fix migration error at fleet page

This commit is contained in:
root
2026-05-25 00:58:10 -04:00
parent 5ef9efb8a9
commit 95376d3223
6 changed files with 16 additions and 14 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import * as repo from './admin.repo'
const ADMIN_RESET_TTL_MINUTES = 60
const PLAN_MONTHLY_AMOUNT: Record<string, number> = {
STARTER: 29900,
GROWTH: 59900,
STARTER: 2990,
GROWTH: 3990,
PRO: 99900,
}
+1 -1
View File
@@ -169,7 +169,7 @@ export async function createSubscriptionInvoice(
data: {
companyId,
subscriptionId,
amount: 29900,
amount: 2990,
currency: 'MAD',
status: 'PENDING',
paymentProvider: 'AMANPAY',
@@ -14,12 +14,12 @@ const LANGUAGE_CURRENCY: Record<string, Currency> = { ar: 'MAD', fr: 'EUR', en:
const PRICES: Record<string, Record<Currency, { monthly: number; annual: number }>> = {
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 },
},
+5 -3
View File
@@ -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"
+4 -4
View File
@@ -22,12 +22,12 @@ export interface ApiError {
// Plan prices in smallest currency unit
export const PLAN_PRICES: Record<string, Record<string, Record<string, number>>> = {
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 },
+2 -2
View File
@@ -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": [
{