|
@@ -67,26 +67,9 @@ const ClientForm = ({ refClientDetail, |
|
|
|
|
|
|
|
|
//form data |
|
|
//form data |
|
|
const {register, getValues, setValue} = useForm(); |
|
|
const {register, getValues, setValue} = useForm(); |
|
|
const [createDate, setCreateDate] = useState(null); |
|
|
|
|
|
// const [awardDate, setAwardDate] = useState(null); |
|
|
|
|
|
// const [deadlineDate, setDeadlineDate] = useState(null); |
|
|
|
|
|
// const [announceDate, setAnnounceDate] = useState(null); |
|
|
|
|
|
// const [selectedRegion, setSelectedRegion] = useState(null); |
|
|
|
|
|
// const [selectedType, setSelectedType] = useState(null); |
|
|
|
|
|
// const [selectedSubDivision, setSelectedSubDivision] = useState([]); |
|
|
|
|
|
// const [fromDate, setFromDate] = useState(null); |
|
|
|
|
|
// const [toDate, setToDate] = useState(null); |
|
|
|
|
|
// const [reminderFlag, setReminderFlag] = useState(false); |
|
|
|
|
|
// const [isFlagFetched, setIsFlagFetched] = useState(false); |
|
|
|
|
|
|
|
|
|
|
|
// //reminder option |
|
|
|
|
|
// const [selectedFrequency, setSelectedFrequency] = useState(null); |
|
|
|
|
|
// const [nextApplicationDate, setNextApplicationDate] = useState(null); |
|
|
|
|
|
|
|
|
|
|
|
// //combo list |
|
|
|
|
|
// const [subDivisionList, setSubDivisionList] = useState([]); |
|
|
|
|
|
|
|
|
|
|
|
const [createDateError, setCreateDateError] = React.useState(null); |
|
|
|
|
|
|
|
|
const [dob, setDob] = useState(null); |
|
|
|
|
|
|
|
|
|
|
|
const [dobError, setDobError] = React.useState(null); |
|
|
const [awardDateError, setAwardDateError] = React.useState(null); |
|
|
const [awardDateError, setAwardDateError] = React.useState(null); |
|
|
const [deadlineDateError, setDeadlineDateError] = React.useState(null); |
|
|
const [deadlineDateError, setDeadlineDateError] = React.useState(null); |
|
|
const [announceDateError, setAnnounceDateError] = React.useState(null); |
|
|
const [announceDateError, setAnnounceDateError] = React.useState(null); |
|
@@ -94,13 +77,13 @@ const ClientForm = ({ refClientDetail, |
|
|
const [toError, setToError] = React.useState(null); |
|
|
const [toError, setToError] = React.useState(null); |
|
|
// const [nextApplicationDateError, setNextApplicationDateError] = React.useState(null); |
|
|
// const [nextApplicationDateError, setNextApplicationDateError] = React.useState(null); |
|
|
|
|
|
|
|
|
const createDateErrorMessage = React.useMemo(() => { |
|
|
|
|
|
switch (createDateError) { |
|
|
|
|
|
|
|
|
const dobErrorMessage = React.useMemo(() => { |
|
|
|
|
|
switch (dobError) { |
|
|
case 'invalidDate': { |
|
|
case 'invalidDate': { |
|
|
return "Invalid date"; |
|
|
return "Invalid date"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, [createDateError]); |
|
|
|
|
|
|
|
|
}, [dobError]); |
|
|
|
|
|
|
|
|
const awardDateErrorMessage = React.useMemo(() => { |
|
|
const awardDateErrorMessage = React.useMemo(() => { |
|
|
switch (awardDateError) { |
|
|
switch (awardDateError) { |
|
@@ -168,13 +151,13 @@ const ClientForm = ({ refClientDetail, |
|
|
// if(applicationList.length===0){ |
|
|
// if(applicationList.length===0){ |
|
|
// validateReminder(); |
|
|
// validateReminder(); |
|
|
// } |
|
|
// } |
|
|
// },[createDate, nextApplicationDate, deadlineDate]); |
|
|
|
|
|
|
|
|
// },[dob, nextApplicationDate, deadlineDate]); |
|
|
|
|
|
|
|
|
// const validateReminder = () =>{ |
|
|
// const validateReminder = () =>{ |
|
|
// const values = getValues(); |
|
|
// const values = getValues(); |
|
|
// let firstIssueDate = null; |
|
|
// let firstIssueDate = null; |
|
|
// let reminderDates = []; |
|
|
// let reminderDates = []; |
|
|
// if (createDate !== null && |
|
|
|
|
|
|
|
|
// if (dob !== null && |
|
|
// nextApplicationDate !== null && |
|
|
// nextApplicationDate !== null && |
|
|
// values.reminderThreshold !== null && |
|
|
// values.reminderThreshold !== null && |
|
|
// values.reminderInterval !== null && |
|
|
// values.reminderInterval !== null && |
|
@@ -182,7 +165,7 @@ const ClientForm = ({ refClientDetail, |
|
|
// ) { |
|
|
// ) { |
|
|
// //have value |
|
|
// //have value |
|
|
// if(applicationList.length <=0){ |
|
|
// if(applicationList.length <=0){ |
|
|
// firstIssueDate = createDate.add(-values.reminderThreshold,'days'); |
|
|
|
|
|
|
|
|
// firstIssueDate = dob.add(-values.reminderThreshold,'days'); |
|
|
// } |
|
|
// } |
|
|
// else{ |
|
|
// else{ |
|
|
// firstIssueDate = nextApplicationDate.add(-values.reminderThreshold, 'days'); |
|
|
// firstIssueDate = nextApplicationDate.add(-values.reminderThreshold, 'days'); |
|
@@ -307,10 +290,8 @@ const ClientForm = ({ refClientDetail, |
|
|
if (!isObjEmpty(refClient)) { |
|
|
if (!isObjEmpty(refClient)) { |
|
|
//checkOvertime(); |
|
|
//checkOvertime(); |
|
|
if(refId !== null){ |
|
|
if(refId !== null){ |
|
|
setValue("fullname", refClient.fullname); |
|
|
|
|
|
setValue("lastname", refClient.lastname); |
|
|
setValue("lastname", refClient.lastname); |
|
|
setValue("firstname", refClient.firstname); |
|
|
setValue("firstname", refClient.firstname); |
|
|
setValue("title", refClient.title); |
|
|
|
|
|
setValue("email", refClient.email); |
|
|
setValue("email", refClient.email); |
|
|
setValue("phone1", refClient.phone1); |
|
|
setValue("phone1", refClient.phone1); |
|
|
setValue("phone2", refClient.phone2); |
|
|
setValue("phone2", refClient.phone2); |
|
@@ -318,7 +299,7 @@ const ClientForm = ({ refClientDetail, |
|
|
setValue("caseManagerId", 1); |
|
|
setValue("caseManagerId", 1); |
|
|
setValue("consultantId", 1); |
|
|
setValue("consultantId", 1); |
|
|
} |
|
|
} |
|
|
setCreateDate(dayjs(getDateString(refClient.created))); |
|
|
|
|
|
|
|
|
setDob(dayjs(getDateString(refClient.dob))); |
|
|
} |
|
|
} |
|
|
},[refClient]); |
|
|
},[refClient]); |
|
|
|
|
|
|
|
@@ -331,7 +312,7 @@ const ClientForm = ({ refClientDetail, |
|
|
setIsEditing(true); |
|
|
setIsEditing(true); |
|
|
} |
|
|
} |
|
|
},[refClient]); |
|
|
},[refClient]); |
|
|
// },[refClient,selectedSubDivision,selectedRegion,selectedType, createDate, deadlineDate]); |
|
|
|
|
|
|
|
|
// },[refClient,selectedSubDivision,selectedRegion,selectedType, dob, deadlineDate]); |
|
|
|
|
|
|
|
|
// useEffect(()=>{ |
|
|
// useEffect(()=>{ |
|
|
// if(selectedFrequency !== null){ |
|
|
// if(selectedFrequency !== null){ |
|
@@ -344,19 +325,19 @@ const ClientForm = ({ refClientDetail, |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
// if (isEditing){ |
|
|
// if (isEditing){ |
|
|
// if (createDate !== null){ |
|
|
|
|
|
|
|
|
// if (dob !== null){ |
|
|
// switch(selectedFrequency.key){ |
|
|
// switch(selectedFrequency.key){ |
|
|
// case 1: |
|
|
// case 1: |
|
|
// setNextApplicationDate(createDate.add(1,'month')); |
|
|
|
|
|
|
|
|
// setNextApplicationDate(dob.add(1,'month')); |
|
|
// break; |
|
|
// break; |
|
|
// case 2: |
|
|
// case 2: |
|
|
// setNextApplicationDate(createDate.add(3,'month')); |
|
|
|
|
|
|
|
|
// setNextApplicationDate(dob.add(3,'month')); |
|
|
// break; |
|
|
// break; |
|
|
// case 3: |
|
|
// case 3: |
|
|
// setNextApplicationDate(createDate.add(1,'year')); |
|
|
|
|
|
|
|
|
// setNextApplicationDate(dob.add(1,'year')); |
|
|
// break; |
|
|
// break; |
|
|
// case 4: |
|
|
// case 4: |
|
|
// setNextApplicationDate(createDate.add(6,'month')); |
|
|
|
|
|
|
|
|
// setNextApplicationDate(dob.add(6,'month')); |
|
|
// break; |
|
|
// break; |
|
|
// default: |
|
|
// default: |
|
|
// setNextApplicationDate(nextApplicationDate); |
|
|
// setNextApplicationDate(nextApplicationDate); |
|
@@ -365,7 +346,7 @@ const ClientForm = ({ refClientDetail, |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// },[selectedFrequency,createDate]); |
|
|
|
|
|
|
|
|
// },[selectedFrequency,dob]); |
|
|
|
|
|
|
|
|
// useEffect(() => { |
|
|
// useEffect(() => { |
|
|
// //if state data are ready and assign to different field |
|
|
// //if state data are ready and assign to different field |
|
@@ -387,27 +368,18 @@ const ClientForm = ({ refClientDetail, |
|
|
const values = getValues(); |
|
|
const values = getValues(); |
|
|
const formErrors = {}; |
|
|
const formErrors = {}; |
|
|
|
|
|
|
|
|
if (isStringEmptyAfterTrim(values.fullname)) { |
|
|
|
|
|
formErrors.fullname = 'Client Name is required'; |
|
|
|
|
|
|
|
|
if (isStringEmptyAfterTrim(values.lastname)) { |
|
|
|
|
|
formErrors.lastname = 'Last Name is required'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (selectedRegion === null ) { |
|
|
// if (selectedRegion === null ) { |
|
|
// formErrors.region = 'Client Region is required'; |
|
|
// formErrors.region = 'Client Region is required'; |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
// if (isStringEmptyAfterTrim(values.organization)) { |
|
|
|
|
|
// formErrors.organization = 'Client Organization is required'; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// if (selectedType === null) { |
|
|
|
|
|
// formErrors.type = 'Client Type is required'; |
|
|
|
|
|
|
|
|
// if (dob === null) { |
|
|
|
|
|
// formErrors.dob = 'DoB is required'; |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
if (createDate === null) { |
|
|
|
|
|
formErrors.createDate = 'Create Date is required'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if (deadlineDate === null) { |
|
|
// if (deadlineDate === null) { |
|
|
// formErrors.deadlineDate = 'Deadline Date is required'; |
|
|
// formErrors.deadlineDate = 'Deadline Date is required'; |
|
|
// } |
|
|
// } |
|
@@ -448,7 +420,7 @@ const ClientForm = ({ refClientDetail, |
|
|
|
|
|
|
|
|
setErrors(formErrors); |
|
|
setErrors(formErrors); |
|
|
// if (Object.keys(formErrors).length === 0 //&& |
|
|
// if (Object.keys(formErrors).length === 0 //&& |
|
|
// !createDateError && !awardDateError && |
|
|
|
|
|
|
|
|
// !dobError && !awardDateError && |
|
|
// !deadlineDateError && !announceDateError && |
|
|
// !deadlineDateError && !announceDateError && |
|
|
// !fromError && !toError && !nextApplicationDateError |
|
|
// !fromError && !toError && !nextApplicationDateError |
|
|
// ) { |
|
|
// ) { |
|
@@ -480,7 +452,7 @@ const ClientForm = ({ refClientDetail, |
|
|
// data["phone1"] = values.phone1; |
|
|
// data["phone1"] = values.phone1; |
|
|
// data["phone2"] = values.phone2; |
|
|
// data["phone2"] = values.phone2; |
|
|
// data["remarks"] = values.remarks; |
|
|
// data["remarks"] = values.remarks; |
|
|
// data["createDate"] = createDate === null ? null : dayjs(createDate).format('YYYY-MM-DD'); |
|
|
|
|
|
|
|
|
// data["dob"] = dob === null ? null : dayjs(dob).format('YYYY-MM-DD'); |
|
|
// setClientDetail(data); |
|
|
// setClientDetail(data); |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
@@ -493,17 +465,15 @@ const ClientForm = ({ refClientDetail, |
|
|
if (Object.keys(formErrors).length === 0) { |
|
|
if (Object.keys(formErrors).length === 0) { |
|
|
let data = {}; |
|
|
let data = {}; |
|
|
data["id"] = isNewRecord ? params.id : refClientDetail.id; |
|
|
data["id"] = isNewRecord ? params.id : refClientDetail.id; |
|
|
data["fullname"] = values.fullname; |
|
|
|
|
|
data["lastname"] = values.lastname; |
|
|
data["lastname"] = values.lastname; |
|
|
data["firstname"] = values.firstname; |
|
|
data["firstname"] = values.firstname; |
|
|
data["title"] = values.title; |
|
|
|
|
|
data["email"] = values.email; |
|
|
data["email"] = values.email; |
|
|
data["phone1"] = values.phone1; |
|
|
data["phone1"] = values.phone1; |
|
|
data["phone2"] = values.phone2; |
|
|
data["phone2"] = values.phone2; |
|
|
data["remarks"] = values.remarks; |
|
|
data["remarks"] = values.remarks; |
|
|
data["caseManagerId"] = 1; |
|
|
data["caseManagerId"] = 1; |
|
|
data["consultantId"] = 1; |
|
|
data["consultantId"] = 1; |
|
|
data["createDate"] = createDate === null ? null : dayjs(createDate).format('YYYY-MM-DD'); |
|
|
|
|
|
|
|
|
data["dob"] = dob === null ? null : dayjs(dob).format('YYYY-MM-DD'); |
|
|
setClientDetail(data); |
|
|
setClientDetail(data); |
|
|
} |
|
|
} |
|
|
else if(isCollectData){ |
|
|
else if(isCollectData){ |
|
@@ -597,41 +567,7 @@ const ClientForm = ({ refClientDetail, |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
sx={{ml: 3, mr: 3,mt:1, display: 'flex', alignItems: 'flex-start'}}> |
|
|
sx={{ml: 3, mr: 3,mt:1, display: 'flex', alignItems: 'flex-start'}}> |
|
|
<Typography variant="lionerSize" component="span"> |
|
|
<Typography variant="lionerSize" component="span"> |
|
|
Client Name: |
|
|
|
|
|
<Typography sx={{ color: GENERAL_RED_COLOR }} component="span">*</Typography> |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={7} s={7} md={7} lg={7}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
{...register("fullname", |
|
|
|
|
|
{ |
|
|
|
|
|
value: refClient.fullname, |
|
|
|
|
|
})} |
|
|
|
|
|
id='fullname' |
|
|
|
|
|
required |
|
|
|
|
|
inputProps={{maxLength: 255, style: {fontSize: '1.1rem'}}} |
|
|
|
|
|
InputProps={{ |
|
|
|
|
|
style: { minHeight:'42.5px', maxHeight: '50vh' }, |
|
|
|
|
|
}} |
|
|
|
|
|
multiline |
|
|
|
|
|
maxRows={3} |
|
|
|
|
|
error={!!errors.fullname} |
|
|
|
|
|
helperText={errors.fullname} |
|
|
|
|
|
disabled={!isEditing} |
|
|
|
|
|
autoComplete="off" |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} s={12} md={12} lg={5.5} sx={{mt:1, ml: 3, mr: 3, mb: 3}}> |
|
|
|
|
|
<Grid container alignItems={"flex-start"}> |
|
|
|
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
|
|
|
sx={{ml: 3, mr: 3,mt:1, display: 'flex', alignItems: 'flex-start'}}> |
|
|
|
|
|
<Typography variant="lionerSize" component="span"> |
|
|
|
|
|
Last Name: |
|
|
|
|
|
|
|
|
Last Name: <Typography sx={{ color: GENERAL_RED_COLOR }} component="span">*</Typography> |
|
|
</Typography> |
|
|
</Typography> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
@@ -650,6 +586,8 @@ const ClientForm = ({ refClientDetail, |
|
|
}} |
|
|
}} |
|
|
multiline |
|
|
multiline |
|
|
maxRows={3} |
|
|
maxRows={3} |
|
|
|
|
|
error={!!errors.lastname} |
|
|
|
|
|
helperText={errors.lastname} |
|
|
disabled={!isEditing} |
|
|
disabled={!isEditing} |
|
|
autoComplete="off" |
|
|
autoComplete="off" |
|
|
/> |
|
|
/> |
|
@@ -725,7 +663,7 @@ const ClientForm = ({ refClientDetail, |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> |
|
|
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> |
|
|
<Typography variant="lionerSize" component="span"> |
|
|
<Typography variant="lionerSize" component="span"> |
|
|
Create Date: <Typography sx={{ color: GENERAL_RED_COLOR }} component="span">*</Typography> |
|
|
|
|
|
|
|
|
Date of Birth: |
|
|
</Typography> |
|
|
</Typography> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
@@ -733,18 +671,18 @@ const ClientForm = ({ refClientDetail, |
|
|
<LocalizationProvider dateAdapter={AdapterDayjs}> |
|
|
<LocalizationProvider dateAdapter={AdapterDayjs}> |
|
|
<DemoItem components={['DatePicker']}> |
|
|
<DemoItem components={['DatePicker']}> |
|
|
<DatePicker |
|
|
<DatePicker |
|
|
id="createDate" |
|
|
|
|
|
|
|
|
id="dob" |
|
|
size="small" |
|
|
size="small" |
|
|
required='true' |
|
|
|
|
|
value={createDate === null ? null : dayjs(createDate)} |
|
|
|
|
|
onChange={(newValue) => setCreateDate(newValue)} |
|
|
|
|
|
|
|
|
required |
|
|
|
|
|
value={dob === null ? null : dayjs(dob)} |
|
|
|
|
|
onChange={(newValue) => setDob(newValue)} |
|
|
format="DD/MM/YYYY" |
|
|
format="DD/MM/YYYY" |
|
|
onError={(newError) => setCreateDateError(newError)} |
|
|
|
|
|
|
|
|
onError={(newError) => setDobError(newError)} |
|
|
slotProps={{ |
|
|
slotProps={{ |
|
|
field: { clearable: true }, |
|
|
field: { clearable: true }, |
|
|
textField: { |
|
|
textField: { |
|
|
error: !!errors.createDate || createDateError, |
|
|
|
|
|
helperText: createDateError ? createDateErrorMessage : errors.createDate, |
|
|
|
|
|
|
|
|
error: !!errors.dob || dobError, |
|
|
|
|
|
helperText: dobError ? dobErrorMessage : errors.dob, |
|
|
}, |
|
|
}, |
|
|
}} |
|
|
}} |
|
|
disabled={!isEditing} |
|
|
disabled={!isEditing} |
|
@@ -755,32 +693,6 @@ const ClientForm = ({ refClientDetail, |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={12} sm={12} md={12} lg={5.5} sx={{ml: 3, mr: 3, mb: 3}}> |
|
|
|
|
|
<Grid container alignItems={"center"}> |
|
|
|
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
|
|
|
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> |
|
|
|
|
|
<Typography variant="lionerSize" component="span"> |
|
|
|
|
|
Title: |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={7} s={7} md={7} lg={6.5}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
inputProps={{maxLength: 50}} |
|
|
|
|
|
size="small" |
|
|
|
|
|
{...register("title", |
|
|
|
|
|
{ |
|
|
|
|
|
value: refClient.title, |
|
|
|
|
|
})} |
|
|
|
|
|
id='title' |
|
|
|
|
|
disabled={!isEditing} |
|
|
|
|
|
autoComplete="off" |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} sm={12} md={12} lg={5.5} sx={{ml: 3, mr: 3, mb: 3}}> |
|
|
<Grid item xs={12} sm={12} md={12} lg={5.5} sx={{ml: 3, mr: 3, mb: 3}}> |
|
|
<Grid container alignItems={"center"}> |
|
|
<Grid container alignItems={"center"}> |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
|
<Grid item xs={4} s={4} md={4} lg={4} |
|
@@ -1015,7 +927,7 @@ const ClientForm = ({ refClientDetail, |
|
|
{!isNewRecord && (<Button |
|
|
{!isNewRecord && (<Button |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
color="delete" |
|
|
color="delete" |
|
|
disabled={!ability.can('DELETE','EVENT')} |
|
|
|
|
|
|
|
|
disabled={!ability.can('MAINTAIN','CLIENT')} |
|
|
onClick={handleDeleteClick} |
|
|
onClick={handleDeleteClick} |
|
|
> |
|
|
> |
|
|
Delete |
|
|
Delete |
|
@@ -1072,7 +984,7 @@ const ClientForm = ({ refClientDetail, |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
color="save" |
|
|
color="save" |
|
|
onClick={updateIsEdit} |
|
|
onClick={updateIsEdit} |
|
|
disabled={ability.can('EDIT','ALL_RECORD')? false : !ability.can('EDIT','EVENT')} |
|
|
|
|
|
|
|
|
disabled={!ability.can('MAINTAIN','CLIENT')} |
|
|
> |
|
|
> |
|
|
Edit |
|
|
Edit |
|
|
</Button> |
|
|
</Button> |
|
@@ -1082,9 +994,10 @@ const ClientForm = ({ refClientDetail, |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
color="cancel" |
|
|
color="cancel" |
|
|
onClick={returnSearchPage} |
|
|
onClick={returnSearchPage} |
|
|
disabled={ability.can('EDIT','ALL_RECORD')? false : !ability.can('EDIT','EVENT')} |
|
|
|
|
|
|
|
|
disabled={!ability.can('VIEW','CLIENT')} |
|
|
> |
|
|
> |
|
|
Back </Button> |
|
|
|
|
|
|
|
|
Back |
|
|
|
|
|
</Button> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|