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

This commit is contained in:
pramod.mahajan 2025-11-10 16:10:45 +05:30
commit ca4d57cdc0
8 changed files with 52 additions and 47 deletions

View File

@ -154,7 +154,7 @@ export const ExpenseTableSkeleton = ({ groups = 3, rowsPerGroup = 3 }) => {
<thead> <thead>
<tr> <tr>
<th className="d-none d-sm-table-cell"> <th className="d-none d-sm-table-cell">
<div className="text-start ms-5">Expense Categort</div> <div className="text-start ms-5">Expense Category</div>
</th> </th>
<th className="d-none d-sm-table-cell"> <th className="d-none d-sm-table-cell">
<div className="text-start ms-5">Payment Mode</div> <div className="text-start ms-5">Payment Mode</div>

View File

@ -239,7 +239,7 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
/> />
)} )}
<div className="card page-min-h table-responsive px-sm-4"> <div className="card page-min-h table-responsive px-sm-4">
<div className="card-datatable" id="payment-request-table"> <div className="card-datatable mx-2" id="payment-request-table ">
<table className="table border-top dataTable text-nowrap align-middle"> <table className="table border-top dataTable text-nowrap align-middle">
<thead> <thead>
<tr> <tr>

View File

@ -181,10 +181,11 @@ const RecurringExpenseList = ({ search, filterStatuses }) => {
/> />
)} )}
<div className="card page-min-h table-responsive px-sm-4 "> <div className="card page-min-h table-responsive px-sm-4">
<div className="card-datatable" id="payment-request-table"> <div className="card-datatable" id="payment-request-table">
{Array.isArray(filteredData) && filteredData.length > 0 && ( <div className="mx-2">
<table className="table border-top dataTable text-nowrap align-middle"> {Array.isArray(filteredData) && filteredData.length > 0 && (
<table className="table border-top dataTable text-nowrap align-middle">
<thead> <thead>
<tr> <tr>
{recurringExpenseColumns.map((col) => ( {recurringExpenseColumns.map((col) => (
@ -284,6 +285,7 @@ const RecurringExpenseList = ({ search, filterStatuses }) => {
{isError ? (<p>{error.message}</p>):(<p>No Recurring Expense Found</p>)} {isError ? (<p>{error.message}</p>):(<p>No Recurring Expense Found</p>)}
</div> </div>
)} )}
</div>
</div> </div>
{/* Pagination */} {/* Pagination */}

View File

@ -156,7 +156,7 @@ const CollectionList = ({ fromDate, toDate, isPending, searchString }) => {
className="card-datatable table-responsive page-min-h" className="card-datatable table-responsive page-min-h"
id="horizontal-example" id="horizontal-example"
> >
<div className="dataTables_wrapper no-footer mx-5 pb-2"> <div className="dataTables_wrapper no-footer mx-3 pb-2">
<table className="table dataTable text-nowrap"> <table className="table dataTable text-nowrap">
<thead> <thead>
<tr className="table_header_border"> <tr className="table_header_border">

View File

@ -140,15 +140,15 @@ const ManageCollection = ({ collectionId, onClose }) => {
description: data?.description, description: data?.description,
attachments: data.attachments attachments: data.attachments
? data.attachments.map((doc) => ({ ? data.attachments.map((doc) => ({
fileName: doc.fileName, fileName: doc.fileName,
base64Data: null, base64Data: null,
contentType: doc.contentType, contentType: doc.contentType,
documentId: doc.documentId, documentId: doc.documentId,
fileSize: 0, fileSize: 0,
description: "", description: "",
preSignedUrl: doc.preSignedUrl, preSignedUrl: doc.preSignedUrl,
isActive: doc.isActive ?? true, isActive: doc.isActive ?? true,
})) }))
: [], : [],
}); });
} }
@ -228,6 +228,7 @@ const ManageCollection = ({ collectionId, onClose }) => {
<div className="col-12 col-md-6 mb-2"> <div className="col-12 col-md-6 mb-2">
<Label required>Invoice Date</Label> <Label required>Invoice Date</Label>
<DatePicker <DatePicker
className="w-100"
name="invoiceDate" name="invoiceDate"
control={control} control={control}
maxDate={new Date()} maxDate={new Date()}
@ -241,6 +242,7 @@ const ManageCollection = ({ collectionId, onClose }) => {
<div className="col-12 col-md-6 mb-2"> <div className="col-12 col-md-6 mb-2">
<Label required>Expected Payment Date</Label> <Label required>Expected Payment Date</Label>
<DatePicker <DatePicker
className="w-100"
name="exceptedPaymentDate" name="exceptedPaymentDate"
control={control} control={control}
minDate={watch("invoiceDate")} minDate={watch("invoiceDate")}
@ -254,6 +256,7 @@ const ManageCollection = ({ collectionId, onClose }) => {
<div className="col-12 col-md-6 mb-2"> <div className="col-12 col-md-6 mb-2">
<Label required>Submission Date (Client)</Label> <Label required>Submission Date (Client)</Label>
<DatePicker <DatePicker
className="w-100"
name="clientSubmitedDate" name="clientSubmitedDate"
control={control} control={control}
maxDate={new Date()} maxDate={new Date()}
@ -411,7 +414,7 @@ const ManageCollection = ({ collectionId, onClose }) => {
(fileError?.fileSize?.message || (fileError?.fileSize?.message ||
fileError?.contentType?.message || fileError?.contentType?.message ||
fileError?.base64Data?.message, fileError?.base64Data?.message,
fileError?.documentId?.message) fileError?.documentId?.message)
} }
</div> </div>
))} ))}

