Merge branch 'Purchase_Invoice_Management' of https://git.marcoaiot.com/admin/marco.pms.web into Weidget_Dashboard_Services
This commit is contained in:
commit
9fc3ede04a
@ -276,8 +276,7 @@ export const TopicBarChart = ({ data,isLoading }) => {
|
|||||||
<div className="col-md-4 d-flex flex-column gap-2">
|
<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 class="card-header d-flex align-items-end justify-content-between"></div>
|
||||||
<div className="p-1 m-1 text-start">
|
<div className="p-1 m-1 text-start">
|
||||||
{/* <p className="fs-5 fs-5">Top Client</p>
|
<small className="fw-medium">Overdue Days</small>
|
||||||
<small> {data.topClient.name}</small> */}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 0–30 Days */}
|
{/* 0–30 Days */}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
|||||||
</div>
|
</div>
|
||||||
</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">
|
<div className="d-flex align-items-center">
|
||||||
<label
|
<label
|
||||||
className="form-label me-2 mb-0 fw-semibold"
|
className="form-label me-2 mb-0 fw-semibold"
|
||||||
@ -70,7 +70,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
|||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
<div className="col-md-12 text-start mb-3">
|
<div className="col-md-12 text-start mb-3">
|
||||||
<div className="d-flex align-items-center">
|
<div className="d-flex align-items-center">
|
||||||
<label
|
<label
|
||||||
@ -112,7 +112,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
|||||||
{data?.contactInformation ? (
|
{data?.contactInformation ? (
|
||||||
JSON.parse(data.contactInformation).map((contact, index) => (
|
JSON.parse(data.contactInformation).map((contact, index) => (
|
||||||
<div key={index} className="mb-3">
|
<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>
|
<div>
|
||||||
<label className="fw-semibold mb-1">Person Name:</label> {contact.contactPerson || "N/A"}
|
<label className="fw-semibold mb-1">Person Name:</label> {contact.contactPerson || "N/A"}
|
||||||
</div>
|
</div>
|
||||||
@ -123,7 +123,7 @@ const ViewBranchDetails = ({ BranchToEdit }) => {
|
|||||||
<label className="fw-semibold mb-1">Emails:</label> {contact.contactEmails?.join(", ") || "N/A"}
|
<label className="fw-semibold mb-1">Emails:</label> {contact.contactEmails?.join(", ") || "N/A"}
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|||||||
@ -89,7 +89,7 @@ const ManageJob = ({ Job }) => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const updatedEmployees = [...oldEmployees, ...newEmployees];
|
const updatedEmployees = [...oldEmployees, ...newEmployees];
|
||||||
|
|
||||||
const payload = [
|
const payload = [
|
||||||
{
|
{
|
||||||
op: "replace",
|
op: "replace",
|
||||||
@ -128,6 +128,11 @@ const ManageJob = ({ Job }) => {
|
|||||||
value: formData.statusId,
|
value: formData.statusId,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
if(payload.length === 0){
|
||||||
|
showToast("Please change any field value", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateJob({ id: Job, payload });
|
UpdateJob({ id: Job, payload });
|
||||||
} else {
|
} else {
|
||||||
formData.assignees = formData.assignees.map((emp) => ({
|
formData.assignees = formData.assignees.map((emp) => ({
|
||||||
|
|||||||
@ -225,7 +225,7 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
|
|||||||
className="dropdown-item cursor-pointer"
|
className="dropdown-item cursor-pointer"
|
||||||
onClick={() => setViewCollection(row.id)}
|
onClick={() => setViewCollection(row.id)}
|
||||||
>
|
>
|
||||||
<i className="bx bx-show me-2 text-primary"></i>
|
<i className="bx bx-show me-2 "></i>
|
||||||
<span>View</span>
|
<span>View</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -245,7 +245,7 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<i className="bx bx-wallet me-2 text-warning"></i>
|
<i className="bx bx-wallet me-2 "></i>
|
||||||
<span>Add Payment</span>
|
<span>Add Payment</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -263,7 +263,7 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<i className="bx bx-check-circle me-2 text-success"></i>
|
<i className="bx bx-check-circle me-2 "></i>
|
||||||
<span>Mark Payment</span>
|
<span>Mark Payment</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -274,17 +274,19 @@ export const useUpdateServiceProjectJob = (onSuccessCallback) => {
|
|||||||
return { resp, isArchiveAction };
|
return { resp, isArchiveAction };
|
||||||
},
|
},
|
||||||
|
|
||||||
onSuccess: ({ isArchiveAction }) => {
|
onSuccess: (data, variable) => {
|
||||||
queryClient.invalidateQueries({ queryKey: ["serviceProjectJobs"] });
|
queryClient.invalidateQueries({ queryKey: ["serviceProjectJobs"] });
|
||||||
queryClient.invalidateQueries({ queryKey: ["service-job"] });
|
queryClient.invalidateQueries({ queryKey: ["service-job"] });
|
||||||
|
if (variable.payload.length >= 1) {
|
||||||
if (onSuccessCallback) onSuccessCallback();
|
showToast("Job Updated successfully", "success");
|
||||||
|
|
||||||
if (isArchiveAction) {
|
|
||||||
showToast("Job archived successfully", "success");
|
|
||||||
} else {
|
} 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) => {
|
onError: (error) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user