From 3c56672a27b548716e1b9f76dcd938686ca9cb93 Mon Sep 17 00:00:00 2001 From: safavimohadeseh78 Date: Wed, 9 Sep 2026 16:57:32 +0330 Subject: [PATCH] fix(customers): online customer form tweaks --- src/pages/menuPages/customers/online/index.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/menuPages/customers/online/index.vue b/src/pages/menuPages/customers/online/index.vue index ae8cde6..3707831 100644 --- a/src/pages/menuPages/customers/online/index.vue +++ b/src/pages/menuPages/customers/online/index.vue @@ -391,7 +391,21 @@ async function submitEdit() { await editFormRef.value?.validate() if (!editId.value) return actionLoading.value = true - await updateCustomer(editId.value, editForm.value as Customer) + const payload: Partial = { + fname: editForm.value.fname, + lname: editForm.value.lname, + mobile: editForm.value.mobile, + birth_date: editForm.value.birth_date, + phone_number: editForm.value.phone_number, + province: editForm.value.province, + city: editForm.value.city, + n_code: editForm.value.n_code, + } + const password = String(editForm.value.password || '').trim() + if (password !== '') { + payload.password = password + } + await updateCustomer(editId.value, payload as Customer) message.success('ویرایش با موفقیت انجام شد') editVisible.value = false await load()