diff --git a/.phase5-state.json b/.phase5-state.json index 8199c64..0f56e26 100644 --- a/.phase5-state.json +++ b/.phase5-state.json @@ -4,6 +4,9 @@ "customer-detail-page", "project-detail-page" ], - "current_feature": "settings-page", - "started_at": "2026-05-23T05:20:11.407108" + "current_feature": "api-client-phase5", + "started_at": "2026-05-23T05:20:11.407108", + "attempted_features": [ + "settings-page" + ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 625eeee..a700c80 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -589,3 +589,17 @@ src/routes/settings.ts(3,10): error TS2305: Module '"../db/schema"' has no expor undefined /home/dark/Developer/EmberClone/apps/api:  ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 2: tsc --noEmit -p tsconfig.json +- `05:24:10` **INFO** Committed feature settings-page +- `05:24:11` **INFO** Pushed: rc=0 + +## Phase-3 Feature: api-client-phase5 (2026-05-23 05:24:11) + +- `05:24:11` **INFO** Description: API um customer-detail, project-detail, settings, theme erweitern +- `05:24:11` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: getCustomerProjects(id), getCustomerT…) +- `05:24:50` **INFO** wrote 4448 chars in 38.9s (attempt 1) +- `05:24:50` **INFO** Running tsc --noEmit on api… +- `05:24:51` **WARN** tsc errors: +src/routes/settings.ts(3,10): error TS2305: Module '"../db/schema"' has no exported member 'settings'. +undefined +/home/dark/Developer/EmberClone/apps/api: + ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 2: tsc --noEmit -p tsconfig.json diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts index 2b3f54e..18b86e3 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -113,11 +113,23 @@ export const api = { }) }, + async getCustomerProjects(customerId: string) { + return request(`/customers/${customerId}/projects`) + }, + + async getCustomerTimeEntries(customerId: string) { + return request(`/customers/${customerId}/time-entries`) + }, + async listProjects(opts?: Record) { const query = opts ? `?${new URLSearchParams(opts).toString()}` : "" return request(`/projects${query}`) }, + async getProject(id: string) { + return request(`/projects/${id}`) + }, + async createProject(data: Partial) { return request("/projects", { method: "POST", @@ -153,5 +165,16 @@ export const api = { return request(`/users/${id}`, { method: "DELETE" }) + }, + + async getSettings() { + return request("/settings") + }, + + async updateSettings(data: { workspaceName?: string; defaultBillable?: boolean; weekStart?: number }) { + return request("/settings", { + method: "PATCH", + body: JSON.stringify(data) + }) } } \ No newline at end of file