Merge branch 'Purchase_Invoice_Management' of https://git.marcoaiot.com/admin/marco.pms.web into Weidget_Dashboard_Services

This commit is contained in:
Kartik Sharma 2025-12-08 11:55:55 +05:30
commit 9fc3ede04a
5 changed files with 23 additions and 17 deletions

View File

@ -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>
{/* 030 Days */}

View File

@ -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>
))

View File

@ -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) => ({

View File

@ -225,7 +225,7 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
className="dropdown-item cursor-pointer"
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>
</a>
</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>
</a>
</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>
</a>
</li>

View File

@ -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) => {