From 95376d3223806fbc2fb3f9d90c6d7bf4baab8542 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 May 2026 00:58:10 -0400 Subject: [PATCH] fix migration error at fleet page --- apps/api/src/modules/admin/admin.service.ts | 4 ++-- apps/api/src/tests/helpers/fixtures.ts | 2 +- .../src/app/(public)/pricing/PricingClient.tsx | 4 ++-- docker/scripts/dev-bootstrap.sh | 8 +++++--- packages/types/src/api.ts | 8 ++++---- results/individual-repos/scan/trivy.json | 4 ++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/apps/api/src/modules/admin/admin.service.ts b/apps/api/src/modules/admin/admin.service.ts index 9ba263c..f76dfd0 100644 --- a/apps/api/src/modules/admin/admin.service.ts +++ b/apps/api/src/modules/admin/admin.service.ts @@ -12,8 +12,8 @@ import * as repo from './admin.repo' const ADMIN_RESET_TTL_MINUTES = 60 const PLAN_MONTHLY_AMOUNT: Record = { - STARTER: 29900, - GROWTH: 59900, + STARTER: 2990, + GROWTH: 3990, PRO: 99900, } diff --git a/apps/api/src/tests/helpers/fixtures.ts b/apps/api/src/tests/helpers/fixtures.ts index eb2a5ee..0ca4bd7 100644 --- a/apps/api/src/tests/helpers/fixtures.ts +++ b/apps/api/src/tests/helpers/fixtures.ts @@ -169,7 +169,7 @@ export async function createSubscriptionInvoice( data: { companyId, subscriptionId, - amount: 29900, + amount: 2990, currency: 'MAD', status: 'PENDING', paymentProvider: 'AMANPAY', diff --git a/apps/marketplace/src/app/(public)/pricing/PricingClient.tsx b/apps/marketplace/src/app/(public)/pricing/PricingClient.tsx index 62cacad..299bcb3 100644 --- a/apps/marketplace/src/app/(public)/pricing/PricingClient.tsx +++ b/apps/marketplace/src/app/(public)/pricing/PricingClient.tsx @@ -14,12 +14,12 @@ const LANGUAGE_CURRENCY: Record = { ar: 'MAD', fr: 'EUR', en: const PRICES: Record> = { STARTER: { - MAD: { monthly: 299, annual: 2990 }, + MAD: { monthly: 299, annual: 299 }, USD: { monthly: 29, annual: 290 }, EUR: { monthly: 27, annual: 270 }, }, GROWTH: { - MAD: { monthly: 599, annual: 5990 }, + MAD: { monthly: 599, annual: 399 }, USD: { monthly: 59, annual: 590 }, EUR: { monthly: 55, annual: 550 }, }, diff --git a/docker/scripts/dev-bootstrap.sh b/docker/scripts/dev-bootstrap.sh index 57a91a7..a397081 100644 --- a/docker/scripts/dev-bootstrap.sh +++ b/docker/scripts/dev-bootstrap.sh @@ -20,13 +20,15 @@ if [ -n "$STORAGE_ROOT" ]; then fi fi +echo "[migrate] Applying pending migrations" +npm run db:deploy + if [ -f "$MARKER_FILE" ]; then - echo "[migrate] Existing dev database detected; skipping deploy and seed" + echo "[migrate] Existing dev database detected; skipping seed" exit 0 fi -echo "[migrate] First dev bootstrap; applying schema and seed data" -npm run db:deploy +echo "[migrate] First dev bootstrap; seeding data" npm run db:seed touch "$MARKER_FILE" diff --git a/packages/types/src/api.ts b/packages/types/src/api.ts index 5c1977f..0b7b24d 100644 --- a/packages/types/src/api.ts +++ b/packages/types/src/api.ts @@ -22,12 +22,12 @@ export interface ApiError { // Plan prices in smallest currency unit export const PLAN_PRICES: Record>> = { STARTER: { - MONTHLY: { MAD: 29900, USD: 2900, EUR: 2700 }, - ANNUAL: { MAD: 299000, USD: 29000, EUR: 27000 }, + MONTHLY: { MAD: 2990, USD: 2900, EUR: 2700 }, + ANNUAL: { MAD: 29900, USD: 29000, EUR: 27000 }, }, GROWTH: { - MONTHLY: { MAD: 59900, USD: 5900, EUR: 5400 }, - ANNUAL: { MAD: 599000, USD: 59000, EUR: 54000 }, + MONTHLY: { MAD: 3990, USD: 5900, EUR: 5400 }, + ANNUAL: { MAD: 39900, USD: 59000, EUR: 54000 }, }, PRO: { MONTHLY: { MAD: 99900, USD: 9900, EUR: 9000 }, diff --git a/results/individual-repos/scan/trivy.json b/results/individual-repos/scan/trivy.json index 149222a..d216126 100644 --- a/results/individual-repos/scan/trivy.json +++ b/results/individual-repos/scan/trivy.json @@ -13,8 +13,8 @@ "Branch": "develop", "Commit": "e74681e810a0eec89557d76afe565a6afefd5df0", "CommitMsg": "fix the upload issue and add driver license upload", - "Author": "root \u003cmelabidi@alrahmaisgl.org\u003e", - "Committer": "root \u003cmelabidi@alrahmaisgl.org\u003e" + "Author": "root \u003cmoulay.elabidi@gmail.com\u003e", + "Committer": "root \u003cmoulay.elabidi@gmail.com\u003e" }, "Results": [ {