fix: client phone number setting fixed
This commit is contained in:
@@ -23,7 +23,7 @@ const ClientTab = () => {
|
|||||||
validate: {
|
validate: {
|
||||||
details: {
|
details: {
|
||||||
phoneNumber: value => {
|
phoneNumber: value => {
|
||||||
if (!value) return;
|
if (!value || value === "+7 ") return false;
|
||||||
return !phone(value || "", {
|
return !phone(value || "", {
|
||||||
country: "",
|
country: "",
|
||||||
strictDetection: false,
|
strictDetection: false,
|
||||||
@@ -45,6 +45,7 @@ const ClientTab = () => {
|
|||||||
const isEditorDisabled = () => client?.id !== card?.client?.id;
|
const isEditorDisabled = () => client?.id !== card?.client?.id;
|
||||||
|
|
||||||
const handleSubmitClientInfo = (values: ClientSchema) => {
|
const handleSubmitClientInfo = (values: ClientSchema) => {
|
||||||
|
if (values.details?.phoneNumber === "+7 ") values.details!.phoneNumber = "";
|
||||||
ClientService.updateClient({
|
ClientService.updateClient({
|
||||||
requestBody: {
|
requestBody: {
|
||||||
data: values,
|
data: values,
|
||||||
|
|||||||
Reference in New Issue
Block a user