update admin
This commit is contained in:
@@ -92,6 +92,8 @@ export interface CustomerSummary {
|
||||
goldDebtGrams: string;
|
||||
fiatDebtRial: string;
|
||||
goldCreditLimitGrams: string;
|
||||
isActive: boolean;
|
||||
isArchived: boolean;
|
||||
}
|
||||
|
||||
export interface OrderSummary {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user