fixed updated or archived - service jobs msg
This commit is contained in:
parent
07ab3314f3
commit
0a82297396
@ -276,8 +276,7 @@ export const TopicBarChart = ({ data,isLoading }) => {
|
||||
<div className="col-md-4 d-flex flex-column gap-2">
|
||||
<div class="card-header d-flex align-items-end justify-content-between"></div>
|
||||
<div className="p-1 m-1 text-start">
|
||||
{/* <p className="fs-5 fs-5">Top Client</p>
|
||||
<small> {data.topClient.name}</small> */}
|
||||
<small className="fw-medium">Overdue Days</small>
|
||||
</div>
|
||||
|
||||
{/* 0–30 Days */}
|
||||
|
||||
@ -49,7 +49,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-md-12 text-start mb-2">
|
||||
{/* <div className="col-md-12 text-start mb-2">
|
||||
<div className="d-flex align-items-center">
|
||||
<label
|
||||
className="form-label me-2 mb-0 fw-semibold"
|
||||
@ -70,7 +70,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
||||
</span>
|
||||
</>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="col-md-12 text-start mb-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<label
|
||||
@ -112,7 +112,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
||||
{data?.contactInformation ? (
|
||||
JSON.parse(data.contactInformation).map((contact, index) => (
|
||||
<div key={index} className="mb-3">
|
||||
<div className="fw-semibold mb-1">Person {index + 1}:-</div>
|
||||
<div className="text-secondary mb-1">Person {index + 1}</div>
|
||||
<div>
|
||||
<label className="fw-semibold mb-1">Person Name:</label> {contact.contactPerson || "N/A"}
|
||||
</div>
|
||||
@ -123,7 +123,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
||||
<label className="fw-semibold mb-1">Emails:</label> {contact.contactEmails?.join(", ") || "N/A"}
|
||||
</div>
|
||||
<div>
|
||||
<label className="fw-semibold mb-1">Numbers:</label> {contact.contactNumbers?.join(", ") || "N/A"}
|
||||
<label className="fw-semibold mb-1">Number:</label> {contact.contactNumbers?.join(", ") || "N/A"}
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
|
||||
@ -89,7 +89,7 @@ const ManageJob = ({ Job }) => {
|
||||
}));
|
||||
|
||||
const updatedEmployees = [...oldEmployees, ...newEmployees];
|
||||
|
||||
|
||||
const payload = [
|
||||
{
|
||||
op: "replace",
|
||||
@ -128,6 +128,11 @@ const ManageJob = ({ Job }) => {
|
||||
value: formData.statusId,
|
||||
},
|
||||
];
|
||||
if(payload.length === 0){
|
||||
showToast("Please change any field value", "warning");
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateJob({ id: Job, payload });
|
||||
} else {
|
||||
formData.assignees = formData.assignees.map((emp) => ({
|
||||
|
||||
@ -274,17 +274,19 @@ export const useUpdateServiceProjectJob = (onSuccessCallback) => {
|
||||
return { resp, isArchiveAction };
|
||||
},
|
||||
|
||||
onSuccess: ({ isArchiveAction }) => {
|
||||
onSuccess: (data, variable) => {
|
||||
queryClient.invalidateQueries({ queryKey: ["serviceProjectJobs"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["service-job"] });
|
||||
|
||||
if (onSuccessCallback) onSuccessCallback();
|
||||
|
||||
if (isArchiveAction) {
|
||||
showToast("Job archived successfully", "success");
|
||||
if (variable.payload.length >= 1) {
|
||||
showToast("Job Updated successfully", "success");
|
||||
} else {
|
||||
showToast("Job restored successfully", "success");
|
||||
if (variable.isArchiveAction) {
|
||||
showToast("Job archived successfully", "success");
|
||||
} else {
|
||||
showToast("Job restored successfully", "success");
|
||||
}
|
||||
}
|
||||
if (onSuccessCallback) onSuccessCallback();
|
||||
},
|
||||
|
||||
onError: (error) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user