View File

@ -73,7 +73,7 @@ const PaymentRequestPage = () => {
{/* Top Bar */} {/* Top Bar */}
<div className="card my-3 px-sm-4 px-0"> <div className="card my-3 px-sm-4 px-0">
<div className="card-body py-2 px-0"> <div className="card-body py-2 px-0 mx-2">
<div className="row align-items-center"> <div className="row align-items-center">
<div className="col-6"> <div className="col-6">
<input <input
@ -81,11 +81,12 @@ const PaymentRequestPage = () => {
className="form-control form-control-sm w-auto" className="form-control form-control-sm w-auto"
placeholder="Search Payment Request" placeholder="Search Payment Request"
value={search} value={search}
style={{minWidth:"200px"}}
onChange={(e) => setSearch(e.target.value)} onChange={(e) => setSearch(e.target.value)}
/> />
</div> </div>
<div className="col-6 text-end mt-2 mt-sm-0"> <div className="col-6 text-end mt-sm-0">
<button <button
className="btn btn-sm btn-primary" className="btn btn-sm btn-primary"
type="button" type="button"
@ -145,7 +146,8 @@ const PaymentRequestPage = () => {
size="md" size="md"
closeModal={() => setIsExpenseGenerate({IsOpen:false, requestId: null})} closeModal={() => setIsExpenseGenerate({IsOpen:false, requestId: null})}
> >
<MakeExpense onClose={() => setIsExpenseGenerate({IsOpen:false, requestId: null})} /> <MakeExpe
nse onClose={() => setIsExpenseGenerate({IsOpen:false, requestId: null})} />
</GlobalModel> </GlobalModel>
)} )}

View File

