@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,29 @@
|
|
|
1
|
+
export type RegSpiStatus = "Draft" | "Submitted" | "Approved";
|
|
2
|
+
export type ModalMode = "create" | "view" | "edit";
|
|
3
|
+
export type EntryRow = {
|
|
4
|
+
id: string;
|
|
5
|
+
entryDate: string;
|
|
6
|
+
reference: string;
|
|
7
|
+
iicRrspNo: string;
|
|
8
|
+
semiExpendablePropertyNo: string;
|
|
9
|
+
itemDescription: string;
|
|
10
|
+
estimatedUsefulLife: string;
|
|
11
|
+
issuedQty: string;
|
|
12
|
+
issuedOfficeOfficer: string;
|
|
13
|
+
returnedQty: string;
|
|
14
|
+
returnedOfficeOfficer: string;
|
|
15
|
+
reissuedQty: string;
|
|
16
|
+
reissuedOfficeOfficer: string;
|
|
17
|
+
disposedQty: string;
|
|
18
|
+
balance: string;
|
|
19
|
+
amount: string;
|
|
20
|
+
remarks: string;
|
|
21
|
+
};
|
|
22
|
+
export type BasicForm = {
|
|
23
|
+
entityName: string;
|
|
24
|
+
semiExpendableProperty: string;
|
|
25
|
+
fundCluster: string;
|
|
26
|
+
sheetNumber: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const EMPTY_BASIC_FORM: BasicForm;
|
|
29
|
+
export declare const EMPTY_ENTRY_DRAFT: Omit<EntryRow, "id">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const EMPTY_BASIC_FORM = {
|
|
2
|
+
entityName: "",
|
|
3
|
+
semiExpendableProperty: "",
|
|
4
|
+
fundCluster: "",
|
|
5
|
+
sheetNumber: "",
|
|
6
|
+
};
|
|
7
|
+
export const EMPTY_ENTRY_DRAFT = {
|
|
8
|
+
entryDate: "",
|
|
9
|
+
reference: "",
|
|
10
|
+
iicRrspNo: "",
|
|
11
|
+
semiExpendablePropertyNo: "",
|
|
12
|
+
itemDescription: "",
|
|
13
|
+
estimatedUsefulLife: "",
|
|
14
|
+
issuedQty: "0",
|
|
15
|
+
issuedOfficeOfficer: "",
|
|
16
|
+
returnedQty: "0",
|
|
17
|
+
returnedOfficeOfficer: "",
|
|
18
|
+
reissuedQty: "0",
|
|
19
|
+
reissuedOfficeOfficer: "",
|
|
20
|
+
disposedQty: "0",
|
|
21
|
+
balance: "0",
|
|
22
|
+
amount: "0",
|
|
23
|
+
remarks: "",
|
|
24
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { RegSpiEntry, RegSpiReport } from "../../internal/contracts/modules/v1/reg-spi-reports/reg-spi-reports.schema.js";
|
|
2
|
+
import type { BasicForm, EntryRow } from "./types.js";
|
|
3
|
+
export declare function formatDateTime(value: string): string;
|
|
4
|
+
export declare function fmtDate(value?: string): string;
|
|
5
|
+
export declare function fmtQtyShort(value: string): string;
|
|
6
|
+
export declare function fmtAmount(value: string): string;
|
|
7
|
+
/** Build preview-ready entry from a live EntryRow (used in create/edit form) */
|
|
8
|
+
export declare function entryRowToPreviewEntry(row: Omit<EntryRow, "id"> | EntryRow): {
|
|
9
|
+
entryDate: string;
|
|
10
|
+
reference: string;
|
|
11
|
+
iicRrspNo: string;
|
|
12
|
+
semiExpendablePropertyNo: string;
|
|
13
|
+
itemDescription: string;
|
|
14
|
+
estimatedUsefulLife: string;
|
|
15
|
+
issuedQty: string;
|
|
16
|
+
issuedOfficeOfficer: string;
|
|
17
|
+
returnedQty: string;
|
|
18
|
+
returnedOfficeOfficer: string;
|
|
19
|
+
reissuedQty: string;
|
|
20
|
+
reissuedOfficeOfficer: string;
|
|
21
|
+
disposedQty: string;
|
|
22
|
+
balance: string;
|
|
23
|
+
amount: string;
|
|
24
|
+
remarks: string;
|
|
25
|
+
};
|
|
26
|
+
/** Build preview-ready entry from a stored RegSpiEntry (used in view modal) */
|
|
27
|
+
export declare function storedEntryToPreviewEntry(entry: RegSpiEntry): {
|
|
28
|
+
entryDate: string;
|
|
29
|
+
reference: string;
|
|
30
|
+
iicRrspNo: string;
|
|
31
|
+
semiExpendablePropertyNo: string;
|
|
32
|
+
itemDescription: string;
|
|
33
|
+
estimatedUsefulLife: string;
|
|
34
|
+
issuedQty: string;
|
|
35
|
+
issuedOfficeOfficer: string;
|
|
36
|
+
returnedQty: string;
|
|
37
|
+
returnedOfficeOfficer: string;
|
|
38
|
+
reissuedQty: string;
|
|
39
|
+
reissuedOfficeOfficer: string;
|
|
40
|
+
disposedQty: string;
|
|
41
|
+
balance: string;
|
|
42
|
+
amount: string;
|
|
43
|
+
remarks: string;
|
|
44
|
+
};
|
|
45
|
+
/** Build a BasicForm from a stored RegSpiReport (used when opening edit modal) */
|
|
46
|
+
export declare function recordToBasicForm(record: RegSpiReport): BasicForm;
|
|
47
|
+
/** Build EntryRow[] from a stored RegSpiReport's entries (used when opening edit modal) */
|
|
48
|
+
export declare function recordEntriesToRows(entries: RegSpiEntry[]): EntryRow[];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export function formatDateTime(value) {
|
|
2
|
+
return new Date(value).toLocaleString("en-PH", {
|
|
3
|
+
year: "numeric",
|
|
4
|
+
month: "short",
|
|
5
|
+
day: "2-digit",
|
|
6
|
+
hour: "2-digit",
|
|
7
|
+
minute: "2-digit",
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export function fmtDate(value) {
|
|
11
|
+
if (!value || value.trim() === "")
|
|
12
|
+
return "";
|
|
13
|
+
const d = new Date(value);
|
|
14
|
+
return isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
|
|
15
|
+
}
|
|
16
|
+
export function fmtQtyShort(value) {
|
|
17
|
+
const n = Number(value);
|
|
18
|
+
return Number.isNaN(n) || n === 0 ? "-" : n.toString();
|
|
19
|
+
}
|
|
20
|
+
export function fmtAmount(value) {
|
|
21
|
+
const n = Number(value);
|
|
22
|
+
return Number.isNaN(n) ? value : n === 0
|
|
23
|
+
? ""
|
|
24
|
+
: n.toLocaleString("en-PH", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
25
|
+
}
|
|
26
|
+
/** Build preview-ready entry from a live EntryRow (used in create/edit form) */
|
|
27
|
+
export function entryRowToPreviewEntry(row) {
|
|
28
|
+
return {
|
|
29
|
+
entryDate: row.entryDate,
|
|
30
|
+
reference: row.reference,
|
|
31
|
+
iicRrspNo: row.iicRrspNo,
|
|
32
|
+
semiExpendablePropertyNo: row.semiExpendablePropertyNo,
|
|
33
|
+
itemDescription: row.itemDescription,
|
|
34
|
+
estimatedUsefulLife: row.estimatedUsefulLife,
|
|
35
|
+
issuedQty: row.issuedQty,
|
|
36
|
+
issuedOfficeOfficer: row.issuedOfficeOfficer,
|
|
37
|
+
returnedQty: row.returnedQty,
|
|
38
|
+
returnedOfficeOfficer: row.returnedOfficeOfficer,
|
|
39
|
+
reissuedQty: row.reissuedQty,
|
|
40
|
+
reissuedOfficeOfficer: row.reissuedOfficeOfficer,
|
|
41
|
+
disposedQty: row.disposedQty,
|
|
42
|
+
balance: row.balance,
|
|
43
|
+
amount: row.amount,
|
|
44
|
+
remarks: row.remarks,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Build preview-ready entry from a stored RegSpiEntry (used in view modal) */
|
|
48
|
+
export function storedEntryToPreviewEntry(entry) {
|
|
49
|
+
return {
|
|
50
|
+
entryDate: entry.entryDate ?? "",
|
|
51
|
+
reference: entry.reference ?? "",
|
|
52
|
+
iicRrspNo: entry.iicRrspNo ?? "",
|
|
53
|
+
semiExpendablePropertyNo: entry.semiExpendablePropertyNo ?? "",
|
|
54
|
+
itemDescription: entry.itemDescription ?? "",
|
|
55
|
+
estimatedUsefulLife: entry.estimatedUsefulLife ?? "",
|
|
56
|
+
issuedQty: entry.issuedQty,
|
|
57
|
+
issuedOfficeOfficer: entry.issuedOfficeOfficer ?? "",
|
|
58
|
+
returnedQty: entry.returnedQty,
|
|
59
|
+
returnedOfficeOfficer: entry.returnedOfficeOfficer ?? "",
|
|
60
|
+
reissuedQty: entry.reissuedQty,
|
|
61
|
+
reissuedOfficeOfficer: entry.reissuedOfficeOfficer ?? "",
|
|
62
|
+
disposedQty: entry.disposedQty,
|
|
63
|
+
balance: entry.balance,
|
|
64
|
+
amount: entry.amount,
|
|
65
|
+
remarks: entry.remarks ?? "",
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Build a BasicForm from a stored RegSpiReport (used when opening edit modal) */
|
|
69
|
+
export function recordToBasicForm(record) {
|
|
70
|
+
return {
|
|
71
|
+
entityName: record.entityName ?? "",
|
|
72
|
+
semiExpendableProperty: record.semiExpendableProperty ?? "",
|
|
73
|
+
fundCluster: record.fundCluster ?? "",
|
|
74
|
+
sheetNumber: record.sheetNumber ?? "",
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** Build EntryRow[] from a stored RegSpiReport's entries (used when opening edit modal) */
|
|
78
|
+
export function recordEntriesToRows(entries) {
|
|
79
|
+
return entries.map((e, i) => ({
|
|
80
|
+
id: `ENTRY-${String(i + 1).padStart(3, "0")}`,
|
|
81
|
+
entryDate: e.entryDate ? e.entryDate.slice(0, 10) : "",
|
|
82
|
+
reference: e.reference ?? "",
|
|
83
|
+
iicRrspNo: e.iicRrspNo ?? "",
|
|
84
|
+
semiExpendablePropertyNo: e.semiExpendablePropertyNo ?? "",
|
|
85
|
+
itemDescription: e.itemDescription ?? "",
|
|
86
|
+
estimatedUsefulLife: e.estimatedUsefulLife ?? "",
|
|
87
|
+
issuedQty: e.issuedQty,
|
|
88
|
+
issuedOfficeOfficer: e.issuedOfficeOfficer ?? "",
|
|
89
|
+
returnedQty: e.returnedQty,
|
|
90
|
+
returnedOfficeOfficer: e.returnedOfficeOfficer ?? "",
|
|
91
|
+
reissuedQty: e.reissuedQty,
|
|
92
|
+
reissuedOfficeOfficer: e.reissuedOfficeOfficer ?? "",
|
|
93
|
+
disposedQty: e.disposedQty,
|
|
94
|
+
balance: e.balance,
|
|
95
|
+
amount: e.amount,
|
|
96
|
+
remarks: e.remarks ?? "",
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { RisBasicForm, RisItem, RisItemDraft } from "../types.js";
|
|
3
|
+
type PickingCriteria = "FIFO" | "LIFO" | "FEFO";
|
|
4
|
+
type InventoryOption = {
|
|
5
|
+
id: string;
|
|
6
|
+
itemId?: number;
|
|
7
|
+
referenceBatchId?: number;
|
|
8
|
+
referenceBatchNo?: string;
|
|
9
|
+
itemCode: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: string;
|
|
12
|
+
uom: string;
|
|
13
|
+
unitCost: number;
|
|
14
|
+
quantity: number;
|
|
15
|
+
pickingCriteria?: PickingCriteria;
|
|
16
|
+
stockStatus: string;
|
|
17
|
+
};
|
|
18
|
+
type RisCreateFormProps = {
|
|
19
|
+
activeTab: string;
|
|
20
|
+
onActiveTabChange: (tab: string) => void;
|
|
21
|
+
risNo: string;
|
|
22
|
+
onRefreshRisNo: () => void;
|
|
23
|
+
basicForm: RisBasicForm;
|
|
24
|
+
basicFieldErrors?: Partial<Record<keyof RisBasicForm, string>>;
|
|
25
|
+
onBasicFieldChange: <K extends keyof RisBasicForm>(field: K, value: RisBasicForm[K]) => void;
|
|
26
|
+
items: RisItem[];
|
|
27
|
+
itemDraft: RisItemDraft;
|
|
28
|
+
onItemDraftFieldChange: <K extends keyof RisItemDraft>(field: K, value: RisItemDraft[K]) => void;
|
|
29
|
+
onAddItem: () => void;
|
|
30
|
+
onRemoveItem: (id: string) => void;
|
|
31
|
+
inventoryItems?: InventoryOption[];
|
|
32
|
+
pickingPlanPanel?: ReactNode;
|
|
33
|
+
role?: "enduser" | "supply" | "superadmin";
|
|
34
|
+
};
|
|
35
|
+
export declare function RisCreateForm({ activeTab, onActiveTabChange, risNo, onRefreshRisNo, basicForm, basicFieldErrors, onBasicFieldChange, items, itemDraft, onItemDraftFieldChange, onAddItem, onRemoveItem, inventoryItems, pickingPlanPanel, role, }: RisCreateFormProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
|
+
import { ArrowDown01Icon, Delete02Icon, PlusSignIcon } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon } from "@hugeicons/react";
|
|
6
|
+
import { ConfigurableFormLayout, } from "../../../internal/components/configurable-form-layout.js";
|
|
7
|
+
import { Badge } from "../../../internal/components/ui/badge.js";
|
|
8
|
+
import { Button } from "../../../internal/components/ui/button.js";
|
|
9
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../../../internal/components/ui/command.js";
|
|
10
|
+
import { DateInput } from "../../../internal/components/ui/date-input.js";
|
|
11
|
+
import { Input } from "../../../internal/components/ui/input.js";
|
|
12
|
+
import { Label } from "../../../internal/components/ui/label.js";
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../internal/components/ui/popover.js";
|
|
14
|
+
import { Switch } from "../../../internal/components/ui/switch.js";
|
|
15
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../../../internal/components/ui/table.js";
|
|
16
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../internal/components/ui/tabs.js";
|
|
17
|
+
import { cn } from "../../../internal/lib/utils.js";
|
|
18
|
+
export function RisCreateForm({ activeTab, onActiveTabChange, risNo, onRefreshRisNo, basicForm, basicFieldErrors = {}, onBasicFieldChange, items, itemDraft, onItemDraftFieldChange, onAddItem, onRemoveItem, inventoryItems, pickingPlanPanel, role, }) {
|
|
19
|
+
const [inventoryPickerOpen, setInventoryPickerOpen] = useState(false);
|
|
20
|
+
const hasInventorySource = Array.isArray(inventoryItems);
|
|
21
|
+
const hasInventory = hasInventorySource && inventoryItems.length > 0;
|
|
22
|
+
const isEnduser = role === "enduser";
|
|
23
|
+
const selectedPickingCriteria = itemDraft.pickingCriteria.trim();
|
|
24
|
+
const filteredInventoryItems = selectedPickingCriteria.length === 0
|
|
25
|
+
? []
|
|
26
|
+
: (inventoryItems ?? []).filter(item => item.pickingCriteria === selectedPickingCriteria);
|
|
27
|
+
const hasMatchingInventory = filteredInventoryItems.length > 0;
|
|
28
|
+
const canSelectInventoryItem = !hasInventorySource || selectedPickingCriteria.length > 0;
|
|
29
|
+
const selectedInventoryLabel = useMemo(() => {
|
|
30
|
+
if (!itemDraft.stockNo.trim())
|
|
31
|
+
return "";
|
|
32
|
+
const selected = filteredInventoryItems.find(item => item.itemCode === itemDraft.stockNo);
|
|
33
|
+
if (!selected)
|
|
34
|
+
return itemDraft.stockNo;
|
|
35
|
+
return `${selected.itemCode} — ${selected.description} (Available: ${selected.quantity} ${selected.uom})`;
|
|
36
|
+
}, [filteredInventoryItems, itemDraft.stockNo]);
|
|
37
|
+
function handleInventorySelect(itemCode) {
|
|
38
|
+
if (!inventoryItems)
|
|
39
|
+
return;
|
|
40
|
+
const selected = filteredInventoryItems.find(item => item.itemCode === itemCode);
|
|
41
|
+
if (!selected) {
|
|
42
|
+
onItemDraftFieldChange("itemId", undefined);
|
|
43
|
+
onItemDraftFieldChange("inventoryBatchId", undefined);
|
|
44
|
+
onItemDraftFieldChange("stockNo", itemCode);
|
|
45
|
+
onItemDraftFieldChange("unit", "");
|
|
46
|
+
onItemDraftFieldChange("description", "");
|
|
47
|
+
onItemDraftFieldChange("unitCost", "0");
|
|
48
|
+
onItemDraftFieldChange("referenceBatchNo", "");
|
|
49
|
+
onItemDraftFieldChange("stockAvailable", false);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
onItemDraftFieldChange("stockNo", selected.itemCode);
|
|
53
|
+
onItemDraftFieldChange("itemId", selected.itemId);
|
|
54
|
+
onItemDraftFieldChange("inventoryBatchId", selected.referenceBatchId);
|
|
55
|
+
onItemDraftFieldChange("unit", selected.uom);
|
|
56
|
+
onItemDraftFieldChange("description", selected.description);
|
|
57
|
+
onItemDraftFieldChange("unitCost", String(selected.unitCost));
|
|
58
|
+
onItemDraftFieldChange("referenceBatchNo", selected.referenceBatchNo ?? "");
|
|
59
|
+
onItemDraftFieldChange("stockAvailable", selected.quantity > 0);
|
|
60
|
+
}
|
|
61
|
+
function basicInputClass(field, className) {
|
|
62
|
+
return cn("w-full rounded-md border px-3 py-2 text-sm", basicFieldErrors[field] && "border-rose-500 focus-visible:outline-rose-500", className);
|
|
63
|
+
}
|
|
64
|
+
function BasicFieldError({ field }) {
|
|
65
|
+
const message = basicFieldErrors[field];
|
|
66
|
+
if (!message)
|
|
67
|
+
return null;
|
|
68
|
+
return _jsx("p", { className: "text-xs text-rose-600", children: message });
|
|
69
|
+
}
|
|
70
|
+
const fields = [
|
|
71
|
+
{
|
|
72
|
+
id: "risDate",
|
|
73
|
+
label: "RIS Date",
|
|
74
|
+
render: () => (_jsxs("div", { children: [_jsx(DateInput, { type: "date", value: basicForm.risDate, onChange: e => onBasicFieldChange("risDate", e.target.value), className: basicInputClass("risDate") }), _jsx(BasicFieldError, { field: "risDate" })] })),
|
|
75
|
+
},
|
|
76
|
+
...(isEnduser
|
|
77
|
+
? []
|
|
78
|
+
: [
|
|
79
|
+
{
|
|
80
|
+
id: "issueDate",
|
|
81
|
+
label: "Issue Date",
|
|
82
|
+
render: () => (_jsx(DateInput, { type: "date", value: basicForm.issueDate, onChange: e => onBasicFieldChange("issueDate", e.target.value), className: "w-full rounded-md border px-3 py-2 text-sm" })),
|
|
83
|
+
},
|
|
84
|
+
]),
|
|
85
|
+
{
|
|
86
|
+
id: "entityName",
|
|
87
|
+
label: "Entity Name",
|
|
88
|
+
fullWidth: true,
|
|
89
|
+
render: () => (_jsxs("div", { children: [_jsx("input", { value: basicForm.entityName, onChange: e => onBasicFieldChange("entityName", e.target.value), placeholder: "Entity Name", className: basicInputClass("entityName") }), _jsx(BasicFieldError, { field: "entityName" })] })),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "fundCluster",
|
|
93
|
+
label: "Fund Cluster",
|
|
94
|
+
fullWidth: true,
|
|
95
|
+
render: () => (_jsxs("div", { children: [_jsxs("select", { value: basicForm.fundCluster, onChange: e => onBasicFieldChange("fundCluster", e.target.value), className: basicInputClass("fundCluster"), children: [_jsx("option", { value: "", children: "Select fund cluster (required)" }), _jsx("option", { children: "Regular Agency Fund" }), _jsx("option", { children: "Trust Fund" }), _jsx("option", { children: "Special Account" })] }), _jsx(BasicFieldError, { field: "fundCluster" })] })),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "division",
|
|
99
|
+
label: "Division",
|
|
100
|
+
render: () => (_jsxs("div", { children: [_jsx("input", { value: basicForm.division, onChange: e => onBasicFieldChange("division", e.target.value), placeholder: "Division", className: basicInputClass("division") }), _jsx(BasicFieldError, { field: "division" })] })),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "responsibilityCenterCode",
|
|
104
|
+
label: "Responsibility Center Code",
|
|
105
|
+
render: () => (_jsx("input", { value: basicForm.responsibilityCenterCode, onChange: e => onBasicFieldChange("responsibilityCenterCode", e.target.value), placeholder: "Responsibility Center Code", className: "w-full rounded-md border px-3 py-2 text-sm" })),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "officeName",
|
|
109
|
+
label: "Office",
|
|
110
|
+
fullWidth: true,
|
|
111
|
+
render: () => (_jsxs("div", { children: [_jsx("input", { value: basicForm.officeName, onChange: e => onBasicFieldChange("officeName", e.target.value), placeholder: "Office", className: basicInputClass("officeName") }), _jsx(BasicFieldError, { field: "officeName" })] })),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "purpose",
|
|
115
|
+
label: "Purpose",
|
|
116
|
+
fullWidth: true,
|
|
117
|
+
render: () => (_jsx("textarea", { value: basicForm.purpose, onChange: e => onBasicFieldChange("purpose", e.target.value), placeholder: "Purpose", className: "w-full rounded-md border px-3 py-2 text-sm", rows: 3 })),
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
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: "Items" })] }), _jsx(TabsContent, { value: "basic", className: "mt-4", children: _jsx(ConfigurableFormLayout, { formKey: isEnduser ? "ris-basic-info-enduser" : "ris-basic-info", fields: fields, header: _jsx("div", { className: "rounded-md border border-indigo-200 bg-indigo-50 p-4 dark:border-indigo-400/35 dark:bg-indigo-950/40", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("p", { className: "text-muted-foreground text-xs font-medium", children: "Auto-Generated RIS Number" }), _jsx("p", { className: "text-3xl font-semibold text-slate-700 dark:text-indigo-100", children: risNo })] }), !isEnduser && (_jsx("button", { onClick: onRefreshRisNo, className: "rounded-md border border-slate-300 bg-white px-3 py-1 text-xs font-medium text-slate-700 hover:bg-slate-100 dark:border-slate-500 dark:bg-slate-800 dark:text-slate-100 dark:hover:bg-slate-700", children: "Refresh" }))] }) }) }) }), _jsxs(TabsContent, { value: "items", className: "mt-4 space-y-4", children: [_jsx("div", { className: "border-border overflow-hidden rounded-lg border", children: _jsxs(Table, { children: [_jsxs(TableHeader, { children: [isEnduser ? (_jsxs(TableRow, { className: "bg-muted/50", children: [_jsx(TableHead, { colSpan: 6, className: "border-border border-r text-xs font-semibold", children: "Requisition" }), _jsx(TableHead, { className: "text-xs font-semibold", children: "Action" })] })) : (_jsxs(TableRow, { className: "bg-muted/50", children: [_jsx(TableHead, { colSpan: 6, className: "border-border border-r text-xs font-semibold", children: "Requisition" }), _jsx(TableHead, { className: "border-border border-r text-center text-xs font-semibold", children: "Stock Available?" }), _jsx(TableHead, { colSpan: 2, className: "border-border border-r text-xs font-semibold", children: "Issue" }), _jsx(TableHead, { className: "border-border border-r text-center text-xs font-semibold", children: "Picking" }), _jsx(TableHead, { className: "text-xs font-semibold", children: "Action" })] })), isEnduser ? (_jsxs(TableRow, { className: "bg-muted/30", children: [_jsx(TableHead, { className: "text-xs", children: "Line" }), _jsx(TableHead, { className: "text-xs", children: "Stock No." }), _jsx(TableHead, { className: "text-xs", children: "Category" }), _jsx(TableHead, { className: "text-xs", children: "Unit" }), _jsx(TableHead, { className: "text-xs", children: "Description" }), _jsx(TableHead, { className: "border-border border-r text-right text-xs", children: "Qty" }), _jsx(TableHead, { className: "w-17.5 text-xs" })] })) : (_jsxs(TableRow, { className: "bg-muted/30", children: [_jsx(TableHead, { className: "text-xs", children: "Line" }), _jsx(TableHead, { className: "text-xs", children: "Stock No." }), _jsx(TableHead, { className: "text-xs", children: "Category" }), _jsx(TableHead, { className: "text-xs", children: "Unit" }), _jsx(TableHead, { className: "text-xs", children: "Description" }), _jsx(TableHead, { className: "border-border border-r text-right text-xs", children: "Qty" }), _jsx(TableHead, { className: "border-border border-r text-center text-xs", children: "Yes / No" }), _jsx(TableHead, { className: "text-right text-xs", children: "Qty" }), _jsx(TableHead, { className: "border-border border-r text-xs", children: "Remarks" }), _jsx(TableHead, { className: "border-border border-r text-center text-xs", children: "Criteria" }), _jsx(TableHead, { className: "w-17.5 text-xs" })] }))] }), _jsxs(TableBody, { children: [items.map(item => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "text-xs", children: item.lineNo }), _jsx(TableCell, { className: "text-xs", children: item.stockNo }), _jsx(TableCell, { className: "text-xs", children: _jsx(Badge, { variant: "outline", className: "text-[10px]", children: item.category ?? "—" }) }), _jsx(TableCell, { className: "text-xs", children: item.unit }), _jsx(TableCell, { className: "text-xs", children: item.description }), _jsx(TableCell, { className: "border-border border-r text-right text-xs", children: item.requestedQty }), !isEnduser && (_jsxs(_Fragment, { children: [_jsx(TableCell, { className: "border-border border-r text-center", children: _jsx(Badge, { variant: item.stockAvailable ? "default" : "secondary", className: "text-[10px]", children: item.stockAvailable ? "Yes" : "No" }) }), _jsx(TableCell, { className: "text-right text-xs", children: item.issuedQty }), _jsx(TableCell, { className: "border-border border-r text-xs", children: item.remarks || "—" }), _jsx(TableCell, { className: "border-border border-r text-center", children: item.pickingCriteria ? (_jsx("span", { className: "rounded-full bg-violet-100 px-2 py-0.5 text-[10px] font-medium text-violet-800", children: item.pickingCriteria })) : (_jsx("span", { className: "text-[10px] text-slate-400", children: "Auto" })) })] })), _jsx(TableCell, { children: _jsx(Button, { variant: "ghost", size: "icon-xs", onClick: () => onRemoveItem(item.id), children: _jsx(HugeiconsIcon, { icon: Delete02Icon, size: 14, className: "text-destructive" }) }) })] }, item.id))), items.length === 0 && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: isEnduser ? 7 : 11, className: "text-muted-foreground h-16 text-center text-xs", children: "No items added yet. Use the form below to add line items." }) }))] })] }) }), _jsxs("div", { className: "space-y-3 rounded-lg border border-dashed p-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { className: "text-muted-foreground text-xs font-medium", children: "Add New Item" }), _jsx("p", { className: "text-[10px] text-blue-600", children: "\uD83D\uDCA1 Items with batches will use picking criteria" })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs(Label, { htmlFor: "ris-picking", className: "text-muted-foreground text-xs", children: ["Picking Criteria", _jsx("span", { className: "ml-1 text-[10px] text-blue-600", children: "(required before item selection)" })] }), _jsxs("select", { id: "ris-picking", value: itemDraft.pickingCriteria, onChange: e => {
|
|
121
|
+
const nextPickingCriteria = e.target.value;
|
|
122
|
+
onItemDraftFieldChange("pickingCriteria", e.target.value);
|
|
123
|
+
if (nextPickingCriteria !== itemDraft.pickingCriteria) {
|
|
124
|
+
handleInventorySelect("");
|
|
125
|
+
}
|
|
126
|
+
}, className: "w-full rounded-md border px-3 py-2 text-sm", children: [_jsx("option", { value: "", children: "\u2014 Select picking criteria first \u2014" }), _jsx("option", { value: "FIFO", children: "FIFO \u2014 Oldest first" }), _jsx("option", { value: "LIFO", children: "LIFO \u2014 Newest first" }), _jsx("option", { value: "FEFO", children: "FEFO \u2014 Expires soonest" })] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-muted-foreground text-xs", children: "Select Item from Inventory" }), hasInventorySource ? (_jsxs(Popover, { open: inventoryPickerOpen, onOpenChange: setInventoryPickerOpen, children: [_jsxs(PopoverTrigger, { disabled: !canSelectInventoryItem, className: cn("flex w-full items-center justify-between rounded-md border px-3 py-2 text-left text-sm", !canSelectInventoryItem && "cursor-not-allowed opacity-50"), children: [_jsx("span", { className: cn("truncate", selectedInventoryLabel.length === 0 && "text-muted-foreground"), children: !canSelectInventoryItem
|
|
127
|
+
? "— Select picking criteria first —"
|
|
128
|
+
: selectedInventoryLabel.length > 0
|
|
129
|
+
? selectedInventoryLabel
|
|
130
|
+
: hasMatchingInventory
|
|
131
|
+
? "— Select an inventory item —"
|
|
132
|
+
: hasInventory
|
|
133
|
+
? "— No items match selected picking criteria —"
|
|
134
|
+
: "— No referenced items/batches available —" }), _jsx(HugeiconsIcon, { icon: ArrowDown01Icon, size: 14, className: "text-muted-foreground ml-2 shrink-0" })] }), _jsx(PopoverContent, { className: "w-[min(40rem,calc(100vw-3rem))] p-0", align: "start", children: _jsxs(Command, { shouldFilter: true, children: [_jsx(CommandInput, { placeholder: !canSelectInventoryItem
|
|
135
|
+
? "Select picking criteria first"
|
|
136
|
+
: "Search stock no, description, or unit", disabled: !canSelectInventoryItem || !hasMatchingInventory }), _jsx(CommandList, { children: !canSelectInventoryItem ? (_jsx(CommandEmpty, { children: "Select picking criteria first." })) : !hasMatchingInventory ? (_jsx(CommandEmpty, { children: hasInventory
|
|
137
|
+
? "No items match selected picking criteria."
|
|
138
|
+
: "No referenced items or batches available." })) : (_jsxs(_Fragment, { children: [_jsx(CommandEmpty, { children: "No matching inventory item found." }), _jsxs(CommandGroup, { children: [itemDraft.stockNo.trim().length > 0 && (_jsx(CommandItem, { value: "clear-selection", onSelect: () => {
|
|
139
|
+
handleInventorySelect("");
|
|
140
|
+
setInventoryPickerOpen(false);
|
|
141
|
+
}, children: "\u2014 Clear selected item \u2014" })), filteredInventoryItems.map(item => {
|
|
142
|
+
const isOutOfStock = item.quantity <= 0;
|
|
143
|
+
const quantityLabel = `Available: ${item.quantity} ${item.uom}${isOutOfStock ? " · Out of Stock" : item.stockStatus === "Low Stock" ? " · Low Stock" : ""}`;
|
|
144
|
+
return (_jsx(CommandItem, { value: `${item.itemCode} ${item.description} ${item.uom} ${item.stockStatus}`, disabled: isOutOfStock, onSelect: () => {
|
|
145
|
+
handleInventorySelect(item.itemCode);
|
|
146
|
+
setInventoryPickerOpen(false);
|
|
147
|
+
}, children: _jsxs("div", { className: "flex w-full items-center justify-between gap-2", children: [_jsxs("span", { className: "truncate", children: [item.itemCode, " \u2014 ", item.description] }), _jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: quantityLabel })] }) }, item.id));
|
|
148
|
+
})] })] })) })] }) })] })) : (_jsx(Input, { value: itemDraft.stockNo, onChange: e => onItemDraftFieldChange("stockNo", e.target.value), placeholder: "e.g. 101-01" }))] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-unit", className: "text-muted-foreground text-xs", children: "Unit" }), _jsx(Input, { id: "ris-unit", value: itemDraft.unit, onChange: e => onItemDraftFieldChange("unit", e.target.value), placeholder: "e.g. pcs, box", readOnly: hasInventory && itemDraft.stockNo.length > 0, className: hasInventory && itemDraft.stockNo.length > 0 ? "bg-muted/40" : "" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-unit-cost", className: "text-muted-foreground text-xs", children: "Reference Unit Cost" }), _jsx(Input, { id: "ris-unit-cost", value: itemDraft.unitCost, readOnly: true, className: "bg-muted/40" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-batch-ref", className: "text-muted-foreground text-xs", children: "Reference Batch" }), _jsx(Input, { id: "ris-batch-ref", value: itemDraft.referenceBatchNo, readOnly: true, placeholder: "Auto-selected from inventory batch", className: "bg-muted/40" })] }), _jsxs("div", { className: "space-y-1 sm:col-span-2", children: [_jsx(Label, { htmlFor: "ris-desc", className: "text-muted-foreground text-xs", children: "Description" }), _jsx(Input, { id: "ris-desc", value: itemDraft.description, onChange: e => onItemDraftFieldChange("description", e.target.value), placeholder: "Item description", readOnly: hasInventory && itemDraft.stockNo.length > 0, className: hasInventory && itemDraft.stockNo.length > 0 ? "bg-muted/40" : "" })] })] }), isEnduser ? (_jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-reqQty", className: "text-muted-foreground text-xs", children: "Requested Qty" }), _jsx(Input, { id: "ris-reqQty", type: "number", min: 1, value: itemDraft.requestedQty, onChange: e => onItemDraftFieldChange("requestedQty", e.target.value), placeholder: "1" })] }) })) : (_jsxs("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-5", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-reqQty", className: "text-muted-foreground text-xs", children: "Requested Qty" }), _jsx(Input, { id: "ris-reqQty", type: "number", min: 1, value: itemDraft.requestedQty, onChange: e => onItemDraftFieldChange("requestedQty", e.target.value), placeholder: "1" })] }), _jsx("div", { className: "flex items-end gap-3 pb-0.5", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { id: "ris-stockAvail", checked: itemDraft.stockAvailable, onCheckedChange: checked => onItemDraftFieldChange("stockAvailable", checked) }), _jsx(Label, { htmlFor: "ris-stockAvail", className: "text-xs", children: "Stock Available" })] }) }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-issQty", className: "text-muted-foreground text-xs", children: "Issued Qty" }), _jsx(Input, { id: "ris-issQty", type: "number", min: 0, value: itemDraft.issuedQty, onChange: e => onItemDraftFieldChange("issuedQty", e.target.value), placeholder: "0" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "ris-remarks", className: "text-muted-foreground text-xs", children: "Remarks" }), _jsx(Input, { id: "ris-remarks", value: itemDraft.remarks, onChange: e => onItemDraftFieldChange("remarks", e.target.value), placeholder: "Optional" })] })] })), _jsxs(Button, { onClick: onAddItem, size: "sm", className: "mt-1", children: [_jsx(HugeiconsIcon, { icon: PlusSignIcon, "data-icon": "inline-start", size: 14 }), "Add Item"] })] }), !isEnduser && pickingPlanPanel] })] }));
|
|
149
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RisBasicForm, RisItem } from "../types.js";
|
|
2
|
+
type RisDocumentPreviewProps = {
|
|
3
|
+
basicForm: RisBasicForm;
|
|
4
|
+
risNo: string;
|
|
5
|
+
items: RisItem[];
|
|
6
|
+
};
|
|
7
|
+
export declare function RisDocumentPreview({ basicForm, risNo, items }: RisDocumentPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
function formatDisplayDate(value) {
|
|
4
|
+
if (!value)
|
|
5
|
+
return "";
|
|
6
|
+
const date = new Date(value);
|
|
7
|
+
if (Number.isNaN(date.getTime()))
|
|
8
|
+
return value;
|
|
9
|
+
return date.toLocaleDateString("en-PH", {
|
|
10
|
+
year: "numeric",
|
|
11
|
+
month: "2-digit",
|
|
12
|
+
day: "2-digit",
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function RisDocumentPreview({ basicForm, risNo, items }) {
|
|
16
|
+
const previewRows = [...items];
|
|
17
|
+
while (previewRows.length < 15) {
|
|
18
|
+
previewRows.push({
|
|
19
|
+
id: `blank-${previewRows.length + 1}`,
|
|
20
|
+
lineNo: previewRows.length + 1,
|
|
21
|
+
stockNo: "",
|
|
22
|
+
unit: "",
|
|
23
|
+
description: "",
|
|
24
|
+
requestedQty: 0,
|
|
25
|
+
stockAvailable: false,
|
|
26
|
+
issuedQty: 0,
|
|
27
|
+
remarks: "",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return (_jsx("div", { className: "w-full overflow-x-auto", children: _jsxs("div", { "data-pdf-page": "true", "data-pdf-orientation": "portrait", className: "mx-auto min-h-[1123px] w-[794px] bg-white p-8 text-[11px] text-slate-900", children: [_jsx("p", { className: "mb-2 text-right text-[10px] text-slate-500 italic", children: "Appendix 63" }), _jsx("h4", { className: "mb-4 text-center text-[28px] font-semibold tracking-wide", children: "REQUISITION AND ISSUE SLIP" }), _jsxs("div", { className: "mb-3 grid grid-cols-[1fr_auto] gap-4 border-b border-slate-900 pb-2 text-xs", children: [_jsxs("p", { children: [_jsx("span", { className: "font-semibold", children: "Entity Name :" }), " ", _jsx("span", { className: "font-semibold underline underline-offset-2", children: basicForm.entityName || " " })] }), _jsxs("p", { children: [_jsx("span", { className: "font-semibold", children: "Fund Cluster :" }), " ", basicForm.fundCluster || " "] })] }), _jsx("table", { className: "mb-0 min-w-full border-collapse text-xs", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: "border border-slate-900 p-2 align-top", children: _jsxs("div", { className: "min-h-14", children: [_jsx("p", { className: "font-semibold", children: "Division :" }), _jsx("p", { className: "mt-2", children: basicForm.division || " " })] }) }), _jsx("td", { className: "border border-slate-900 p-2 align-top", children: _jsxs("div", { className: "min-h-14", children: [_jsx("p", { className: "font-semibold", children: "Responsibility Center Code :" }), _jsx("p", { className: "mt-2", children: basicForm.responsibilityCenterCode || " " })] }) })] }), _jsxs("tr", { children: [_jsxs("td", { className: "border border-slate-900 p-2", children: [_jsx("span", { className: "font-semibold", children: "Office :" }), " ", basicForm.officeName || " "] }), _jsx("td", { className: "border border-slate-900 p-2", children: _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("p", { children: [_jsx("span", { className: "font-semibold", children: "RIS No. :" }), " ", risNo] }), _jsxs("p", { children: [_jsx("span", { className: "font-semibold", children: "Date :" }), " ", formatDisplayDate(basicForm.risDate)] })] }) })] })] }) }), _jsxs("table", { className: "mb-0 min-w-full border-collapse text-xs", children: [_jsxs("thead", { children: [_jsxs("tr", { children: [_jsx("th", { className: "border border-slate-900 p-1 text-center italic", colSpan: 4, children: "Requisition" }), _jsx("th", { className: "border border-slate-900 p-1 text-center italic", colSpan: 2, children: "Stock Available?" }), _jsx("th", { className: "border border-slate-900 p-1 text-center italic", colSpan: 2, children: "Issue" })] }), _jsxs("tr", { children: [_jsx("th", { className: "border border-slate-900 p-1", children: "Stock No." }), _jsx("th", { className: "border border-slate-900 p-1", children: "Unit" }), _jsx("th", { className: "border border-slate-900 p-1", children: "Description" }), _jsx("th", { className: "border border-slate-900 p-1", children: "Quantity" }), _jsx("th", { className: "border border-slate-900 p-1 text-center", children: "Yes" }), _jsx("th", { className: "border border-slate-900 p-1 text-center", children: "No" }), _jsx("th", { className: "border border-slate-900 p-1", children: "Quantity" }), _jsx("th", { className: "border border-slate-900 p-1", children: "Remarks" })] })] }), _jsx("tbody", { children: previewRows.map(item => (_jsxs("tr", { children: [_jsx("td", { className: "h-7 border border-slate-900 p-1", children: item.stockNo || " " }), _jsx("td", { className: "border border-slate-900 p-1", children: item.unit || " " }), _jsx("td", { className: "border border-slate-900 p-1", children: item.description || " " }), _jsx("td", { className: "border border-slate-900 p-1 text-right", children: item.stockNo ? item.requestedQty : " " }), _jsx("td", { className: "border border-slate-900 p-1 text-center", children: item.stockNo && item.stockAvailable ? "✓" : " " }), _jsx("td", { className: "border border-slate-900 p-1 text-center", children: item.stockNo && !item.stockAvailable ? "✓" : " " }), _jsx("td", { className: "border border-slate-900 p-1 text-right", children: item.stockNo && item.issuedQty > 0 ? item.issuedQty : " " }), _jsx("td", { className: "border border-slate-900 p-1", children: item.remarks || " " })] }, `preview-${item.id}`))) })] }), _jsxs("div", { className: "mb-0 border border-t-0 border-slate-900 p-2 text-xs", children: [_jsx("span", { className: "font-semibold", children: "Purpose:" }), " ", basicForm.purpose || " "] }), _jsxs("table", { className: "min-w-full border-collapse text-xs", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "border border-slate-900 p-2 text-left font-semibold", children: "Signature :" }), _jsx("th", { className: "border border-slate-900 p-2 text-left font-semibold", children: "Requested by:" }), _jsx("th", { className: "border border-slate-900 p-2 text-left font-semibold", children: "Approved by:" }), _jsx("th", { className: "border border-slate-900 p-2 text-left font-semibold", children: "Issued by:" }), _jsx("th", { className: "border border-slate-900 p-2 text-left font-semibold", children: "Received by:" })] }) }), _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: "Printed Name :" }), _jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: basicForm.requestedByName || " " }), _jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: basicForm.approvedByName || " " }), _jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: basicForm.issuedByName || " " }), _jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: basicForm.receivedByName || " " })] }), _jsxs("tr", { children: [_jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: "Designation :" }), _jsx("td", { className: "border border-slate-900 p-2", children: basicForm.requestedByDesignation || " " }), _jsx("td", { className: "border border-slate-900 p-2", children: basicForm.approvedByDesignation || " " }), _jsx("td", { className: "border border-slate-900 p-2", children: basicForm.issuedByDesignation || " " }), _jsx("td", { className: "border border-slate-900 p-2", children: basicForm.receivedByDesignation || " " })] }), _jsxs("tr", { children: [_jsx("td", { className: "border border-slate-900 p-2 font-semibold", children: "Date :" }), _jsx("td", { className: "border border-slate-900 p-2", children: formatDisplayDate(basicForm.requestedByDate) }), _jsx("td", { className: "border border-slate-900 p-2", children: formatDisplayDate(basicForm.approvedByDate) }), _jsx("td", { className: "border border-slate-900 p-2", children: formatDisplayDate(basicForm.issuedByDate || basicForm.issueDate) }), _jsx("td", { className: "border border-slate-900 p-2", children: formatDisplayDate(basicForm.receivedByDate) })] })] })] })] }) }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export type RisStatus = "Pending" | "Approved" | "Returned" | "Issued" | "Received";
|
|
2
|
+
export type RisItemCategory = "Supplies" | "Semi-Expendable" | "PPE";
|
|
3
|
+
export type RisItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
lineNo: number;
|
|
6
|
+
itemId?: number | null;
|
|
7
|
+
inventoryBatchId?: number | null;
|
|
8
|
+
stockNo: string;
|
|
9
|
+
unit: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category?: RisItemCategory;
|
|
12
|
+
requestedQty: number;
|
|
13
|
+
stockAvailable: boolean;
|
|
14
|
+
issuedQty: number;
|
|
15
|
+
unitCost?: number;
|
|
16
|
+
referenceBatchNo?: string;
|
|
17
|
+
remarks: string;
|
|
18
|
+
pickingCriteria?: "FIFO" | "LIFO" | "FEFO";
|
|
19
|
+
};
|
|
20
|
+
export type RisRecord = {
|
|
21
|
+
id: string;
|
|
22
|
+
risNo: string;
|
|
23
|
+
documentTypeId?: number | null;
|
|
24
|
+
entityName: string;
|
|
25
|
+
fundCluster: string;
|
|
26
|
+
divisionId?: string | null;
|
|
27
|
+
division: string;
|
|
28
|
+
responsibilityCenterCode: string;
|
|
29
|
+
officeId?: string | null;
|
|
30
|
+
officeName: string;
|
|
31
|
+
purchaseRequestRef?: string | null;
|
|
32
|
+
risDate: string;
|
|
33
|
+
issueDate: string;
|
|
34
|
+
purpose: string;
|
|
35
|
+
requestedById?: string;
|
|
36
|
+
requestedByEmail?: string;
|
|
37
|
+
requestedByRole?: string;
|
|
38
|
+
requestedByName: string;
|
|
39
|
+
requestedByDesignation: string;
|
|
40
|
+
requestedByDate?: string;
|
|
41
|
+
approvedByName: string;
|
|
42
|
+
approvedByDesignation: string;
|
|
43
|
+
approvedByDate?: string;
|
|
44
|
+
issuedByName: string;
|
|
45
|
+
issuedByDesignation: string;
|
|
46
|
+
issuedByDate?: string;
|
|
47
|
+
receivedByName: string;
|
|
48
|
+
receivedByDesignation: string;
|
|
49
|
+
receivedByDate?: string;
|
|
50
|
+
items: RisItem[];
|
|
51
|
+
status: RisStatus;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt?: string;
|
|
54
|
+
};
|
|
55
|
+
export type RisBasicForm = {
|
|
56
|
+
documentTypeId?: number;
|
|
57
|
+
entityName: string;
|
|
58
|
+
fundCluster: string;
|
|
59
|
+
divisionId?: string;
|
|
60
|
+
division: string;
|
|
61
|
+
responsibilityCenterCode: string;
|
|
62
|
+
officeId?: string;
|
|
63
|
+
officeName: string;
|
|
64
|
+
risDate: string;
|
|
65
|
+
issueDate: string;
|
|
66
|
+
purpose: string;
|
|
67
|
+
requestedByName: string;
|
|
68
|
+
requestedByDesignation: string;
|
|
69
|
+
requestedByDate?: string;
|
|
70
|
+
approvedByName: string;
|
|
71
|
+
approvedByDesignation: string;
|
|
72
|
+
approvedByDate?: string;
|
|
73
|
+
issuedByName: string;
|
|
74
|
+
issuedByDesignation: string;
|
|
75
|
+
issuedByDate?: string;
|
|
76
|
+
receivedByName: string;
|
|
77
|
+
receivedByDesignation: string;
|
|
78
|
+
receivedByDate?: string;
|
|
79
|
+
};
|
|
80
|
+
export type RisItemDraft = {
|
|
81
|
+
itemId?: number;
|
|
82
|
+
inventoryBatchId?: number;
|
|
83
|
+
stockNo: string;
|
|
84
|
+
unit: string;
|
|
85
|
+
description: string;
|
|
86
|
+
requestedQty: string;
|
|
87
|
+
stockAvailable: boolean;
|
|
88
|
+
issuedQty: string;
|
|
89
|
+
unitCost: string;
|
|
90
|
+
referenceBatchNo: string;
|
|
91
|
+
remarks: string;
|
|
92
|
+
pickingCriteria: string;
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RlsddpFormState } from "../types.js";
|
|
2
|
+
type Props = {
|
|
3
|
+
form: RlsddpFormState;
|
|
4
|
+
onChange: <K extends keyof RlsddpFormState>(key: K, value: RlsddpFormState[K]) => void;
|
|
5
|
+
activeTab: string;
|
|
6
|
+
onTabChange: (tab: string) => void;
|
|
7
|
+
mode: "create" | "edit";
|
|
8
|
+
rlsddpNo?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function RlsddpCreateForm({ form, onChange, activeTab, onTabChange, mode, rlsddpNo, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|