UI updation at Purchase Invoice.

This commit is contained in:
Kartik Sharma 2025-11-28 11:49:26 +05:30
parent e5bfc6be44
commit 40b11d209c
7 changed files with 37 additions and 35 deletions

View File

@ -222,10 +222,7 @@ const ManageServiceProject = ({ serviceProjectId, onClose }) => {
type="text" type="text"
className="form-control form-control-sm" className="form-control form-control-sm"
{...register("contactName")} {...register("contactName")}
placeholder="Enter Employee name.." placeholder="Enter Employee name.."
onInput={(e) => {
e.target.value = e.target.value.replace(/[^A-Za-z ]/g, "");
}}
/> />
{errors?.contactName && ( {errors?.contactName && (
<span className="danger-text">{errors.contactName.message}</span> <span className="danger-text">{errors.contactName.message}</span>

View File

@ -240,6 +240,7 @@ const ServiceBranch = () => {
<td <td
colSpan={columns.length + 1} colSpan={columns.length + 1}
className="text-center py-12" className="text-center py-12"
style={{ height: "200px" }}
> >
No Branch Found No Branch Found
</td> </td>

View File

@ -22,8 +22,7 @@ export const projectSchema = z.object({
contactName: z contactName: z
.string() .string()
.trim() .trim()
.min(1, "Contact name is required") .min(1, "Contact name is required"),
.regex(/^[A-Za-z\s]+$/, "Contact name can contain only letters"),
contactPhone: z contactPhone: z
.string() .string()

View File

@ -77,6 +77,7 @@ const ServiceProjectTeamList = () => {
<td <td
colSpan={servceProjectColmen.length} colSpan={servceProjectColmen.length}
className="text-center py-4 border-0" className="text-center py-4 border-0"
style={{ height: "200px" }}
> >
{isLoading ? ( {isLoading ? (
<SpinnerLoader /> <SpinnerLoader />
@ -85,6 +86,7 @@ const ServiceProjectTeamList = () => {
)} )}
</td> </td>
</tr> </tr>
)} )}
</tbody> </tbody>
</table> </table>

View File

@ -26,7 +26,7 @@ const PurchasePartyDetails = () => {
} = useAppFormContext(); } = useAppFormContext();
return ( return (
<div className="row g-2 text-start"> <div className="row g-3 text-start">
{/* Title */} {/* Title */}
<div className="col-12 col-md-6"> <div className="col-12 col-md-6">
<Label htmlFor="title" required> <Label htmlFor="title" required>
@ -36,7 +36,7 @@ const PurchasePartyDetails = () => {
<input <input
id="title" id="title"
type="text" type="text"
className={`form-control form-control-md ${ className={`form-control form-control-xs ${
errors?.title ? "is-invalid" : "" errors?.title ? "is-invalid" : ""
}`} }`}
{...register("title")} {...register("title")}
@ -50,7 +50,7 @@ const PurchasePartyDetails = () => {
{/* Project ID */} {/* Project ID */}
<div className="col-12 col-md-6"> <div className="col-12 col-md-6">
<SelectProjectField <SelectProjectField
className={`form-control form-control-md ${ className={`form-control form-control-xs ${
errors?.projectId ? "is-invalid" : "" errors?.projectId ? "is-invalid" : ""
}`} }`}
label="Project" label="Project"
@ -67,7 +67,7 @@ const PurchasePartyDetails = () => {
/> />
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 my-0">
<AppFormController <AppFormController
name="organizationId" name="organizationId"
control={control} control={control}
@ -87,7 +87,7 @@ const PurchasePartyDetails = () => {
/> />
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 my-0">
<AppFormController <AppFormController
name="supplierId" name="supplierId"
control={control} control={control}
@ -108,13 +108,13 @@ const PurchasePartyDetails = () => {
/> />
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 my-0">
<Label htmlFor="billingAddress">Billing Address</Label> <Label htmlFor="billingAddress">Billing Address</Label>
<textarea <textarea
id="billingAddress" id="billingAddress"
rows="2" rows="2"
className={`form-control form-control-md `} className={`form-control form-control-xs `}
{...register("billingAddress")} {...register("billingAddress")}
/> />
@ -123,13 +123,13 @@ const PurchasePartyDetails = () => {
)} )}
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 my-0 mb-1">
<Label htmlFor="shippingAddress">Shipping Address</Label> <Label htmlFor="shippingAddress">Shipping Address</Label>
<textarea <textarea
id="shippingAddress" id="shippingAddress"
rows="2" rows="2"
className={`form-control form-control-md `} className={`form-control form-control-xs `}
{...register("shippingAddress")} {...register("shippingAddress")}
/> />
@ -139,7 +139,7 @@ const PurchasePartyDetails = () => {
</div> </div>
{/* Purchase Order Number */} {/* Purchase Order Number */}
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 ">
<Label htmlFor="purchaseOrderNumber" required> <Label htmlFor="purchaseOrderNumber" required>
Purchase Order Number Purchase Order Number
</Label> </Label>
@ -147,7 +147,7 @@ const PurchasePartyDetails = () => {
<input <input
id="purchaseOrderNumber" id="purchaseOrderNumber"
type="text" type="text"
className={`form-control form-control-md `} className={`form-control form-control-xs `}
{...register("purchaseOrderNumber")} {...register("purchaseOrderNumber")}
/> />
@ -159,7 +159,7 @@ const PurchasePartyDetails = () => {
</div> </div>
{/* Purchase Order Date */} {/* Purchase Order Date */}
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 mb-1">
<Label htmlFor="purchaseOrderDate" required> <Label htmlFor="purchaseOrderDate" required>
Purchase Order Date Purchase Order Date
</Label> </Label>
@ -167,6 +167,7 @@ const PurchasePartyDetails = () => {
<DatePicker <DatePicker
control={control} control={control}
name="purchaseOrderDate" name="purchaseOrderDate"
size="xs"
className={` w-full ${ className={` w-full ${
errors?.purchaseOrderDate ? "is-invalid" : "" errors?.purchaseOrderDate ? "is-invalid" : ""
}`} }`}
@ -193,7 +194,7 @@ const PurchasePartyDetails = () => {
</div> </div>
)} )}
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 mb-1">
<Label htmlFor="proformaInvoiceAmountt">Proforma Amount</Label> <Label htmlFor="proformaInvoiceAmountt">Proforma Amount</Label>
<input <input
id="proformaInvoiceAmount" id="proformaInvoiceAmount"
@ -208,13 +209,14 @@ const PurchasePartyDetails = () => {
</div> </div>
)} )}
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 mb-2">
<Label htmlFor="proformaInvoiceDate">Proforma Date</Label> <Label htmlFor="proformaInvoiceDate">Proforma Date</Label>
<DatePicker <DatePicker
control={control} control={control}
name="proformaInvoiceDate" name="proformaInvoiceDate"
className="w-full" className="w-full"
size="xs"
/> />
{errors?.proformaInvoiceDate && ( {errors?.proformaInvoiceDate && (

View File

@ -27,7 +27,7 @@ const PurchasePaymentDetails = () => {
}, [baseAmount, taxAmount, setValue]); }, [baseAmount, taxAmount, setValue]);
return ( return (
<div className="row g-2 text-start"> <div className="row g-3 text-start">
<div className="col-12 col-md-4"> <div className="col-12 col-md-4">
<Label htmlFor="baseAmount" required> <Label htmlFor="baseAmount" required>
Base Amount Base Amount
@ -36,7 +36,7 @@ const PurchasePaymentDetails = () => {
<input <input
id="baseAmount" id="baseAmount"
type="number" type="number"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("baseAmount", { valueAsNumber: true })} {...register("baseAmount", { valueAsNumber: true })}
/> />
@ -55,7 +55,7 @@ const PurchasePaymentDetails = () => {
<input <input
id="taxAmount" id="taxAmount"
type="number" type="number"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("taxAmount",{ valueAsNumber: true })} {...register("taxAmount",{ valueAsNumber: true })}
/> />
@ -74,7 +74,7 @@ const PurchasePaymentDetails = () => {
<input <input
id="totalAmount" id="totalAmount"
type="number" type="number"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("totalAmount",{ valueAsNumber: true })} {...register("totalAmount",{ valueAsNumber: true })}
readOnly readOnly
/> />
@ -92,7 +92,7 @@ const PurchasePaymentDetails = () => {
<input <input
id="transportCharges" id="transportCharges"
type="number" type="number"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("transportCharges",{ valueAsNumber: true })} {...register("transportCharges",{ valueAsNumber: true })}
/> />
@ -110,6 +110,7 @@ const PurchasePaymentDetails = () => {
name={"paymentDueDate"} name={"paymentDueDate"}
control={control} control={control}
className="w-full" className="w-full"
size="xs"
/> />
{errors?.paymentDueDate && ( {errors?.paymentDueDate && (
@ -119,7 +120,7 @@ const PurchasePaymentDetails = () => {
)} )}
</div> </div>
<div className="col-12"> <div className="col-12 mb-2">
<Label htmlFor="description" required> <Label htmlFor="description" required>
Description Description
</Label> </Label>
@ -127,7 +128,7 @@ const PurchasePaymentDetails = () => {
<textarea <textarea
id="description" id="description"
rows="3" rows="3"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("description")} {...register("description")}
/> />

View File

@ -10,7 +10,7 @@ const PurchaseTransportDetails = () => {
} = useAppFormContext(); } = useAppFormContext();
return ( return (
<div className="row g-2 text-start"> <div className="row g-3 text-start">
{/* Invoice Number */} {/* Invoice Number */}
<div className="col-12 col-md-6"> <div className="col-12 col-md-6">
<Label htmlFor="invoiceNumber" required> <Label htmlFor="invoiceNumber" required>
@ -20,7 +20,7 @@ const PurchaseTransportDetails = () => {
<input <input
id="invoiceNumber" id="invoiceNumber"
type="text" type="text"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("invoiceNumber")} {...register("invoiceNumber")}
/> />
@ -36,7 +36,7 @@ const PurchaseTransportDetails = () => {
<Label htmlFor="invoiceDate">Invoice Date</Label> <Label htmlFor="invoiceDate">Invoice Date</Label>
<DatePicker control={control} name="invoiceDate" className="w-full"/> <DatePicker control={control} name="invoiceDate" className="w-full" size="xs"/>
{errors?.invoiceDate && ( {errors?.invoiceDate && (
<div className="small text-danger mt-1"> <div className="small text-danger mt-1">
@ -52,7 +52,7 @@ const PurchaseTransportDetails = () => {
<input <input
id="eWayBillNumber" id="eWayBillNumber"
type="text" type="text"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("eWayBillNumber")} {...register("eWayBillNumber")}
/> />
@ -84,7 +84,7 @@ const PurchaseTransportDetails = () => {
<input <input
id="invoiceReferenceNumber" id="invoiceReferenceNumber"
type="text" type="text"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("invoiceReferenceNumber")} {...register("invoiceReferenceNumber")}
/> />
@ -102,7 +102,7 @@ const PurchaseTransportDetails = () => {
<input <input
id="acknowledgmentNumber" id="acknowledgmentNumber"
type="text" type="text"
className="form-control form-control-md" className="form-control form-control-xs"
{...register("acknowledgmentNumber")} {...register("acknowledgmentNumber")}
/> />
@ -113,10 +113,10 @@ const PurchaseTransportDetails = () => {
)} )}
</div> </div>
<div className="col-12 col-md-6"> <div className="col-12 col-md-6 mb-2">
<Label htmlFor="acknowledgmentDate">Acknowledgment Date</Label> <Label htmlFor="acknowledgmentDate">Acknowledgment Date</Label>
<DatePicker control={control} name="acknowledgmentDate" className="w-full"/> <DatePicker control={control} name="acknowledgmentDate" className="w-full" size="xs"/>
{errors?.acknowledgmentDate && ( {errors?.acknowledgmentDate && (
<div className="small text-danger mt-1"> <div className="small text-danger mt-1">