From 82e2ef6db2756bce980b1eddbc4bb4d36558f1d5 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Sat, 28 Jun 2025 13:12:09 +0400 Subject: [PATCH] fix: client phone number setting fixed --- src/modules/cardModules/cardEditorTabs/ClientTab/ClientTab.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/cardModules/cardEditorTabs/ClientTab/ClientTab.tsx b/src/modules/cardModules/cardEditorTabs/ClientTab/ClientTab.tsx index ee23c92..2c765c2 100644 --- a/src/modules/cardModules/cardEditorTabs/ClientTab/ClientTab.tsx +++ b/src/modules/cardModules/cardEditorTabs/ClientTab/ClientTab.tsx @@ -23,7 +23,7 @@ const ClientTab = () => { validate: { details: { phoneNumber: value => { - if (!value) return; + if (!value || value === "+7 ") return false; return !phone(value || "", { country: "", strictDetection: false, @@ -45,6 +45,7 @@ const ClientTab = () => { const isEditorDisabled = () => client?.id !== card?.client?.id; const handleSubmitClientInfo = (values: ClientSchema) => { + if (values.details?.phoneNumber === "+7 ") values.details!.phoneNumber = ""; ClientService.updateClient({ requestBody: { data: values,