diff --git a/Makefile b/Makefile index 8bfbc94..fe84387 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ build: ## deps: install Node.js, pnpm and native-module build tools (Fedora) deps: require-root - dnf install -y nodejs gcc-c++ make python3 rsync + dnf install -y nodejs gcc-c++ make python3 corepack enable ## install: full production install on a fresh checkout (Fedora) @@ -41,14 +41,9 @@ service: require-root # Dedicated system user (no login, no home). id -u $(SERVICE_USER) >/dev/null 2>&1 || \ useradd --system --no-create-home --shell /usr/sbin/nologin $(SERVICE_USER) - # Copy the tree (preserving pnpm's symlinked node_modules) but leave behind - # the repo metadata, local dev database, and editor/nix cruft. + # Copy the whole tree so pnpm's symlinked node_modules stay intact. mkdir -p $(PREFIX) - rsync -a --delete \ - --exclude='.git' --exclude='.direnv' --exclude='.env' \ - --exclude='*.db' --exclude='*.db-wal' --exclude='*.db-shm' \ - --exclude='$(PREFIX)' \ - ./ $(PREFIX)/ + cp -a . $(PREFIX)/ # Config + secrets — never clobber an existing env file. mkdir -p $(CONFDIR) test -f $(CONFDIR)/wutzcalc.env || \ diff --git a/README.md b/README.md index 77a4d39..a21460a 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ sudo useradd --system --no-create-home --shell /usr/sbin/nologin wutzcalc # 2. Install the built app (run `pnpm install && pnpm build` first) sudo mkdir -p /opt/wutzcalc -sudo rsync -a --exclude='.git' --exclude='*.db*' ./ /opt/wutzcalc/ +sudo cp -a . /opt/wutzcalc # or rsync/checkout into place sudo chown -R root:root /opt/wutzcalc # app dir stays read-only to the service # 3. Config + secrets (chmod 600 — holds ADMIN_PASSWORD) diff --git a/client/admin.html b/client/admin.html index 3d58c4b..aa42195 100644 --- a/client/admin.html +++ b/client/admin.html @@ -4,14 +4,6 @@ wutzcalc — Backoffice - - diff --git a/client/index.html b/client/index.html index d375e0a..8a7e6af 100644 --- a/client/index.html +++ b/client/index.html @@ -4,14 +4,6 @@ wutzcalc - - diff --git a/client/public/favicon.svg b/client/public/favicon.svg deleted file mode 100644 index 63774fe..0000000 --- a/client/public/favicon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/client/src/admin/Admin.tsx b/client/src/admin/Admin.tsx index 40dc8b8..81884d3 100644 --- a/client/src/admin/Admin.tsx +++ b/client/src/admin/Admin.tsx @@ -62,7 +62,7 @@ function Login({ onAuthed }: { onAuthed: () => void }) { value={pw} onInput={(e: any) => setPw(e.currentTarget.value)} /> - {err &&
{err}
} + {err &&
{err}
} @@ -107,7 +107,7 @@ function Stats() { <>

Umsatz nach Tagen

- +
@@ -227,7 +227,7 @@ function Drinks() { - + @@ -377,7 +377,7 @@ function Bars() { <>

Bars

{bars.map(b => ( -
+
- +
-
- - {bar.name} -
+
{bar.name}
@@ -95,12 +92,10 @@ export function Sale({ config, onChangeBar }: Props) { )} ))} - {bar.pfand_cents > 0 && ( - - )} +
diff --git a/server/src/time.ts b/server/src/time.ts index 3302406..e70445b 100644 --- a/server/src/time.ts +++ b/server/src/time.ts @@ -39,7 +39,7 @@ function localParts(d: Date, tz: string = TZ): LocalParts { hour: '2-digit', minute: '2-digit', second: '2-digit', - hourCycle: 'h23', // force midnight as 00, never the 24 artifact + hour12: false, }); const parts: Record = {}; for (const p of fmt.formatToParts(d)) { @@ -49,7 +49,7 @@ function localParts(d: Date, tz: string = TZ): LocalParts { year: Number(parts.year), month: Number(parts.month), day: Number(parts.day), - hour: Number(parts.hour), + hour: Number(parts.hour === '24' ? '0' : parts.hour), minute: Number(parts.minute), second: Number(parts.second), };
TagTransaktionenBezahltCrew-TransaktionenPfand zurück