@tonzxz/government-forms 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FORM_CATALOG.md +44 -0
- package/README.md +165 -0
- package/dist/definitions.d.ts +1147 -0
- package/dist/definitions.js +60 -0
- package/dist/forms/iar.d.ts +172 -0
- package/dist/forms/iar.js +6 -0
- package/dist/forms/ics.d.ts +48 -0
- package/dist/forms/ics.js +6 -0
- package/dist/forms/iirup.d.ts +54 -0
- package/dist/forms/iirup.js +6 -0
- package/dist/forms/iirusp.d.ts +32 -0
- package/dist/forms/iirusp.js +6 -0
- package/dist/forms/itr.d.ts +42 -0
- package/dist/forms/itr.js +6 -0
- package/dist/forms/par.d.ts +84 -0
- package/dist/forms/par.js +6 -0
- package/dist/forms/ppelc.d.ts +34 -0
- package/dist/forms/ppelc.js +6 -0
- package/dist/forms/pr.d.ts +27 -0
- package/dist/forms/pr.js +6 -0
- package/dist/forms/property-card.d.ts +68 -0
- package/dist/forms/property-card.js +6 -0
- package/dist/forms/ptr.d.ts +54 -0
- package/dist/forms/ptr.js +6 -0
- package/dist/forms/regspi.d.ts +32 -0
- package/dist/forms/regspi.js +6 -0
- package/dist/forms/ris.d.ts +66 -0
- package/dist/forms/ris.js +6 -0
- package/dist/forms/rlsddp.d.ts +54 -0
- package/dist/forms/rlsddp.js +6 -0
- package/dist/forms/rlsddsp.d.ts +42 -0
- package/dist/forms/rlsddsp.js +6 -0
- package/dist/forms/rpci.d.ts +32 -0
- package/dist/forms/rpci.js +6 -0
- package/dist/forms/rpcppe.d.ts +32 -0
- package/dist/forms/rpcppe.js +6 -0
- package/dist/forms/rpcsp.d.ts +32 -0
- package/dist/forms/rpcsp.js +6 -0
- package/dist/forms/rrsp.d.ts +32 -0
- package/dist/forms/rrsp.js +6 -0
- package/dist/forms/rsmi.d.ts +32 -0
- package/dist/forms/rsmi.js +6 -0
- package/dist/forms/rsmp.d.ts +33 -0
- package/dist/forms/rsmp.js +6 -0
- package/dist/forms/rspi.d.ts +32 -0
- package/dist/forms/rspi.js +6 -0
- package/dist/forms/spc.d.ts +37 -0
- package/dist/forms/spc.js +6 -0
- package/dist/forms/splc.d.ts +41 -0
- package/dist/forms/splc.js +6 -0
- package/dist/forms/stock-card.d.ts +28 -0
- package/dist/forms/stock-card.js +6 -0
- package/dist/forms/wmr.d.ts +32 -0
- package/dist/forms/wmr.js +6 -0
- package/dist/gam/components/gam-report-workbench.d.ts +40 -0
- package/dist/gam/components/gam-report-workbench.js +2 -0
- package/dist/gam/components/grand-total-computation.d.ts +10 -0
- package/dist/gam/components/grand-total-computation.js +26 -0
- package/dist/gam/components/iar-preview.d.ts +30 -0
- package/dist/gam/components/iar-preview.js +150 -0
- package/dist/gam/components/ics-preview.d.ts +31 -0
- package/dist/gam/components/ics-preview.js +114 -0
- package/dist/gam/components/iirup-preview.d.ts +42 -0
- package/dist/gam/components/iirup-preview.js +237 -0
- package/dist/gam/components/itr-preview.d.ts +31 -0
- package/dist/gam/components/itr-preview.js +180 -0
- package/dist/gam/components/par-preview.d.ts +28 -0
- package/dist/gam/components/par-preview.js +95 -0
- package/dist/gam/components/ppelc-preview.d.ts +28 -0
- package/dist/gam/components/ppelc-preview.js +128 -0
- package/dist/gam/components/property-card-preview.d.ts +21 -0
- package/dist/gam/components/property-card-preview.js +117 -0
- package/dist/gam/components/ptr-preview.d.ts +36 -0
- package/dist/gam/components/ptr-preview.js +122 -0
- package/dist/gam/components/purchase-order-page-client.d.ts +66 -0
- package/dist/gam/components/purchase-order-page-client.js +179 -0
- package/dist/gam/components/reg-spi-preview.d.ts +28 -0
- package/dist/gam/components/reg-spi-preview.js +138 -0
- package/dist/gam/components/ris-form.d.ts +13 -0
- package/dist/gam/components/ris-form.js +20 -0
- package/dist/gam/components/ris-preview.d.ts +7 -0
- package/dist/gam/components/ris-preview.js +16 -0
- package/dist/gam/components/rlsddp-preview.d.ts +34 -0
- package/dist/gam/components/rlsddp-preview.js +251 -0
- package/dist/gam/components/rlsddsp-preview.d.ts +33 -0
- package/dist/gam/components/rlsddsp-preview.js +226 -0
- package/dist/gam/components/rpci-preview.d.ts +27 -0
- package/dist/gam/components/rpci-preview.js +123 -0
- package/dist/gam/components/rpcppe-preview.d.ts +28 -0
- package/dist/gam/components/rpcppe-preview.js +133 -0
- package/dist/gam/components/rpcsp-preview.d.ts +29 -0
- package/dist/gam/components/rpcsp-preview.js +81 -0
- package/dist/gam/components/rspi-preview.d.ts +23 -0
- package/dist/gam/components/rspi-preview.js +72 -0
- package/dist/gam/components/spc-preview.d.ts +23 -0
- package/dist/gam/components/spc-preview.js +149 -0
- package/dist/gam/components/splc-entry-form.d.ts +14 -0
- package/dist/gam/components/splc-entry-form.js +6 -0
- package/dist/gam/components/splc-preview.d.ts +27 -0
- package/dist/gam/components/splc-preview.js +192 -0
- package/dist/gam/components/stock-card-preview.d.ts +14 -0
- package/dist/gam/components/stock-card-preview.js +17 -0
- package/dist/gam/config/new-report-config.d.ts +1094 -0
- package/dist/gam/config/new-report-config.js +1478 -0
- package/dist/gam/purchase-order-flow.d.ts +146 -0
- package/dist/gam/purchase-order-flow.js +173 -0
- package/dist/gam/purchase-request/workflow.d.ts +19 -0
- package/dist/gam/purchase-request/workflow.js +45 -0
- package/dist/gam/types/ris-types.d.ts +37 -0
- package/dist/gam/types/ris-types.js +1 -0
- package/dist/gam/utils/export-ics-xlsx.d.ts +28 -0
- package/dist/gam/utils/export-ics-xlsx.js +273 -0
- package/dist/gam/utils/export-par-xlsx.d.ts +18 -0
- package/dist/gam/utils/export-par-xlsx.js +181 -0
- package/dist/gam/utils/export-preview-pdf.d.ts +13 -0
- package/dist/gam/utils/export-preview-pdf.js +270 -0
- package/dist/gam/utils/export-report-xlsx.d.ts +228 -0
- package/dist/gam/utils/export-report-xlsx.js +873 -0
- package/dist/gam/utils/line-totals.d.ts +6 -0
- package/dist/gam/utils/line-totals.js +18 -0
- package/dist/gam/utils/monetary-input.d.ts +6 -0
- package/dist/gam/utils/monetary-input.js +18 -0
- package/dist/gam/utils/print-element.d.ts +8 -0
- package/dist/gam/utils/print-element.js +157 -0
- package/dist/government-form.d.ts +16 -0
- package/dist/government-form.js +45 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +50 -0
- package/dist/internal/components/configurable-form-layout.d.ts +20 -0
- package/dist/internal/components/configurable-form-layout.js +49 -0
- package/dist/internal/components/ui/badge.d.ts +7 -0
- package/dist/internal/components/ui/badge.js +34 -0
- package/dist/internal/components/ui/button.d.ts +10 -0
- package/dist/internal/components/ui/button.js +35 -0
- package/dist/internal/components/ui/calendar.d.ts +8 -0
- package/dist/internal/components/ui/calendar.js +77 -0
- package/dist/internal/components/ui/command.d.ts +19 -0
- package/dist/internal/components/ui/command.js +36 -0
- package/dist/internal/components/ui/date-input.d.ts +14 -0
- package/dist/internal/components/ui/date-input.js +33 -0
- package/dist/internal/components/ui/date-picker.d.ts +19 -0
- package/dist/internal/components/ui/date-picker.js +34 -0
- package/dist/internal/components/ui/dialog.d.ts +18 -0
- package/dist/internal/components/ui/dialog.js +38 -0
- package/dist/internal/components/ui/input-group.d.ts +18 -0
- package/dist/internal/components/ui/input-group.js +57 -0
- package/dist/internal/components/ui/input.d.ts +3 -0
- package/dist/internal/components/ui/input.js +12 -0
- package/dist/internal/components/ui/label.d.ts +3 -0
- package/dist/internal/components/ui/label.js +7 -0
- package/dist/internal/components/ui/popover.d.ts +9 -0
- package/dist/internal/components/ui/popover.js +23 -0
- package/dist/internal/components/ui/select.d.ts +17 -0
- package/dist/internal/components/ui/select.js +35 -0
- package/dist/internal/components/ui/switch.d.ts +5 -0
- package/dist/internal/components/ui/switch.js +8 -0
- package/dist/internal/components/ui/table.d.ts +10 -0
- package/dist/internal/components/ui/table.js +28 -0
- package/dist/internal/components/ui/tabs.d.ts +10 -0
- package/dist/internal/components/ui/tabs.js +29 -0
- package/dist/internal/components/ui/textarea.d.ts +3 -0
- package/dist/internal/components/ui/textarea.js +7 -0
- package/dist/internal/components/ui/tooltip.d.ts +6 -0
- package/dist/internal/components/ui/tooltip.js +17 -0
- package/dist/internal/contracts/modules/v1/reg-spi-reports/reg-spi-reports.schema.d.ts +112 -0
- package/dist/internal/contracts/modules/v1/reg-spi-reports/reg-spi-reports.schema.js +91 -0
- package/dist/internal/hooks/use-form-field-order.d.ts +7 -0
- package/dist/internal/hooks/use-form-field-order.js +43 -0
- package/dist/internal/lib/utils.d.ts +2 -0
- package/dist/internal/lib/utils.js +3 -0
- package/dist/inventory/components/inventory-item-form.d.ts +7 -0
- package/dist/inventory/components/inventory-item-form.js +5 -0
- package/dist/inventory/components/inventory-item-preview.d.ts +6 -0
- package/dist/inventory/components/inventory-item-preview.js +5 -0
- package/dist/inventory/iar.d.ts +4 -0
- package/dist/inventory/iar.js +4 -0
- package/dist/inventory/ics.d.ts +2 -0
- package/dist/inventory/ics.js +3 -0
- package/dist/inventory/iirup.d.ts +2 -0
- package/dist/inventory/iirup.js +3 -0
- package/dist/inventory/iirusp.d.ts +4 -0
- package/dist/inventory/iirusp.js +4 -0
- package/dist/inventory/index.d.ts +3 -0
- package/dist/inventory/index.js +4 -0
- package/dist/inventory/item.d.ts +3 -0
- package/dist/inventory/item.js +3 -0
- package/dist/inventory/itr.d.ts +4 -0
- package/dist/inventory/itr.js +4 -0
- package/dist/inventory/par.d.ts +2 -0
- package/dist/inventory/par.js +3 -0
- package/dist/inventory/po.d.ts +2 -0
- package/dist/inventory/po.js +2 -0
- package/dist/inventory/ppelc.d.ts +2 -0
- package/dist/inventory/ppelc.js +3 -0
- package/dist/inventory/pplc.d.ts +2 -0
- package/dist/inventory/pplc.js +4 -0
- package/dist/inventory/pr.d.ts +4 -0
- package/dist/inventory/pr.js +4 -0
- package/dist/inventory/property-card.d.ts +2 -0
- package/dist/inventory/property-card.js +3 -0
- package/dist/inventory/ptr.d.ts +2 -0
- package/dist/inventory/ptr.js +3 -0
- package/dist/inventory/regspi.d.ts +4 -0
- package/dist/inventory/regspi.js +4 -0
- package/dist/inventory/ris.d.ts +4 -0
- package/dist/inventory/ris.js +4 -0
- package/dist/inventory/rlsddp.d.ts +4 -0
- package/dist/inventory/rlsddp.js +4 -0
- package/dist/inventory/rlsddsp.d.ts +2 -0
- package/dist/inventory/rlsddsp.js +3 -0
- package/dist/inventory/rpci.d.ts +2 -0
- package/dist/inventory/rpci.js +3 -0
- package/dist/inventory/rpcppe.d.ts +2 -0
- package/dist/inventory/rpcppe.js +3 -0
- package/dist/inventory/rpcsp.d.ts +2 -0
- package/dist/inventory/rpcsp.js +3 -0
- package/dist/inventory/rrsp.d.ts +2 -0
- package/dist/inventory/rrsp.js +3 -0
- package/dist/inventory/rsmi.d.ts +4 -0
- package/dist/inventory/rsmi.js +4 -0
- package/dist/inventory/rsmp.d.ts +4 -0
- package/dist/inventory/rsmp.js +4 -0
- package/dist/inventory/rspi.d.ts +2 -0
- package/dist/inventory/rspi.js +3 -0
- package/dist/inventory/spc.d.ts +2 -0
- package/dist/inventory/spc.js +3 -0
- package/dist/inventory/splc.d.ts +3 -0
- package/dist/inventory/splc.js +4 -0
- package/dist/inventory/stock-card.d.ts +4 -0
- package/dist/inventory/stock-card.js +4 -0
- package/dist/inventory/types.d.ts +11 -0
- package/dist/inventory/types.js +1 -0
- package/dist/inventory/wmr.d.ts +4 -0
- package/dist/inventory/wmr.js +4 -0
- package/dist/lib/rpcsp-accountable-person.d.ts +1 -0
- package/dist/lib/rpcsp-accountable-person.js +10 -0
- package/dist/reports/iar/_components/create-form.d.ts +13 -0
- package/dist/reports/iar/_components/create-form.js +92 -0
- package/dist/reports/iar/_components/document-preview.d.ts +11 -0
- package/dist/reports/iar/_components/document-preview.js +131 -0
- package/dist/reports/iar/types.d.ts +97 -0
- package/dist/reports/iar/types.js +24 -0
- package/dist/reports/iirusp/_components/create-form.d.ts +17 -0
- package/dist/reports/iirusp/_components/create-form.js +118 -0
- package/dist/reports/iirusp/_components/document-preview.d.ts +8 -0
- package/dist/reports/iirusp/_components/document-preview.js +389 -0
- package/dist/reports/iirusp/types.d.ts +134 -0
- package/dist/reports/iirusp/types.js +29 -0
- package/dist/reports/iirusp/utils.d.ts +29 -0
- package/dist/reports/iirusp/utils.js +488 -0
- package/dist/reports/itr/_components/create-form.d.ts +28 -0
- package/dist/reports/itr/_components/create-form.js +90 -0
- package/dist/reports/itr/_components/document-preview.d.ts +6 -0
- package/dist/reports/itr/_components/document-preview.js +7 -0
- package/dist/reports/itr/types.d.ts +68 -0
- package/dist/reports/itr/types.js +27 -0
- package/dist/reports/itr/utils.d.ts +24 -0
- package/dist/reports/itr/utils.js +76 -0
- package/dist/reports/pr/_components/create-form.d.ts +16 -0
- package/dist/reports/pr/_components/create-form.js +52 -0
- package/dist/reports/pr/_components/document-preview.d.ts +7 -0
- package/dist/reports/pr/_components/document-preview.js +9 -0
- package/dist/reports/pr/types.d.ts +69 -0
- package/dist/reports/pr/types.js +1 -0
- package/dist/reports/pr/utils.d.ts +72 -0
- package/dist/reports/pr/utils.js +572 -0
- package/dist/reports/regspi/_components/create-form.d.ts +19 -0
- package/dist/reports/regspi/_components/create-form.js +33 -0
- package/dist/reports/regspi/_components/document-preview.d.ts +6 -0
- package/dist/reports/regspi/_components/document-preview.js +7 -0
- package/dist/reports/regspi/types.d.ts +29 -0
- package/dist/reports/regspi/types.js +24 -0
- package/dist/reports/regspi/utils.d.ts +48 -0
- package/dist/reports/regspi/utils.js +98 -0
- package/dist/reports/ris/_components/create-form.d.ts +36 -0
- package/dist/reports/ris/_components/create-form.js +149 -0
- package/dist/reports/ris/_components/document-preview.d.ts +8 -0
- package/dist/reports/ris/_components/document-preview.js +31 -0
- package/dist/reports/ris/types.d.ts +93 -0
- package/dist/reports/ris/types.js +1 -0
- package/dist/reports/rlsddp/_components/create-form.d.ts +11 -0
- package/dist/reports/rlsddp/_components/create-form.js +165 -0
- package/dist/reports/rlsddp/_components/document-preview.d.ts +8 -0
- package/dist/reports/rlsddp/_components/document-preview.js +15 -0
- package/dist/reports/rlsddp/types.d.ts +105 -0
- package/dist/reports/rlsddp/types.js +31 -0
- package/dist/reports/rrsp/components/rrsp-preview.d.ts +21 -0
- package/dist/reports/rrsp/components/rrsp-preview.js +155 -0
- package/dist/reports/rsmi/components/rsmi-create-form.d.ts +20 -0
- package/dist/reports/rsmi/components/rsmi-create-form.js +8 -0
- package/dist/reports/rsmi/components/rsmi-document-body.d.ts +15 -0
- package/dist/reports/rsmi/components/rsmi-document-body.js +12 -0
- package/dist/reports/rsmi/components/rsmi-types.d.ts +45 -0
- package/dist/reports/rsmi/components/rsmi-types.js +1 -0
- package/dist/reports/rsmi/components/rsmi-utils.d.ts +2 -0
- package/dist/reports/rsmi/components/rsmi-utils.js +18 -0
- package/dist/reports/rsmp/components/rsmp-create-modal.d.ts +5 -0
- package/dist/reports/rsmp/components/rsmp-create-modal.js +7 -0
- package/dist/reports/rsmp/components/rsmp-preview-modal.d.ts +11 -0
- package/dist/reports/rsmp/components/rsmp-preview-modal.js +47 -0
- package/dist/reports/rsmp/components/rsmp-types.d.ts +44 -0
- package/dist/reports/rsmp/components/rsmp-types.js +1 -0
- package/dist/reports/rsmp/components/rsmp-utils.d.ts +5 -0
- package/dist/reports/rsmp/components/rsmp-utils.js +41 -0
- package/dist/reports/rsmp/lib/rsmp-grouping.d.ts +14 -0
- package/dist/reports/rsmp/lib/rsmp-grouping.js +75 -0
- package/dist/reports/stock-card/_components/create-form.d.ts +13 -0
- package/dist/reports/stock-card/_components/create-form.js +39 -0
- package/dist/reports/stock-card/_components/document-preview.d.ts +7 -0
- package/dist/reports/stock-card/_components/document-preview.js +29 -0
- package/dist/reports/stock-card/types.d.ts +31 -0
- package/dist/reports/stock-card/types.js +1 -0
- package/dist/reports/stock-card/utils.d.ts +32 -0
- package/dist/reports/stock-card/utils.js +248 -0
- package/dist/reports/wmr/_components/create-form.d.ts +22 -0
- package/dist/reports/wmr/_components/create-form.js +61 -0
- package/dist/reports/wmr/_components/document-preview.d.ts +10 -0
- package/dist/reports/wmr/_components/document-preview.js +59 -0
- package/dist/reports/wmr/types.d.ts +45 -0
- package/dist/reports/wmr/types.js +1 -0
- package/dist/reports/wmr/utils.d.ts +32 -0
- package/dist/reports/wmr/utils.js +343 -0
- package/dist/styles.css +4492 -0
- package/extraction-manifest.json +620 -0
- package/package.json +197 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ConfigurableFormLayout, } from "../../../internal/components/configurable-form-layout.js";
|
|
4
|
+
import { DateInput } from "../../../internal/components/ui/date-input.js";
|
|
5
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../internal/components/ui/tabs.js";
|
|
6
|
+
const inputCls = "w-full rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/40";
|
|
7
|
+
const textareaCls = "w-full resize-none rounded-md border px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/40";
|
|
8
|
+
export function RlsddpCreateForm({ form, onChange, activeTab, onTabChange, mode, rlsddpNo, }) {
|
|
9
|
+
const generalFields = [
|
|
10
|
+
{
|
|
11
|
+
id: "entityName",
|
|
12
|
+
label: "Entity Name *",
|
|
13
|
+
render: () => (_jsx("input", { value: form.entityName, onChange: e => onChange("entityName", e.target.value), placeholder: "Entity Name", className: inputCls })),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "fundCluster",
|
|
17
|
+
label: "Fund Cluster *",
|
|
18
|
+
render: () => (_jsx("input", { value: form.fundCluster, onChange: e => onChange("fundCluster", e.target.value), placeholder: "Fund Cluster", className: inputCls })),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "departmentOffice",
|
|
22
|
+
label: "Department / Office",
|
|
23
|
+
render: () => (_jsx("input", { value: form.departmentOffice, onChange: e => onChange("departmentOffice", e.target.value), placeholder: "Department/Office", className: inputCls })),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "accountableOfficer",
|
|
27
|
+
label: "Accountable Officer *",
|
|
28
|
+
render: () => (_jsx("input", { value: form.accountableOfficer, onChange: e => onChange("accountableOfficer", e.target.value), placeholder: "Full name", className: inputCls })),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "designation",
|
|
32
|
+
label: "Designation",
|
|
33
|
+
render: () => (_jsx("input", { value: form.designation, onChange: e => onChange("designation", e.target.value), placeholder: "Designation", className: inputCls })),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "policeNotified",
|
|
37
|
+
label: "Police Notified",
|
|
38
|
+
render: () => (_jsxs("select", { value: form.policeNotified, onChange: e => onChange("policeNotified", e.target.value), className: inputCls, children: [_jsx("option", { value: "Yes", children: "Yes" }), _jsx("option", { value: "No", children: "No" })] })),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "policeStation",
|
|
42
|
+
label: "Police Station",
|
|
43
|
+
render: () => (_jsx("input", { value: form.policeStation, onChange: e => onChange("policeStation", e.target.value), placeholder: "Police Station", className: inputCls })),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "policeNotifiedDate",
|
|
47
|
+
label: "Date Reported to Police",
|
|
48
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.policeNotifiedDate, onChange: e => onChange("policeNotifiedDate", e.target.value), className: inputCls })),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "rlsddpDate",
|
|
52
|
+
label: "RLSDDP Date",
|
|
53
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.rlsddpDate, onChange: e => onChange("rlsddpDate", e.target.value), className: inputCls })),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "parNo",
|
|
57
|
+
label: "PAR No.",
|
|
58
|
+
render: () => (_jsx("input", { value: form.parNo, onChange: e => onChange("parNo", e.target.value), placeholder: "PAR No.", className: inputCls })),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "parDate",
|
|
62
|
+
label: "PAR Date",
|
|
63
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.parDate, onChange: e => onChange("parDate", e.target.value), className: inputCls })),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "statusOfProperty",
|
|
67
|
+
label: "Status of Property",
|
|
68
|
+
fullWidth: true,
|
|
69
|
+
render: () => (_jsx("div", { className: "flex flex-wrap gap-6 py-1", children: ["Lost", "Stolen", "Damaged", "Destroyed"].map(status => (_jsxs("label", { className: "flex cursor-pointer items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", name: "statusOfProperty", value: status, checked: form.statusOfProperty === status, onChange: () => onChange("statusOfProperty", status), className: "accent-primary" }), status] }, status))) })),
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
const propertyFields = [
|
|
73
|
+
{
|
|
74
|
+
id: "propertyNo",
|
|
75
|
+
label: "Property No. *",
|
|
76
|
+
render: () => (_jsx("input", { value: form.propertyNo, onChange: e => onChange("propertyNo", e.target.value), placeholder: "Property No.", className: inputCls })),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "acquisitionCost",
|
|
80
|
+
label: "Acquisition Cost",
|
|
81
|
+
render: () => (_jsx("input", { type: "number", min: 0, step: "0.01", value: form.acquisitionCost, onChange: e => onChange("acquisitionCost", e.target.value), className: inputCls })),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "description",
|
|
85
|
+
label: "Description",
|
|
86
|
+
fullWidth: true,
|
|
87
|
+
render: () => (_jsx("textarea", { value: form.description, onChange: e => onChange("description", e.target.value), rows: 3, placeholder: "Item description", className: textareaCls })),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "circumstance",
|
|
91
|
+
label: "Circumstances",
|
|
92
|
+
fullWidth: true,
|
|
93
|
+
render: () => (_jsx("textarea", { value: form.circumstance, onChange: e => onChange("circumstance", e.target.value), rows: 5, placeholder: "Describe the circumstances of loss, theft, damage, or destruction...", className: textareaCls })),
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
const certificationFields = [
|
|
97
|
+
{
|
|
98
|
+
id: "accountableOfficerSignature",
|
|
99
|
+
label: "AO Signature Over Printed Name",
|
|
100
|
+
render: () => (_jsx("input", { value: form.accountableOfficerSignature, onChange: e => onChange("accountableOfficerSignature", e.target.value), placeholder: "Full name / signature", className: inputCls })),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "accountableOfficerDate",
|
|
104
|
+
label: "AO Certification Date",
|
|
105
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.accountableOfficerDate, onChange: e => onChange("accountableOfficerDate", e.target.value), className: inputCls })),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "governmentIssuedId",
|
|
109
|
+
label: "Government Issued ID",
|
|
110
|
+
render: () => (_jsx("input", { value: form.governmentIssuedId, onChange: e => onChange("governmentIssuedId", e.target.value), placeholder: "ID type", className: inputCls })),
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "idNo",
|
|
114
|
+
label: "ID No.",
|
|
115
|
+
render: () => (_jsx("input", { value: form.idNo, onChange: e => onChange("idNo", e.target.value), placeholder: "ID number", className: inputCls })),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "dateIssued",
|
|
119
|
+
label: "ID Date Issued",
|
|
120
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.dateIssued, onChange: e => onChange("dateIssued", e.target.value), className: inputCls })),
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "immediateSupervisorSignature",
|
|
124
|
+
label: "Supervisor Signature Over Printed Name",
|
|
125
|
+
render: () => (_jsx("input", { value: form.immediateSupervisorSignature, onChange: e => onChange("immediateSupervisorSignature", e.target.value), placeholder: "Full name / signature", className: inputCls })),
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "immediateSupervisorDate",
|
|
129
|
+
label: "Supervisor Noted Date",
|
|
130
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.immediateSupervisorDate, onChange: e => onChange("immediateSupervisorDate", e.target.value), className: inputCls })),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "swornDate",
|
|
134
|
+
label: "Sworn Date",
|
|
135
|
+
render: () => (_jsx(DateInput, { type: "date", value: form.swornDate, onChange: e => onChange("swornDate", e.target.value), className: inputCls })),
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "docNo",
|
|
139
|
+
label: "Doc No.",
|
|
140
|
+
render: () => (_jsx("input", { value: form.docNo, onChange: e => onChange("docNo", e.target.value), placeholder: "Doc No.", className: inputCls })),
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "pageNo",
|
|
144
|
+
label: "Page No.",
|
|
145
|
+
render: () => (_jsx("input", { value: form.pageNo, onChange: e => onChange("pageNo", e.target.value), placeholder: "Page No.", className: inputCls })),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "bookNo",
|
|
149
|
+
label: "Book No.",
|
|
150
|
+
render: () => (_jsx("input", { value: form.bookNo, onChange: e => onChange("bookNo", e.target.value), placeholder: "Book No.", className: inputCls })),
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "seriesOf",
|
|
154
|
+
label: "Series of",
|
|
155
|
+
render: () => (_jsx("input", { value: form.seriesOf, onChange: e => onChange("seriesOf", e.target.value), placeholder: "Series of", className: inputCls })),
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "notaryPublic",
|
|
159
|
+
label: "Notary Public",
|
|
160
|
+
fullWidth: true,
|
|
161
|
+
render: () => (_jsx("input", { value: form.notaryPublic, onChange: e => onChange("notaryPublic", e.target.value), placeholder: "Notary Public", className: inputCls })),
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
return (_jsxs(Tabs, { value: activeTab, onValueChange: onTabChange, children: [_jsxs(TabsList, { className: "grid w-full grid-cols-3", children: [_jsx(TabsTrigger, { value: "general", children: "General Info" }), _jsx(TabsTrigger, { value: "property", children: "Property" }), _jsx(TabsTrigger, { value: "certification", children: "Certification" })] }), _jsx(TabsContent, { value: "general", className: "mt-4", children: _jsx(ConfigurableFormLayout, { formKey: "rlsddp-general", fields: generalFields, header: _jsxs("div", { className: "rounded-md border border-indigo-200 bg-indigo-50 p-3", children: [_jsx("p", { className: "text-muted-foreground text-xs font-medium", children: "RLSDDP Number" }), _jsx("p", { className: "text-sm text-slate-600 italic", children: mode === "edit" && rlsddpNo ? rlsddpNo : "Auto-generated on save" })] }) }) }), _jsx(TabsContent, { value: "property", className: "mt-4", children: _jsx(ConfigurableFormLayout, { formKey: "rlsddp-property", fields: propertyFields }) }), _jsx(TabsContent, { value: "certification", className: "mt-4", children: _jsx(ConfigurableFormLayout, { formKey: "rlsddp-certification", fields: certificationFields }) })] }));
|
|
165
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RlsddpFormState } from "../types.js";
|
|
2
|
+
type Props = {
|
|
3
|
+
form: RlsddpFormState;
|
|
4
|
+
rlsddpNo?: string;
|
|
5
|
+
scale?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function RlsddpDocumentPreview({ form, rlsddpNo, scale }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { RlsddpPreview } from "../../../gam/components/rlsddp-preview.js";
|
|
4
|
+
export function RlsddpDocumentPreview({ form, rlsddpNo, scale = 1 }) {
|
|
5
|
+
const useScale = scale > 0 && scale !== 1;
|
|
6
|
+
const preview = (_jsx(RlsddpPreview, { rlsddpNo: rlsddpNo ?? "Auto-generated", entityName: form.entityName, fundCluster: form.fundCluster, departmentOffice: form.departmentOffice, accountableOfficer: form.accountableOfficer, designation: form.designation, policeNotified: form.policeNotified, policeStation: form.policeStation, policeNotifiedDate: form.policeNotifiedDate, rlsddpDate: form.rlsddpDate, parNo: form.parNo, parDate: form.parDate, statusOfProperty: form.statusOfProperty, propertyNo: form.propertyNo, description: form.description, acquisitionCost: form.acquisitionCost, circumstance: form.circumstance, accountableOfficerSignature: form.accountableOfficerSignature, accountableOfficerDate: form.accountableOfficerDate, governmentIssuedId: form.governmentIssuedId, idNo: form.idNo, dateIssued: form.dateIssued, immediateSupervisorSignature: form.immediateSupervisorSignature, immediateSupervisorDate: form.immediateSupervisorDate, swornDate: form.swornDate, docNo: form.docNo, pageNo: form.pageNo, bookNo: form.bookNo, seriesOf: form.seriesOf, notaryPublic: form.notaryPublic }));
|
|
7
|
+
return (_jsx("div", { className: "mx-auto w-full max-w-full overflow-x-auto", children: useScale ? (_jsx("div", { className: "mx-auto", style: {
|
|
8
|
+
width: `calc(210mm * ${scale})`,
|
|
9
|
+
height: `calc(297mm * ${scale})`,
|
|
10
|
+
}, children: _jsx("div", { style: {
|
|
11
|
+
transform: `scale(${scale})`,
|
|
12
|
+
transformOrigin: "top left",
|
|
13
|
+
width: "210mm",
|
|
14
|
+
}, children: preview }) })) : (preview) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type RlsddpStatus = "Draft" | "Submitted" | "For Repair" | "Approved";
|
|
2
|
+
export type RlsddpRecord = {
|
|
3
|
+
id: number;
|
|
4
|
+
rlsddpNo: string;
|
|
5
|
+
entityName?: string | null;
|
|
6
|
+
fundCluster?: string | null;
|
|
7
|
+
departmentOffice?: string | null;
|
|
8
|
+
accountableOfficer: string;
|
|
9
|
+
designation?: string | null;
|
|
10
|
+
policeNotified?: string | null;
|
|
11
|
+
policeStation?: string | null;
|
|
12
|
+
policeNotifiedDate?: string | null;
|
|
13
|
+
rlsddpDate?: string | null;
|
|
14
|
+
parNo?: string | null;
|
|
15
|
+
parDate?: string | null;
|
|
16
|
+
statusOfProperty?: string | null;
|
|
17
|
+
propertyNo: string;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
acquisitionCost: string;
|
|
20
|
+
circumstance?: string | null;
|
|
21
|
+
accountableOfficerSignature?: string | null;
|
|
22
|
+
accountableOfficerDate?: string | null;
|
|
23
|
+
governmentIssuedId?: string | null;
|
|
24
|
+
idNo?: string | null;
|
|
25
|
+
dateIssued?: string | null;
|
|
26
|
+
immediateSupervisorSignature?: string | null;
|
|
27
|
+
immediateSupervisorDate?: string | null;
|
|
28
|
+
swornDate?: string | null;
|
|
29
|
+
docNo?: string | null;
|
|
30
|
+
pageNo?: string | null;
|
|
31
|
+
bookNo?: string | null;
|
|
32
|
+
seriesOf?: string | null;
|
|
33
|
+
notaryPublic?: string | null;
|
|
34
|
+
status: RlsddpStatus;
|
|
35
|
+
createdById?: string | null;
|
|
36
|
+
requestorDocumentUploaded?: boolean;
|
|
37
|
+
inspectionDocumentUploaded?: boolean;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
};
|
|
41
|
+
export type RlsddpPayload = {
|
|
42
|
+
issuedItemId?: string;
|
|
43
|
+
entityName?: string;
|
|
44
|
+
fundCluster?: string;
|
|
45
|
+
departmentOffice?: string;
|
|
46
|
+
accountableOfficer: string;
|
|
47
|
+
designation?: string;
|
|
48
|
+
policeNotified?: string;
|
|
49
|
+
policeStation?: string;
|
|
50
|
+
policeNotifiedDate?: string;
|
|
51
|
+
rlsddpDate?: string;
|
|
52
|
+
parNo?: string;
|
|
53
|
+
parDate?: string;
|
|
54
|
+
statusOfProperty?: string;
|
|
55
|
+
propertyNo: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
acquisitionCost?: string;
|
|
58
|
+
circumstance?: string;
|
|
59
|
+
accountableOfficerSignature?: string;
|
|
60
|
+
accountableOfficerDate?: string;
|
|
61
|
+
governmentIssuedId?: string;
|
|
62
|
+
idNo?: string;
|
|
63
|
+
dateIssued?: string;
|
|
64
|
+
immediateSupervisorSignature?: string;
|
|
65
|
+
immediateSupervisorDate?: string;
|
|
66
|
+
swornDate?: string;
|
|
67
|
+
docNo?: string;
|
|
68
|
+
pageNo?: string;
|
|
69
|
+
bookNo?: string;
|
|
70
|
+
seriesOf?: string;
|
|
71
|
+
notaryPublic?: string;
|
|
72
|
+
status?: string;
|
|
73
|
+
};
|
|
74
|
+
export declare const EMPTY_RLSDDP_FORM: RlsddpFormState;
|
|
75
|
+
export type RlsddpFormState = {
|
|
76
|
+
entityName: string;
|
|
77
|
+
fundCluster: string;
|
|
78
|
+
departmentOffice: string;
|
|
79
|
+
accountableOfficer: string;
|
|
80
|
+
designation: string;
|
|
81
|
+
policeNotified: string;
|
|
82
|
+
policeStation: string;
|
|
83
|
+
policeNotifiedDate: string;
|
|
84
|
+
rlsddpDate: string;
|
|
85
|
+
parNo: string;
|
|
86
|
+
parDate: string;
|
|
87
|
+
statusOfProperty: string;
|
|
88
|
+
propertyNo: string;
|
|
89
|
+
description: string;
|
|
90
|
+
acquisitionCost: string;
|
|
91
|
+
circumstance: string;
|
|
92
|
+
accountableOfficerSignature: string;
|
|
93
|
+
accountableOfficerDate: string;
|
|
94
|
+
governmentIssuedId: string;
|
|
95
|
+
idNo: string;
|
|
96
|
+
dateIssued: string;
|
|
97
|
+
immediateSupervisorSignature: string;
|
|
98
|
+
immediateSupervisorDate: string;
|
|
99
|
+
swornDate: string;
|
|
100
|
+
docNo: string;
|
|
101
|
+
pageNo: string;
|
|
102
|
+
bookNo: string;
|
|
103
|
+
seriesOf: string;
|
|
104
|
+
notaryPublic: string;
|
|
105
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const EMPTY_RLSDDP_FORM = {
|
|
2
|
+
entityName: "",
|
|
3
|
+
fundCluster: "",
|
|
4
|
+
departmentOffice: "",
|
|
5
|
+
accountableOfficer: "",
|
|
6
|
+
designation: "",
|
|
7
|
+
policeNotified: "No",
|
|
8
|
+
policeStation: "",
|
|
9
|
+
policeNotifiedDate: "",
|
|
10
|
+
rlsddpDate: "",
|
|
11
|
+
parNo: "",
|
|
12
|
+
parDate: "",
|
|
13
|
+
statusOfProperty: "",
|
|
14
|
+
propertyNo: "",
|
|
15
|
+
description: "",
|
|
16
|
+
acquisitionCost: "0",
|
|
17
|
+
circumstance: "",
|
|
18
|
+
accountableOfficerSignature: "",
|
|
19
|
+
accountableOfficerDate: "",
|
|
20
|
+
governmentIssuedId: "",
|
|
21
|
+
idNo: "",
|
|
22
|
+
dateIssued: "",
|
|
23
|
+
immediateSupervisorSignature: "",
|
|
24
|
+
immediateSupervisorDate: "",
|
|
25
|
+
swornDate: "",
|
|
26
|
+
docNo: "",
|
|
27
|
+
pageNo: "",
|
|
28
|
+
bookNo: "",
|
|
29
|
+
seriesOf: "",
|
|
30
|
+
notaryPublic: "",
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type RrspVariant = "semi_expendable" | "ppe";
|
|
2
|
+
type RrspPreviewItem = {
|
|
3
|
+
itemDescription?: string;
|
|
4
|
+
quantity?: string;
|
|
5
|
+
icsNo?: string;
|
|
6
|
+
endUser?: string;
|
|
7
|
+
remarks?: string;
|
|
8
|
+
};
|
|
9
|
+
type RrspPreviewProps = {
|
|
10
|
+
variant?: RrspVariant;
|
|
11
|
+
entityName: string;
|
|
12
|
+
reportDate: string;
|
|
13
|
+
rrspNo: string;
|
|
14
|
+
returnedBy: string;
|
|
15
|
+
returnedDate: string;
|
|
16
|
+
receivedBy: string;
|
|
17
|
+
receivedDate: string;
|
|
18
|
+
items: RrspPreviewItem[];
|
|
19
|
+
};
|
|
20
|
+
export declare function RrspPreview({ variant, entityName, reportDate, rrspNo, returnedBy, returnedDate, receivedBy, receivedDate, items, }: RrspPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// ── Constants — match the RLSDDP/RLSDDSP pattern exactly ─────────────────────
|
|
4
|
+
const BLANK = " ";
|
|
5
|
+
const LINE = "1px solid #111";
|
|
6
|
+
/**
|
|
7
|
+
* Minimum table rows rendered (real items + filler).
|
|
8
|
+
* At ROW_HEIGHT_MM each, this keeps the items section tall enough
|
|
9
|
+
* so the form fills the A4 page when there are few real items.
|
|
10
|
+
*/
|
|
11
|
+
const MIN_TABLE_ROWS = 20;
|
|
12
|
+
const ROW_HEIGHT_MM = "8mm";
|
|
13
|
+
const VARIANT_CONFIG = {
|
|
14
|
+
semi_expendable: {
|
|
15
|
+
title: "RECEIPT OF RETURNED SEMI-EXPENDABLE PROPERTY",
|
|
16
|
+
ackLine: "This is to acknowledge receipt of the returned Semi-Expendable Property",
|
|
17
|
+
refColumnHeader: "ICS No.",
|
|
18
|
+
numberLabel: "RRSP No.:",
|
|
19
|
+
},
|
|
20
|
+
ppe: {
|
|
21
|
+
title: "RECEIPT OF RETURNED PROPERTY, PLANT AND EQUIPMENT",
|
|
22
|
+
ackLine: "This is to acknowledge receipt of the returned Property, Plant and Equipment",
|
|
23
|
+
refColumnHeader: "Property No.",
|
|
24
|
+
numberLabel: "RRPPE No.:",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
function fmtDate(value) {
|
|
28
|
+
if (!value)
|
|
29
|
+
return "";
|
|
30
|
+
const d = new Date(value);
|
|
31
|
+
return Number.isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
|
|
32
|
+
}
|
|
33
|
+
export function RrspPreview({ variant = "semi_expendable", entityName, reportDate, rrspNo, returnedBy, returnedDate, receivedBy, receivedDate, items, }) {
|
|
34
|
+
// Treat any stale client-side value as RRSP/Semi-Expendable instead of
|
|
35
|
+
// crashing the return-request modal while an older browser bundle refreshes.
|
|
36
|
+
const cfg = VARIANT_CONFIG[variant] ?? VARIANT_CONFIG.semi_expendable;
|
|
37
|
+
const fillerCount = Math.max(0, MIN_TABLE_ROWS - items.length);
|
|
38
|
+
// Shared cell style for data rows — mirrors RLSDDP's rowCell pattern
|
|
39
|
+
const cellStyle = {
|
|
40
|
+
border: LINE,
|
|
41
|
+
padding: "1mm 2mm",
|
|
42
|
+
fontSize: "8pt",
|
|
43
|
+
lineHeight: 1.2,
|
|
44
|
+
verticalAlign: "middle",
|
|
45
|
+
height: ROW_HEIGHT_MM,
|
|
46
|
+
boxSizing: "border-box",
|
|
47
|
+
};
|
|
48
|
+
const thStyle = {
|
|
49
|
+
...cellStyle,
|
|
50
|
+
fontWeight: 700,
|
|
51
|
+
textAlign: "center",
|
|
52
|
+
backgroundColor: "#f0f0f0",
|
|
53
|
+
height: "9mm",
|
|
54
|
+
};
|
|
55
|
+
return (
|
|
56
|
+
/**
|
|
57
|
+
* Outer A4 shell — identical approach to RlsddpPreview / RlsddspPreview:
|
|
58
|
+
* width: 210mm, minHeight: 297mm, inline styles only, Times New Roman.
|
|
59
|
+
*/
|
|
60
|
+
_jsx("div", { className: "psms-print-preview", "data-pdf-page": "true", style: {
|
|
61
|
+
width: "210mm",
|
|
62
|
+
minHeight: "297mm",
|
|
63
|
+
backgroundColor: "#fff",
|
|
64
|
+
boxSizing: "border-box",
|
|
65
|
+
color: "#111",
|
|
66
|
+
fontFamily: '"Times New Roman", Times, serif',
|
|
67
|
+
fontSize: "9pt",
|
|
68
|
+
lineHeight: 1.2,
|
|
69
|
+
padding: 0,
|
|
70
|
+
}, children: _jsxs("div", { style: {
|
|
71
|
+
width: "180mm",
|
|
72
|
+
margin: "0 auto",
|
|
73
|
+
paddingTop: "20mm",
|
|
74
|
+
paddingBottom: "15mm",
|
|
75
|
+
}, children: [_jsx("div", { style: {
|
|
76
|
+
textAlign: "center",
|
|
77
|
+
fontWeight: 700,
|
|
78
|
+
fontSize: "11pt",
|
|
79
|
+
lineHeight: 1.3,
|
|
80
|
+
marginBottom: "5mm",
|
|
81
|
+
letterSpacing: "0.3pt",
|
|
82
|
+
}, children: cfg.title }), _jsx("table", { style: {
|
|
83
|
+
width: "100%",
|
|
84
|
+
borderCollapse: "collapse",
|
|
85
|
+
tableLayout: "fixed",
|
|
86
|
+
border: LINE,
|
|
87
|
+
}, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: {
|
|
88
|
+
width: "62%",
|
|
89
|
+
borderRight: LINE,
|
|
90
|
+
padding: "2mm 2.5mm",
|
|
91
|
+
verticalAlign: "middle",
|
|
92
|
+
fontSize: "8.5pt",
|
|
93
|
+
}, children: [_jsx("span", { style: { fontWeight: 700 }, children: "Entity Name: " }), _jsx("span", { children: entityName || BLANK })] }), _jsxs("td", { style: { width: "38%", padding: 0, verticalAlign: "top" }, children: [_jsxs("div", { style: {
|
|
94
|
+
borderBottom: LINE,
|
|
95
|
+
padding: "1.8mm 2.5mm",
|
|
96
|
+
display: "flex",
|
|
97
|
+
gap: "1.5mm",
|
|
98
|
+
fontSize: "8.5pt",
|
|
99
|
+
}, children: [_jsx("span", { style: { fontWeight: 700, whiteSpace: "nowrap" }, children: "Date:" }), _jsx("span", { children: fmtDate(reportDate) || BLANK })] }), _jsxs("div", { style: {
|
|
100
|
+
padding: "1.8mm 2.5mm",
|
|
101
|
+
display: "flex",
|
|
102
|
+
gap: "1.5mm",
|
|
103
|
+
fontSize: "8.5pt",
|
|
104
|
+
}, children: [_jsx("span", { style: { fontWeight: 700, whiteSpace: "nowrap" }, children: cfg.numberLabel }), _jsx("span", { children: rrspNo || BLANK })] })] })] }) }) }), _jsx("div", { style: {
|
|
105
|
+
textAlign: "center",
|
|
106
|
+
fontStyle: "italic",
|
|
107
|
+
fontSize: "8pt",
|
|
108
|
+
padding: "2.5mm 4mm",
|
|
109
|
+
borderLeft: LINE,
|
|
110
|
+
borderRight: LINE,
|
|
111
|
+
borderBottom: LINE,
|
|
112
|
+
boxSizing: "border-box",
|
|
113
|
+
}, children: cfg.ackLine }), _jsxs("table", { style: {
|
|
114
|
+
width: "100%",
|
|
115
|
+
borderCollapse: "collapse",
|
|
116
|
+
tableLayout: "fixed",
|
|
117
|
+
borderLeft: LINE,
|
|
118
|
+
borderRight: LINE,
|
|
119
|
+
}, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: { ...thStyle, width: "30%" }, children: "Item Description" }), _jsx("th", { style: { ...thStyle, width: "12%" }, children: "Quantity" }), _jsx("th", { style: { ...thStyle, width: "16%" }, children: cfg.refColumnHeader }), _jsx("th", { style: { ...thStyle, width: "26%" }, children: "End User" }), _jsx("th", { style: { ...thStyle, width: "16%" }, children: "Remarks" })] }) }), _jsxs("tbody", { children: [items.map((item, i) => (_jsxs("tr", { children: [_jsx("td", { style: { ...cellStyle }, children: item.itemDescription || BLANK }), _jsx("td", { style: { ...cellStyle, textAlign: "center" }, children: item.quantity
|
|
120
|
+
? Number(item.quantity).toLocaleString("en-PH", {
|
|
121
|
+
minimumFractionDigits: 2,
|
|
122
|
+
})
|
|
123
|
+
: BLANK }), _jsx("td", { style: { ...cellStyle }, children: item.icsNo || BLANK }), _jsx("td", { style: { ...cellStyle }, children: item.endUser || BLANK }), _jsx("td", { style: { ...cellStyle }, children: item.remarks || BLANK })] }, i))), Array.from({ length: fillerCount }).map((_, i) => (_jsxs("tr", { children: [_jsx("td", { style: { ...cellStyle }, children: BLANK }), _jsx("td", { style: { ...cellStyle }, children: BLANK }), _jsx("td", { style: { ...cellStyle }, children: BLANK }), _jsx("td", { style: { ...cellStyle }, children: BLANK }), _jsx("td", { style: { ...cellStyle }, children: BLANK })] }, `filler-${i}`)))] })] }), _jsx("table", { style: {
|
|
124
|
+
width: "100%",
|
|
125
|
+
borderCollapse: "collapse",
|
|
126
|
+
tableLayout: "fixed",
|
|
127
|
+
border: LINE,
|
|
128
|
+
borderTop: LINE,
|
|
129
|
+
}, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: {
|
|
130
|
+
width: "50%",
|
|
131
|
+
borderRight: LINE,
|
|
132
|
+
padding: "3mm 5mm 3mm",
|
|
133
|
+
verticalAlign: "top",
|
|
134
|
+
boxSizing: "border-box",
|
|
135
|
+
height: "45mm",
|
|
136
|
+
}, children: [_jsx("div", { style: { fontSize: "8pt", marginBottom: "9mm" }, children: "Returned by:" }), _jsxs("div", { style: { width: "62mm", margin: "0 auto 1.5mm", textAlign: "center" }, children: [_jsx("div", { style: {
|
|
137
|
+
borderBottom: LINE,
|
|
138
|
+
minHeight: "5mm",
|
|
139
|
+
padding: "0 1mm",
|
|
140
|
+
fontWeight: 700,
|
|
141
|
+
fontSize: "8.5pt",
|
|
142
|
+
}, children: returnedBy || BLANK }), _jsx("div", { style: { fontSize: "7pt", marginTop: "1mm" }, children: "End User" })] }), _jsxs("div", { style: { width: "42mm", margin: "5mm auto 0", textAlign: "center" }, children: [_jsx("div", { style: { borderBottom: LINE, minHeight: "5mm", padding: "0 1mm" }, children: fmtDate(returnedDate) || BLANK }), _jsx("div", { style: { fontSize: "7pt", marginTop: "1mm" }, children: "Date" })] })] }), _jsxs("td", { style: {
|
|
143
|
+
width: "50%",
|
|
144
|
+
padding: "3mm 5mm 3mm",
|
|
145
|
+
verticalAlign: "top",
|
|
146
|
+
boxSizing: "border-box",
|
|
147
|
+
height: "45mm",
|
|
148
|
+
}, children: [_jsx("div", { style: { fontSize: "8pt", marginBottom: "9mm" }, children: "Received by:" }), _jsxs("div", { style: { width: "62mm", margin: "0 auto 1.5mm", textAlign: "center" }, children: [_jsx("div", { style: {
|
|
149
|
+
borderBottom: LINE,
|
|
150
|
+
minHeight: "5mm",
|
|
151
|
+
padding: "0 1mm",
|
|
152
|
+
fontWeight: 700,
|
|
153
|
+
fontSize: "8.5pt",
|
|
154
|
+
}, children: receivedBy || BLANK }), _jsx("div", { style: { fontSize: "7pt", marginTop: "1mm" }, children: "Head, Property and/or Supply Division/Unit" })] }), _jsxs("div", { style: { width: "42mm", margin: "5mm auto 0", textAlign: "center" }, children: [_jsx("div", { style: { borderBottom: LINE, minHeight: "5mm", padding: "0 1mm" }, children: fmtDate(receivedDate) || BLANK }), _jsx("div", { style: { fontSize: "7pt", marginTop: "1mm" }, children: "Date" })] })] })] }) }) })] }) }));
|
|
155
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RsmiBasicForm, RsmiLineDraft, RsmiRecapLine, RsmiRecapLineDraft } from "./rsmi-types.js";
|
|
2
|
+
type RsmiCreateFormProps = {
|
|
3
|
+
activeTab: string;
|
|
4
|
+
onActiveTabChange: (tab: string) => void;
|
|
5
|
+
rsmiNo: string;
|
|
6
|
+
onRefreshRsmiNo: () => void;
|
|
7
|
+
basicForm: RsmiBasicForm;
|
|
8
|
+
onBasicFieldChange: <K extends keyof RsmiBasicForm>(field: K, value: RsmiBasicForm[K]) => void;
|
|
9
|
+
lineDraft: RsmiLineDraft;
|
|
10
|
+
onLineDraftChange: <K extends keyof RsmiLineDraft>(field: K, value: RsmiLineDraft[K]) => void;
|
|
11
|
+
onAddLine: () => void;
|
|
12
|
+
editingLineId?: string | null;
|
|
13
|
+
recapItems: RsmiRecapLine[];
|
|
14
|
+
onRemoveRecap: (id: string) => void;
|
|
15
|
+
recapDraft: RsmiRecapLineDraft;
|
|
16
|
+
onRecapDraftChange: <K extends keyof RsmiRecapLineDraft>(field: K, value: RsmiRecapLineDraft[K]) => void;
|
|
17
|
+
onAddRecap: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function RsmiCreateForm({ activeTab, onActiveTabChange, rsmiNo, onRefreshRsmiNo, basicForm, onBasicFieldChange, lineDraft, onLineDraftChange, onAddLine, editingLineId, recapItems, onRemoveRecap, recapDraft, onRecapDraftChange, onAddRecap, }: RsmiCreateFormProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { DateInput } from "../../../internal/components/ui/date-input.js";
|
|
4
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../internal/components/ui/tabs.js";
|
|
5
|
+
import { formatCurrency } from "./rsmi-utils.js";
|
|
6
|
+
export function RsmiCreateForm({ activeTab, onActiveTabChange, rsmiNo, onRefreshRsmiNo, basicForm, onBasicFieldChange, lineDraft, onLineDraftChange, onAddLine, editingLineId, recapItems, onRemoveRecap, recapDraft, onRecapDraftChange, onAddRecap, }) {
|
|
7
|
+
return (_jsxs(Tabs, { value: activeTab, onValueChange: onActiveTabChange, children: [_jsxs(TabsList, { className: "grid w-full grid-cols-2", children: [_jsx(TabsTrigger, { value: "basic", children: "Basic Info" }), _jsx(TabsTrigger, { value: "items", children: "Lines & Recapitulation" })] }), _jsxs(TabsContent, { value: "basic", className: "mt-4 space-y-3", children: [_jsx("div", { className: "rounded-md border border-indigo-200 bg-indigo-50 p-4", children: _jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { children: [_jsx("p", { className: "text-xs font-medium text-muted-foreground", children: "Serial Number" }), _jsx("p", { className: "text-3xl font-semibold text-slate-700", children: basicForm.serialNo || "---" })] }) }) }), _jsxs("div", { className: "grid gap-2 md:grid-cols-2", children: [_jsx("input", { value: basicForm.entityName, onChange: e => onBasicFieldChange("entityName", e.target.value), placeholder: "Entity Name", className: "w-full rounded-md border px-3 py-2 text-sm" }), _jsx("input", { value: basicForm.fundCluster, onChange: e => onBasicFieldChange("fundCluster", e.target.value), placeholder: "Fund Cluster", className: "w-full rounded-md border px-3 py-2 text-sm" })] }), _jsxs("div", { className: "grid gap-2 md:grid-cols-2", children: [_jsx("input", { value: basicForm.serialNo, onChange: e => onBasicFieldChange("serialNo", e.target.value), placeholder: "Serial No.", className: "w-full rounded-md border px-3 py-2 text-sm" }), _jsx(DateInput, { type: "date", value: basicForm.reportDate, onChange: e => onBasicFieldChange("reportDate", e.target.value), className: "w-full rounded-md border px-3 py-2 text-sm" })] }), _jsxs("div", { className: "grid gap-2 md:grid-cols-2", children: [_jsx("input", { value: basicForm.supplyCustodianName, onChange: e => onBasicFieldChange("supplyCustodianName", e.target.value), placeholder: "Supply and/or Property Custodian", className: "w-full rounded-md border px-3 py-2 text-sm" }), _jsx("input", { value: basicForm.accountingStaffName, onChange: e => onBasicFieldChange("accountingStaffName", e.target.value), placeholder: "Designated Accounting Staff", className: "w-full rounded-md border px-3 py-2 text-sm" })] })] }), _jsx(TabsContent, { value: "items", className: "mt-4 space-y-6", children: _jsxs("div", { className: "rounded-md border p-4 bg-muted/20 space-y-4 shadow-sm", children: [_jsxs("div", { className: "flex items-center justify-between border-b pb-2", children: [_jsx("p", { className: "text-sm font-semibold uppercase tracking-wider text-slate-700", children: "Line Columns" }), editingLineId && (_jsx("span", { className: "text-[10px] bg-indigo-100 text-indigo-700 px-2 py-0.5 rounded-full font-bold", children: "EDITING ROW" }))] }), _jsxs("div", { className: "grid gap-3 md:grid-cols-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "RIS No." }), _jsx("input", { value: lineDraft.risNo, onChange: e => onLineDraftChange("risNo", e.target.value), placeholder: "000-00-000", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "RCC" }), _jsx("input", { value: lineDraft.responsibilityCenterCode, onChange: e => onLineDraftChange("responsibilityCenterCode", e.target.value), placeholder: "00-00-000", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Stock No." }), _jsx("input", { value: lineDraft.stockNo, onChange: e => onLineDraftChange("stockNo", e.target.value), placeholder: "SN-000", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Item Description" }), _jsx("input", { value: lineDraft.item, onChange: e => onLineDraftChange("item", e.target.value), placeholder: "Item", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] })] }), _jsxs("div", { className: "grid gap-3 md:grid-cols-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Unit" }), _jsx("input", { value: lineDraft.unit, onChange: e => onLineDraftChange("unit", e.target.value), placeholder: "Piece", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Quantity" }), _jsx("input", { type: "number", value: lineDraft.quantityIssued, onChange: e => onLineDraftChange("quantityIssued", e.target.value), placeholder: "0", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Unit Cost" }), _jsx("input", { type: "number", value: lineDraft.unitCost, onChange: e => onLineDraftChange("unitCost", e.target.value), placeholder: "0.00", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Amount" }), _jsx("input", { value: formatCurrency(Number(lineDraft.quantityIssued || 0) * Number(lineDraft.unitCost || 0)), readOnly: true, className: "w-full rounded-md border bg-slate-50 px-2 py-1.5 text-xs shadow-sm" })] })] }), _jsx("div", { className: "flex justify-end", children: _jsx("button", { onClick: onAddLine, className: "rounded-md bg-slate-800 px-3 py-2 text-xs font-semibold text-white transition-colors hover:bg-slate-700", children: editingLineId ? "Update Line" : "Add Line" }) }), _jsxs("div", { className: "mt-6 pt-4 border-t space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between border-b pb-2", children: [_jsx("p", { className: "text-sm font-semibold uppercase tracking-wider text-slate-700", children: "Recapitulation Columns" }), editingLineId && recapItems.find(r => r.lineId === editingLineId) && (_jsx("span", { className: "text-[10px] bg-slate-100 text-slate-700 px-2 py-0.5 rounded-full font-bold", children: "UPDATING LINKED RECAP" }))] }), _jsxs("div", { className: "grid gap-3 md:grid-cols-5", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Stock No." }), _jsx("input", { value: recapDraft.stockNo, onChange: e => onRecapDraftChange("stockNo", e.target.value), placeholder: "SN-000", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Quantity" }), _jsx("input", { type: "number", value: recapDraft.quantity, onChange: e => onRecapDraftChange("quantity", e.target.value), placeholder: "0", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Unit Cost" }), _jsx("input", { type: "number", value: recapDraft.unitCost, onChange: e => onRecapDraftChange("unitCost", e.target.value), placeholder: "0.00", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "Total Cost" }), _jsx("input", { value: formatCurrency(Number(recapDraft.quantity || 0) * Number(recapDraft.unitCost || 0)), readOnly: true, className: "w-full rounded-md border bg-slate-50 px-2 py-1.5 text-xs shadow-sm" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { className: "text-[10px] font-medium text-muted-foreground uppercase", children: "UACS Object Code" }), _jsx("input", { value: recapDraft.uacsCode, onChange: e => onRecapDraftChange("uacsCode", e.target.value), placeholder: "000-00-000", className: "w-full rounded-md border px-2 py-1.5 text-xs shadow-sm" })] })] }), _jsx("div", { className: "flex justify-end", children: _jsx("button", { onClick: onAddRecap, className: "rounded-md bg-slate-800 px-3 py-2 text-xs font-semibold text-white transition-colors hover:bg-slate-700", children: editingLineId && recapItems.find(r => r.lineId === editingLineId) ? "Update Recapitulation" : "Add Recapitulation" }) })] })] }) })] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RsmiLine, RsmiRecapLine } from "./rsmi-types.js";
|
|
2
|
+
type RsmiDocumentBodyProps = {
|
|
3
|
+
entityName: string;
|
|
4
|
+
fundCluster: string;
|
|
5
|
+
serialNo: string;
|
|
6
|
+
reportDate: string;
|
|
7
|
+
supplyCustodianName?: string;
|
|
8
|
+
accountingStaffName?: string;
|
|
9
|
+
lines: RsmiLine[];
|
|
10
|
+
recapitulation: RsmiRecapLine[];
|
|
11
|
+
onEditLine?: (lineId: string) => void;
|
|
12
|
+
onRemoveLine?: (lineId: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function RsmiDocumentBody({ entityName, fundCluster, serialNo, reportDate, supplyCustodianName, accountingStaffName, lines, recapitulation, onEditLine, onRemoveLine, }: RsmiDocumentBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Delete01Icon, PencilEdit01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon } from "@hugeicons/react";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../../../internal/components/ui/tooltip.js";
|
|
6
|
+
import { formatCurrency, formatDate } from "./rsmi-utils.js";
|
|
7
|
+
export function RsmiDocumentBody({ entityName, fundCluster, serialNo, reportDate, supplyCustodianName, accountingStaffName, lines, recapitulation, onEditLine, onRemoveLine, }) {
|
|
8
|
+
const isEditable = Boolean(onEditLine && onRemoveLine);
|
|
9
|
+
const bodyRowCount = Math.max(lines.length, 18);
|
|
10
|
+
const recapRows = recapitulation.length > 0 ? recapitulation : [undefined];
|
|
11
|
+
return (_jsxs("div", { "data-pdf-page": "true", "data-pdf-orientation": "portrait", className: "rsmi-document-page psms-print-preview mx-auto min-h-[1123px] w-[794px] border border-black bg-white px-5 py-4 font-serif text-[12px] leading-tight text-black shadow-sm", children: [_jsx("div", { className: "text-center", children: _jsx("h2", { className: "text-[18px] font-bold tracking-normal uppercase", children: "REPORT OF SUPPLIES AND MATERIALS ISSUED" }) }), _jsxs("div", { className: "mt-2 grid grid-cols-2 gap-4 text-[12px]", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("p", { children: [_jsx("span", { className: "font-bold", children: "Entity Name:" }), " ", entityName || "-"] }), _jsxs("p", { children: [_jsx("span", { className: "font-bold", children: "Fund Cluster:" }), " ", fundCluster || "-"] })] }), _jsxs("div", { className: "space-y-1 text-right", children: [_jsxs("p", { children: [_jsx("span", { className: "font-bold", children: "Serial No. :" }), " ", serialNo || "-"] }), _jsxs("p", { children: [_jsx("span", { className: "font-bold", children: "Date :" }), " ", formatDate(reportDate)] })] })] }), _jsx("div", { className: "mt-1 border border-black", children: _jsxs("table", { className: "w-full table-fixed border-collapse text-[11px]", children: [_jsxs("colgroup", { children: [_jsx("col", { className: "w-[12%]" }), _jsx("col", { className: "w-[10%]" }), _jsx("col", { className: "w-[7.5%]" }), _jsx("col", { className: "w-[31%]" }), _jsx("col", { className: "w-[6.5%]" }), _jsx("col", { className: "w-[8.5%]" }), _jsx("col", { className: "w-[11%]" }), _jsx("col", { className: "w-[13.5%]" })] }), _jsxs("thead", { children: [_jsxs("tr", { className: "border-b border-black", children: [_jsx("th", { colSpan: 6, className: "border-r border-b border-black px-1 py-1 text-center text-[12px] leading-[1.25] font-normal italic", children: "To be filled up by the Supply and/or Property Division/Unit" }), _jsx("th", { colSpan: 2, className: "px-1 py-1 text-center text-[12px] leading-[1.25] font-normal italic", children: "filled up by the Accounting Division" })] }), _jsxs("tr", { className: "border-b-2 border-black text-center text-[12px] leading-[1.25] font-bold", children: [_jsx("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: "RIS No." }), _jsxs("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: ["Responsibili", _jsx("br", {}), "ty Center", _jsx("br", {}), "Code"] }), _jsx("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: "Stock No." }), _jsx("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: "Item" }), _jsx("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: "Unit" }), _jsxs("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: ["Quantity", _jsx("br", {}), "Issued"] }), _jsx("th", { className: "h-14 border-r border-b border-black px-1 py-1", children: "Unit Cost" }), _jsx("th", { className: "h-14 px-1 py-1", children: "Amount" })] })] }), _jsxs("tbody", { children: [lines.map(line => (_jsxs("tr", { className: "group align-top", children: [_jsxs("td", { className: `h-[27px] border-r border-b border-black px-1 py-0.5 ${isEditable && line ? "relative pr-16" : ""}`, children: [isEditable && line && (_jsx("div", { className: "pointer-events-none absolute top-1/2 right-1 z-10 flex -translate-y-1/2 items-center gap-1 rounded-md bg-background/95 px-1 py-0.5 opacity-0 shadow-sm ring-1 ring-border transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100", children: _jsxs(TooltipProvider, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { onClick: () => onEditLine?.(line.id), className: "flex size-7 items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm transition-all hover:bg-slate-50 hover:text-indigo-600 focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:outline-none", children: _jsx(HugeiconsIcon, { icon: PencilEdit01Icon, className: "size-3.5" }) }), _jsx(TooltipContent, { side: "left", children: "Edit this item" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { onClick: () => onRemoveLine?.(line.id), className: "flex size-7 items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm transition-all hover:bg-slate-50 hover:text-red-600 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:outline-none", children: _jsx(HugeiconsIcon, { icon: Delete01Icon, className: "size-3.5" }) }), _jsx(TooltipContent, { side: "left", children: "Remove this item" })] })] }) })), line.risNo] }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5", children: line.responsibilityCenterCode }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5", children: line.stockNo }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5", children: line.item }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5", children: line.unit }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5 text-right", children: line.quantityIssued }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5 text-right", children: formatCurrency(line.unitCost) }), _jsx("td", { className: "h-[27px] border-b border-black px-1 py-0.5 text-right", children: formatCurrency(line.amount) })] }, line.id))), lines.length > 0 && (_jsxs("tr", { className: "align-top", children: [_jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5 text-center italic text-slate-500", children: "***nothing follows***" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-b border-black px-1 py-0.5" })] })), Array.from({ length: Math.max(0, bodyRowCount - lines.length - (lines.length > 0 ? 1 : 0)) }, (_, i) => (_jsxs("tr", { className: "group align-top", children: [_jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-r border-b border-black px-1 py-0.5" }), _jsx("td", { className: "h-[27px] border-b border-black px-1 py-0.5" })] }, `blank-${i}`)))] }), _jsxs("tfoot", { children: [_jsxs("tr", { children: [_jsx("td", { className: "border-t-2 border-r border-black" }), _jsxs("td", { colSpan: 2, className: "border-t-2 border-r border-black p-0 align-top", children: [_jsx("div", { className: "border-b border-black py-1 text-center text-[12px] leading-[1.25] font-bold", children: "Recapitulation:" }), _jsxs("div", { className: "grid grid-cols-2 border-b border-black text-center text-[12px] leading-[1.25] font-bold", children: [_jsx("div", { className: "border-r border-b border-black px-1 py-1", children: "Stock No." }), _jsx("div", { className: "px-1 py-1", children: "Quantity" })] }), recapRows.map((recap, idx) => (_jsxs("div", { className: "grid grid-cols-2 text-center", children: [_jsx("div", { className: "min-h-6 border-r border-b border-black px-1 py-1 leading-[1.25]", children: recap?.stockNo ?? "" }), _jsx("div", { className: "min-h-6 px-1 py-1 leading-[1.25] text-right", children: recap?.quantity ?? "" })] }, recap?.id ?? `left-recap-${idx}`)))] }), _jsx("td", { className: "border-t-2 border-r border-black" }), _jsx("td", { className: "border-t-2 border-r border-black" }), _jsx("td", { className: "border-t-2 border-r border-black" }), _jsxs("td", { colSpan: 2, className: "border-t-2 border-black p-0 align-top", children: [_jsx("div", { className: "border-b border-black py-1 text-center text-[12px] leading-[1.25] font-bold", children: "Recapitulation:" }), _jsxs("div", { className: "grid grid-cols-3 border-b border-black text-center text-[12px] leading-[1.25] font-bold", children: [_jsx("div", { className: "border-r border-b border-black px-1 py-1", children: "Unit Cost" }), _jsx("div", { className: "border-r border-b border-black px-1 py-1", children: "Total Cost" }), _jsx("div", { className: "px-1 py-1", children: "UACS Object Code" })] }), recapRows.map((recap, idx) => (_jsxs("div", { className: "grid grid-cols-3 text-center", children: [_jsx("div", { className: "min-h-6 border-r border-b border-black px-1 py-1 leading-[1.25] text-right", children: recap ? formatCurrency(recap.unitCost) : "" }), _jsx("div", { className: "min-h-6 border-r border-b border-black px-1 py-1 leading-[1.25] text-right", children: recap ? formatCurrency(recap.totalCost) : "" }), _jsx("div", { className: "min-h-6 px-1 py-1 leading-[1.25]", children: recap?.uacsCode ?? "" })] }, recap?.id ?? `right-recap-${idx}`)))] })] }), _jsxs("tr", { children: [_jsxs("td", { colSpan: 6, className: "border-t-2 border-r border-black px-5 py-3", children: [_jsx("p", { children: "I hereby certify to the correctness of the above information." }), _jsxs("div", { className: "mt-11 text-center", children: [_jsx("p", { className: "font-bold uppercase", children: supplyCustodianName || "" }), _jsx("p", { className: "mt-1", children: "Signature over Printed Name of Supply and/or Property Custodian" })] })] }), _jsxs("td", { colSpan: 2, className: "border-t-2 border-black px-1 py-3", children: [_jsx("p", { children: "Posted by:" }), _jsxs("div", { className: "mt-8 text-center", children: [_jsx("p", { className: "font-bold uppercase", children: accountingStaffName || "" }), _jsxs("div", { className: "mt-1 grid grid-cols-[1fr_42px] items-start gap-1", children: [_jsx("p", { className: "border-t border-black pt-1", children: "Signature over Printed Name of Designated" }), _jsx("p", { className: "border-t border-black pt-1", children: "Date" })] })] })] })] })] })] }) })] }));
|
|
12
|
+
}
|