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>
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).
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>
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>
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>
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>
Mirrors Hamkar so each khanegi tenant can restore its factory ui-config without exposing defaultSnapshot publicly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Includes mobile auth, get_user/get_version, SMS wallet parity endpoints, appearance backfill, and related Prisma migrations.
Co-authored-by: Cursor <cursoragent@cursor.com>