From 46f42b6bc6523566f1414bbb074d0dd364e144cb Mon Sep 17 00:00:00 2001 From: Stefan van Herwijnen Date: Mon, 28 Oct 2024 10:18:34 +0100 Subject: [PATCH] fix: allow add payment sub menu to cover parent --- packages/api/package.json | 2 +- packages/api/src/setup.ts | 3 ++- .../invoice/InvoiceExpansionItem.vue | 6 +++++- pnpm-lock.yaml | 18 +++++++++--------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index acab7e7..ce81ec2 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -50,7 +50,7 @@ "@fastify/cors": "^10.0.1", "@fastify/middie": "9.0.2", "@fastify/static": "8.0.2", - "@modular-api/api": "^0.5.8", + "@modular-api/api": "^0.5.10", "@modular-api/fastify-cart": "^0.3.1", "@modular-api/fastify-checkout": "^0.4.7", "@modular-api/fastify-oidc": "^0.6.1", diff --git a/packages/api/src/setup.ts b/packages/api/src/setup.ts index aae6945..a072f27 100644 --- a/packages/api/src/setup.ts +++ b/packages/api/src/setup.ts @@ -48,6 +48,7 @@ const sassVariables = { */ export default async function (fastify: FastifyInstance) { const hostname = env.read('API_HOSTNAME') || env.read('VITE_API_HOSTNAME') + const corsOrigin = [`https://${hostname}`] if (!hostname) throw new Error( @@ -208,7 +209,7 @@ export default async function (fastify: FastifyInstance) { await fastify.register(modularApiPlugin, { kysely, cors: { - origin: [`https://${hostname}`] + origin: corsOrigin }, trpc: { createRouter, diff --git a/packages/app/src/components/invoice/InvoiceExpansionItem.vue b/packages/app/src/components/invoice/InvoiceExpansionItem.vue index b3c445b..ee37bf5 100644 --- a/packages/app/src/components/invoice/InvoiceExpansionItem.vue +++ b/packages/app/src/components/invoice/InvoiceExpansionItem.vue @@ -254,7 +254,11 @@ - +