Commit Graph
508 Commits
Author SHA1 Message Date
mohmdsdgandCursor 7e8979d78d fix(settings): honor per-day trading hours and refresh SuperAdmin overlay
Use trading_hours_by_day for close_price gates, prefer public SuperAdmin fetch, and add refresh endpoint/command so stale last-good cache no longer keeps switches like enable_automation off.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 21:22:44 +03:30
Mahdi 61dbaf1f0f feat(sms): failover SuperAdmin SMS hosts with sticky success cache
Try montzar/montech/montest when wallet panel calls fail; remember last working base for 7 days. No .env change required.
2026-08-24 17:32:55 +03:30
mohmdsdgandCursor 352bb9976d feat(settings): enable_automation gate; reject stale montzar quote jumps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 16:15:52 +03:30
mohmdsdgandCursor b28a98938e feat(settings): add menu/show_to_user and public get_settings for client apps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 15:32:35 +03:30
mohmdsdgandCursor 5c542e2733 fix(settings): never plant deploy seed defaults on restore-from-backup
Ignore limangold/payping seed URLs from backup or superadmin when filling;
keep any real local value untouched unless force-overwrite.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 12:48:10 +03:30
mohmdsdgandCursor 3eac5bcb3a fix(settings): treat limangold deploy default as refillable from superadmin
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 12:45:52 +03:30
mohmdsdgandCursor 1cb8c40607 fix(settings): never overwrite existing values on restore-from-backup
Prefer superadmin over stale backup defaults like limangold.ir when filling empty keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 12:45:33 +03:30
mohmdsdgandCursor d2fd315e8a setting pushed
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 22:34:18 +03:30
mohmdsdg d3997cfc8f added time working 2026-08-23 17:13:30 +03:30
mohmdsdg 657c10d1cc added automation 2026-08-23 14:16:00 +03:30
mohmdsdg 0c0b424a69 fix price 2026-08-22 18:06:35 +03:30
mohmdsdg 7bdb2c91a0 fix(settings): read SuperAdmin overlay via ConfigService everywhere 2026-08-22 15:10:54 +03:30
mohmdsdg 197b49b719 fix(pargar): read login credentials from ConfigService overlay 2026-08-22 15:04:36 +03:30
mohmdsdg 3ea21594a6 fix all error 2026-08-22 14:42:28 +03:30
mohmdsdgandCursor 2e960c07a1 fix(settings): keep local can_edit=0 keys in get_settings when SA omits them
Customer /api/get_settings dropped price_provider because SuperAdmin
catalog did not return it. Merge SA values when present; otherwise keep
the tenant copy so the app still receives the key.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 22:02:10 +03:30
mohmdsdgandCursor 1c7a3ede77 fix(settings): do not overlay empty SuperAdmin values onto tenant DB
Blank template values must not wipe local can_edit=0 settings like
price_provider until SuperAdmin actually saves a value for that tenant.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 21:47:43 +03:30
mohmdsdgandCursor 924234bb19 fix(settings): PHP sync for runtime can_edit after deploy
Force can_edit=1 for Montzar/price runtime keys via settings:deploy
and settings:sync-runtime-can-edit, so tenant DB stays correct even
when an older deploy SQL is still on the server.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 21:07:12 +03:30
mohmdsdgandCursor b7eed369c6 fix(settings): force can_edit=1 for runtime keys in API and DB writes
editable_only now includes RUNTIME_KEYS; normalize can_edit in responses.
UpdateConfig and montzar login persist can_edit=1. SQL override moved before COMMIT.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 20:15:28 +03:30
mohmdsdgandCursor 027170a33f fix(settings): fee only from fee_service_charge_percentage; deploy:tenant
Remove service_charge_percentage alias and config/fee.php fallback (empty → 0).
Move code-managed Montzar/price runtime keys to can_edit=1 in deploy SQL.
Add settings:deploy and deploy:tenant artisan commands for server deploy.
Advanced admin settings merge runtime keys from local DB; block manual edits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:55:29 +03:30
mohmdsdgandCursor 5b2ed2e5fc fix(price-trigger): restrict notifications to SMS only
Remove email/in-app paths and enforce sms action on create/update so
price alerts match the product requirement for SMS-only delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:02:46 +03:30
mohmdsdgandCursor 08d51ab1d1 feat(admin): add Montzar partner product list API for settings select
Expose GET /admin/montzar/products using MontzarService::listProductOptions().

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 14:02:48 +03:30
mohmdsdgandCursor a321ebdaad feat(product): add show_in_list toggle and TV price formula
- New `show_in_list` column to control product visibility in customer list
- New `tv_price_formula_enabled` + `tv_price_formula` columns for separate TV pricing
- FormulaPriceService: isTvEnabled() and calculateTvForProduct()
- listTvProducts applies TV formula overrides before returning
- filterProductData handles both new field sets

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 11:51:54 +03:30
mohmdsdgandCursor b0296c6e94 feat(server): evaluate price alerts per product and fix gold discharge rounding
Alerts now bind to a product_id and share one evaluator; displayed gold within a rounding step discharges the full wallet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 22:23:20 +03:30
mohmdsdgandCursor 341b2da2c9 feat(server): expose settings table API and compose get_settings from SA locks plus local edits
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 18:52:29 +03:30
mohmdsdg 5337818396 fix setting bug 2026-08-18 18:32:41 +03:30
mohmdsdgandCursor 0afa01eea9 fix(server): queue tiny Pargar gold wallet documents instead of skipping them
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 17:57:22 +03:30
mohmdsdgandCursor e158831fd3 feat(server): add show_on_tv product flag and public /tv products API
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 17:17:01 +03:30
mohmdsdgandCursor da9f98b958 feat(server): overlay admin get_settings from SuperAdmin program-settings
Fetch public program-settings with 3-origin retry and no Laravel cache so
local DB settings stay in sync with the sold version.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 16:10:37 +03:30
mohmdsdgandCursor 7d405cb83b feat(server): store and apply negative special price profits
Keep signed buy/sell extras so discounts work on quotes and orders, and ignore the nested user clone in this repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 13:11:00 +03:30
mohmdsdg bd8284e4f8 added setting for user 2026-08-16 22:00:23 +03:30
mohmdsdg c3c3a60088 added table of co-woeker requests and new features 4 2026-08-16 20:58:56 +03:30
mohmdsdg 0e45a83088 added table of co-woeker requests and new features 3 2026-08-16 20:46:10 +03:30
mohmdsdg 28fd07d176 added table of co-woeker requests and new features 2 2026-08-16 20:26:23 +03:30
mohmdsdg acd1c2ea20 added table of co-woeker requests and new features 2026-08-16 20:03:18 +03:30
mohmdsdg 6fffd84584 Merge branch 'main' of https://get.feep.ir/khaneghi_abshodeh/khaneghi_server 2026-08-15 18:23:28 +03:30
mohmdsdg d651ff9d6c fix dome bugs 2026-08-15 18:22:58 +03:30
Mahdi 7b62c0e318 fix(sms): SuperAdmin wallet alerts ignore send_sms and go to all admins 2026-08-15 14:30:40 +03:30
MahdiandCursor c09b73763a fix(admin): stop dashboard OOM by aggregating product stats in SQL
Drop unbounded TransactionsAdmin/customer dumps from dashboardMaster
and aggregate GT_products_report without loading all transactions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 21:51:55 +03:30
MahdiandCursor 9a101292ea fix(admin): stop dashboard OOM by aggregating product stats in SQL
Drop unbounded TransactionsAdmin/customer dumps from dashboardMaster
and aggregate GT_products_report without loading all transactions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 21:45:59 +03:30
MahdiandCursor b81a840ffd fix(super): accept SMS shared secret as Bearer for kill-switch
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 19:53:40 +03:30
MahdiandCursor 5cd81b9663 fix(super): accept SMS shared HMAC for kill-switch auth
Allow SUPERADMIN_SMS_SHARED_SECRET (+ domain) like SMS remote, with
Bearer SUPERADMIN_REMOTE_TOKEN as fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 19:33:30 +03:30
MahdiandCursor e92be66e54 feat: SuperAdmin server-access kill switch gate
Add /super/settings endpoints and API middleware that returns generic 503 while keeping unlock routes whitelisted.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 15:51:17 +03:30
safavimohadeseh78andCursor 4468eabd03 Add referral_show setting and keep existing setting values intact.
Allow hiding the referral field on user registration via settings SQL and ConfigService, and document SQL-only Cursor rules that never overwrite live values.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 08:26:13 +02:00
mohmdsdgandCursor fabce6176a Price orders at the provider's real trade rate instead of the mid quote.
montzar_live_price is the midpoint between the colleague's buy and sell rates,
so orders priced straight from it charged the customer less than we pay the
provider and the whole spread was lost on every trade, even though the app
already showed the correct side. Order base price now follows the traded side
(base + spread on buy, base - spread on sell), which also makes price_original
the real cost basis so the dashboard stops counting the provider spread as
profit. Conditional order triggers compare against the same displayed price.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 19:21:56 +03:30
mohmdsdgandCursor 279e4bc881 Enable gated multi-level referral profit and harden chat/SMS notify paths.
Honor enable_customer_level_profit for order referral payouts, and tighten support-chat webhook/SMS plus SuperAdmin SMS panel sync settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 16:48:53 +03:30
mohmdsdgandCursor f421fcb83f Add formula-based product pricing (P/W/MG) for Parsian-style unit prices.
Port FormulaPriceService from colleague app so admins can compute a single unit price from reference mid, weight, and wage instead of offset coefficients.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 16:47:29 +03:30
MahdiandCursor 71a48c9c08 Add SuperAdmin SMS probe command and per-version enable-remote helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 15:33:46 +03:30
MahdiandCursor 62d83a5bfd Sync SMS panel with SuperAdmin and mirror local wallet/logs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 22:24:35 +03:30
MahdiandCursor c6b1478b21 add SuperAdmin SMS client routing
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:34:07 +03:30
mohmdsdg f42ae09d14 fix support issue 2026-08-05 12:56:52 +03:30