Compare commits
54 Commits
dev
..
cfd3a77472
| Author | SHA1 | Date | |
|---|---|---|---|
| cfd3a77472 | |||
| d308f80341 | |||
| c79f81ec7d | |||
| 9af4ddaf18 | |||
| 9dd9ccebdd | |||
| 92605d85c2 | |||
| 59a1ae51fa | |||
| 80a3d4d464 | |||
| 9efb93c37c | |||
| cf638dc42d | |||
| 65092b57d9 | |||
| 7045317fc6 | |||
| 0f75f55ac4 | |||
| 2d2dc52012 | |||
| 566437bd71 | |||
| 266ee1af80 | |||
| 43f8e00968 | |||
| 5c43b817a7 | |||
| 0953847f24 | |||
| 9e7fc530b5 | |||
| 18777e5f7c | |||
| b55129dfff | |||
| 26856ee1df | |||
| dd1d8d8d6b | |||
| cf2df0aaac | |||
| 1199d6468f | |||
| 7cd958c31e | |||
| f89cf84a38 | |||
| e3fc1d8659 | |||
| 060f8d01c6 | |||
| 667609d70c | |||
| b05f19acd9 | |||
| 2aa9a968f5 | |||
| e42a2f510a | |||
| d2b22fc71f | |||
| 471c0c7a49 | |||
| 75ff65e76b | |||
| 7cf1245ef6 | |||
| 2adbfa75a5 | |||
| 216a1cb1d4 | |||
| 7fc98d6c9f | |||
| e346cf9445 | |||
| c030b6dbe6 | |||
| 6f26b9bbc3 | |||
| a34a70572f | |||
| 4b3c8a2424 | |||
| 568b3bf495 | |||
| 5653d32857 | |||
| 7cf5b8df48 | |||
| 65c5fc0f8f | |||
| b626a67907 | |||
| 6643a176a6 | |||
| 89803754a7 | |||
| 5052b3e83a |
@@ -51,7 +51,6 @@ export const confirmUser = async (username) => {
|
|||||||
EMail Varchar(100) NOT NULL,
|
EMail Varchar(100) NOT NULL,
|
||||||
Telefonnummer Varchar(100) NOT NULL,
|
Telefonnummer Varchar(100) NOT NULL,
|
||||||
Lose INT NOT NULL,
|
Lose INT NOT NULL,
|
||||||
Schokolade BOOLEAN NOT NULL,
|
|
||||||
Firmenname Varchar(100),
|
Firmenname Varchar(100),
|
||||||
Vorname_Geschaeftlich Varchar(100),
|
Vorname_Geschaeftlich Varchar(100),
|
||||||
Nachname_Geschaeftlich Varchar(100),
|
Nachname_Geschaeftlich Varchar(100),
|
||||||
@@ -94,7 +93,7 @@ export const newEntry = async (formData, username, prizeDraw) => {
|
|||||||
const tableName = confirmation.tableName;
|
const tableName = confirmation.tableName;
|
||||||
|
|
||||||
const [result] = await pool.query(
|
const [result] = await pool.query(
|
||||||
`INSERT INTO ?? (Verlosung, Vorname, Nachname, EMail, Telefonnummer, Lose, Schokolade, Firmenname, Vorname_Geschaeftlich, Nachname_Geschaeftlich, EMail_Geschaeftlich, Telefonnummer_Geschaeftlich, Strasse_Hausnr, Plz_Ort, Zahlungsmethode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
`INSERT INTO ?? (Verlosung, Vorname, Nachname, EMail, Telefonnummer, Lose, Firmenname, Vorname_Geschaeftlich, Nachname_Geschaeftlich, EMail_Geschaeftlich, Telefonnummer_Geschaeftlich, Strasse_Hausnr, Plz_Ort, Zahlungsmethode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||||
[
|
[
|
||||||
tableName,
|
tableName,
|
||||||
prizeDraw,
|
prizeDraw,
|
||||||
@@ -103,7 +102,6 @@ export const newEntry = async (formData, username, prizeDraw) => {
|
|||||||
formData.email,
|
formData.email,
|
||||||
formData.phoneNumber,
|
formData.phoneNumber,
|
||||||
formData.tickets,
|
formData.tickets,
|
||||||
formData.chocolates,
|
|
||||||
formData.companyName,
|
formData.companyName,
|
||||||
formData.cmpFirstName,
|
formData.cmpFirstName,
|
||||||
formData.cpmLastName,
|
formData.cpmLastName,
|
||||||
|
|||||||
+73
-13
@@ -1,16 +1,19 @@
|
|||||||
services:
|
services:
|
||||||
# frontend:
|
frontend:
|
||||||
# container_name: ca-lose-frontend
|
container_name: ca-lose-frontend
|
||||||
# build: ./frontend
|
hostname: lose-verkaufen
|
||||||
# ports:
|
build: ./frontend
|
||||||
# - "8002:80"
|
depends_on:
|
||||||
# restart: unless-stopped
|
- backend
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.2
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
container_name: ca-lose-backend
|
container_name: ca-lose-backend
|
||||||
|
hostname: backend
|
||||||
build: ./backend
|
build: ./backend
|
||||||
ports:
|
|
||||||
- "8004:8004"
|
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
DB_HOST: ca-lose-mysql
|
DB_HOST: ca-lose-mysql
|
||||||
@@ -19,21 +22,78 @@ services:
|
|||||||
DB_NAME: ca_lose
|
DB_NAME: ca_lose
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.3
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
database:
|
database:
|
||||||
container_name: ca-lose-mysql
|
container_name: ca-lose-mysql
|
||||||
|
hostname: database
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "3311:3306"
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
||||||
MYSQL_DATABASE: ca_lose
|
MYSQL_DATABASE: ca_lose
|
||||||
TZ: Europe/Berlin
|
TZ: Europe/Berlin
|
||||||
volumes:
|
volumes:
|
||||||
- ./.docker/volumes/ca-lose_mysql:/var/lib/mysql
|
- ../docker/volumes/ca-lose_mysql:/var/lib/mysql
|
||||||
- ./mysql-timezone.cnf:/etc/mysql/conf.d/timezone.cnf:ro
|
- ./mysql-timezone.cnf:/etc/mysql/conf.d/timezone.cnf:ro
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.4
|
||||||
|
|
||||||
volumes:
|
# DNS Server for hostname resolution within the Docker network
|
||||||
ca-lose_mysql:
|
dnsmasq:
|
||||||
|
container_name: ca-lose-dns
|
||||||
|
image: andyshinn/dnsmasq:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
command: >
|
||||||
|
--no-daemon
|
||||||
|
--log-queries
|
||||||
|
--address=/lose-verkaufen/172.25.0.2
|
||||||
|
--address=/frontend/172.25.0.2
|
||||||
|
--address=/backend/172.25.0.3
|
||||||
|
--address=/database/172.25.0.4
|
||||||
|
--address=/wireguard/172.25.0.6
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.5
|
||||||
|
|
||||||
|
# WireGuard VPN server for secure remote access to the Docker network
|
||||||
|
wireguard:
|
||||||
|
build: ./wg-easy-ca-lose
|
||||||
|
container_name: ca-lose-wireguard
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- SYS_MODULE
|
||||||
|
environment:
|
||||||
|
WG_HOST: dus3.the1s.de
|
||||||
|
INSECURE: "true"
|
||||||
|
HOST: "172.25.0.6"
|
||||||
|
PORT: "80"
|
||||||
|
volumes:
|
||||||
|
- ../docker/volumes/ca-lose-wireguard-v15:/etc/wireguard
|
||||||
|
- /lib/modules:/lib/modules:ro
|
||||||
|
ports:
|
||||||
|
- "51830:51830/udp"
|
||||||
|
# - "51831:51821/tcp" Public Web-UI Port
|
||||||
|
sysctls:
|
||||||
|
- net.ipv4.ip_forward=1
|
||||||
|
- net.ipv4.conf.all.src_valid_mark=1
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- dnsmasq
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.6
|
||||||
|
|
||||||
|
networks:
|
||||||
|
ca-lose-internal:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.25.0.0/24
|
||||||
|
gateway: 172.25.0.1
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export const createFormSchema = (
|
|||||||
email: z.email(t("email-error")),
|
email: z.email(t("email-error")),
|
||||||
phoneNumber: z.string(t("phone-error")).refine(validator.isMobilePhone),
|
phoneNumber: z.string(t("phone-error")).refine(validator.isMobilePhone),
|
||||||
tickets: z.number(t("ticket-error")).min(1),
|
tickets: z.number(t("ticket-error")).min(1),
|
||||||
chocolates: z.boolean(t("chocolates-error")),
|
|
||||||
companyName: invoice
|
companyName: invoice
|
||||||
? z.string().min(1, t("name-error"))
|
? z.string().min(1, t("name-error"))
|
||||||
: z.string().optional(),
|
: z.string().optional(),
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ export const MainForm = () => {
|
|||||||
lastName: "",
|
lastName: "",
|
||||||
email: "",
|
email: "",
|
||||||
phoneNumber: "",
|
phoneNumber: "",
|
||||||
tickets: 0,
|
tickets: 1,
|
||||||
chocolates: false,
|
|
||||||
companyName: "",
|
companyName: "",
|
||||||
cmpFirstName: "",
|
cmpFirstName: "",
|
||||||
cpmLastName: "",
|
cpmLastName: "",
|
||||||
@@ -317,7 +316,7 @@ export const MainForm = () => {
|
|||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
{/* Tickets + Invoice + Chocolate toggle */}
|
{/* Tickets + Invoice toggle */}
|
||||||
<div className="grid grid-cols-2 gap-3 items-end">
|
<div className="grid grid-cols-2 gap-3 items-end">
|
||||||
<FormControl required>
|
<FormControl required>
|
||||||
<FormLabel>{t("tickets")}</FormLabel>
|
<FormLabel>{t("tickets")}</FormLabel>
|
||||||
@@ -331,14 +330,12 @@ export const MainForm = () => {
|
|||||||
<>
|
<>
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
value={
|
value={field.state.value ?? ""}
|
||||||
field.state.value === 0 ? "" : field.state.value
|
|
||||||
}
|
|
||||||
onBlur={field.handleBlur}
|
onBlur={field.handleBlur}
|
||||||
onChange={(e) => {
|
onChange={(e) =>
|
||||||
const val = e.target.value;
|
field.handleChange(Number(e.target.value))
|
||||||
field.handleChange(val === "" ? 0 : Number(val));
|
}
|
||||||
}}
|
slotProps={{ input: { min: 1 } }}
|
||||||
variant="soft"
|
variant="soft"
|
||||||
sx={{ borderRadius: "10px" }}
|
sx={{ borderRadius: "10px" }}
|
||||||
/>
|
/>
|
||||||
@@ -352,7 +349,7 @@ export const MainForm = () => {
|
|||||||
}}
|
}}
|
||||||
</Field>
|
</Field>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<div className="flex flex-col gap-2 pb-2">
|
<div className="flex items-center pb-2">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={invoice}
|
checked={invoice}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -371,16 +368,6 @@ export const MainForm = () => {
|
|||||||
label={t("invoice")}
|
label={t("invoice")}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
/>
|
/>
|
||||||
<Field name="chocolates">
|
|
||||||
{(field) => (
|
|
||||||
<Checkbox
|
|
||||||
checked={!!field.state.value}
|
|
||||||
onChange={(e) => field.handleChange(e.target.checked)}
|
|
||||||
label={t("chocolates")}
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,5 @@
|
|||||||
"name-error": "Sie müssen einen Namen eingeben!",
|
"name-error": "Sie müssen einen Namen eingeben!",
|
||||||
"email-error": "Sie müssen eine gültige E-Mail Adresse eingeben!",
|
"email-error": "Sie müssen eine gültige E-Mail Adresse eingeben!",
|
||||||
"phone-error": "Sie müssen eine gültige Telefonnummer eingeben!",
|
"phone-error": "Sie müssen eine gültige Telefonnummer eingeben!",
|
||||||
"footer-headline": "Dieses System wurde vollständig konzipiert und entwickelt von Theis Gaedigk. - Portfolio: ",
|
"footer-headline": "Dieses System wurde vollständig konzipiert und entwickelt von Theis Gaedigk. - Portfolio: "
|
||||||
"chocolates": "Schokoladen",
|
|
||||||
"chocolates-error": "Dieses Feld kann nur wahr oder falsch sein."
|
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,5 @@
|
|||||||
"name-error": "You have to enter a name!",
|
"name-error": "You have to enter a name!",
|
||||||
"email-error": "You have to enter a valid E-Mail adress!",
|
"email-error": "You have to enter a valid E-Mail adress!",
|
||||||
"phone-error": "You have to enter a vaild phone number!",
|
"phone-error": "You have to enter a vaild phone number!",
|
||||||
"footer-headline": "This system was fully designed and developed by Theis Gaedigk. - Portfolio: ",
|
"footer-headline": "This system was fully designed and developed by Theis Gaedigk. - Portfolio: "
|
||||||
"chocolates": "Chocolates",
|
|
||||||
"chocolates-error": "This field can only be true or false."
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user