diff --git a/packages/api/package.json b/packages/api/package.json index 9933a7d..5a2580e 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -51,9 +51,9 @@ "@fastify/cors": "^10.0.1", "@fastify/middie": "9.0.2", "@fastify/static": "8.0.3", - "@modular-api/api": "^0.5.15", + "@modular-api/api": "^0.5.16", "@modular-api/fastify-cart": "^0.3.2", - "@modular-api/fastify-checkout": "^0.4.10", + "@modular-api/fastify-checkout": "^0.4.11", "@modular-api/fastify-oidc": "^0.6.4", "@mollie/api-client": "^4.1.0", "@slimfact/app": "^0.1.0", diff --git a/packages/api/src/kysely/migrations/04_create_clients_table.ts b/packages/api/src/kysely/migrations/04_create_clients_table.ts index 6874a99..8c75292 100644 --- a/packages/api/src/kysely/migrations/04_create_clients_table.ts +++ b/packages/api/src/kysely/migrations/04_create_clients_table.ts @@ -13,6 +13,7 @@ export async function up(db: Kysely): Promise { .addColumn('city', 'varchar', (col) => col.notNull()) .addColumn('country', 'varchar') .addColumn('vat_id_number', 'varchar') + .addColumn('coc_number', 'varchar') .addColumn('email', 'varchar', (col) => col.notNull().unique()) .addColumn('account_id', 'integer', (col) => col.references('accounts.id')) diff --git a/packages/api/src/kysely/types.ts b/packages/api/src/kysely/types.ts index 63ca88d..b133abd 100644 --- a/packages/api/src/kysely/types.ts +++ b/packages/api/src/kysely/types.ts @@ -19,6 +19,7 @@ export interface Clients { contactPersonName: string | null country: string vatIdNumber: string | null + cocNumber: string | null createdAt: Generated email: string id: Generated diff --git a/packages/api/src/repositories/client.ts b/packages/api/src/repositories/client.ts index 95a1c24..1ce9607 100644 --- a/packages/api/src/repositories/client.ts +++ b/packages/api/src/repositories/client.ts @@ -15,6 +15,7 @@ const defaultSelect = [ 'contactPersonName', 'country', 'vatIdNumber', + 'cocNumber', 'email', 'postalCode', 'accountId' diff --git a/packages/api/src/zod/client.ts b/packages/api/src/zod/client.ts index 4c21be7..1f675ac 100644 --- a/packages/api/src/zod/client.ts +++ b/packages/api/src/zod/client.ts @@ -9,6 +9,7 @@ export const clientValidation = { contactPersonName: z.string().optional(), country: z.string().optional(), vatIdNumber: z.string().nullable().optional(), + cocNumber: z.string().nullable().optional(), email: z.string().email(), postalCode: z.string(), accountId: z.number().nullable().optional() diff --git a/packages/app/package.json b/packages/app/package.json index 620504f..25d10e7 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@modular-api/fastify-cart": "^0.3.2", - "@modular-api/fastify-checkout": "^0.4.10", + "@modular-api/fastify-checkout": "^0.4.11", "@modular-api/quasar-components": "^0.3.6", "@quasar/extras": "1.16.13", "@quasar/quasar-ui-qcalendar": "4.0.0-beta.16", diff --git a/packages/app/src/components/client/ClientForm.vue b/packages/app/src/components/client/ClientForm.vue index 59e0183..bcd3ac7 100644 --- a/packages/app/src/components/client/ClientForm.vue +++ b/packages/app/src/components/client/ClientForm.vue @@ -68,6 +68,15 @@ lazy-rules name="vatIdNumber" /> + =14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@rollup/pluginutils@5.1.3': resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} engines: {node: '>=14.0.0'} @@ -7405,7 +7404,7 @@ snapshots: - encoding - supports-color - '@modular-api/api@0.5.15(bcrypt@5.1.1)(fastify@5.1.0)(handlebars@4.7.8)(kysely@0.27.4)(openid-client@6.1.3)(otplib@12.0.1)(typescript@5.7.2)(vue@3.5.13(typescript@5.7.2))': + '@modular-api/api@0.5.16(bcrypt@5.1.1)(fastify@5.1.0)(handlebars@4.7.8)(kysely@0.27.4)(openid-client@6.1.3)(otplib@12.0.1)(typescript@5.7.2)(vue@3.5.13(typescript@5.7.2))': dependencies: '@fastify/cookie': 11.0.1 '@fastify/cors': 10.0.1 @@ -7413,7 +7412,7 @@ snapshots: '@fastify/middie': 9.0.2 '@fastify/static': 8.0.3 '@modular-api/fastify-cart': 0.3.2(kysely@0.27.4) - '@modular-api/fastify-checkout': 0.4.10(kysely@0.27.4) + '@modular-api/fastify-checkout': 0.4.11(kysely@0.27.4) '@modular-api/fastify-oidc': 0.6.4(@fastify/static@8.0.3)(bcrypt@5.1.1)(fastify@5.1.0)(handlebars@4.7.8)(kysely@0.27.4)(otplib@12.0.1)(typescript@5.7.2) '@trpc/server': 10.45.2 '@types/compression': 1.7.5 @@ -7463,6 +7462,18 @@ snapshots: transitivePeerDependencies: - encoding + '@modular-api/fastify-checkout@0.4.11(kysely@0.27.4)': + dependencies: + '@fastify/cookie': 11.0.1 + '@fastify/middie': 9.0.2 + '@fastify/static': 8.0.3 + '@mollie/api-client': 4.1.0 + '@vitrify/tools': 0.2.3 + fastify-plugin: 5.0.1 + kysely: 0.27.4 + transitivePeerDependencies: + - encoding + '@modular-api/fastify-oidc@0.6.4(@fastify/static@8.0.3)(bcrypt@5.1.1)(fastify@5.1.0)(handlebars@4.7.8)(kysely@0.27.4)(otplib@12.0.1)(typescript@5.7.2)': dependencies: '@fastify/cookie': 11.0.1 @@ -7619,7 +7630,7 @@ snapshots: '@rollup/plugin-node-resolve@15.3.0(rollup@2.79.1)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@2.79.1) + '@rollup/pluginutils': 5.1.3(rollup@2.79.1) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 @@ -7648,14 +7659,6 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.1 - '@rollup/pluginutils@5.1.2(rollup@2.79.1)': - dependencies: - '@types/estree': 1.0.6 - estree-walker: 2.0.2 - picomatch: 2.3.1 - optionalDependencies: - rollup: 2.79.1 - '@rollup/pluginutils@5.1.3(rollup@2.79.1)': dependencies: '@types/estree': 1.0.6