fix: client phone number setting fixed

This commit is contained in:
2025-06-28 13:12:09 +04:00
parent 4787151b69
commit 82e2ef6db2

View File

@@ -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,