Compare commits

9 Commits

Author SHA1 Message Date
BOHA
f49015a627 1.1.4 2026-03-26 15:33:11 +01:00
BOHA
c201958689 fix: increase global rate limit from 100 to 300 req/min
Switching months quickly on received invoices triggered rate limit
due to multiple API calls per navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:33:10 +01:00
BOHA
461b54c4e6 1.1.3 2026-03-26 15:21:23 +01:00
BOHA
bdd58e70ff fix: flatten customer and user names in project detail response
Frontend expected flat customer_name and responsible_user_name but API
returned nested customers/users objects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:21:22 +01:00
BOHA
2fccc5d31d 1.1.2 2026-03-26 13:13:47 +01:00
BOHA
2f4a661b7d fix: flatten order/quotation data in project detail response
Project detail API returned nested orders/quotations objects but frontend
expected flat order_number, order_status, quotation_number fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:13:47 +01:00
BOHA
6aaf28bd2c 1.1.1 2026-03-26 13:05:19 +01:00
BOHA
d211f9a616 chore: rename package to app-ts 2026-03-26 13:05:19 +01:00
BOHA
9c05681fde chore: bump version to 1.1.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:10:07 +01:00
4 changed files with 14 additions and 6 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "boha-app-ts", "name": "boha-app-ts",
"version": "1.0.0", "version": "1.1.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "boha-app-ts", "name": "boha-app-ts",
"version": "1.0.0", "version": "1.1.4",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "boha-app-ts", "name": "app-ts",
"version": "1.0.0", "version": "1.1.4",
"description": "", "description": "",
"main": "dist/server.js", "main": "dist/server.js",
"scripts": { "scripts": {

View File

@@ -58,7 +58,7 @@ async function start() {
await app.register(cookie); await app.register(cookie);
await app.register(rateLimit, { await app.register(rateLimit, {
max: 100, max: 300,
timeWindow: "1 minute", timeWindow: "1 minute",
}); });

View File

@@ -76,8 +76,16 @@ export async function getProject(id: number) {
}, },
}); });
if (!project) return null; if (!project) return null;
const { orders, quotations, customers, users, ...rest } = project;
return { return {
...project, ...rest,
customer_name: customers?.name ?? null,
responsible_user_name: users
? `${users.first_name} ${users.last_name}`
: null,
order_number: orders?.order_number ?? null,
order_status: orders?.status ?? null,
quotation_number: quotations?.quotation_number ?? null,
has_nas_folder: project.project_number has_nas_folder: project.project_number
? nasFileManager.projectFolderExists(project.project_number) ? nasFileManager.projectFolderExists(project.project_number)
: false, : false,