Commit Graph
22 Commits
Author SHA1 Message Date
mohmdsdgandCursor e98831f0f9 feat: add npm run update for safe API deploys
Ship schema to replicas without the data repair that disables subscriptions and stalls replication.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-07 17:15:12 +03:30
MahdiandCursor 9b11617eab feat: Excel export of all projects for full-access admins
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-27 20:44:29 +03:30
mohmdsdgandCursor 3034c59319 fix(build): ship jalaali types with production dependencies
Move @types/jalaali-js into dependencies and add a local module declaration so nest build works when installing without devDependencies.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 18:59:38 +03:30
Mahdi 67281710ac fix(billing): compute plan expiry with Jalali months
Server/plugin/support charges used Gregorian Date#setMonth, so 3 months from 1405/06/01 became 1405/09/02. Now add N Jalali months minus one day (1405/08/30).
2026-08-24 18:03:54 +03:30
mohmdsdgandCursor 71d6f6a534 fix(settings): restrict superadmin template to can_edit=0 keys only
Superadmin was seeding all deploy_settings_const INSERT keys including
can_edit=1 entries with wrong defaults (e.g. montzar_product_id=25).
Template/catalog now follow final can_edit=0 from SQL; editable keys are
purged from setting_templates and tenant settings on boot/seed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 18:40:07 +03:30
mohmdsdgandCursor 16d562caa5 feat(replicas): auto-heal slave data drift and no-store public settings
Add sync-replica-data repair on deploy, a publisher-side replica watch
(60s + after tenant/settings writes), REFRESH PUBLICATION after migrate,
and Cache-Control no-store on program-settings and get_version.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 12:32:30 +03:30
mohmdsdgandCursor d57ce0a3cb feat(settings): store Khanegi keys in settings tables instead of tenant JSON
Template defaults seed from deploy_settings_const; new tenants copy them, import decides per key, and /get_settings reads the per-tenant rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 20:14:17 +03:30
mohmdsdgandCursor 515e39d420 feat(deploy): sync schema to replication subscribers before migrating
Logical replication carries rows but not DDL, so a migration that adds a
column stalls every subscriber with "missing replicated columns" until the
column exists there too. _prisma_migrations is replicated, so migrate deploy
on a subscriber reports nothing pending while its tables lag behind.

sync-replica-schema.sh applies pending migrations to each subscriber first,
tracking them locally in _replica_ddl_applied, then migrates the publisher.
--check reports subscription state and columns missing on any replica.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 21:34:02 +03:30
MahdiandCursor a589c7f0c2 fix: normalize Khanegi newTheme ui config for userTheme schema
Map sidebar+bottom→both, products→buyProduct, ensure header.variant. Repair script + get_user normalize so colors apply instead of Zod fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 12:34:07 +03:30
MahdiandCursor 425eb3c714 feat: bulk apply Niazi modular brand colors to Khanegi tenants
Add prisma:bulk-khanegi-modular-brand (skip Aygin/newTheme). Palette: header #0a1b37, accent #e0be7f, bg #ffffff; bumps appVersion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 11:42:31 +03:30
MahdiandCursor 2f0e39edbb Add bulk copy of Khanegi SMS price and charge info from pilot.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 16:00:54 +03:30
MahdiandCursor 448dc444c9 Add Khanegi SMS sync inventory, batch import, and rollout helpers.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 15:30:43 +03:30
MahdiandCursor c6d90ea262 Fix SMS tenant copy target matching; add list-tenants helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 17:17:56 +03:30
MahdiandCursor 7ebee7fa4e Add script to copy SMS wallet between SuperAdmin tenants.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 16:58:19 +03:30
MahdiandCursor 17a54774ae Add remote SMS panel sync API and product MySQL import script.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:53:59 +03:30
Mahdi 14d9c5d143 Implementing SMS panel in Super Admin 2026-08-05 14:13:44 +03:30
MahdiandCursor b66e47c3b3 Add Khanegi default appearance snapshot seed and strip SA meta from get_user.
Mirrors Hamkar so each khanegi tenant can restore its factory ui-config without exposing defaultSnapshot publicly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 21:13:46 +03:30
MahdiandCursor 3fa24ac965 Add Hamkar default appearance snapshot seed script and builder support.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 20:51:33 +03:30
MahdiandCursor 54036a531c Emit Nest build to dist/main.js by compiling only src.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 20:47:37 +03:30
MahdiandCursor a6b3457779 Add production-ready SuperAdmin API features for tenants, SMS, servers, and plugins.
Includes mobile auth, get_user/get_version, SMS wallet parity endpoints, appearance backfill, and related Prisma migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 18:19:53 +03:30
Mahdi ddf36f8470 Creating a control panel infrastructure 2026-07-23 19:41:21 +03:30
SuperAdmin 7fbc47766c Initial SuperAdmin API (NestJS + Prisma) 2026-07-23 10:25:32 +03:30