fix: client phone number setting fixed
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user