update admin

This commit is contained in:
s.esmaeili
2026-09-21 17:37:26 +03:30
parent ef1d4638cc
commit a743f6f93c
9 changed files with 269 additions and 2 deletions
+2
View File
@@ -92,6 +92,8 @@ export interface CustomerSummary {
goldDebtGrams: string;
fiatDebtRial: string;
goldCreditLimitGrams: string;
isActive: boolean;
isArchived: boolean;
}
export interface OrderSummary {
+6 -1
View File
@@ -124,8 +124,13 @@ const countDownTimer = () => {
const sendPhone = async () => {
try {
body.loading = true
// GET /api/customers already filters to isActive && !isArchived (matching
// legacy henza_server's Customer::active()->where('is_archive', 0)), but
// the check is repeated here in case that ever changes upstream — an
// inactive/archived customer must never be able to log in.
const customers = await api.listCustomers()
matchedCustomer = customers.find((c) => c.mobile === formModel.username) ?? null
matchedCustomer =
customers.find((c) => c.mobile === formModel.username && c.isActive && !c.isArchived) ?? null
if (!matchedCustomer) {
notify.text = 'اطلاعات کاربری در سیستم وجود ندارد.'
notify.show = true