Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
FROM node:20-alpine AS base

RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
openssl \
gdb

ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV NODE_ENV=production

# 🔴 Enable Node crash diagnostics
Expand Down
11 changes: 2 additions & 9 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
FROM node:20-alpine AS base

# System deps for puppeteer/chromium used by the API
# System deps for API + test orchestration
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
openssl \
wget \
bash \
netcat-openbsd

ENV PUPPETEER_SKIP_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser \
NODE_ENV=production
ENV NODE_ENV=production

# Build-time args (optional)
ARG SENTRY_AUTH_TOKEN
Expand Down
4 changes: 1 addition & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
"cors": "^2.8.5",
"cuid": "^3.0.0",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",
"express": "^4.21.1",
"express-file-routing": "^3.0.3",
"express-session": "^1.18.1",
"html-pdf-node": "^1.0.8",
"http-proxy-middleware": "^3.0.5",
"inquirer": "^12.4.2",
"jsonwebtoken": "^9.0.2",
Expand All @@ -43,9 +41,9 @@
"passport": "^0.7.0",
"passport-saml": "^3.2.4",
"path": "^0.12.7",
"pdfkit": "^0.17.2",
"pg": "^8.13.1",
"postmark": "^4.0.5",
"puppeteer": "^23.6.1",
"tsx": "^4.21.0",
"uploadthing": "^7.2.0",
"url": "^0.11.4",
Expand Down
4 changes: 3 additions & 1 deletion api/routes/shop/[shopId]/job/[jobId]/draft-invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export const get = [
},
});

const { url, key } = await generateInvoice(job, userId, shopId);
const { url, key } = await generateInvoice(job, userId, shopId, {
draft: true,
});

return res.json({ url, key });
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const jobItemUpdateSchema = z.object({
materialId: z.string().nullable().optional(),
secondaryMaterialId: z.string().nullable().optional(),

timeQty: z.number().optional().default(0),
timeQty: z.number().optional().nullable().default(0),
processingTimeQty: z.number().nullable().optional().default(0),
unitQty: z.number().nullable().optional().default(0),
materialQty: z.number().nullable().optional().default(0),
materialQty: z.number().nullable().optional().nullable().default(0),
secondaryMaterialQty: z.number().nullable().optional().default(0),
rawValue: z.number().nullable().optional().default(0),
qty: z.number().optional().default(0),
qty: z.number().optional().nullable().default(0),

approved: z.boolean().nullable().optional(),
status: z.string().optional(),
Expand Down
179 changes: 0 additions & 179 deletions api/util/docgen/invoice.ejs

This file was deleted.

Loading
Loading