fix: rename the henza brand to montzar

اپ: اصلاح نام برند به منتزر

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
s.esmaeili
2026-10-10 17:17:14 +03:30
co-authored by Cursor
parent f124a69e76
commit d613d16c82
9 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ apps/api/storage/uploads/*
# apps/admin-panel/dist/
# apps/user-app/dist/
# Live henza data dump (customers' personal data). Never commit.
# Live legacy data dump (customers' personal data). Never commit.
# Only the structure-only oapi-struncture.sql belongs in the repo.
/oapi.sql
@@ -29,7 +29,7 @@
// ant-design-pro boilerplate in Vue's own palette, inherited verbatim from
// legacy and used as `@border-color-base`. That file is deleted (ADV4 has no
// LESS build to feed); nothing in the app should reference `--primary`/
// `--accent` any more — use the Henza tokens below instead.
// `--accent` any more — use the Montzar tokens below instead.
:root {
--primary-color: #1c2d56;
--secondary-color: #836447;
+2 -2
View File
@@ -473,14 +473,14 @@ model Customer {
///
/// Legacy recorded NO reason: none of its 49 `customers` columns is a
/// reason/note field, and on rejection it only sent a fixed SMS. So the 14
/// rows migrated from henza carry the sentinel
/// rows migrated from the legacy system carry the sentinel
/// «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support
/// knows why it is blank (owner ruling 2026-10-07). The migration tool
/// writes it only WHERE this IS NULL, so a re-run cannot overwrite a real
/// reason entered in the new system.
verificationRejectionReason String?
/// NULL for rows migrated from henza — legacy recorded no rejection time.
/// NULL for rows migrated from the legacy system — it recorded no rejection time.
verificationRejectedAt DateTime?
/// Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the
+4 -2
View File
@@ -385,10 +385,12 @@ async function main() {
prisma.category.upsert({ where: { id: 'cat-coins' }, update: {}, create: { id: 'cat-coins', title: 'سکه و شمش' } }),
]);
// Databases seeded before the rename hold the old id; Product/Promotion FKs cascade on update.
await prisma.brand.updateMany({ where: { id: 'brand-henza' }, data: { id: 'brand-montzar' } });
const brandMontzar = await prisma.brand.upsert({
where: { id: 'brand-henza' },
where: { id: 'brand-montzar' },
update: { title: 'منتزر طلا' },
create: { id: 'brand-henza', title: 'منتزر طلا' },
create: { id: 'brand-montzar', title: 'منتزر طلا' },
});
const brandArtisan = await prisma.brand.upsert({
where: { id: 'brand-artisan' },
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* henza (MySQL `oapi`) → gold-bank (PostgreSQL) data import.
* Legacy system (MySQL `oapi`) → montzar (PostgreSQL) data import.
*
* The rules live in docs/DATA-MIGRATION-MAP.md; every step cites its section.
*
@@ -8,7 +8,7 @@
* npx ts-node --transpile-only scripts/legacy-import/index.ts \
* --source "mysql://user:pass@127.0.0.1:3307/oapi" \
* --target "postgresql://user:pass@localhost:5432/goldbank_import_test" \
* [--images "F:/henza/storage" --upload-dir "./storage/uploads"] \
* [--images "F:/legacy/storage" --upload-dir "./storage/uploads"] \
* [--only customers,ledger] [--report ./legacy-import-report.md] --yes
*
* Safety:
@@ -9,7 +9,7 @@ import { createPool, type Pool, type RowDataPacket } from 'mysql2/promise';
export interface Options {
sourceUrl: string;
targetUrl: string;
/** henza `storage/` folder holding the image files (optional). */
/** Legacy system's `storage/` folder holding the image files (optional). */
imagesDir?: string;
/** Target UPLOAD_DIR the files are copied into (required with imagesDir). */
uploadDir?: string;
@@ -56,7 +56,7 @@ export class Report {
}
render(header: string[]): string {
const out: string[] = ['# henza → gold-bank import report', '', ...header, ''];
const out: string[] = ['# legacy (oapi) → montzar import report', '', ...header, ''];
for (const [step, s] of this.sections) {
out.push(`## ${step}`, '');
if (s.counts.size) {
@@ -317,7 +317,7 @@ function copyImage(ctx: Ctx, file: string, step: string) {
return;
}
if (!existsSync(from) || !statSync(from).isFile()) {
ctx.report.count('images', 'missing in henza storage');
ctx.report.count('images', 'missing in legacy storage');
ctx.report.note('images', `missing file ${file} (referenced from ${step})`);
return;
}
@@ -1,5 +1,5 @@
/**
* Value conversion from the henza MySQL schema to the Prisma one.
* Value conversion from the legacy system's MySQL schema to the Prisma one.
*
* Every helper here is pure, so the rules can be read and tested in isolation.
* Each rule is the one recorded in docs/DATA-MIGRATION-MAP.md.
@@ -279,7 +279,7 @@
</template>
<template v-slot:title>
<div class="p-8 text-justify">
برای دسترسی به تمامی امکانات نرم افزار هنزاگلد، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید.
برای دسترسی به تمامی امکانات نرم افزار منتزر، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید.
</div>
</template>
<template v-slot:button>
+1 -1
View File
@@ -365,7 +365,7 @@ D18 برای این‌ها توقف می‌خواهد (مورد ۴). شماره
- اسکلت Vite 5 + Vue 3.5 + TS strict + Pinia + vue-router، با نسخه‌های قفل‌شده‌ی بالا.
- **asset ها بایت‌به‌بایت با checksum:** فونت‌ها، `icons.json` و `Icon.vue`، تصاویر `assets/img` و empty، favicon، آیکون‌های manifest، فایل Lottie، `whatsapp.png`.
- `themeConfig/colors.json`، متغیرهای less، `tailwind.config.js` و `postcss-rtl` — همان مقادیر.
- `index.html` همان: عنوان «طلای هنزا»، `theme-color` ‏`#1C2D56`، قفل zoom، دکمه‌ی شناور واتس‌اپ (شماره از env، با مقدار پیش‌فرض مرجع). `bale.png` در `public/` هست ولی در `index.html` استفاده نمی‌شود — بررسی می‌شود.
- `index.html` همان: عنوان «طلای منتزر»، `theme-color` ‏`#1C2D56`، قفل zoom، دکمه‌ی شناور واتس‌اپ (شماره از env، با مقدار پیش‌فرض مرجع). `bale.png` در `public/` هست ولی در `index.html` استفاده نمی‌شود — بررسی می‌شود.
- PWA: `injectManifest`، `sw.ts` فقط precache، manifest همان، **mode production**.
- زیرساخت: پورت 5183، `Dockerfile` و nginx به الگوی v1، سرویس compose، اضافه شدن به `build:release`، به‌روزرسانی `DELIVERY.md`.