Compare commits
335 Commits
c14ae996be
...
v1.0-final
Author | SHA1 | Date | |
---|---|---|---|
701e3c9cf6 | |||
e320f5b02b | |||
5aca84c43b | |||
5b483d5c5d | |||
037f1ff671 | |||
99896a4f77 | |||
624ade2032 | |||
99b123565c | |||
be6de240bb | |||
7cf1819460 | |||
17f0c645f1 | |||
bdd1017232 | |||
f4299c33c1 | |||
f86a14b2f8 | |||
2fb5826a3b | |||
b993700ae4 | |||
5d506a1526 | |||
e87d0d8cdd | |||
fb222c9213 | |||
cf9ab66e68 | |||
cdc372d574 | |||
2290f01a8f | |||
3bc0996c73 | |||
758c6810ab | |||
577a4f72f0 | |||
a2aca7a8ca | |||
3b7317a831 | |||
32921a3f87 | |||
63e9bc2336 | |||
31bff55a20 | |||
5861b61565 | |||
f0c9823e45 | |||
6fbb16fea2 | |||
0d547c8903 | |||
5162e3fc19 | |||
8bfe8b37f5 | |||
2e07d03908 | |||
b9e87f5bd4 | |||
cd641d6cc4 | |||
4e9f7800be | |||
8d27c486d5 | |||
714ac4f1de | |||
186db31b17 | |||
fb53c68be3 | |||
19cf6ccfc5 | |||
7fafd14715 | |||
d5181f149a | |||
a950ecb2b9 | |||
f42a50d24d | |||
33118ddb2f | |||
a6a2adc7db | |||
62df2346c3 | |||
c1a0ecdcf3 | |||
a1abbf5329 | |||
deaf283a98 | |||
ffe9af0633 | |||
2989b54593 | |||
b846b919b7 | |||
1f83a82f17 | |||
cd1a8568e6 | |||
53cdb20091 | |||
9389675b5c | |||
97a7f3a8ad | |||
aa2f42a10a | |||
f128a8b9ed | |||
ffea25c082 | |||
d77b8c046a | |||
8fdfe9cc69 | |||
e5332a3348 | |||
c3eaf5ac11 | |||
fa75beb9c4 | |||
4bef17dc0a | |||
79e4986880 | |||
181a09e16b | |||
f4aae9c581
|
|||
ea0c8c45d6
|
|||
8416783e0a | |||
bcbebe8e8d | |||
a570696795 | |||
187656814e | |||
8c0652b26b
|
|||
ef07447abc | |||
bb7b35dc28 | |||
93cfbb4a27 | |||
68cc35cec3 | |||
b2ee048f25 | |||
020a30474e | |||
4bfc8a2cc6 | |||
0ff873baaa | |||
1812c89994 | |||
2442a477c8
|
|||
ebb3c8c235 | |||
e6c068e71a | |||
86e3ced19b | |||
44df9e4b4f | |||
18cbfbf148 | |||
e037b75f7c | |||
486f237135 | |||
396d3fda14 | |||
3b1d378968 | |||
5a0b303601
|
|||
d5825ba7a0
|
|||
8199bd8a23 | |||
774e62f892
|
|||
e1c00eca8f
|
|||
e904eba7a4 | |||
6284a4d7bf | |||
3b364ae815
|
|||
2ba4968556 | |||
18f35c43e7 | |||
709c80fa37 | |||
87bade71b4 | |||
b6eb66e348 | |||
0a7722d612 | |||
d121532fba
|
|||
985169117d | |||
fa610cae3b | |||
3bb3c5b513 | |||
15616e05f3 | |||
0ab185f143 | |||
1dd4b5cfa5 | |||
266bba095a | |||
fa7bdf2f7e | |||
76550be9e7 | |||
ef8aa826a3 | |||
114453b5b9 | |||
7397698929 | |||
9fa2c1f3a7
|
|||
327ba182f5
|
|||
30226c5c19 | |||
e0e853a575 | |||
d2b98f083b | |||
a41889b2cb | |||
0f7d248d40 | |||
11ade7b8f9 | |||
a664b42853 | |||
56f4ec0dda | |||
1590821f64 | |||
16803d2b12 | |||
938d16301d | |||
5a59ac11b0 | |||
c194f44308 | |||
fc68e231d3 | |||
6d8a36b7ac | |||
49e26039a3 | |||
28834431ce | |||
5691f0eeec | |||
7f643987f3
|
|||
6b8bf25e0e | |||
ebeba72278 | |||
f671baf7f0 | |||
691916894f
|
|||
e7e2017825 | |||
03d557d67b
|
|||
8fff0e2dca
|
|||
6317780dfa | |||
78a7ad053a | |||
f6554629d7 | |||
eb82d05f4f | |||
41320473d9 | |||
bd6be54149 | |||
99612165f5 | |||
9dff6adb3d | |||
445b504188 | |||
bd8b3db7f3 | |||
8a4ff4cfa5 | |||
2245309198 | |||
d078c44027 | |||
bd8b07990b | |||
2f4c45ed71 | |||
b600040bf3 | |||
4f5e1fe185 | |||
f348d33c94
|
|||
6f90b9c941
|
|||
e53c1e0872
|
|||
e138476d76 | |||
c1b9588189 | |||
5e05100d21 | |||
93a5863fbe | |||
7f652e38f0 | |||
0061d25082
|
|||
d4ddd8a9a3 | |||
a192f0ac51 | |||
9660e52f34 | |||
72ddfa42ef | |||
fc239983a7 | |||
5e1170839e | |||
2ef9eb29ac | |||
f4ba79a4cd | |||
976e2d1949 | |||
b7134a60da | |||
ff4c984f54 | |||
21502a0b1c
|
|||
b38ffdea34 | |||
6988d3f213
|
|||
f5ad05f49f
|
|||
e539a9433a | |||
b14c565e81 | |||
b04d627695 | |||
839bebcd89 | |||
3775f96f3f | |||
2394157be8 | |||
922e3cadef | |||
0fb1d5704e | |||
dfa528484c | |||
38fcda708f | |||
9238162a4c | |||
1cb52a20d4 | |||
67c101ebea | |||
657d315850 | |||
e7e3864b4c
|
|||
407229f15d | |||
5d7ecbdfb7 | |||
c8d3ab3ff0 | |||
1b2e75a82c | |||
286edb33ed | |||
1a1502b38c | |||
d55a50ab29
|
|||
e4489ff3a6 | |||
2c2b5c1d0f | |||
e9a3cb51ba | |||
f4b0d6a576
|
|||
2bf383b113
|
|||
ff5b0afc93 | |||
d5540c1979
|
|||
e1df56147b
|
|||
35861d3664 | |||
08dc4bcb47 | |||
a38b817f20 | |||
8a2eff1fe9 | |||
e4d6642d61 | |||
9406bbc4ac | |||
e5b28250c2 | |||
db1d3d31b2 | |||
42a02effa6 | |||
819cca7f2a | |||
846e448f01 | |||
614a929592 | |||
60699ed847 | |||
83ad1f3999 | |||
5b4c0be1c8 | |||
0256c19e8f | |||
adcd840154 | |||
b5495bda3d | |||
106b00a907 | |||
7c73f69865 | |||
7c467c8641 | |||
ffb683bdd0
|
|||
8386629088
|
|||
86a2e5d8c2 | |||
747eb1cde2 | |||
8d65998ac2 | |||
178f98d664 | |||
33ff754b9d | |||
ac79e1cf22 | |||
40013f0812 | |||
77892c9dfc | |||
cff9417dc5 | |||
e571e21281 | |||
019f5d8f1b | |||
620e163a14 | |||
6892a11688
|
|||
fcdf0e776d | |||
a3efa4092a | |||
32c6b8cb68 | |||
525a5f7eb1
|
|||
ba570852a7 | |||
8ede86fdce | |||
caf5430a06 | |||
9a24fa306d | |||
da78ab4990 | |||
9cfb1cd0ad | |||
7686c4cda6 | |||
39eefbdd3e | |||
6e3d1cbcf5 | |||
1ce9a971ba | |||
d8032c2bd7 | |||
4711527971 | |||
b7b5c7a6b3 | |||
5c5df83872 | |||
7b6882b12b | |||
d739b15410 | |||
0c66a713b4 | |||
d0785308d4 | |||
bc350b3177 | |||
8d6a1f4053 | |||
6b9db3eed5 | |||
3f5b1efa0c | |||
d4be2b9e94 | |||
14bef592c4 | |||
0840eda369 | |||
3c69f38367 | |||
39fb735f21 | |||
e0f638f0bd | |||
4f6388e4b9 | |||
2bbf8260f4 | |||
b1840dd845 | |||
dc49bc2e8d | |||
8c777ca1ff | |||
c73435b2a0
|
|||
ea8aaa3931 | |||
56efbd7940 | |||
a98782bc01 | |||
0de35f1a51
|
|||
f403a6e1c4 | |||
d06fd57447 | |||
197a774fb2 | |||
af99e8107d | |||
f2fc51384e | |||
922e21a454
|
|||
c69b20b914 | |||
c92e485018 | |||
62d811db1d | |||
fd9dcf141e | |||
09c85fe8cb | |||
22d2744c8c | |||
bba4173269 | |||
e1d7becc2e | |||
89eaeaed40 | |||
edcdb2e9cf | |||
530034a40e | |||
8f24aee350 | |||
bd2aeb63f6 | |||
713c8ebe86 | |||
e406918ca2 | |||
e167832164 | |||
777786f5b6 | |||
a62e3e8a63 | |||
7f95cef13b | |||
95e52cc79d | |||
d4d1426438 | |||
d1301f6988 | |||
731f4761fa | |||
69b5b33af8
|
|||
8dd4cc4459
|
2
.gitignore
vendored
@ -91,3 +91,5 @@ local.properties
|
||||
prototype/*.db
|
||||
|
||||
prototype/images
|
||||
prototype/data
|
||||
|
||||
|
32
delivery/.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
HELP.md
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**
|
||||
!**/src/test/**
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
30
delivery/build.gradle
Normal file
@ -0,0 +1,30 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.7.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'org.hso.ecommerce'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = '11'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
compile 'org.json:json:20190722'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
BIN
delivery/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
delivery/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Tue May 19 15:50:06 CEST 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
183
delivery/gradlew
vendored
Executable file
@ -0,0 +1,183 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
184
prototype/gradlew.bat → delivery/gradlew.bat
vendored
@ -1,84 +1,100 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
1
delivery/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = 'delivery'
|
11
delivery/src/main/java/org/hso/ecommerce/supplier/App.java
Normal file
@ -0,0 +1,11 @@
|
||||
package org.hso.ecommerce.supplier;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class App {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(App.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package org.hso.ecommerce.supplier;
|
||||
|
||||
|
||||
import org.hso.ecommerce.supplier.data.Delivery;
|
||||
import org.hso.ecommerce.supplier.data.DeliveryManager;
|
||||
import org.hso.ecommerce.supplier.data.ReturnStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@RestController
|
||||
public class RequestController {
|
||||
|
||||
|
||||
|
||||
@PostMapping("/newDelivery")
|
||||
public String supplier(HttpServletResponse response, HttpServletRequest request, @RequestBody Delivery delivery) {
|
||||
DeliveryManager.getInstance().add(delivery);
|
||||
|
||||
return delivery.getUuid();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/status", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ReturnStatus searchArticles(@RequestParam(value = "trackingID") String trackingID, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
Delivery delivery = DeliveryManager.getInstance().getDeliveryByID(trackingID);
|
||||
if (delivery == null) {
|
||||
Delivery lostDelivery = Delivery.lostDelivery(trackingID);
|
||||
DeliveryManager.getInstance().add(lostDelivery);
|
||||
delivery = lostDelivery;
|
||||
}
|
||||
|
||||
return new ReturnStatus(delivery.getStatus(), delivery.getEstimatedArrival());
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package org.hso.ecommerce.supplier.data;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Delivery {
|
||||
|
||||
private String[] states = {"Bestellung eingegangen", "Bestellung auf dem Weg", "Lieferung erfolgreich"};
|
||||
private int[] timeBorder = {4, 24};
|
||||
|
||||
private String name;
|
||||
private String address;
|
||||
|
||||
// Why is this a string and creationTime a Date?!
|
||||
private String estimatedArrival;
|
||||
|
||||
private Date creationTime;
|
||||
private String uuid;
|
||||
|
||||
public Delivery(String name, String address) {
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.creationTime = new Date();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
|
||||
this.estimatedArrival = formatter.format(addDays((Date) this.creationTime.clone(), 1));
|
||||
}
|
||||
|
||||
public static Delivery lostDelivery(String uuid) {
|
||||
Delivery delivery = new Delivery("", "");
|
||||
delivery.uuid = uuid;
|
||||
delivery.creationTime = addDays(new Date(), -1);
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
|
||||
delivery.estimatedArrival = formatter.format(addDays((Date) delivery.creationTime.clone(), 1));
|
||||
return delivery;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
Date now = new Date();
|
||||
long timeNow = now.getTime();
|
||||
long creationTime = this.creationTime.getTime();
|
||||
|
||||
// Wow, that's how calculate date diffs.
|
||||
long diff = timeNow - creationTime;
|
||||
double hour = (((diff / 1000.0) / 3600.0));
|
||||
|
||||
for (int i = 0; i < timeBorder.length; i++) {
|
||||
|
||||
if (hour < timeBorder[i])
|
||||
return states[i];
|
||||
}
|
||||
|
||||
return states[timeBorder.length];
|
||||
}
|
||||
|
||||
public String getEstimatedArrival() {
|
||||
|
||||
return estimatedArrival;
|
||||
}
|
||||
|
||||
private static Date addDays(Date date, int days) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.DATE, days);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package org.hso.ecommerce.supplier.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class DeliveryManager {
|
||||
|
||||
private HashMap<String, Delivery> deliveryList;
|
||||
private static DeliveryManager deliveryManager;
|
||||
|
||||
private DeliveryManager()
|
||||
{
|
||||
deliveryList = new HashMap<>();
|
||||
}
|
||||
|
||||
public static DeliveryManager getInstance() {
|
||||
|
||||
if (DeliveryManager.deliveryManager == null) {
|
||||
DeliveryManager.deliveryManager = new DeliveryManager();
|
||||
}
|
||||
return DeliveryManager.deliveryManager;
|
||||
}
|
||||
|
||||
public void add(Delivery delivery) {
|
||||
deliveryList.put(delivery.getUuid(), delivery);
|
||||
}
|
||||
|
||||
public Delivery getDeliveryByID(String uuid) {
|
||||
return deliveryList.getOrDefault(uuid, null);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.hso.ecommerce.supplier.data;
|
||||
|
||||
public class ReturnStatus {
|
||||
|
||||
private String status;
|
||||
private String estimatedArrival;
|
||||
|
||||
public ReturnStatus(String status, String estimatedArrival) {
|
||||
this.status = status;
|
||||
this.estimatedArrival = estimatedArrival;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getEstimatedArrival() {
|
||||
return estimatedArrival;
|
||||
}
|
||||
}
|
2
delivery/src/main/resources/application.properties
Normal file
@ -0,0 +1,2 @@
|
||||
server.address=::1
|
||||
server.port=8082
|
123485
doc/charter/charter.fodt
@ -1,479 +0,0 @@
|
||||
:root {
|
||||
font-family: "Fira Sans";
|
||||
line-height: 1.15;
|
||||
|
||||
--u5: calc(1em * 1.5 * 1.5 * 1.5 * 1.5 * 1.5 );
|
||||
--u4: calc(1em * 1.5 * 1.5 * 1.5 * 1.5);
|
||||
--u3: calc(1em * 1.5 * 1.5 * 1.5);
|
||||
--u2: calc(1em * 1.5 * 1.5);
|
||||
--u1: calc(1em * 1.5);
|
||||
--u0: calc(1em);
|
||||
--u-1: calc(1em * 0.666);
|
||||
--u-2: calc(1em * 0.666 * 0.666);
|
||||
--u-3: calc(1em * 0.666 * 0.666 * 0.666);
|
||||
--u-4: calc(1em * 0.666 * 0.666 * 0.666 * 0.666);
|
||||
|
||||
|
||||
--root-c-base: #ecf0f1;
|
||||
--root-c-base-highlight: #bdc3c7;
|
||||
|
||||
--root-c-primary: #1abc9c;
|
||||
--root-c-primary-highlight: #16a085;
|
||||
|
||||
--root-c-secondary: #9b59b6;
|
||||
--root-c-secondary-highlight: #8e44ad;
|
||||
|
||||
--root-c-black: #2c3e50;
|
||||
--root-c-black-highlight: #34495e;
|
||||
|
||||
|
||||
--c-base: var(--root-c-base);
|
||||
--c-base-highlight: var(--root-c-base-highlight);
|
||||
|
||||
--c-primary:var(--root-c-primary);
|
||||
--c-primary-highlight: var(--root-c-primary-highlight);
|
||||
|
||||
--c-secondary: var(--c-secondary);
|
||||
--c-secondary-highlight: var(--root-c-secondary-highlight);
|
||||
|
||||
--c-black: var(--root-c-black);
|
||||
--c-black-highlight: var(--root-c-black-highlight);
|
||||
}
|
||||
|
||||
.primary {
|
||||
--c-base: var(--root-c-base);
|
||||
--c-base-highlight: var(--root-c-base-highlight);
|
||||
|
||||
--c-primary:var(--root-c-primary);
|
||||
--c-primary-highlight: var(--root-c-primary-highlight);
|
||||
|
||||
--c-secondary: var(--c-secondary);
|
||||
--c-secondary-highlight: var(--root-c-secondary-highlight);
|
||||
|
||||
--c-black: var(--root-c-black);
|
||||
--c-black: var(--root-c-black-highlight);
|
||||
}
|
||||
|
||||
.secondary {
|
||||
--c-base: var(--root-c-base);
|
||||
--c-base-highlight: var(--root-c-base-highlight);
|
||||
|
||||
--c-primary:var(--root-c-secondary);
|
||||
--c-primary-highlight: var(--root-c-secondary-highlight);
|
||||
|
||||
--c-secondary: var(--root-c-primary);
|
||||
--c-secondary-highlight: var(--root-c-primary-highlight);
|
||||
|
||||
--c-black: var(--root-c-black);
|
||||
--c-black-highlight: var(--root-c-black-highlight);
|
||||
}
|
||||
|
||||
.inverted {
|
||||
--c-base: var(--root-c-black);
|
||||
--c-base-highlight: var(--root-c-black-highlight);
|
||||
|
||||
--c-primary:var(--root-c-primary);
|
||||
--c-primary-highlight: var(--root-c-primary-highlight);
|
||||
|
||||
--c-secondary: var(--c-secondary);
|
||||
--c-secondary-highlight: var(--root-c-secondary-highlight);
|
||||
|
||||
--c-black: var(--root-c-base);
|
||||
--c-black-highlight: var(--root-c-base-highlight);
|
||||
}
|
||||
|
||||
|
||||
* {
|
||||
margin: 0em;
|
||||
padding: 0em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-size: var(--u0);
|
||||
height: 100%;
|
||||
background-color: var(--c-base);
|
||||
color: var(--c-black)
|
||||
}
|
||||
|
||||
main {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
font-family: "Fira Mono";
|
||||
padding-top: 1em;
|
||||
padding-bottom: 0.618em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
p {
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: var(--u2);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: var(--u1);
|
||||
}
|
||||
|
||||
h3, h4, h5 {
|
||||
font-size: var(--u0);
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table td,
|
||||
table th {
|
||||
padding: var(--u0);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: var(--c-primary);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
table tr:nth-child(2n+1) {
|
||||
background-color: var(--c-base-highlight);
|
||||
}
|
||||
|
||||
/*
|
||||
* NAV
|
||||
*/
|
||||
|
||||
nav {
|
||||
|
||||
}
|
||||
|
||||
nav h1 {
|
||||
font-size: var(--u0);
|
||||
margin: 0rem;
|
||||
}
|
||||
|
||||
nav li {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
nav li li {
|
||||
margin-left: var(--u0);
|
||||
}
|
||||
|
||||
nav li a {
|
||||
padding: var(--u0);
|
||||
transition: all 0.1s ease-out;
|
||||
}
|
||||
|
||||
nav li a:hover,
|
||||
nav li a.selected {
|
||||
padding: var(--u0);
|
||||
background-color: var(--c-primary);
|
||||
color: var(--c-base);
|
||||
}
|
||||
/*
|
||||
* FOOTER
|
||||
*/
|
||||
|
||||
footer {
|
||||
padding-top: var(--u3);
|
||||
padding-bottom: var(--u1);
|
||||
}
|
||||
|
||||
/*
|
||||
* INPUTS
|
||||
*/
|
||||
|
||||
form * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
|
||||
background-color: var(--c-base);
|
||||
|
||||
border: none;
|
||||
|
||||
border-radius: var(--u-2);
|
||||
margin-top: var(--u0);
|
||||
margin-bottom: var(--u0);
|
||||
|
||||
padding: var(--u0);
|
||||
font-size: var(--u0);
|
||||
color: var(--c-black);
|
||||
|
||||
/* box-shadow: var(--s-0-secondary); */
|
||||
}
|
||||
|
||||
input[type="text"]::placeholder,
|
||||
input[type="password"]::placeholder {
|
||||
color: var(--c-primary-highlight);
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
button, .button {
|
||||
font-family: "Fira Mono";
|
||||
font-weight: bold;
|
||||
|
||||
background-color: var(--c-primary);
|
||||
color: var(--c-base);
|
||||
|
||||
border: none;
|
||||
border-radius: var(--u-2);
|
||||
|
||||
margin-bottom: var(--u0);
|
||||
margin-top: var(--u0);
|
||||
|
||||
padding: var(--u0);
|
||||
|
||||
min-width: 10em;
|
||||
|
||||
font-family: "Fira Mono";
|
||||
text-transform: uppercase;
|
||||
font-size: var(--u0);
|
||||
|
||||
/* box-shadow: var(--s-0-secondary); */
|
||||
}
|
||||
|
||||
button:active, .button:active {
|
||||
background-color: var(--c-primary-highlight);
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
button,
|
||||
.button {
|
||||
transition: all 0.1s ease-out;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
min-width: 10em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*
|
||||
* HERO
|
||||
*/
|
||||
|
||||
.hero {
|
||||
background-color: var(--c-primary);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
.hero-black {
|
||||
background-color: var(--c-black);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
/*
|
||||
* LAYOUT
|
||||
*/
|
||||
|
||||
.content-width {
|
||||
max-width: 80rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
padding-left: var(--u0);
|
||||
padding-right: var(--u0);
|
||||
}
|
||||
|
||||
.bar-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.bar-flex > * {
|
||||
margin: var(--u0);
|
||||
}
|
||||
|
||||
.bar-flex > .spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar-layout {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.sidebar-layout > *:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grid.vertical-center {
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.grid.center {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.grid > * {
|
||||
flex: 1;
|
||||
margin: var(--u0);
|
||||
padding: var(--u0);
|
||||
border-radius: var(--u0);
|
||||
}
|
||||
|
||||
.grid.base > * {
|
||||
background-color: var(--c-base);
|
||||
color: var(--c-black);
|
||||
}
|
||||
|
||||
.grid.black > * {
|
||||
background-color: var(--c-black);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
.grid.primary > * {
|
||||
background-color: var(--c-primary);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
.grid.secondary > * {
|
||||
background-color: var(--c-primary-highlight);
|
||||
color: var(--c-base);
|
||||
}
|
||||
|
||||
.hero-primary .grid.shadow > * {
|
||||
/* box-shadow: var(--s-0-secondary); */
|
||||
}
|
||||
|
||||
.hero-black .grid.shadow > * {
|
||||
/* box-shadow: var(--s-0-secondary); */
|
||||
}
|
||||
|
||||
.grid.s > .spacer {
|
||||
box-shadow: none;
|
||||
|
||||
margin: calc(var(--u0) * 2);
|
||||
padding: 0px;
|
||||
|
||||
width: 10rem;
|
||||
max-width: 10rem;
|
||||
min-width: 7.5rem;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.grid.s > * {
|
||||
max-width: 10rem;
|
||||
min-width: 7.5rem;
|
||||
}
|
||||
|
||||
|
||||
.grid.m > .spacer {
|
||||
box-shadow: none;
|
||||
|
||||
margin: calc(var(--u0) * 2);
|
||||
padding: 0px;
|
||||
|
||||
width: 20rem;
|
||||
max-width: 20rem;
|
||||
min-width: 15rem;
|
||||
height: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.grid.m > * {
|
||||
width: 20rem;
|
||||
max-width: 20rem;
|
||||
min-width: 15rem;
|
||||
}
|
||||
|
||||
.grid.l > .spacer {
|
||||
box-shadow: none;
|
||||
|
||||
margin: calc(var(--u0) * 2);
|
||||
padding: 0px;
|
||||
|
||||
width: 40rem;
|
||||
max-width: 40rem;
|
||||
min-width: 15rem;
|
||||
height: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.grid.l > * {
|
||||
width: 40rem;
|
||||
max-width: 40rem;
|
||||
min-width: 15rem;
|
||||
}
|
||||
|
||||
.vertical-spacer.s {
|
||||
min-height: 10rem;
|
||||
}
|
||||
|
||||
.vertical-spacer.m {
|
||||
min-height: 20rem;
|
||||
}
|
||||
|
||||
.vertical-spacer.l {
|
||||
min-height: 40rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Impov
|
||||
*/
|
||||
|
||||
.input-icon {
|
||||
/* box-shadow: var(--s-0-secondary); */
|
||||
display: flex;
|
||||
padding: 0px;
|
||||
|
||||
border-radius: var(--u0);
|
||||
}
|
||||
|
||||
.input-icon > input {
|
||||
flex: 1;
|
||||
margin: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.input-icon > button {
|
||||
margin: 0px;
|
||||
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CONTENT
|
||||
*/
|
||||
|
||||
.price {
|
||||
opacity: 75%;
|
||||
font-size: var(--u1);
|
||||
text-align: right;
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Frontpage</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/ecom.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<nav class='hero'>
|
||||
<div class='content-width bar-flex'>
|
||||
<h1>Project eCommerce</h1>
|
||||
<button>Angebote</button>
|
||||
<div class='spacer input-icon secondary'>
|
||||
<input type="text" placeholder="Nach Produkten suchen..."/>
|
||||
<button>Finden</button>
|
||||
</div>
|
||||
<button>Login</button>
|
||||
</div>
|
||||
</nav>
|
||||
<main>
|
||||
<div class='hero'>
|
||||
<div class='content-width'>
|
||||
<h1>Angebote</h1>
|
||||
<div class='grid m base shadow'>
|
||||
|
||||
<section>
|
||||
<img src="pics/product-1.jpg">
|
||||
<h2>Lorem Ipsum</h2>
|
||||
<p class='price'> 25.14 €</p>
|
||||
<p>
|
||||
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="pics/product-2.jpg">
|
||||
<h2>Lorem Ipsum</h2>
|
||||
<p class='price'> 10.14 €</p>
|
||||
<p>
|
||||
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="pics/product-1.jpg">
|
||||
<h2>Lorem Ipsum</h2>
|
||||
<p class='price'> 25.14 €</p>
|
||||
<p>
|
||||
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="pics/product-2.jpg">
|
||||
<h2>Lorem Ipsum</h2>
|
||||
<p class='price'> 10.14 €</p>
|
||||
<p>
|
||||
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="pics/product-3.jpg">
|
||||
<h2>Lorem Ipsum</h2>
|
||||
<p class='price'> 44.14 €</p>
|
||||
<p>
|
||||
|
||||
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte.
|
||||
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vertical-spacer s"></div>
|
||||
</div>
|
||||
|
||||
<div class=''>
|
||||
<div class='content-width'>
|
||||
<h1>Personalisierte Empfehlungen</h1>
|
||||
<div class="grid l">
|
||||
<img src="undraw/undraw_successful_purchase_secondary.svg"/>
|
||||
<div>
|
||||
<h2>Werde jetzt Kunde</h2>
|
||||
<p> Jetzt Kunde werden und viele Vorteile sichern,
|
||||
wie z.B. personalisierte Empfehlungen. </p>
|
||||
<button>Registieren</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vertical-spacer s"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="hero-black">
|
||||
<div class='content-width bar-flex'>
|
||||
<h3>Project eCommerce</h3>
|
||||
<div class="spacer"></div>
|
||||
<div>
|
||||
<h4>Seite</h4>
|
||||
<ul>
|
||||
<li><a>Login</a></li>
|
||||
<li><a>Angebote</a></li>
|
||||
<li><a>Suche</a></li>
|
||||
<li><a>Mitarbeiter Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Mehr</h4>
|
||||
<ul>
|
||||
<li><a>Nutzungsbedingungen</a></li>
|
||||
<li><a>Datenschutz</a></li>
|
||||
<li><a>Über</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@ -1,158 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Frontpage</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/ecom.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<nav class='hero'>
|
||||
<div class='content-width bar-flex'>
|
||||
<h1>Project eCommerce</h1>
|
||||
<button>Angebote</button>
|
||||
<div class='spacer input-icon secondary'>
|
||||
<input type="text" placeholder="Nach Produkten suchen..."/>
|
||||
<button>Finden</button>
|
||||
</div>
|
||||
<button>Login</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a>Dashboard</a>
|
||||
<ul>
|
||||
<li><a>Artikel</a></li>
|
||||
<li><a>Umsatzsteuer</a></li>
|
||||
<li><a class='selected'>Geldbuchungen</a></li>
|
||||
<li><a>Einstellungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a>Lieferanten</a>
|
||||
<ul>
|
||||
<li><a>Warenbuchungen</a></li>
|
||||
<li><a>Geldbuchungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a>Lager</a>
|
||||
<ul>
|
||||
<li><a>Bestandsbuchungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a>Kunden</a>
|
||||
<ul>
|
||||
<li><a>Bestellungen</a></li>
|
||||
<li><a>Geldbuchungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="content-width">
|
||||
<h1>Geldbuchungen</h1>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Datum</th>
|
||||
<th>Betrag</th>
|
||||
<th>Gegenkonto</th>
|
||||
<th>Betreff</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>#100</td>
|
||||
<td>2019-10-08</td>
|
||||
<td>100,50 €</td>
|
||||
<td>Lieferant: Hans</td>
|
||||
<td>Bestellungen: #41</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<p>
|
||||
<a class="button">Manuelle Buchung</a>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="hero-black">
|
||||
<div class='content-width bar-flex'>
|
||||
<h3>Project eCommerce</h3>
|
||||
<div class="spacer"></div>
|
||||
<div>
|
||||
<h4>Seite</h4>
|
||||
<ul>
|
||||
<li><a>Login</a></li>
|
||||
<li><a>Angebote</a></li>
|
||||
<li><a>Suche</a></li>
|
||||
<li><a>Mitarbeiter Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Mehr</h4>
|
||||
<ul>
|
||||
<li><a>Nutzungsbedingungen</a></li>
|
||||
<li><a>Datenschutz</a></li>
|
||||
<li><a>Über</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@ -1,48 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Frontpage</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/ecom.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div class='grid m center vertical-center'>
|
||||
<form class='hero primary'>
|
||||
<p>
|
||||
<label>Nutzername</label>
|
||||
<input type="text" placeholder=""/>
|
||||
</p>
|
||||
<p>
|
||||
<label>Passwort</label>
|
||||
<input type="password" placeholder=""/>
|
||||
</p>
|
||||
<button class='secondary'>Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer class="hero-black">
|
||||
<div class='content-width bar-flex'>
|
||||
<h3>Project eCommerce</h3>
|
||||
<div class="spacer"></div>
|
||||
<div>
|
||||
<h4>Seite</h4>
|
||||
<ul>
|
||||
<li><a>Login</a></li>
|
||||
<li><a>Angebote</a></li>
|
||||
<li><a>Suche</a></li>
|
||||
<li><a>Mitarbeiter Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Mehr</h4>
|
||||
<ul>
|
||||
<li><a>Nutzungsbedingungen</a></li>
|
||||
<li><a>Datenschutz</a></li>
|
||||
<li><a>Über</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB |
BIN
prototype/gradle/wrapper/gradle-wrapper.jar
vendored
@ -1,6 +0,0 @@
|
||||
INSERT INTO article_offers ("manufacturer", "article_number", "vat_percent")
|
||||
VALUES ("McDonalds", "1", 7);
|
||||
|
||||
INSERT INTO articles ("related_id", "shop_price_per_unit_net_cent", "warehouse_units_per_slot", "should_reorder", "reorder_max_price", "title", "description", "image_id")
|
||||
VALUES (1, 19.99, 10, 1, 15, "Huge Hamburger", "This huge Hamburger is awesome!", NULL);
|
||||
|
@ -1,11 +0,0 @@
|
||||
package org.hso.ecommerce.action.shop;
|
||||
|
||||
import org.hso.ecommerce.entities.shop.CustomerOrder;
|
||||
|
||||
public class EnableTrackingAction {
|
||||
|
||||
public static void addTrackingInfo(CustomerOrder customerOrder) {
|
||||
// TODO:
|
||||
customerOrder.trackingId = "555-NASE";
|
||||
}
|
||||
}
|
@ -1,278 +0,0 @@
|
||||
package org.hso.ecommerce.app;
|
||||
|
||||
import org.hso.ecommerce.repos.user.UserRepository;
|
||||
import org.hso.ecommerce.entities.user.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* TODO clean up this class
|
||||
*/
|
||||
@Controller
|
||||
public class RequestController {
|
||||
|
||||
@Autowired
|
||||
private final UserRepository userRepository = null;
|
||||
|
||||
static int notSoRandom = 0;
|
||||
|
||||
// @GetMapping("/")
|
||||
// public String home() {
|
||||
// return "redirect:/shop/";
|
||||
// }
|
||||
|
||||
@GetMapping("/login")
|
||||
public String login() {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public String loginPost(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@RequestParam("username") String username,
|
||||
@RequestParam("password") String password,
|
||||
HttpSession session
|
||||
) {
|
||||
String gto = (String) session.getAttribute("afterLogin");
|
||||
|
||||
Optional<User> user = userRepository.findByEmail(username);
|
||||
if (!user.isPresent()) {
|
||||
request.setAttribute("error", "Email Adresse falsch.");
|
||||
response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
|
||||
return "login";
|
||||
}
|
||||
|
||||
if (!user.get().validatePassword(password)) {
|
||||
request.setAttribute("error", "Passwort falsch.");
|
||||
response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
|
||||
return "login";
|
||||
}
|
||||
|
||||
session.setAttribute("userId", user.get().getId());
|
||||
|
||||
if (gto != null && gto.startsWith("/")) {
|
||||
return "redirect:" + gto;
|
||||
} else {
|
||||
return "redirect:/";
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/logout")
|
||||
public String logoutPost(HttpServletResponse response,
|
||||
HttpSession session
|
||||
) {
|
||||
session.removeAttribute("userId");
|
||||
return "redirect:/";
|
||||
}
|
||||
|
||||
@GetMapping("/register")
|
||||
public String register() {
|
||||
return "register";
|
||||
}
|
||||
|
||||
@PostMapping("/register")
|
||||
public String registerPost(
|
||||
@RequestParam("username") String username,
|
||||
@RequestParam("password") String password,
|
||||
@RequestParam("password2") String password2,
|
||||
@RequestParam("type") String type
|
||||
) {
|
||||
|
||||
return "redirect:/";
|
||||
}
|
||||
|
||||
// @GetMapping("/shop/")
|
||||
// public String shop() {
|
||||
// return "shop/index";
|
||||
// }
|
||||
|
||||
@GetMapping("/shop/search")
|
||||
public String shopSearch() {
|
||||
return "shop/search";
|
||||
}
|
||||
|
||||
/* @GetMapping("/shop/checkout")
|
||||
public String shopCheckout(HttpSession session, HttpServletRequest request) {
|
||||
session.setAttribute("afterLogin", request.getRequestURI());
|
||||
return "shop/checkout";
|
||||
}
|
||||
|
||||
@PostMapping("/shop/checkoutFinish")
|
||||
public String shopCheckoutFinish() {
|
||||
return "shop/checkoutFinish";
|
||||
}
|
||||
|
||||
@GetMapping("/shop/checkoutFinish")
|
||||
public String shopCheckoutFinishGET() {
|
||||
return "shop/checkoutFinish";
|
||||
}*/
|
||||
|
||||
// @GetMapping("/shop/articles/{id}")
|
||||
// public String shopArticlesById() {
|
||||
// return "shop/articles/id";
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/shop/articles/{id}")
|
||||
// public String shopArticlesByIdBuy(HttpSession session,
|
||||
// @RequestAttribute(value = "user", required = false) User customer,
|
||||
// @PathVariable("id") Integer id,
|
||||
// @RequestParam("fastcheckout") Boolean fastcheckout
|
||||
// ) {
|
||||
// if (customer != null) {
|
||||
// if (!fastcheckout) {
|
||||
// return "shop/articles/post_add";
|
||||
// } else {
|
||||
// return "shop/checkout";
|
||||
// }
|
||||
// } else {
|
||||
// session.setAttribute("afterLogin", "/shop/articles/" + id);
|
||||
// return "redirect:/login";
|
||||
// }
|
||||
// }
|
||||
|
||||
// @GetMapping("/about")
|
||||
// public String about() {
|
||||
// return "about";
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/terms")
|
||||
// public String terms() {
|
||||
// return "terms";
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/privacy")
|
||||
// public String privacy() {
|
||||
// return "privacy";
|
||||
// }
|
||||
|
||||
|
||||
@GetMapping("/intern/")
|
||||
public String intern() {
|
||||
return "intern/index";
|
||||
}
|
||||
/*
|
||||
|
||||
@GetMapping("/intern/listedArticles/")
|
||||
public String internListedArticles() {
|
||||
return "intern/listedArticles/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/listedArticles/{id}")
|
||||
public String internListedArticlesId() {
|
||||
return "intern/listedArticles/id";
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
@GetMapping("/intern/articles/")
|
||||
public String internArticles() {
|
||||
return "intern/articles/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/articles/{id}")
|
||||
public String internArticlesId() {
|
||||
return "intern/articles/id";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/customers/")
|
||||
public String internCustomers() {
|
||||
return "intern/customers/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/customers/{id}")
|
||||
public String internCustomersId() {
|
||||
return "intern/customers/id";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/customerOrders/")
|
||||
public String internCustomerOrder() {
|
||||
return "intern/customerOrders/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/customerOrders/{id}")
|
||||
public String internCustomerOrdersId() {
|
||||
return "intern/customerOrders/id";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/suppliers/")
|
||||
public String internSuppliers() {
|
||||
return "intern/suppliers/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/suppliers/{id}")
|
||||
public String internSuppliersId() {
|
||||
return "intern/suppliers/id";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/supplierOrders/")
|
||||
public String internSupplierOrders() {
|
||||
return "intern/supplierOrders/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/supplierOrders/{id}")
|
||||
public String internSupplierOrdersId() {
|
||||
return "intern/supplierOrders/id";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/accounting/")
|
||||
public String accounting() {
|
||||
return "intern/accounting/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/accounting/vat")
|
||||
public String accountingVat() {
|
||||
return "intern/accounting/vat";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/accounting/main")
|
||||
public String accountingIntern() {
|
||||
return "intern/accounting/main";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/accounting/addManual")
|
||||
public String accountingAddManual() {
|
||||
return "intern/accounting/addManual";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/warehouse/")
|
||||
public String accountingWarehouse() {
|
||||
return "intern/warehouse/index";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/warehouse/todo")
|
||||
public String accountingWarehouseTodo() {
|
||||
return "intern/warehouse/todo";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/warehouse/addManual")
|
||||
public String accountingWarehouseAddManual() {
|
||||
return "intern/warehouse/addManual";
|
||||
}
|
||||
|
||||
@PostMapping("/intern/warehouse/progress/{id}")
|
||||
public String accountingWarehouseProgressIdPost(HttpServletResponse response) {
|
||||
if ((notSoRandom++) % 2 == 1) {
|
||||
return "redirect:/intern/warehouse/progress/450";
|
||||
} else {
|
||||
response.setStatus(409);
|
||||
return "intern/warehouse/error_progress_failed";
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/intern/warehouse/progress/{id}")
|
||||
public String accountingWarehouseProgressId() {
|
||||
return "intern/warehouse/id_progress";
|
||||
}
|
||||
|
||||
@GetMapping("/intern/warehouse/slots/")
|
||||
public String accountingWarehouseSlots() {
|
||||
return "intern/warehouse/slots/index";
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package org.hso.ecommerce.app;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("user")
|
||||
public class UserRequestController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String user() {
|
||||
return "redirect:/user/settings";
|
||||
}
|
||||
|
||||
@GetMapping("/settings")
|
||||
public String userSettings() {
|
||||
return "user/settings";
|
||||
}
|
||||
|
||||
@GetMapping("/orders/")
|
||||
public String userOrdeers() {
|
||||
return "user/orders/index";
|
||||
}
|
||||
|
||||
@GetMapping("/bonuspoints")
|
||||
public String userBonuspoints() {
|
||||
return "user/bonuspoints";
|
||||
}
|
||||
|
||||
@GetMapping("/notifications/")
|
||||
public String userNotifications() {
|
||||
return "user/notifications/index";
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class BookingController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class LoginController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class UserController {
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hso.ecommerce.entities.shop.Article;
|
||||
import org.hso.ecommerce.repos.shop.ArticleRepository;
|
||||
import org.hso.ecommerce.repos.warehouse.WarehouseBookingPositionSlotEntryRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("intern/listedArticles")
|
||||
public class InternArticleController
|
||||
{
|
||||
@Autowired
|
||||
private final ArticleRepository articleRepository = null;
|
||||
|
||||
@Autowired
|
||||
private final WarehouseBookingPositionSlotEntryRepository warehouseEntryRepository = null;
|
||||
|
||||
@GetMapping("/")
|
||||
public String internListedArticles(Model model)
|
||||
{
|
||||
|
||||
List<ListedArticlesListTotals> totals = new ArrayList<ListedArticlesListTotals>();
|
||||
|
||||
for (Article article : articleRepository.findAll()) {
|
||||
ListedArticlesListTotals tmp = new ListedArticlesListTotals();
|
||||
tmp.addListedArticle(article,
|
||||
warehouseEntryRepository.getArticleStock(article.id).orElse(0));
|
||||
totals.add(tmp);
|
||||
}
|
||||
|
||||
model.addAttribute("ListedArticles", totals);
|
||||
return "intern/listedArticles/index";
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public String internListedArticlesId()
|
||||
{
|
||||
return "intern/listedArticles/id";
|
||||
}
|
||||
|
||||
public static class ListedArticlesListTotals
|
||||
{
|
||||
|
||||
public String imgPath;
|
||||
|
||||
public String title;
|
||||
|
||||
public String price;
|
||||
|
||||
public String price_netto;
|
||||
|
||||
public String categorie;
|
||||
|
||||
public int stock;
|
||||
|
||||
public long offer_id;
|
||||
|
||||
public long id;
|
||||
|
||||
void addListedArticle(Article article, int stock)
|
||||
{
|
||||
this.imgPath = article.image.path;
|
||||
this.title = article.title;
|
||||
this.price_netto = String.format("%.2f",
|
||||
((float) article.shopPricePerUnitNetCent / 100));
|
||||
this.price = String.format("%.2f",
|
||||
((float) article.getPriceGross() / 100));
|
||||
this.categorie = article.getCategories();
|
||||
this.stock = stock;
|
||||
this.offer_id = article.related.id;
|
||||
this.id = article.id;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class InternIndexController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class WarehouseController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern.customers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class CustomerOrderController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern.customers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class CustomersIndexController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern.suppliers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class SupplierIndexController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern.suppliers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class SupplierOfferController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.intern.suppliers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class SupplierOrderController {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package org.hso.ecommerce.controller.shop;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
//@RequestMapping("...")
|
||||
public class ShopSearchController {
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
package org.hso.ecommerce.entities.shop;
|
||||
|
||||
import org.hso.ecommerce.entities.supplier.ArticleOffer;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@Entity
|
||||
@Table(name = "articles")
|
||||
public class Article
|
||||
{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Basic
|
||||
public long id;
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
public ArticleOffer related;
|
||||
|
||||
public int shopPricePerUnitNetCent;
|
||||
|
||||
public int warehouseUnitsPerSlot;
|
||||
|
||||
public boolean shouldReorder;
|
||||
|
||||
public int reorderMaxPrice;
|
||||
|
||||
@NotNull
|
||||
public String title;
|
||||
|
||||
@NotNull
|
||||
public String description;
|
||||
|
||||
@OneToOne(optional = true)
|
||||
@Basic(fetch = FetchType.LAZY)
|
||||
public Image image;
|
||||
|
||||
@ManyToMany
|
||||
@JoinTable(name = "article_categories_bindings")
|
||||
public Set<Category> categories = new HashSet<>();
|
||||
|
||||
public String getCategories()
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (Category temp : categories) {
|
||||
result.append(temp.name);
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public int getVat()
|
||||
{
|
||||
return (shopPricePerUnitNetCent * related.vatPercent) / 100;
|
||||
}
|
||||
|
||||
public int getPriceGross()
|
||||
{
|
||||
return shopPricePerUnitNetCent + getVat();
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package org.hso.ecommerce.entities.warehouse;
|
||||
|
||||
import org.hso.ecommerce.entities.shop.CustomerOrder;
|
||||
import org.hso.ecommerce.entities.supplier.SupplierOrder;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "warehouse_booking_reasons")
|
||||
public class WarehouseBookingReason {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Basic
|
||||
public long id;
|
||||
|
||||
public String comment;
|
||||
|
||||
@ManyToOne(optional = true)
|
||||
public SupplierOrder causeSupplierOrder;
|
||||
|
||||
@ManyToOne(optional = true)
|
||||
public CustomerOrder customerOrder;
|
||||
|
||||
public boolean isManuel;
|
||||
|
||||
public WarehouseBookingReason() {
|
||||
}
|
||||
|
||||
public WarehouseBookingReason(CustomerOrder order) {
|
||||
this.customerOrder = order;
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package org.hso.ecommerce.repos.booking;
|
||||
|
||||
import org.hso.ecommerce.entities.booking.Booking;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface BookingRepository extends JpaRepository<Booking, Long> {
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
package org.hso.ecommerce.repos.shop;
|
||||
|
||||
import org.hso.ecommerce.entities.shop.Article;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface ArticleRepository extends JpaRepository<Article, Long>
|
||||
{
|
||||
|
||||
@Query("SELECT a FROM Article a WHERE a.id = :articleId")
|
||||
Article findArticleById(@Param("articleId") long articleId);
|
||||
|
||||
@Query("SELECT a FROM Article a")
|
||||
List<Article> findAll();
|
||||
|
||||
@Query("SELECT a FROM Article a JOIN a.related ao WHERE ao.should_be_advertised = true")
|
||||
List<Article> getAdvertisedArticles();
|
||||
|
||||
@Query("SELECT a FROM CustomerOrderPosition cop JOIN cop.order co JOIN co.customer c JOIN cop.article a ORDER BY co.id DESC")
|
||||
List<Article> getOrderedArticles();
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package org.hso.ecommerce.repos.shop;
|
||||
|
||||
import org.hso.ecommerce.entities.shop.CustomerOrder;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface CustomerOderRepository extends JpaRepository<CustomerOrder, Long> {
|
||||
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
package org.hso.ecommerce.repos.user;
|
||||
|
||||
import org.hso.ecommerce.entities.user.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
|
||||
@Query("SELECT c FROM User c WHERE c.email = :email")
|
||||
Optional<User> findByEmail(String email);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
package org.hso.ecommerce.repos.warehouse;
|
||||
|
||||
import org.hso.ecommerce.entities.warehouse.WarehouseBookingPositionSlotEntry;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface WarehouseBookingPositionSlotEntryRepository extends JpaRepository<WarehouseBookingPositionSlotEntry, Long> {
|
||||
|
||||
// TODO this is wrong. revisit.
|
||||
// @Query("SELECT e FROM WarehouseBookingPositionSlotEntry e, Slot s WHERE e.slot = s AND e.article = :article GROUP BY e.slot.slotNum HAVING max(e.id)")
|
||||
@Query(value = "Select e.id, e.article_id, e.new_sum_slot, e.slot_id from warehouse_booking_position_entries as e, warehouse_slots as s where e.slot_id = s.id AND e.article_id = :article GROUP BY s.slot_num HAVING max(e.id)", nativeQuery = true)
|
||||
List<WarehouseBookingPositionSlotEntry> getByArticle(long article);
|
||||
|
||||
|
||||
@Query(value = "SELECT SUM(w.new_sum_articles) FROM warehouse_booking_position_entries as w WHERE w.article_id = :articleid", nativeQuery = true)
|
||||
Optional<Integer> getArticleStock(long articleid);
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.7 KiB |
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>e-commerce</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:fragment="sidebar">
|
||||
<h1>Kategorien</h1>
|
||||
<ul class="secondary">
|
||||
<li><a href="/shop/search">Aufnahmegeräte</a></li>
|
||||
<li><a href="/shop/search">Computer</a></li>
|
||||
<li><a href="/shop/search">Fernseher</a></li>
|
||||
<li><a href="/shop/search">Handys</a></li>
|
||||
<li><a href="/shop/search">Unterhaltungselektronik</a></li>
|
||||
<li><a href="/shop/search">Sonstiges</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</body>
|
||||
</html>
|
@ -1,140 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Händlerangebote</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Übersicht der von Lieferanten angebotenen Artikel</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zur Übersicht der von Lieferanten angebotenen Artikel."
|
||||
data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Hersteller</th>
|
||||
<th>Artikelnummer</th>
|
||||
<th>Lieferant</th>
|
||||
<th>Kaufpreis (Netto)</th>
|
||||
<th>Werbungs-<br/>anfrage</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<!--**********************************************************-->
|
||||
<tr data-group="5420">
|
||||
<td>Kamera</td>
|
||||
<td>Sonjizu</td>
|
||||
<td>K48431587EX</td>
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/listedArticles/48670}">Gelistet 44048</a></td>
|
||||
</tr>
|
||||
<tr data-group="5420">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Hans Guck GmbH</a></td>
|
||||
<td>584,50 EUR</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr data-group="5420">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Cheap AG</a></td>
|
||||
<td>84,54 EUR</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr data-group="5420">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Not Cheap AG</a></td>
|
||||
<td>184,54 EUR</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!--**********************************************************-->
|
||||
<tr data-group="1233">
|
||||
<td>Earbuds</td>
|
||||
<td>Sonjizu</td>
|
||||
<td>G447#$X</td>
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/listedArticles/48670}">Gelistet 448</a></td>
|
||||
</tr>
|
||||
<tr data-group="1233">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Cheap AG</a></td>
|
||||
<td>50,54 EUR</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!--**********************************************************-->
|
||||
<tr data-group="42415">
|
||||
<td>Mundschutz</td>
|
||||
<td>Farma Corp</td>
|
||||
<td>Mu-15415</td>
|
||||
<td colspan="3"></td>
|
||||
<td><a class="button smaller" th:href="@{/intern/listedArticles/48670}">Hinzufügen</a></td>
|
||||
</tr>
|
||||
<tr data-group="42415">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Cheap AG</a></td>
|
||||
<td>150,54 EUR</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<tr data-group="42415">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Not Cheap AG</a></td>
|
||||
<td>250,54 EUR</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!--**********************************************************-->
|
||||
<tr data-group="4580">
|
||||
<td>Goldbaren</td>
|
||||
<td>Bundesbank</td>
|
||||
<td>G1KG</td>
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/listedArticles/48670}">Inaktiv 4888</a></td>
|
||||
</tr>
|
||||
<tr data-group="4580">
|
||||
<td colspan="3"></td>
|
||||
<td><a th:href="@{/intern/suppliers/48670}">Cheap AG</a></td>
|
||||
<td>10000,54 EUR</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,118 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Artikelübersicht</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Bestellung 1010</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-insert="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<div>
|
||||
<h2 id="20202701"> Bestellung vom 27.01.2020 </h2>
|
||||
<div>
|
||||
<table class="key-value">
|
||||
<tr>
|
||||
<th>Nutzer</th>
|
||||
<td><a th:href="@{/intern/customers/498}">K-4850</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Lieferstatus</th>
|
||||
<td><b>Unterwegs</b> <br/> Vorraussichtliche Ankunft: 29.01.2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sendeverfolgungsnummer</th>
|
||||
<td>XE51451436DE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
Hans Maier <br/>
|
||||
Hauptstraße 12<br/>
|
||||
74880 Musterstadt<br/>
|
||||
Deutschland <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Eingelösste Bonuspunkte</th>
|
||||
<td>10</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Name</th>
|
||||
<th>Menge</th>
|
||||
<th>Preis (Brutto)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-1.jpg}" class="s"/><a></td>
|
||||
<td><a th:href="@{/shop/articles/4151}">Kamera<a/></td>
|
||||
<td> 1</td>
|
||||
<td>100,50 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-2.jpg}" class="s"/><a/></td>
|
||||
<td><a th:href="@{/shop/articles/4151}">Earbuds<a/></td>
|
||||
<td> 3</td>
|
||||
<td>63,95 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Position</th>
|
||||
<th>Preis</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Artikel (Netto)</td>
|
||||
<td> 120,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Bonuspunkte</td>
|
||||
<td> 5,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Umsatzsteuer (19%)</td>
|
||||
<td> 42,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<h3>Gesammtpreis</h3>
|
||||
</td>
|
||||
<td>
|
||||
<h3>240,79 EUR</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,129 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Kunden</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Kunden</h1>
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zur Kundenübersicht." data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<th>Beitrittsdatum</th>
|
||||
<th>Name</th>
|
||||
<th>E-Mail</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1209</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td>Geschäftskunde</td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1208</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td>Inaktiv, Geschäftskunde</td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1207</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1206</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1205</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1204</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1203</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1202</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1201</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>hans.maier@example.com</td>
|
||||
<td>Inaktiv, Mitarbeiter</td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1214</td>
|
||||
<td>2019-11-10</td>
|
||||
<td>Hans Maier</td>
|
||||
<td>admin@example.com</td>
|
||||
<td>Mitarbeiter</td>
|
||||
<td><a th:href="@{/intern/customers/4884}" class="button smaller">Details</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,119 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Gelistete Artikel</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Gelisteter Artikel 8450</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-insert="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<h2>Gelisteter Artikel 8450</h2>
|
||||
<form class="detailgrid">
|
||||
<p class="m">
|
||||
<label for="title">Titel</label>
|
||||
<input class=" full-width" type="text" name="title" value="Kamera"/>
|
||||
</p>
|
||||
<p class="s">
|
||||
<label for="ref-article">Refernzierter Artikel</label>
|
||||
<input class="" type="text" name="ref-article" value="8405" disabled/>
|
||||
<td><a th:href="@{/intern/articles/#q=%2044048}">Details</a></td>
|
||||
</p>
|
||||
<div class="spacer"></div>
|
||||
<div class="m">
|
||||
<p>
|
||||
<label for="img">Bild Hochladen</label>
|
||||
<input class="full-width" type="file" name="img"/>
|
||||
</p>
|
||||
<p>
|
||||
<img th:src="@{/img/product-1.jpg}" class="m"/>
|
||||
</p>
|
||||
</div>
|
||||
<div class="s">
|
||||
<p>
|
||||
<label for="price">Preis (Netto)</label>
|
||||
<input class="" type="number" step="0.01" name="price" value="84.45"/> EUR <br/>
|
||||
(19% Mwst.)
|
||||
<!-- Info von article ref--> <br/>
|
||||
= 105.98 EUR Brutto
|
||||
</p>
|
||||
<p>
|
||||
<label for="max-price-buy">Maximaler Einkaufspreis (Netto)</label>
|
||||
<input class="" type="number" step="0.01" name="price" value="80.98"/> EUR
|
||||
</p>
|
||||
<div>
|
||||
<fieldset>
|
||||
<input type="radio" name="autobuy" value="true" id="autobuy-yes" checked required>
|
||||
<label for="autobuy-yes"> Automatisch nachbestellen.</label> <br/>
|
||||
<input type="radio" name="autobuy" value="false" id="autobuy-no" required>
|
||||
<label for="autobuy-no"> Nicht mehr nachkaufen.</label> <br/>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m">
|
||||
<label for="tags">Kategorien</label>
|
||||
<p>
|
||||
Bitte jede Kategorien in eine eigene Zeile
|
||||
</p>
|
||||
<textarea name="tags" class="full-width" rows="6">
|
||||
Überwachung
|
||||
Elektronik
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="s">
|
||||
<p>
|
||||
<label for="price">Einheiten pro Lagerplatz</label>
|
||||
<input class="" type="number" name="units-per-slot" value="20"/>
|
||||
</p>
|
||||
<p>
|
||||
<b>Lagerbestand: 12</b>
|
||||
</p>
|
||||
<p>
|
||||
Der Wert wird nur für zukünftige Lagerbuchungen verwendet.
|
||||
Bei Problemen kann können Einheiten aus- und wieder eingebucht werden.
|
||||
<!-- TODO: set link g-->
|
||||
</p>
|
||||
<p>
|
||||
<a href="/todo" class="button smaller">Lagerbuchung</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="l">
|
||||
<label for="description">Beschreibung</label>
|
||||
<textarea name="description" class="full-width" rows="15">
|
||||
Eine TOLLE Kamera
|
||||
Jaja du denkst jetzt bestimmt: "Bei dem Preis kann sie gar nich sooo TOLL sein".
|
||||
Aber glaub mir, sie is echt echt TOLL!
|
||||
Indianerehrenwort!
|
||||
</textarea>
|
||||
</p>
|
||||
<div class="l">
|
||||
<button type="submit">Änderungen speichern</button>
|
||||
<button type="reset">Zurücksetzen</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Gelistete Artikel</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Gelistete Artikel</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zu den gelisteten Artikeln." data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<h2>Artikel Hinzufügen</h2>
|
||||
<p>
|
||||
Weitere Artikel können über Artikelübersicht gelistet werden.
|
||||
<a class="button smaller" th:href="@{/intern/articles/}"> Jetzt Hinzufügen </a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Name</th>
|
||||
<th>Preis</th>
|
||||
<th>(Netto)</th>
|
||||
<th>Kategorien</th>
|
||||
<th>Lagerbestand</th>
|
||||
<th>Angebot</th>
|
||||
<th>ID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="article : ${ListedArticles}">
|
||||
<td><img th:src="${article.imgPath}" class="s"/></td>
|
||||
<td><span th:text="${article.title}"></span></td>
|
||||
<td><span th:text="${article.price}"></span></td>
|
||||
<td><span th:text="${article.price_netto}"></span></td>
|
||||
<td><span th:text="${article.categorie}"></span></td>
|
||||
<td><span th:text="${article.stock}"></span></td>
|
||||
<td><a th:href="@{/intern/articles/{id}(id = ${article.offer_id})}" th:text="${article.offer_id}"></a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/{id}(id = ${article.id})}" th:text="${article.id}"></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,103 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Lieferanten Bestellungen</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Lieferanten Bestellungen</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zu den Bestellungen bei Lieferanten."
|
||||
data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="9">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bestellnummer</th>
|
||||
<th>Datum</th>
|
||||
<th>Leiferant</th>
|
||||
<th>Artikel</th>
|
||||
<th>Preis/Stk (Netto)</th>
|
||||
<th>Menge</th>
|
||||
<th>Gesamtpreis (Netto)</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4545</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/suppliers/45015}">Cheap AG</a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>10</td>
|
||||
<td>200,00 EUR</td>
|
||||
<td>Unterwegs <br/><a th:href="@{/intern/warehouse/todo}" class="button smaller">Angekommen</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2455</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/suppliers/45015}">Cheap AG</a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>11</td>
|
||||
<td>220,00 EUR</td>
|
||||
<td>Unterwegs <br/><a th:href="@{/intern/warehouse/todo}" class="button smaller">Angekommen</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1224</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/suppliers/45015}">Cheap AG</a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>11</td>
|
||||
<td>220,00 EUR</td>
|
||||
<td>Angekommen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4520</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/suppliers/45015}">Cheap AG</a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>11</td>
|
||||
<td>220,00 EUR</td>
|
||||
<td>Angekommen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4521</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/suppliers/45015}">Cheap AG</a></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>11</td>
|
||||
<td>220,00 EUR</td>
|
||||
<td>Angekommen</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,86 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Lieferanten Details</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Lierfant Cheap AG</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-insert="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<h2>Bestellungen</h2>
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="9">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bestellnummer</th>
|
||||
<th>Datum</th>
|
||||
<th>Artikel</th>
|
||||
<th>Preis/Stk (Netto)</th>
|
||||
<th>Menge</th>
|
||||
<th>Gesamtpreis (Netto)</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4545</td>
|
||||
<td>2019-18-10</td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>20,00 EUR</td>
|
||||
<td>10</td>
|
||||
<td>200,00 EUR</td>
|
||||
<td>Unterwegs <br/><a th:href="@{/intern/warehouse/todo}" class="button smaller">Angekommen</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<h2>Buchungen</h2>
|
||||
<div>
|
||||
<h4> Kontostand </h4>
|
||||
<h3> -100,00 EUR </h3>
|
||||
</div>
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th>Zeitpunkt</th>
|
||||
<th>Betrag</th>
|
||||
<th>Von</th>
|
||||
<th>Kontostand</th>
|
||||
<th>Grund</th>
|
||||
<th>Referenz</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10.09.2019 13:45</td>
|
||||
<td>100,00 EUR</td>
|
||||
<td><a th:href="@{/intern/accounting/main}">Hauptkonto</a></td>
|
||||
<td>-100,00 EUR</td>
|
||||
<td>Lieferanten-Bestellung</td>
|
||||
<td><a th:href="@{/intern/supplierOrders/#q=4520}">2504</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,58 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>e-commerce</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<main class="modal l">
|
||||
<div class="detailflex l">
|
||||
<h1>Erfolgreich zugewiesen.</h1>
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th>Zeitpunkt</th>
|
||||
<th>Artikel</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Von</th>
|
||||
<th>Nach</th>
|
||||
</tr>
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="3">
|
||||
<td>2020-01-12 12:18</td>
|
||||
<td colspan="4" class="l">
|
||||
<a th:href="@{/intern/customerOrders/4808}">Bestellung 8408</a>
|
||||
<div>
|
||||
Hans Maier <br/>
|
||||
Hauptstraße 12<br/>
|
||||
74880 Musterstadt<br/>
|
||||
Deutschland <br/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td><img th:src="@{/img/product-1.jpg}" class="s"/></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a></td>
|
||||
<td> -</td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td><img th:src="@{/img/product-2.jpg}" class="s"/></td>
|
||||
<td><a th:href="@{/intern/listedArticles/4205}">Spielzeugauto</a></td>
|
||||
<td>2</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%232}">Lagerplatz 02</a></td>
|
||||
<td> -</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<a class="secondary button" th:href="@{/intern/warehouse/todo}"> Abschließen </a>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,127 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Lager</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Lagerbuchungen</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zu den Lagerbuchungen." data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<p>
|
||||
Die Lagerbestände nach Artikel können Sie unter den <a th:href="@{/intern/listedArticles/}">gelisteten
|
||||
Artikeln</a> einsehen.
|
||||
</p>
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Zeitpunkt</th>
|
||||
<th>Artikel</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Von</th>
|
||||
<th>Nach</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="3">
|
||||
<td>2020-01-12 12:18</td>
|
||||
<td colspan="4" class="l">
|
||||
<a th:href="@{/intern/customerOrders/4808}">Bestellung 8408</a>
|
||||
</td>
|
||||
<td>Auf Warteliste <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/listedArticles/4205}">Spielzeugauto</a></td>
|
||||
<td>2</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%232}">Lagerplatz 02</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="2">
|
||||
<td>2020-01-12 12:15</td>
|
||||
<td colspan="4" class="l">
|
||||
Manuell: Ware war defekt.
|
||||
</td>
|
||||
<td>In Arbeit <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-group="2">
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="1">
|
||||
<td>2020-01-12 12:11</td>
|
||||
<td colspan="4" class="l">
|
||||
<a th:href="@{/intern/supplierOrders/#q=4545}">Lieferung 4545</a>
|
||||
</td>
|
||||
<td>Fertig <br/></td>
|
||||
</tr>
|
||||
<tr data-group="1">
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>10</td>
|
||||
<td> -</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a>
|
||||
</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr data-group="1">
|
||||
<td></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td> -</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%234}">Lagerplatz 04</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,105 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Packliste</title>
|
||||
<script th:src="@{/js/filterTable.js}"></script>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Packliste</h1>
|
||||
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="intern" data-name="Zurück zur Packliste." data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/intern :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<p>
|
||||
<table id="main-table">
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
<input type="text" placeholder="Filtern" class="smaller jsFilterTable full-width"
|
||||
data-target-id="main-table"></input>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Zeitpunkt</th>
|
||||
<th>Artikel</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Von</th>
|
||||
<th>Nach</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="3">
|
||||
<td>2020-01-12 12:18</td>
|
||||
<td colspan="4" class="l">
|
||||
<a th:href="@{/intern/customerOrders/4808}">Bestellung 8408</a>
|
||||
<div>
|
||||
Hans Maier <br/>
|
||||
Hauptstraße 12<br/>
|
||||
74880 Musterstadt<br/>
|
||||
Deutschland <br/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<form th:action="@{/intern/warehouse/progress/5410}" method="post">
|
||||
<button type="submit">Beginnen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td><img th:src="@{/img/product-1.jpg}" class="s"/></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr data-group="3">
|
||||
<td><img th:src="@{/img/product-2.jpg}" class="s"/></td>
|
||||
<td><a th:href="@{/intern/listedArticles/4205}">Spielzeugauto</a></td>
|
||||
<td>2</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%232}">Lagerplatz 02</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<tr data-group="2">
|
||||
<td>2020-01-12 12:15</td>
|
||||
<td colspan="4" class="l">
|
||||
Manuell: Ware war defekt.
|
||||
</td>
|
||||
<td><a class="secondary button">Abschließen</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-group="2">
|
||||
<td><img th:src="@{/img/product-1.jpg}" class="s"/></td>
|
||||
<td><a th:href="@{/intern/listedArticles/45015}">Kamera</a></td>
|
||||
<td>1</td>
|
||||
<td><a th:href="@{/intern/warehouse/slots/#q=%231}">Lagerplatz 01</a></td>
|
||||
<td> -</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,97 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Neuen Account erstellen</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
|
||||
<script th:src="@{/js/scrollToContent.js}"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<main class="modal">
|
||||
<form class="detailflex m" th:action="@{/register}" method="POST">
|
||||
<div>
|
||||
<h1>Neuen Account erstellen</h1>
|
||||
</div>
|
||||
<div>
|
||||
<h2> Login Daten </h2>
|
||||
</div>
|
||||
<div>
|
||||
<label for="username">Email Adresse</label>
|
||||
<input class="full-width" type="text" name="username" placeholder="Email Adresse" id="username" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="password">Passwort</label>
|
||||
<input class="full-width" type="password" name="password" placeholder="Passwort" id="password" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="password2">Passwort wiederholen</label>
|
||||
<input class="full-width" type="password" name="password2" placeholder="Passwort" id="password2" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2> Rechungs- und Lieferinformation </h2>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<div>
|
||||
<label for="salutation">Anrede</label>
|
||||
<input class="full-width" list="salutationsOpt" name="salutation" id="salutation" placeholder="Anrede"
|
||||
required/>
|
||||
<datalist id="salutationsOpt">
|
||||
<option value="Herr">
|
||||
<option value="Frau">
|
||||
<option value="Herr Dr.">
|
||||
<option value="Frau Dr.">
|
||||
</datalist>
|
||||
</div>
|
||||
<div>
|
||||
<label for="name">Name</label>
|
||||
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="address">Anschrift</label>
|
||||
<textarea rows="5" class="full-width" type="text" name="address" id="address"
|
||||
placeholder="Optional: Zusatz Optional: Unternehmen Straße Hausnummer Postleitzeit Ort Land"></textarea>
|
||||
</div>
|
||||
<fieldset>
|
||||
<input type="radio" name="type" value="priv" id="type-priv" required>
|
||||
<label for="type-priv">Ich bin Privatkunde.</label> <br/>
|
||||
<input type="radio" name="type" value="bus" id="type-bus" required>
|
||||
<label for="type-bus">Ich bin Geschäftskunde.</label> <br/>
|
||||
</fieldset>
|
||||
|
||||
<div>
|
||||
<h2> Werbung </h2>
|
||||
</div>
|
||||
<div>
|
||||
<fieldset>
|
||||
<input type="radio" name="ad" value="y" id="ad-y" required>
|
||||
<label for="type-priv">Ich möchte Werbung erhalten.</label> <br/>
|
||||
<input type="radio" name="ad" value="n" id="ad-n" required>
|
||||
<label for="type-bus">Ich möchte keine Werbung erhalten.</label> <br/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="full-width" type="submit" name="action" value="login">Registeren</button>
|
||||
<a th:href="@{/terms}">
|
||||
Unsere AGBs finden sie hier.
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,93 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Sucherergebnisse</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Dirty hack to align the heading.-->
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Suchergebnisse</h1>
|
||||
<script th:src="@{/js/back.js}"></script>
|
||||
<div class="back" data-group="shop" data-name="Zurück zur Suche." data-insert="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/shop :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<div class='grid m condensed'>
|
||||
<section><a th:href="@{/shop/articles/1234}" class="section">
|
||||
<img th:src="@{/img/product-1.jpg}">
|
||||
<h2>Tolle Kamera</h2>
|
||||
<p class='price'> 25.14 EUR</p>
|
||||
<p>
|
||||
Eine TOLLE Kamera <br>
|
||||
Jaja du denkst jetzt bestimmt: "Bei dem Preis kann sie gar nich sooo TOLL sein". <br>
|
||||
Aber glaub mir, sie is echt echt TOLL! <br>
|
||||
Indianerehrenwort!
|
||||
</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section><a th:href="@{/shop/articles/1234}" class="section">
|
||||
<img th:src="@{/img/product-2.jpg}">
|
||||
<h2>Bluetooth Kopfhörer</h2>
|
||||
<p class='price'> 10.14 EUR</p>
|
||||
<p>
|
||||
Sind halt Kopfhörer ohne Kabel, mehr gibts da nich zu sagen.
|
||||
</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section><a th:href="@{/shop/articles/1234}" class="section">
|
||||
<img th:src="@{/img/product-3.jpg}">
|
||||
<h2>???</h2>
|
||||
<p class='price'> 25.14 EUR</p>
|
||||
<p>
|
||||
Ich weiß selbst nich was das genau sein soll.<br>
|
||||
Wenn dus willst kannst es gern haben, musst nur das Geld überweisen.
|
||||
</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section><a th:href="@{/shop/articles/1234}" class="section">
|
||||
<img th:src="@{/img/product-4.jpg}">
|
||||
<h2>Kamera Stativ.</h2>
|
||||
<p class='price'> 25.14 EUR</p>
|
||||
<p>
|
||||
Das Stativ der Zukunft! Jetzt kaufen und verwenden für
|
||||
wackelfreie Bilder aus der Zukunft!.
|
||||
</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section><a th:href="@{/shop/articles/1234}" class="section">
|
||||
<img th:src="@{/img/product-5.jpg}">
|
||||
<h2>Bluetooth Ersatzfernbedinung</h2>
|
||||
<p class='price'> 10.14 EUR</p>
|
||||
<p>
|
||||
Kann alles und jeden ausknippsen.
|
||||
</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Bonusprogramm</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Bonusprogramm</h1>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/customer :: sidebar"></nav>
|
||||
<div class="content-width">
|
||||
<div class="grid xl">
|
||||
<div class="card">
|
||||
<h2> Ihr Bonuspunktestand beträgt: </h2>
|
||||
<h1 class="huge"> 15 </h1>
|
||||
</div>
|
||||
<div class="s">
|
||||
<h2> Bonuspunkte sichern </h2>
|
||||
<p>
|
||||
Sie sichern sich automatisch bei jedem Einkaufen pro Angefangenen
|
||||
10 EUR einen Bonuspunkt.
|
||||
</p>
|
||||
<p>
|
||||
Eine Übersicht ihrer Bonuspunkt finden sie hier auf dieser
|
||||
Bonus.
|
||||
</p>
|
||||
<p>
|
||||
Um die Bonuspunkte einzulösen hacken sie einfach
|
||||
"Bonuspunkte" verwenden beim Abschließen der Bestellung
|
||||
an. Für jeden Bonuspunkt wird ihnen 0,50 EUR gutgeschrieben.
|
||||
</p>
|
||||
</div>
|
||||
<div class="s">
|
||||
<img th:src="@{/img/undraw_gift.svg}"/>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,92 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Meine Benachrichtigungen</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Meine Benachrichtigungen</h1>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/customer :: sidebar"></nav>
|
||||
<div>
|
||||
<div class="grid xl">
|
||||
<section class="notification unread">
|
||||
<h2>Nachricht vom 17.08.2020, 14:38 Uhr</h2>
|
||||
<h3>Ihre Bestellung kommt voraussichtlich am Donnerstag, den 20.08.2020</h3>
|
||||
<p>
|
||||
Vielen Dank für Ihre Bestellung der folgenden Artikel:<br>
|
||||
<br>
|
||||
2x tolle Kamera<br>
|
||||
1x Bluetooth Kopfhörer<br>
|
||||
3x USB-Magic Light<br>
|
||||
<br>
|
||||
Die Sendung wird Ihnen voraussichtlich am Donnerstag, den 20.08.2020 zugestellt.
|
||||
Den aktuellen Status des Pakets können Sie jederzeit in der <a th:href="@{/shop/orders/}">Bestellübersicht</a>
|
||||
nachvollziehen.
|
||||
</p>
|
||||
<button type="button" name="button">Als gelesen makieren</button>
|
||||
</section>
|
||||
<section class="notification">
|
||||
<h2>Nachricht vom 15.08.2020, 16:38 Uhr</h2>
|
||||
<h3>Jetzt unsere Tagesangebote entdecken.</h3>
|
||||
<p>
|
||||
Entdecken sie jetzt unseren neusten Angebote:
|
||||
</p>
|
||||
<div class="flowflex">
|
||||
<div>
|
||||
<a th:href="@{/shop/articles/1234}" class="section">
|
||||
<h3>Lorem Ipsum</h3>
|
||||
<img th:src="@{/img/product-2.jpg}" class="s"/>
|
||||
<p>Nur 15,00 EUR</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a th:href="@{/shop/articles/1234}" class="section">
|
||||
<h3>Stativ</h3>
|
||||
<img th:src="@{/img/product-4.jpg}" class="s"/>
|
||||
<p>Nur 7,00 EUR</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a th:href="@{/shop/articles/1234}" class="section">
|
||||
<h3>Ersatzfernbedinung</h3>
|
||||
<img th:src="@{/img/product-6.jpg}" class="s"/>
|
||||
<p>Nur 17,00 EUR</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="notification">
|
||||
<h2>Nachricht vom 13.08.2020, 14:38 Uhr</h2>
|
||||
<h3>Ihre Bestellung ist angekommen.</h3>
|
||||
<p>
|
||||
Vielen Dank für Ihre Bestellung der folgenden Artikel:<br>
|
||||
<br>
|
||||
3x USB-Magic Light<br>
|
||||
<br>
|
||||
Ihre Bestellungen ist angekommen.
|
||||
</p>
|
||||
</section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
<section class="spacer"></section>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,193 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
|
||||
|
||||
<title>Meine Bestellungen</title>
|
||||
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav th:replace="fragments/header :: header">Header</nav>
|
||||
|
||||
<div class="sidebar-layout content-width">
|
||||
<nav></nav>
|
||||
<div>
|
||||
<h1>Meine Bestellungen</h1>
|
||||
</div>
|
||||
</div>
|
||||
<main class="sidebar-layout content-width">
|
||||
<nav th:replace="fragments/customer :: sidebar"></nav>
|
||||
<div class="content-width detailflex">
|
||||
<div>
|
||||
<h2 id="20202701"> Bestellung vom 27.01.2020 </h2>
|
||||
<div>
|
||||
<table class="key-value">
|
||||
<tr>
|
||||
<th>Lieferstatus</th>
|
||||
<td><b>Unterwegs</b> <br/> Vorraussichtliche Ankunft: 29.01.2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sendeverfolgungsnummer</th>
|
||||
<td>XE51451436DE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
Hans Maier <br/>
|
||||
Hauptstraße 12<br/>
|
||||
74880 Musterstadt<br/>
|
||||
Deutschland <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Eingelösste Bonuspunkte</th>
|
||||
<td>10</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Name</th>
|
||||
<th>Menge</th>
|
||||
<th>Preis (Brutto)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-1.jpg}" class="s"/><a></td>
|
||||
<td><a th:href="@{/shop/articles/4151}">Kamera<a/></td>
|
||||
<td> 1</td>
|
||||
<td>100,50 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-2.jpg}" class="s"/><a/></td>
|
||||
<td><a th:href="@{/shop/articles/4151}">Earbuds<a/></td>
|
||||
<td> 3</td>
|
||||
<td>63,95 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Position</th>
|
||||
<th>Preis</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Artikel (Netto)</td>
|
||||
<td> 120,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Bonuspunkte</td>
|
||||
<td> 5,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Umsatzsteuer (19%)</td>
|
||||
<td> 42,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<h3>Gesammtpreis</h3>
|
||||
</td>
|
||||
<td>
|
||||
<h3>240,79 EUR</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2 id="20200101"> Bestellung vom 01.01.2020 </h2>
|
||||
<div>
|
||||
<table class="key-value">
|
||||
<tr>
|
||||
<th>Lieferstatus</th>
|
||||
<td><b>Angekommen</b> <br/> 03.01.2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sendeverfolgungsnummer</th>
|
||||
<td>XE5140684351DE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
Hans Maier <br/>
|
||||
Hauptstraße 12<br/>
|
||||
74880 Musterstadt<br/>
|
||||
Deutschland <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gutgeschriebene Bonuspunkte</th>
|
||||
<td>5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Name</th>
|
||||
<th>Menge</th>
|
||||
<th>Preis pro Artikel (Brutto)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-1.jpg}" class="s"/><a></td>
|
||||
<td><a th:href="@{/shop/articles/4151}"> Billige Kamera<a/></td>
|
||||
<td> 1</td>
|
||||
<td>40,50 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a th:href="@{/shop/articles/4151}"><img th:src="@{/img/product-5.jpg}" class="s"/><a></td>
|
||||
<td><a th:href="@{/shop/articles/4151}">Apfel<a/></td>
|
||||
<td> 5</td>
|
||||
<td>1,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Position</th>
|
||||
<th>Preis</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Artikel (Netto)</td>
|
||||
<td> 20,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Umsatzsteuer (19%)</td>
|
||||
<td> 5,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Umsatzsteuer (7%)</td>
|
||||
<td> 2,00 EUR</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<h3>Gesammtpreis</h3>
|
||||
</td>
|
||||
<td>
|
||||
<h3>50,79 EUR</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer th:replace="fragments/footer :: footer"></footer>
|
||||
</body>
|
||||
|
||||
</html>
|
32
supplier/.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
HELP.md
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**
|
||||
!**/src/test/**
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
29
supplier/build.gradle
Normal file
@ -0,0 +1,29 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.7.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'org.hso.ecommerce'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = '11'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
26
supplier/config/bank.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"id" : "bank",
|
||||
"name" : "Bank of Cheese",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 100,
|
||||
"percentDiscount": 1
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Big Mac",
|
||||
"manufacturer": "Mc Donalds",
|
||||
"articleNumber": "0x1 BIGMAC",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 700,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "500£ Schein",
|
||||
"manufacturer": "Bank",
|
||||
"articleNumber": "500",
|
||||
"vatPercent": 0,
|
||||
"pricePerUnitNet": 50000,
|
||||
"shouldBeAdvertised": false
|
||||
}
|
||||
]
|
||||
}
|
34
supplier/config/hans-and-more.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"id" : "hans",
|
||||
"name" : "Hans and more",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 100000,
|
||||
"percentDiscount": 2
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Big Mac",
|
||||
"manufacturer": "Mc Donalds",
|
||||
"articleNumber": "0x1 BIGMAC",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 700,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pommes",
|
||||
"manufacturer": "Mc Donalds",
|
||||
"articleNumber": "0x1 POmes",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 100,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "Milchshake Premium 19%",
|
||||
"manufacturer": "Mc Donalds",
|
||||
"articleNumber": "0x2",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 50,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
50
supplier/config/mda.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"id" : "mda",
|
||||
"name" : "MDA",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 20,
|
||||
"percentDiscount": 3
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "MDA Nezyr 7",
|
||||
"manufacturer": "MDA",
|
||||
"articleNumber": "n7",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 29990,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "MDA Nezyr 5",
|
||||
"manufacturer": "MDA",
|
||||
"articleNumber": "n5",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 19700,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "MDA Nezyr 3",
|
||||
"manufacturer": "MDA",
|
||||
"articleNumber": "n3",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 8990,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "MDA Nezyr Threadcracker 3990",
|
||||
"manufacturer": "MDA",
|
||||
"articleNumber": "ntc3990",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 404900,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "MDA Radon RX 5700",
|
||||
"manufacturer": "MDA",
|
||||
"articleNumber": "rrx5700",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 43624,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
34
supplier/config/nanosoft.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"id" : "nanosoft",
|
||||
"name" : "Nanosoft",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 50,
|
||||
"percentDiscount": 0.5
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Nanosoft Doors 10",
|
||||
"manufacturer": "Nanosoft",
|
||||
"articleNumber": "d10",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 2099,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Nanosoft Interior Pro 7",
|
||||
"manufacturer": "Nanosoft",
|
||||
"articleNumber": "ip7",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 90780,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "Nanosoft Ybox Two",
|
||||
"manufacturer": "Nanosoft",
|
||||
"articleNumber": "ybox2",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 23500,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
42
supplier/config/outtel.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"id" : "outtel",
|
||||
"name" : "Outtel",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 20,
|
||||
"percentDiscount": 1
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Outtel Core o7",
|
||||
"manufacturer": "Outtel",
|
||||
"articleNumber": "o7",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 40000,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Outtel Core o5",
|
||||
"manufacturer": "Outtel",
|
||||
"articleNumber": "o5",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 25000,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Outtel Core o3",
|
||||
"manufacturer": "Outtel",
|
||||
"articleNumber": "o3",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 8000,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "Outtel Core o9",
|
||||
"manufacturer": "Outtel",
|
||||
"articleNumber": "o9",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 55000,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
50
supplier/config/pear.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"id" : "pear",
|
||||
"name" : "Pear",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 100,
|
||||
"percentDiscount": 2
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Pear iMobile 10",
|
||||
"manufacturer": "Pear",
|
||||
"articleNumber": "iM10",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 31500,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pear iPlate Plus",
|
||||
"manufacturer": "Pear",
|
||||
"articleNumber": "ipp",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 44900,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pear iDonalds 9",
|
||||
"manufacturer": "Pear",
|
||||
"articleNumber": "id9",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 234800,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pear GroundPods",
|
||||
"manufacturer": "Pear",
|
||||
"articleNumber": "gp",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 13599,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pear Donalsbook Pro",
|
||||
"manufacturer": "Pear",
|
||||
"articleNumber": "dbp",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 145900,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
42
supplier/config/sumsang.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"id" : "sumsang",
|
||||
"name" : "Sumsang",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 300,
|
||||
"percentDiscount": 2
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "Sumsang Universe S10",
|
||||
"manufacturer": "Sumsang",
|
||||
"articleNumber": "us10",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 59000,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Sumsang Universe S10e",
|
||||
"manufacturer": "Sumsang",
|
||||
"articleNumber": "us10e",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 70231,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "Sumsang DumbTV",
|
||||
"manufacturer": "Sumsang",
|
||||
"articleNumber": "dtv",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 38395,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Sumsang UniverseWatch",
|
||||
"manufacturer": "Sumsang",
|
||||
"articleNumber": "uw",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 20494,
|
||||
"shouldBeAdvertised": true
|
||||
}
|
||||
]
|
||||
}
|
58
supplier/config/techdealer.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"id" : "techdealer",
|
||||
"name" : "Tech Dealer",
|
||||
"discount" : {
|
||||
"minimumDailySalesVolumeNetCent": 100,
|
||||
"percentDiscount": 2
|
||||
},
|
||||
"articles": [
|
||||
{
|
||||
"title": "TROPIC Gehäuselüfter",
|
||||
"manufacturer": "TROPIC",
|
||||
"articleNumber": "tgl",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 459,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pirate PC-Netzteil",
|
||||
"manufacturer": "Pirate",
|
||||
"articleNumber": "ppcn",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 9355,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Pirate Void Elite RGB Wireless Gaming Headset",
|
||||
"manufacturer": "Pirate",
|
||||
"articleNumber": "pvergbwgh",
|
||||
"vatPercent": 7,
|
||||
"pricePerUnitNet": 10999,
|
||||
"shouldBeAdvertised": false
|
||||
},
|
||||
{
|
||||
"title": "Aeroheat CYLON PC-Gehäuse",
|
||||
"manufacturer": "Aeroheat",
|
||||
"articleNumber": "acpcg",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 3999,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Illogitech C270 Webcam",
|
||||
"manufacturer": "Illogitech",
|
||||
"articleNumber": "ic270w",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 3499,
|
||||
"shouldBeAdvertised": true
|
||||
},
|
||||
{
|
||||
"title": "Illogitech Z607 Surround Sound Lautsprecher",
|
||||
"manufacturer": "Illogitech",
|
||||
"articleNumber": "iz607ssl",
|
||||
"vatPercent": 19,
|
||||
"pricePerUnitNet": 9495,
|
||||
"shouldBeAdvertised": false
|
||||
}
|
||||
]
|
||||
}
|
BIN
supplier/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
185
supplier/gradlew
vendored
Executable file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
104
supplier/gradlew.bat
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
1
supplier/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = 'supplier'
|
11
supplier/src/main/java/org/hso/ecommerce/supplier/App.java
Normal file
@ -0,0 +1,11 @@
|
||||
package org.hso.ecommerce.supplier;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class App {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(App.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package org.hso.ecommerce.supplier;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.hso.ecommerce.supplier.data.Supplier;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ConfigurationReader {
|
||||
|
||||
public static List<Supplier> read() throws IOException {
|
||||
File dir = new File("./config/");
|
||||
|
||||
System.out.println("Loading Config in " + dir.getAbsolutePath());
|
||||
ArrayList<Supplier> ret = Files.list(dir.toPath()).map(path -> {
|
||||
|
||||
System.out.println("Iterating over; " + path);
|
||||
if (path.toString().endsWith(".json")) {
|
||||
try {
|
||||
String jsonData = Files.readString(path, StandardCharsets.UTF_8);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Supplier sup = objectMapper.readValue(jsonData, Supplier.class);
|
||||
System.out.println("Loaded " + sup.id);
|
||||
return sup;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
System.out.println("Skipping because of file extension.");
|
||||
}
|
||||
return null;
|
||||
}).collect(Collectors.toCollection(ArrayList::new));
|
||||
|
||||
ret.removeIf(Objects::isNull);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
package org.hso.ecommerce.supplier;
|
||||
|
||||
import org.hso.ecommerce.supplier.carrier.Avian;
|
||||
import org.hso.ecommerce.supplier.carrier.Carrier;
|
||||
import org.hso.ecommerce.supplier.carrier.Posaidon;
|
||||
import org.hso.ecommerce.supplier.carrier.Shredder;
|
||||
import org.hso.ecommerce.supplier.data.Article;
|
||||
import org.hso.ecommerce.supplier.data.Order;
|
||||
import org.hso.ecommerce.supplier.data.OrderConfirmation;
|
||||
import org.hso.ecommerce.supplier.data.Supplier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class RequestController {
|
||||
|
||||
private final HashMap<String, Integer> dailySalesVolumeCent = new HashMap<>();
|
||||
private final HashMap<String, Supplier> knownSuppliers = new HashMap<>();
|
||||
private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
private final Carrier[] carriers = new Carrier[]{
|
||||
new Avian(), new Posaidon(), new Shredder()
|
||||
};
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws IOException {
|
||||
for (Supplier s : ConfigurationReader.read()) {
|
||||
knownSuppliers.put(s.id, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/")
|
||||
public List<Supplier> index() {
|
||||
return new ArrayList<>(knownSuppliers.values());
|
||||
}
|
||||
|
||||
@GetMapping("/{supplier}/")
|
||||
public Supplier supplier(HttpServletResponse res, @PathVariable("supplier") String supplierName) {
|
||||
Supplier s = knownSuppliers.get(supplierName);
|
||||
if (s == null) {
|
||||
res.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@PostMapping("/{supplier}/order")
|
||||
public OrderConfirmation order(HttpServletResponse res, @PathVariable("supplier") String supplierName, @RequestBody Order order) {
|
||||
Supplier s = knownSuppliers.get(supplierName);
|
||||
if (s == null) {
|
||||
res.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
return null;
|
||||
}
|
||||
|
||||
String dateKey = simpleDateFormat.format(new Date());
|
||||
int dailyVolume = dailySalesVolumeCent.getOrDefault(dateKey, 0);
|
||||
|
||||
Article a = s.findArticle(order.manufacturer, order.articleNumber);
|
||||
if (a == null) {
|
||||
res.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return null;
|
||||
}
|
||||
|
||||
int priceNet = a.pricePerUnitNet * order.quantity;
|
||||
int discountableNetAmount = 0;
|
||||
if (dailyVolume >= s.discount.minimumDailySalesVolumeNetCent) {
|
||||
// grant discount on the full price
|
||||
discountableNetAmount = priceNet;
|
||||
} else if (dailyVolume + priceNet > s.discount.minimumDailySalesVolumeNetCent) {
|
||||
// grant partial discount
|
||||
discountableNetAmount = dailyVolume + priceNet - s.discount.minimumDailySalesVolumeNetCent;
|
||||
}
|
||||
int discount = (discountableNetAmount * s.discount.percentDiscount) / 100;
|
||||
|
||||
Carrier selectedCarrier = carriers[Math.abs((supplierName + java.time.LocalDate.now()).hashCode()) % carriers.length];
|
||||
|
||||
OrderConfirmation confirmation = new OrderConfirmation();
|
||||
confirmation.articleNumber = order.articleNumber;
|
||||
confirmation.discountNetCent = discount;
|
||||
confirmation.pricePerUnitNetCent = a.pricePerUnitNet;
|
||||
confirmation.manufacturer = a.manufacturer;
|
||||
confirmation.quantity = order.quantity;
|
||||
confirmation.totalPriceNetCharged = priceNet - discount;
|
||||
confirmation.carrier = selectedCarrier.getName();
|
||||
confirmation.trackingId = selectedCarrier.generateTrackingId();
|
||||
confirmation.estimatedArrival = selectedCarrier.arrivalEstimate();
|
||||
|
||||
if (confirmation.totalPriceNetCharged > order.maxTotalPriceCentNet) {
|
||||
res.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
|
||||
return null;
|
||||
}
|
||||
|
||||
dailyVolume += confirmation.totalPriceNetCharged;
|
||||
dailySalesVolumeCent.put(dateKey, dailyVolume);
|
||||
|
||||
return confirmation;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package org.hso.ecommerce.supplier.carrier;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Random;
|
||||
|
||||
public class Avian implements Carrier {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Avian Carriers";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTrackingId() {
|
||||
Random rnd = new Random();
|
||||
|
||||
return "2001-"
|
||||
+ Integer.toHexString(rnd.nextInt(0xFFFF))
|
||||
+ "--"
|
||||
+ Integer.toHexString(rnd.nextInt(0xFFFF))
|
||||
+ "-"
|
||||
+ Integer.toHexString(rnd.nextInt(0xFFFF));
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime arrivalEstimate() {
|
||||
return LocalDateTime.now().plusHours(8);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package org.hso.ecommerce.supplier.carrier;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public interface Carrier {
|
||||
public String getName();
|
||||
|
||||
public String generateTrackingId();
|
||||
|
||||
public LocalDateTime arrivalEstimate();
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
package org.hso.ecommerce.supplier.carrier;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Random;
|
||||
|
||||
public class Posaidon implements Carrier {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Poseidon Inc.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTrackingId() {
|
||||
Random rnd = new Random();
|
||||
return "WAT"
|
||||
+ Integer.toString(rnd.nextInt(Short.MAX_VALUE))
|
||||
+ "3"
|
||||
+ Integer.toString(rnd.nextInt(Short.MAX_VALUE))
|
||||
+ "R";
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime arrivalEstimate() {
|
||||
return LocalDateTime.now().plusHours(50);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package org.hso.ecommerce.supplier.carrier;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Random;
|
||||
|
||||
public class Shredder implements Carrier {
|
||||
|
||||
private Random rnd = new Random();
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Schree & Derr";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTrackingId() {
|
||||
return "O" + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + d() + "0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime arrivalEstimate() {
|
||||
return LocalDateTime.now().plusHours(22);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a random digit followed by a dash.
|
||||
*/
|
||||
private String d() {
|
||||
return Integer.toString(rnd.nextInt(9)) + "-";
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package org.hso.ecommerce.supplier.data;
|
||||
|
||||
public class Article {
|
||||
public String title;
|
||||
public String manufacturer;
|
||||
public String articleNumber;
|
||||
|
||||
public int vatPercent;
|
||||
public int pricePerUnitNet;
|
||||
public boolean shouldBeAdvertised;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package org.hso.ecommerce.supplier.data;
|
||||
|
||||
public class Order {
|
||||
public String manufacturer;
|
||||
public String articleNumber;
|
||||
|
||||
public int quantity;
|
||||
public int maxTotalPriceCentNet;
|
||||
}
|