@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,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { GovernmentForm } from '../government-form.js';
|
|
4
|
+
import { formDefinitions } from '../definitions.js';
|
|
5
|
+
export const definition = formDefinitions["splc"];
|
|
6
|
+
export function Form(props) { return _jsx(GovernmentForm, { ...props, code: "splc" }); }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type GovernmentFormProps } from '../government-form.js';
|
|
2
|
+
export declare const definition: {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
reportCode: string;
|
|
6
|
+
moduleKey: string;
|
|
7
|
+
regulatoryBasis: string;
|
|
8
|
+
story: string;
|
|
9
|
+
acceptanceChecks: string[];
|
|
10
|
+
fields: ({
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
type: "text";
|
|
14
|
+
required: true;
|
|
15
|
+
} | {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
type: "number";
|
|
19
|
+
required: true;
|
|
20
|
+
} | {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
type: "date";
|
|
24
|
+
required: true;
|
|
25
|
+
})[];
|
|
26
|
+
initialRows: never[];
|
|
27
|
+
};
|
|
28
|
+
export declare function Form(props: Omit<GovernmentFormProps, 'code'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { GovernmentForm } from '../government-form.js';
|
|
4
|
+
import { formDefinitions } from '../definitions.js';
|
|
5
|
+
export const definition = formDefinitions["stock-card"];
|
|
6
|
+
export function Form(props) { return _jsx(GovernmentForm, { ...props, code: "stock-card" }); }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type GovernmentFormProps } from '../government-form.js';
|
|
2
|
+
export declare const definition: {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
reportCode: string;
|
|
6
|
+
regulatoryBasis: string;
|
|
7
|
+
story: string;
|
|
8
|
+
acceptanceChecks: string[];
|
|
9
|
+
fields: ({
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
type: "text";
|
|
13
|
+
required: true;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
type: "date";
|
|
18
|
+
required: true;
|
|
19
|
+
} | {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
type: "number";
|
|
23
|
+
required: true;
|
|
24
|
+
} | {
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
type: "textarea";
|
|
28
|
+
required: true;
|
|
29
|
+
})[];
|
|
30
|
+
initialRows: never[];
|
|
31
|
+
};
|
|
32
|
+
export declare function Form(props: Omit<GovernmentFormProps, 'code'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { GovernmentForm } from '../government-form.js';
|
|
4
|
+
import { formDefinitions } from '../definitions.js';
|
|
5
|
+
export const definition = formDefinitions["wmr"];
|
|
6
|
+
export function Form(props) { return _jsx(GovernmentForm, { ...props, code: "wmr" }); }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type GamFieldType = "text" | "number" | "date" | "textarea" | "select";
|
|
2
|
+
export type GamNumberType = "int" | "float";
|
|
3
|
+
export type GamField = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: GamFieldType;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
options?: string[];
|
|
10
|
+
numberType?: GamNumberType;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
searchable?: boolean;
|
|
13
|
+
/** If true, the field value is auto-generated on create and shown as read-only */
|
|
14
|
+
autoGenerate?: boolean;
|
|
15
|
+
/** If true, the field defaults to today's date (YYYY-MM-DD) when the create modal opens */
|
|
16
|
+
defaultToday?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type GamTableField = {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
type: GamFieldType;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
options?: string[];
|
|
25
|
+
numberType?: GamNumberType;
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
searchable?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type GamReportWorkbenchProps = {
|
|
30
|
+
title: string;
|
|
31
|
+
moduleKey?: string;
|
|
32
|
+
description: string;
|
|
33
|
+
reportCode: string;
|
|
34
|
+
regulatoryBasis: string;
|
|
35
|
+
story: string;
|
|
36
|
+
acceptanceChecks: string[];
|
|
37
|
+
fields: GamField[];
|
|
38
|
+
tableFields?: GamTableField[];
|
|
39
|
+
initialRows?: unknown[];
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ComputationLine = {
|
|
2
|
+
label?: string;
|
|
3
|
+
physicalCountQty: string | number;
|
|
4
|
+
unitValue: string | number;
|
|
5
|
+
};
|
|
6
|
+
export declare function GrandTotalComputation({ lines, includeInExport, }: {
|
|
7
|
+
lines: ComputationLine[];
|
|
8
|
+
includeInExport?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { computeGrandTotal, computeLineTotal, fmtAmount } from "../utils/line-totals.js";
|
|
4
|
+
// On-screen-only helper that spells out how the Grand Total is derived
|
|
5
|
+
// (each line's Total Value listed, then summed). Tagged `no-print` so it is
|
|
6
|
+
// excluded from the html2canvas PDF capture (see export-preview-pdf onclone)
|
|
7
|
+
// and from browser print via the inline @media print rule. The official
|
|
8
|
+
// printed/PDF document keeps the standard COA layout.
|
|
9
|
+
export function GrandTotalComputation({ lines, includeInExport = false, }) {
|
|
10
|
+
const rows = lines.filter(line => Number(line.physicalCountQty) !== 0 || Number(line.unitValue) !== 0);
|
|
11
|
+
if (rows.length === 0)
|
|
12
|
+
return null;
|
|
13
|
+
const grandTotal = computeGrandTotal(rows);
|
|
14
|
+
return (_jsxs("div", { className: includeInExport ? undefined : "no-print", style: {
|
|
15
|
+
marginTop: "14px",
|
|
16
|
+
marginLeft: "auto",
|
|
17
|
+
maxWidth: "340px",
|
|
18
|
+
fontFamily: "Arial, sans-serif",
|
|
19
|
+
fontSize: "8pt",
|
|
20
|
+
border: "1px dashed #999",
|
|
21
|
+
borderRadius: "4px",
|
|
22
|
+
padding: "8px 10px",
|
|
23
|
+
background: "#f7f7f7",
|
|
24
|
+
color: "#222",
|
|
25
|
+
}, children: [_jsx("style", { children: `@media print { .no-print { display: none !important; } }` }), _jsx("div", { style: { fontWeight: "bold", marginBottom: "4px" }, children: "Grand Total Computation" }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse" }, children: _jsxs("tbody", { children: [rows.map((line, index) => (_jsxs("tr", { children: [_jsx("td", { style: { padding: "1px 0", color: "#444" }, children: line.label?.trim() || `Line ${index + 1}` }), _jsxs("td", { style: { padding: "1px 0", textAlign: "right" }, children: ["₱", fmtAmount(computeLineTotal(line.physicalCountQty, line.unitValue))] })] }, index))), _jsx("tr", { children: _jsx("td", { colSpan: 2, style: { borderTop: "1px solid #999", padding: 0 } }) }), _jsxs("tr", { style: { fontWeight: "bold" }, children: [_jsx("td", { style: { padding: "2px 0" }, children: "Grand Total" }), _jsxs("td", { style: { padding: "2px 0", textAlign: "right" }, children: ["₱", fmtAmount(grandTotal)] })] })] }) }), !includeInExport && (_jsx("div", { style: { marginTop: "5px", fontStyle: "italic", color: "#888", fontSize: "7pt" }, children: "On-screen reference only \u2014 excluded from the printed/PDF document." }))] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type IarPreviewItem = {
|
|
2
|
+
stockNo: string;
|
|
3
|
+
description: string;
|
|
4
|
+
unit: string;
|
|
5
|
+
quantity: string;
|
|
6
|
+
receivedQty?: string;
|
|
7
|
+
unitCost: string;
|
|
8
|
+
totalAmount: string;
|
|
9
|
+
rejectedQty?: string;
|
|
10
|
+
};
|
|
11
|
+
type IarPreviewProps = {
|
|
12
|
+
entityName: string;
|
|
13
|
+
fundCluster: string;
|
|
14
|
+
supplier: string;
|
|
15
|
+
iarNo: string;
|
|
16
|
+
iarDate: string;
|
|
17
|
+
crsiNo: string;
|
|
18
|
+
crsiDate: string;
|
|
19
|
+
requestingOffice: string;
|
|
20
|
+
responsibilityCenterCode: string;
|
|
21
|
+
items: IarPreviewItem[];
|
|
22
|
+
dateInspected: string;
|
|
23
|
+
dateReceived: string;
|
|
24
|
+
isInspected?: boolean;
|
|
25
|
+
isComplete?: boolean;
|
|
26
|
+
inspectionOfficer: string;
|
|
27
|
+
supplyCustodian: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function IarPreview({ entityName, fundCluster, supplier, iarNo, iarDate, crsiNo, crsiDate, requestingOffice, responsibilityCenterCode, items, dateInspected, dateReceived, isInspected, isComplete, inspectionOfficer, supplyCustodian, }: IarPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
const ITEM_ROWS = 14;
|
|
4
|
+
const NBSP = "\u00a0";
|
|
5
|
+
const B = "1.4px solid #000";
|
|
6
|
+
const THICK = "2px solid #000";
|
|
7
|
+
function display(value) {
|
|
8
|
+
return value?.trim() || NBSP;
|
|
9
|
+
}
|
|
10
|
+
function fmtDate(value) {
|
|
11
|
+
if (!value)
|
|
12
|
+
return "";
|
|
13
|
+
const d = new Date(value);
|
|
14
|
+
return Number.isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
|
|
15
|
+
}
|
|
16
|
+
function asNumber(value) {
|
|
17
|
+
const parsed = Number(value || "0");
|
|
18
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
19
|
+
}
|
|
20
|
+
function fmtQuantity(value) {
|
|
21
|
+
return Number.isInteger(value) ? String(value) : value.toFixed(2);
|
|
22
|
+
}
|
|
23
|
+
const td = {
|
|
24
|
+
border: B,
|
|
25
|
+
padding: "1mm 1.2mm",
|
|
26
|
+
fontSize: "11pt",
|
|
27
|
+
lineHeight: 1.14,
|
|
28
|
+
verticalAlign: "middle",
|
|
29
|
+
};
|
|
30
|
+
const itemTh = {
|
|
31
|
+
border: THICK,
|
|
32
|
+
padding: "1.2mm 1mm",
|
|
33
|
+
fontSize: "12pt",
|
|
34
|
+
fontStyle: "italic",
|
|
35
|
+
fontWeight: "bold",
|
|
36
|
+
lineHeight: 1.18,
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
verticalAlign: "middle",
|
|
39
|
+
};
|
|
40
|
+
const breakableText = {
|
|
41
|
+
overflowWrap: "anywhere",
|
|
42
|
+
wordBreak: "break-word",
|
|
43
|
+
};
|
|
44
|
+
function Checkbox({ checked }) {
|
|
45
|
+
return (_jsx("span", { style: {
|
|
46
|
+
display: "inline-flex",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
justifyContent: "center",
|
|
49
|
+
width: "7mm",
|
|
50
|
+
height: "7mm",
|
|
51
|
+
border: B,
|
|
52
|
+
boxSizing: "border-box",
|
|
53
|
+
lineHeight: 1,
|
|
54
|
+
fontSize: "10pt",
|
|
55
|
+
verticalAlign: "middle",
|
|
56
|
+
flex: "0 0 auto",
|
|
57
|
+
}, children: checked ? "X" : "" }));
|
|
58
|
+
}
|
|
59
|
+
export function IarPreview({ entityName, fundCluster, supplier, iarNo, iarDate, crsiNo, crsiDate, requestingOffice, responsibilityCenterCode, items, dateInspected, dateReceived, isInspected = false, isComplete = true, inspectionOfficer, supplyCustodian, }) {
|
|
60
|
+
const visibleItems = items.filter(item => [item.stockNo, item.description, item.unit, item.quantity].some(value => String(value ?? "").trim() !== ""));
|
|
61
|
+
const rows = Array.from({ length: ITEM_ROWS }, (_, index) => visibleItems[index] ?? null);
|
|
62
|
+
const nothingFollowsIndex = Math.min(Math.max(visibleItems.length, 2), ITEM_ROWS - 1);
|
|
63
|
+
const expectedTotal = visibleItems.reduce((sum, item) => sum + asNumber(item.quantity), 0);
|
|
64
|
+
const receivedTotal = visibleItems.reduce((sum, item) => sum + asNumber(item.receivedQty ?? item.quantity), 0);
|
|
65
|
+
const partialQuantityText = !isComplete && expectedTotal > 0
|
|
66
|
+
? `${fmtQuantity(receivedTotal)} of ${fmtQuantity(expectedTotal)} received`
|
|
67
|
+
: "pls. specify quantity";
|
|
68
|
+
return (_jsx("div", { className: "iar-a4-page", "data-iar-preview": "true", "data-pdf-page": "true", "data-pdf-fit-one-page": "true", "data-pdf-orientation": "portrait", style: {
|
|
69
|
+
width: "210mm",
|
|
70
|
+
minHeight: "297mm",
|
|
71
|
+
padding: "8mm 5mm 4mm",
|
|
72
|
+
backgroundColor: "#fff",
|
|
73
|
+
boxSizing: "border-box",
|
|
74
|
+
color: "#000",
|
|
75
|
+
fontFamily: '"Times New Roman", Times, serif',
|
|
76
|
+
}, children: _jsxs("div", { style: { border: THICK, minHeight: "285mm", boxSizing: "border-box" }, children: [_jsx("div", { style: {
|
|
77
|
+
height: "26mm",
|
|
78
|
+
display: "flex",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
justifyContent: "center",
|
|
81
|
+
textAlign: "center",
|
|
82
|
+
}, children: _jsx("div", { style: { fontSize: "16pt", fontWeight: "bold", letterSpacing: "0.2px" }, children: "INSPECTION AND ACCEPTANCE REPORT" }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: _jsx("tbody", { children: _jsxs("tr", { style: { height: "12mm" }, children: [_jsxs("td", { style: {
|
|
83
|
+
...td,
|
|
84
|
+
width: "70%",
|
|
85
|
+
borderLeft: "none",
|
|
86
|
+
borderTop: "none",
|
|
87
|
+
borderBottom: THICK,
|
|
88
|
+
fontSize: "12pt",
|
|
89
|
+
fontWeight: "bold",
|
|
90
|
+
verticalAlign: "middle",
|
|
91
|
+
}, children: ["Entity Name :", " ", _jsx("span", { style: { textDecoration: entityName ? "underline" : "none" }, children: display(entityName) })] }), _jsxs("td", { style: {
|
|
92
|
+
...td,
|
|
93
|
+
borderRight: "none",
|
|
94
|
+
borderTop: "none",
|
|
95
|
+
borderBottom: THICK,
|
|
96
|
+
fontSize: "12pt",
|
|
97
|
+
fontWeight: "bold",
|
|
98
|
+
verticalAlign: "middle",
|
|
99
|
+
}, children: ["Fund Cluster : ", display(fundCluster)] })] }) }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: _jsx("tbody", { children: _jsxs("tr", { style: { height: "26mm" }, children: [_jsxs("td", { style: {
|
|
100
|
+
...td,
|
|
101
|
+
width: "70%",
|
|
102
|
+
borderLeft: "none",
|
|
103
|
+
borderTop: "none",
|
|
104
|
+
borderBottom: THICK,
|
|
105
|
+
padding: "1.6mm 1.4mm",
|
|
106
|
+
fontSize: "11.5pt",
|
|
107
|
+
}, children: [_jsxs("div", { children: ["Supplier : ", display(supplier)] }), _jsxs("div", { style: { marginTop: "5.2mm" }, children: ["Requisitioning Office/Dept.: ", display(requestingOffice)] }), _jsxs("div", { style: { marginTop: "2.6mm" }, children: ["Responsibility Center Code : ", display(responsibilityCenterCode)] })] }), _jsxs("td", { style: {
|
|
108
|
+
...td,
|
|
109
|
+
borderRight: "none",
|
|
110
|
+
borderTop: "none",
|
|
111
|
+
borderBottom: THICK,
|
|
112
|
+
padding: "1.6mm 1.4mm",
|
|
113
|
+
fontSize: "11.5pt",
|
|
114
|
+
}, children: [_jsxs("div", { children: ["IAR No.: ", display(iarNo)] }), _jsxs("div", { style: { marginTop: "2.5mm" }, children: ["Date : ", display(fmtDate(iarDate))] }), _jsxs("div", { style: { marginTop: "5.2mm" }, children: [_jsx("span", { children: "CR/SI No.: " }), _jsx("span", { style: { ...breakableText, fontSize: "8.5pt", lineHeight: 1.05 }, children: display(crsiNo) })] }), _jsxs("div", { style: { marginTop: "2.6mm" }, children: ["Date : ", display(fmtDate(crsiDate))] })] })] }) }) }), _jsxs("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: "16.4%" } }), _jsx("col", { style: { width: "53%" } }), _jsx("col", { style: { width: "14%" } }), _jsx("col", { style: { width: "16.6%" } })] }), _jsx("thead", { children: _jsxs("tr", { style: { height: "14mm" }, children: [_jsxs("th", { style: { ...itemTh, borderLeft: "none" }, children: ["Stock/", _jsx("br", {}), "Property No."] }), _jsx("th", { style: itemTh, children: "Description" }), _jsx("th", { style: itemTh, children: "Unit" }), _jsx("th", { style: { ...itemTh, borderRight: "none" }, children: "Quantity" })] }) }), _jsx("tbody", { children: rows.map((item, index) => (_jsxs("tr", { style: { height: "8.5mm" }, children: [_jsx("td", { style: { ...td, borderLeft: "none", padding: "0.8mm 1mm", textAlign: "center" }, children: item?.stockNo || NBSP }), _jsx("td", { style: { ...td, padding: "0.8mm 1mm", textAlign: "center" }, children: item?.description ? (item.description) : index === nothingFollowsIndex ? (_jsx("strong", { style: { fontSize: "10pt", fontStyle: "italic" }, children: "***NOTHING FOLLOWS***" })) : (NBSP) }), _jsx("td", { style: { ...td, padding: "0.8mm 1mm", textAlign: "center" }, children: item?.unit || NBSP }), _jsx("td", { style: { ...td, borderRight: "none", padding: "0.8mm 1mm", textAlign: "center" }, children: item?.quantity || NBSP })] }, index))) })] }), _jsxs("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: [_jsx("thead", { children: _jsxs("tr", { style: { height: "9mm" }, children: [_jsx("th", { style: { ...itemTh, width: "50%", borderLeft: "none", padding: "0.8mm 1mm" }, children: "Inspection" }), _jsx("th", { style: { ...itemTh, borderRight: "none", padding: "0.8mm 1mm" }, children: "Complete" })] }) }), _jsx("tbody", { children: _jsxs("tr", { style: { height: "55mm" }, children: [_jsxs("td", { style: {
|
|
115
|
+
...td,
|
|
116
|
+
width: "50%",
|
|
117
|
+
borderLeft: "none",
|
|
118
|
+
borderBottom: "none",
|
|
119
|
+
padding: "2.2mm 1.4mm",
|
|
120
|
+
position: "relative",
|
|
121
|
+
fontSize: "12pt",
|
|
122
|
+
}, children: [_jsxs("div", { style: { fontWeight: "bold" }, children: ["Date Inspected : ", display(fmtDate(dateInspected))] }), _jsxs("div", { style: {
|
|
123
|
+
display: "flex",
|
|
124
|
+
alignItems: "flex-start",
|
|
125
|
+
gap: "8mm",
|
|
126
|
+
marginTop: "8mm",
|
|
127
|
+
paddingLeft: "1mm",
|
|
128
|
+
}, children: [_jsx(Checkbox, { checked: isInspected }), _jsxs("div", { style: { maxWidth: "67mm", textAlign: "center", lineHeight: 1.25 }, children: ["Inspected, verified and found in order as", _jsx("br", {}), "to quantity and specifications"] })] }), _jsx("div", { style: {
|
|
129
|
+
position: "absolute",
|
|
130
|
+
left: 0,
|
|
131
|
+
right: 0,
|
|
132
|
+
bottom: "4mm",
|
|
133
|
+
textAlign: "center",
|
|
134
|
+
fontSize: "12pt",
|
|
135
|
+
}, children: inspectionOfficer || "Inspection Officer" })] }), _jsxs("td", { style: {
|
|
136
|
+
...td,
|
|
137
|
+
borderRight: "none",
|
|
138
|
+
borderBottom: "none",
|
|
139
|
+
padding: "2.2mm 1.4mm",
|
|
140
|
+
position: "relative",
|
|
141
|
+
fontSize: "12pt",
|
|
142
|
+
}, children: [_jsxs("div", { style: { fontWeight: "bold" }, children: ["Date Inspected : ", display(fmtDate(dateReceived))] }), _jsxs("div", { style: { display: "grid", gap: "4mm", marginTop: "7.5mm", paddingLeft: "1mm" }, children: [_jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8mm" }, children: [_jsx(Checkbox, { checked: isComplete }), _jsx("span", { children: "Complete" })] }), _jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8mm" }, children: [_jsx(Checkbox, { checked: !isComplete }), _jsxs("span", { children: ["Partial (", partialQuantityText, ")"] })] })] }), _jsx("div", { style: {
|
|
143
|
+
position: "absolute",
|
|
144
|
+
left: 0,
|
|
145
|
+
right: 0,
|
|
146
|
+
bottom: "4mm",
|
|
147
|
+
textAlign: "center",
|
|
148
|
+
fontSize: "12pt",
|
|
149
|
+
}, children: supplyCustodian || "Supply and/or Property Custodian" })] })] }) })] })] }) }));
|
|
150
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type IcsPreviewItem = {
|
|
2
|
+
quantity?: string;
|
|
3
|
+
unit?: string;
|
|
4
|
+
unitCost?: string;
|
|
5
|
+
totalCost?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
inventoryItemNo?: string;
|
|
8
|
+
estimatedUsefulLife?: string;
|
|
9
|
+
};
|
|
10
|
+
export type IcsPreviewSignature = {
|
|
11
|
+
label: string;
|
|
12
|
+
signedByName?: string;
|
|
13
|
+
position?: string;
|
|
14
|
+
signedAt?: string;
|
|
15
|
+
signature?: string | null;
|
|
16
|
+
};
|
|
17
|
+
type IcsPreviewProps = {
|
|
18
|
+
entityName?: string;
|
|
19
|
+
fundCluster?: string;
|
|
20
|
+
icsNo?: string;
|
|
21
|
+
purchaseOrderNo?: string;
|
|
22
|
+
purchaseRequestRef?: string;
|
|
23
|
+
supplierName?: string;
|
|
24
|
+
invoiceNo?: string;
|
|
25
|
+
deliveryReceiptNo?: string;
|
|
26
|
+
procurementRemarks?: string;
|
|
27
|
+
items?: IcsPreviewItem[];
|
|
28
|
+
signatures?: IcsPreviewSignature[];
|
|
29
|
+
};
|
|
30
|
+
export declare function IcsPreview({ entityName, fundCluster, icsNo, purchaseOrderNo, purchaseRequestRef, supplierName, invoiceNo, deliveryReceiptNo, procurementRemarks, items, signatures, }: IcsPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
const FIXED_ROWS = 14;
|
|
4
|
+
function fmtDate(value) {
|
|
5
|
+
if (!value || value.trim() === "")
|
|
6
|
+
return "";
|
|
7
|
+
const d = new Date(value);
|
|
8
|
+
return isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
|
|
9
|
+
}
|
|
10
|
+
function fmtAmount(value) {
|
|
11
|
+
if (!value || value.trim() === "")
|
|
12
|
+
return "";
|
|
13
|
+
const n = Number(value);
|
|
14
|
+
if (!Number.isFinite(n) || n === 0)
|
|
15
|
+
return "";
|
|
16
|
+
return n.toLocaleString("en-PH", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
17
|
+
}
|
|
18
|
+
function fmtQuantity(value) {
|
|
19
|
+
if (!value || value.trim() === "")
|
|
20
|
+
return "";
|
|
21
|
+
const n = Number(value);
|
|
22
|
+
if (!Number.isFinite(n) || n === 0)
|
|
23
|
+
return "";
|
|
24
|
+
return n.toLocaleString("en-PH");
|
|
25
|
+
}
|
|
26
|
+
function findSignature(signatures, ...labels) {
|
|
27
|
+
if (!signatures || signatures.length === 0)
|
|
28
|
+
return undefined;
|
|
29
|
+
const normalized = labels.map(l => l.toLowerCase());
|
|
30
|
+
return signatures.find(sig => normalized.includes(sig.label.toLowerCase()));
|
|
31
|
+
}
|
|
32
|
+
export function IcsPreview({ entityName = "", fundCluster = "", icsNo = "", purchaseOrderNo = "", purchaseRequestRef = "", supplierName = "", invoiceNo = "", deliveryReceiptNo = "", procurementRemarks = "", items = [], signatures = [], }) {
|
|
33
|
+
const cell = "border border-gray-800 bg-transparent! px-1 py-0.5 text-[7pt] text-black! align-top";
|
|
34
|
+
const th = "border border-gray-800 bg-gray-50! px-1 py-1 text-center text-[6.5pt] leading-[1.2] font-semibold text-black!";
|
|
35
|
+
const headerLabelStyle = {
|
|
36
|
+
display: "inline-block",
|
|
37
|
+
position: "relative",
|
|
38
|
+
zIndex: 1,
|
|
39
|
+
fontWeight: "bold",
|
|
40
|
+
lineHeight: 1.35,
|
|
41
|
+
verticalAlign: "top",
|
|
42
|
+
backgroundColor: "transparent",
|
|
43
|
+
};
|
|
44
|
+
const tableHeaderTextStyle = {
|
|
45
|
+
display: "block",
|
|
46
|
+
position: "relative",
|
|
47
|
+
zIndex: 1,
|
|
48
|
+
backgroundColor: "transparent",
|
|
49
|
+
};
|
|
50
|
+
const headerValueStyle = {
|
|
51
|
+
display: "inline-block",
|
|
52
|
+
position: "relative",
|
|
53
|
+
zIndex: 1,
|
|
54
|
+
maxWidth: "100%",
|
|
55
|
+
lineHeight: 1.35,
|
|
56
|
+
verticalAlign: "top",
|
|
57
|
+
backgroundColor: "transparent",
|
|
58
|
+
};
|
|
59
|
+
const signatureFieldStyle = {
|
|
60
|
+
borderBottom: "1px solid #000",
|
|
61
|
+
boxSizing: "border-box",
|
|
62
|
+
display: "flex",
|
|
63
|
+
alignItems: "flex-start",
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
height: "28px",
|
|
66
|
+
padding: "4px 2px 6px",
|
|
67
|
+
lineHeight: 1.1,
|
|
68
|
+
marginBottom: "4px",
|
|
69
|
+
textAlign: "center",
|
|
70
|
+
};
|
|
71
|
+
const filledItems = items.filter(item => Boolean(item.description ||
|
|
72
|
+
item.inventoryItemNo ||
|
|
73
|
+
(item.quantity && Number(item.quantity) > 0) ||
|
|
74
|
+
(item.unitCost && Number(item.unitCost) > 0)));
|
|
75
|
+
const blankRowCount = Math.max(0, FIXED_ROWS - filledItems.length);
|
|
76
|
+
const receivedBy = findSignature(signatures, "Received by");
|
|
77
|
+
const receivedFrom = findSignature(signatures, "Received from");
|
|
78
|
+
return (_jsxs("div", { "data-ics-preview": "true", "data-pdf-page": "true", "data-pdf-orientation": "portrait", className: "ics-a4-page bg-white! text-black! [&_table]:text-black! [&_td]:bg-transparent! [&_td]:text-black! [&_th]:text-black!", style: {
|
|
79
|
+
width: "210mm",
|
|
80
|
+
minHeight: "297mm",
|
|
81
|
+
padding: "12mm 14mm",
|
|
82
|
+
fontFamily: '"Times New Roman", Times, serif',
|
|
83
|
+
fontSize: "7.5pt",
|
|
84
|
+
backgroundColor: "#fff",
|
|
85
|
+
color: "#000",
|
|
86
|
+
colorScheme: "light",
|
|
87
|
+
boxSizing: "border-box",
|
|
88
|
+
}, children: [_jsx("div", { style: { textAlign: "center", marginBottom: "8px" }, children: _jsx("div", { style: { fontSize: "11pt", fontWeight: "bold", letterSpacing: "0.5px" }, children: "INVENTORY CUSTODIAN SLIP" }) }), _jsx("table", { style: {
|
|
89
|
+
width: "100%",
|
|
90
|
+
borderCollapse: "collapse",
|
|
91
|
+
marginBottom: "6px",
|
|
92
|
+
fontSize: "7.5pt",
|
|
93
|
+
}, children: _jsxs("tbody", { children: [_jsxs("tr", { style: { height: "18px" }, children: [_jsxs("td", { style: { width: "70%", padding: "2px 0" }, children: [_jsx("span", { style: headerLabelStyle, children: "Entity Name:\u00A0" }), _jsx("span", { style: { ...headerValueStyle, minWidth: "260px" }, children: entityName || " " })] }), _jsx("td", { style: { width: "30%", padding: "2px 0" } })] }), _jsxs("tr", { style: { height: "18px" }, children: [_jsxs("td", { style: { padding: "2px 0" }, children: [_jsx("span", { style: headerLabelStyle, children: "Fund Cluster:\u00A0" }), _jsx("span", { style: { ...headerValueStyle, minWidth: "200px" }, children: fundCluster || " " })] }), _jsxs("td", { style: { padding: "2px 0", textAlign: "right" }, children: [_jsx("span", { style: headerLabelStyle, children: "ICS No:\u00A0" }), _jsx("span", { style: { ...headerValueStyle, minWidth: "100px", textAlign: "left" }, children: icsNo || "\u00a0" })] })] })] }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", marginBottom: "10px", fontSize: "7pt" }, children: _jsxs("tbody", { children: [_jsxs("tr", { style: { height: "14px" }, children: [_jsxs("td", { style: { width: "25%", padding: "2px 0", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "PO No.:\u00A0" }), _jsx("span", { style: headerValueStyle, children: purchaseOrderNo || "\u00a0" })] }), _jsxs("td", { style: { width: "25%", padding: "2px 0", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "PR Ref.:\u00A0" }), _jsx("span", { style: headerValueStyle, children: purchaseRequestRef || "\u00a0" })] }), _jsxs("td", { style: { width: "25%", padding: "2px 0", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "Invoice:\u00A0" }), _jsx("span", { style: headerValueStyle, children: invoiceNo || "\u00a0" })] }), _jsxs("td", { style: { width: "25%", padding: "2px 0", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "DR No.:\u00A0" }), _jsx("span", { style: headerValueStyle, children: deliveryReceiptNo || "\u00a0" })] })] }), _jsxs("tr", { style: { height: "16px" }, children: [_jsxs("td", { colSpan: 2, style: { padding: "2px 0 5px", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "Supplier:\u00A0" }), _jsx("span", { style: headerValueStyle, children: supplierName || "\u00a0" })] }), _jsxs("td", { colSpan: 2, style: { padding: "2px 0 5px", lineHeight: 1.2 }, children: [_jsx("span", { style: headerLabelStyle, children: "Procurement Remarks:\u00A0" }), _jsx("span", { style: headerValueStyle, children: procurementRemarks || "\u00a0" })] })] })] }) }), _jsxs("table", { style: {
|
|
94
|
+
width: "100%",
|
|
95
|
+
borderCollapse: "collapse",
|
|
96
|
+
fontSize: "7pt",
|
|
97
|
+
border: "1px solid #000",
|
|
98
|
+
}, children: [_jsx("thead", { children: _jsxs("tr", { style: { height: "34px" }, children: [_jsx("th", { className: th, style: { width: "7%", verticalAlign: "middle" }, children: _jsx("span", { style: tableHeaderTextStyle, children: "QTY" }) }), _jsx("th", { className: th, style: { width: "7%", verticalAlign: "middle" }, children: _jsx("span", { style: tableHeaderTextStyle, children: "Unit" }) }), _jsxs("th", { className: th, style: { width: "11%", verticalAlign: "middle" }, children: [_jsx("span", { style: tableHeaderTextStyle, children: "Amount" }), _jsx("span", { style: tableHeaderTextStyle, children: "Unit Cost" })] }), _jsxs("th", { className: th, style: { width: "11%", verticalAlign: "middle" }, children: [_jsx("span", { style: tableHeaderTextStyle, children: "Amount" }), _jsx("span", { style: tableHeaderTextStyle, children: "Total Cost" })] }), _jsx("th", { className: th, style: { width: "37%", verticalAlign: "middle" }, children: _jsx("span", { style: tableHeaderTextStyle, children: "Description" }) }), _jsx("th", { className: th, style: { width: "13%", verticalAlign: "middle" }, children: _jsx("span", { style: tableHeaderTextStyle, children: "Inventory Item No." }) }), _jsx("th", { className: th, style: { width: "14%", verticalAlign: "middle" }, children: _jsx("span", { style: tableHeaderTextStyle, children: "Estimated Useful Life" }) })] }) }), _jsxs("tbody", { children: [filledItems.map((item, i) => (_jsxs("tr", { style: { height: "16px" }, children: [_jsx("td", { className: cell, style: { textAlign: "center" }, children: fmtQuantity(item.quantity) || " " }), _jsx("td", { className: cell, style: { textAlign: "center" }, children: item.unit || " " }), _jsx("td", { className: cell, style: { textAlign: "right" }, children: fmtAmount(item.unitCost) || " " }), _jsx("td", { className: cell, style: { textAlign: "right" }, children: fmtAmount(item.totalCost) || " " }), _jsx("td", { className: cell, children: item.description || " " }), _jsx("td", { className: cell, children: item.inventoryItemNo || " " }), _jsx("td", { className: cell, children: item.estimatedUsefulLife || " " })] }, `item-${i}`))), filledItems.length > 0 && (_jsxs("tr", { style: { height: "16px" }, children: [_jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, style: { textAlign: "center", fontStyle: "italic", color: "#444" }, children: "*****nothing follows*****" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" })] })), Array.from({ length: blankRowCount }).map((_, i) => (_jsxs("tr", { style: { height: "16px" }, children: [_jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" })] }, `blank-${i}`)))] })] }), _jsx("table", { style: {
|
|
99
|
+
width: "100%",
|
|
100
|
+
borderCollapse: "collapse",
|
|
101
|
+
fontSize: "7pt",
|
|
102
|
+
border: "1px solid #000",
|
|
103
|
+
borderTop: "none",
|
|
104
|
+
}, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: {
|
|
105
|
+
width: "50%",
|
|
106
|
+
padding: "8px 10px 6px",
|
|
107
|
+
borderRight: "1px solid #000",
|
|
108
|
+
verticalAlign: "top",
|
|
109
|
+
}, children: [_jsx("div", { style: { marginBottom: "24px" }, children: "Received by:" }), _jsx("div", { style: signatureFieldStyle, children: receivedBy?.signedByName || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt", marginBottom: "12px" }, children: "Signature Over Printed Name" }), _jsx("div", { style: signatureFieldStyle, children: receivedBy?.position || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt", marginBottom: "12px" }, children: "Position/Office" }), _jsx("div", { style: signatureFieldStyle, children: fmtDate(receivedBy?.signedAt) || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt" }, children: "Date" })] }), _jsxs("td", { style: {
|
|
110
|
+
width: "50%",
|
|
111
|
+
padding: "8px 10px 6px",
|
|
112
|
+
verticalAlign: "top",
|
|
113
|
+
}, children: [_jsx("div", { style: { marginBottom: "24px" }, children: "Received from:" }), _jsx("div", { style: signatureFieldStyle, children: receivedFrom?.signedByName || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt", marginBottom: "12px" }, children: "Signature Over Printed Name" }), _jsx("div", { style: signatureFieldStyle, children: receivedFrom?.position || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt", marginBottom: "12px" }, children: "Position/Office" }), _jsx("div", { style: signatureFieldStyle, children: fmtDate(receivedFrom?.signedAt) || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "6.5pt" }, children: "Date" })] })] }) }) })] }));
|
|
114
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
interface EntryRow {
|
|
2
|
+
dateAcquired: string;
|
|
3
|
+
particularsArticles: string;
|
|
4
|
+
propertyNo: string;
|
|
5
|
+
qty: string;
|
|
6
|
+
unitCost: string;
|
|
7
|
+
totalCost: string;
|
|
8
|
+
accumulatedDepreciation: string;
|
|
9
|
+
accumulatedImpairmentLosses: string;
|
|
10
|
+
carryingAmount: string;
|
|
11
|
+
remarks: string;
|
|
12
|
+
sale: string;
|
|
13
|
+
transfer: string;
|
|
14
|
+
destruction: string;
|
|
15
|
+
othersSpecify: string;
|
|
16
|
+
total: string;
|
|
17
|
+
appraisedValue: string;
|
|
18
|
+
orNo: string;
|
|
19
|
+
amount: string;
|
|
20
|
+
}
|
|
21
|
+
interface IirupPreviewProps {
|
|
22
|
+
entityName: string;
|
|
23
|
+
nameOfAccountableOfficer: string;
|
|
24
|
+
designation: string;
|
|
25
|
+
station: string;
|
|
26
|
+
fundCluster: string;
|
|
27
|
+
date: string;
|
|
28
|
+
iirupNo: string;
|
|
29
|
+
requestedBy?: string;
|
|
30
|
+
approvedBy?: string;
|
|
31
|
+
accountableOfficerDesignation?: string;
|
|
32
|
+
authorizedOfficialDesignation?: string;
|
|
33
|
+
inspectionOfficerSignatory?: string;
|
|
34
|
+
inspectionOfficerDesignation?: string;
|
|
35
|
+
witnessSignatory?: string;
|
|
36
|
+
witnessDispositionDay?: string;
|
|
37
|
+
witnessDispositionMonth?: string;
|
|
38
|
+
witnessDispositionYear?: string;
|
|
39
|
+
entries: EntryRow[];
|
|
40
|
+
}
|
|
41
|
+
export declare function IirupPreview({ entityName, nameOfAccountableOfficer, designation, station, fundCluster, date, iirupNo, requestedBy, approvedBy, accountableOfficerDesignation, authorizedOfficialDesignation, inspectionOfficerSignatory, inspectionOfficerDesignation, witnessSignatory, witnessDispositionDay, witnessDispositionMonth, witnessDispositionYear, entries, }: IirupPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|