@ -57,16 +57,17 @@ const RecurringExpensePage = () => {
{/* Top Bar */} {/* Top Bar */}
<div className="card my-3 px-sm-4 px-0"> <div className="card my-3 px-sm-4 px-0">
<div className="card-body py-2 px-1"> <div className="card-body py-2 px-1 mx-2">
<div className="row align-items-center mb-0"> <div className="row align-items-center mb-0">
{/* Left Column: Search + Filter */} {/* Left Column: Search + Filter */}
<div className="col-md-8 col-sm-12 mb-2 mb-md-0"> <div className="col-md-8 col-sm-12 mb-2 mb-md-0">
<div className="d-flex align-items-center flex-wrap gap-0"> <div className="d-flex align-items-center flex-wrap gap-0">
<input <input
type="search" type="search"
className="form-control form-control-sm w-25" className="form-control form-control-sm w-auto"
placeholder="Search Recurring Expense" placeholder="Search Recurring Expense"
value={search} value={search}
style={{minWidth:"200px"}}
onChange={(e) => setSearch(e.target.value)} onChange={(e) => setSearch(e.target.value)}
/> />
@ -99,7 +100,7 @@ const RecurringExpensePage = () => {
</div> </div>
{/* Right Column: Add Button */} {/* Right Column: Add Button */}
<div className="col-md-4 col-sm-12 text-md-end text-start"> <div className="col-md-4 col-sm-12 text-md-end text-end">
<button <button
className="btn btn-sm btn-primary" className="btn btn-sm btn-primary"
type="button" type="button"

View File

@ -112,15 +112,15 @@ const CollectionPage = () => {
data={[{ label: "Home", link: "/" }, { label: "Collection" }]} data={[{ label: "Home", link: "/" }, { label: "Collection" }]}
/> />
<div className="card my-3 py-2 px-sm-4 px-0"> <div className="card my-3 py-2 px-sm-4 px-2">
<div className="row px-3"> <div className="row align-items-center mx-0">
<div className="col-12 col-md-3 mb-1"> {/* Left side: Date Picker + Show Pending (stacked on mobile) */}
<div className="col-12 col-md-6 d-flex flex-column flex-md-row flex-wrap align-items-start align-md-items-center gap-2 gap-md-3 mb-3 mb-md-0">
<FormProvider {...methods}> <FormProvider {...methods}>
<DateRangePicker1 howManyDay={180} /> <DateRangePicker1 howManyDay={180} />
</FormProvider> </FormProvider>
</div>
<div className="col-12 col-md-3 d-flex align-items-center gap-2 "> <div className="form-check form-switch d-flex align-items-center mt-1">
<div className="form-check form-switch text-start align-items-center">
<input <input
type="checkbox" type="checkbox"
className="form-check-input" className="form-check-input"
@ -130,41 +130,38 @@ const CollectionPage = () => {
onChange={(e) => setShowPending(e.target.checked)} onChange={(e) => setShowPending(e.target.checked)}
/> />
<label <label
className="form-check-label ms-0" className="form-check-label ms-2"
htmlFor="inactiveEmployeesCheckbox" htmlFor="inactiveEmployeesCheckbox"
> >
Show Pending Show Completed Collections
</label> </label>
</div> </div>
</div> </div>
<div className="col-12 col-md-6 d-flex justify-content-between justify-content-md-end gap-4"> {/* Right side: Search + Add Button */}
<div className="w-md-auto"> <div className="col-12 col-sm-6 d-flex justify-content-end align-items-center gap-2">
{" "} <input
<input type="search"
type="search" value={searchText}
value={searchText} onChange={(e) => setSearchText(e.target.value)}
onChange={(e) => setSearchText(e.target.value)} placeholder="Search Collection"
placeholder="Search Collection" className="form-control form-control-sm w-auto"
className="form-control form-control-sm" />
/>
</div>
{(canCreate || isAdmin) && ( {(canCreate || isAdmin) && (
<button <button
className="btn btn-sm btn-primary" className="btn btn-sm btn-primary"
type="button" type="button"
onClick={() => onClick={() => setCollection({ isOpen: true, invoiceId: null })}
setCollection({ isOpen: true, invoiceId: null })
}
> >
<i className="bx bx-plus-circle me-2"></i> <i className="bx bx-plus-circle me-2"></i>
<span className="d-none d-md-inline-block"> <span className="d-none d-md-inline-block">Add New Collection</span>
Add New Collection
</span>
</button> </button>
)} )}
</div> </div>
</div> </div>
</div> </div>
<CollectionList <CollectionList