@appcorp/fusion-storybook 0.4.16 → 0.4.18

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.
@@ -0,0 +1,13 @@
1
+ interface BuildAutoPostPayloadInput {
2
+ schoolId: string;
3
+ computerNumbers: string[];
4
+ paidAt: string;
5
+ skipFine: boolean;
6
+ }
7
+ export declare function buildAutoPostPayload(input: BuildAutoPostPayloadInput): {
8
+ skipFine?: boolean | undefined;
9
+ schoolId: string;
10
+ computerNumbers: string[];
11
+ paidAt: string;
12
+ };
13
+ export {};
@@ -0,0 +1,3 @@
1
+ export function buildAutoPostPayload(input) {
2
+ return Object.assign({ schoolId: input.schoolId, computerNumbers: input.computerNumbers, paidAt: input.paidAt }, (input.skipFine ? { skipFine: true } : {}));
3
+ }
@@ -39,4 +39,5 @@ export declare const formatStudentName: (_: unknown, row: unknown) => string;
39
39
  export declare const formatCurrency: (amount: number) => string;
40
40
  export declare const formatAmount: (_: unknown, row: unknown) => string;
41
41
  export declare const formatAmountPaid: (_: unknown, row: unknown) => string;
42
+ export declare const formatFine: (_: unknown, row: unknown) => string;
42
43
  export declare const formatAmountDue: (_: unknown, row: unknown) => string;
@@ -65,6 +65,10 @@ export const formatAmountPaid = (_, row) => {
65
65
  var _a;
66
66
  return formatCurrency((_a = row.amountPaid) !== null && _a !== void 0 ? _a : 0);
67
67
  };
68
+ export const formatFine = (_, row) => {
69
+ var _a;
70
+ return formatCurrency((_a = row.fine) !== null && _a !== void 0 ? _a : 0);
71
+ };
68
72
  export const formatAmountDue = (_, row) => {
69
73
  var _a;
70
74
  return formatCurrency((_a = row.amountDue) !== null && _a !== void 0 ? _a : 0);
@@ -39,6 +39,7 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
39
39
  amount: number;
40
40
  amountDue: number;
41
41
  amountPaid: number;
42
+ fine: number;
42
43
  discountAmount: number;
43
44
  discountCodeId: string | null;
44
45
  dueDate: string;
@@ -79,6 +80,7 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
79
80
  amount: number;
80
81
  amountDue: number;
81
82
  amountPaid: number;
83
+ fine: number;
82
84
  discountAmount: number;
83
85
  discountCodeId: string | null;
84
86
  dueDate: string;
@@ -121,6 +123,7 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
121
123
  amount: number;
122
124
  amountDue: number;
123
125
  amountPaid: number;
126
+ fine: number;
124
127
  discountAmount: number;
125
128
  discountCodeId: string | null;
126
129
  dueDate: string;
@@ -161,6 +164,7 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
161
164
  amount: number;
162
165
  amountDue: number;
163
166
  amountPaid: number;
167
+ fine: number;
164
168
  discountAmount: number;
165
169
  discountCodeId: string | null;
166
170
  dueDate: string;
@@ -201,6 +205,7 @@ export declare const STUDENT_FEE_ACTION_TYPES: {
201
205
  amount: number;
202
206
  amountDue: number;
203
207
  amountPaid: number;
208
+ fine: number;
204
209
  discountAmount: number;
205
210
  discountCodeId: string | null;
206
211
  dueDate: string;
@@ -37,6 +37,7 @@ const studentFeeConfig = {
37
37
  amount: 0,
38
38
  amountDue: 0,
39
39
  amountPaid: 0,
40
+ fine: 0,
40
41
  discountAmount: 0,
41
42
  discountCodeId: null,
42
43
  dueDate: (() => {
@@ -51,6 +51,7 @@ export declare const useStudentFeeModule: () => {
51
51
  amount: number;
52
52
  amountDue: number;
53
53
  amountPaid: number;
54
+ fine: number;
54
55
  discountAmount: number;
55
56
  discountCodeId: string | null;
56
57
  dueDate: string;
@@ -70,6 +70,7 @@ export const useStudentFeeModule = () => {
70
70
  amount: 0,
71
71
  amountDue: 0,
72
72
  amountPaid: 0,
73
+ fine: 0,
73
74
  discountAmount: 0,
74
75
  discountCodeId: null,
75
76
  dueDate: `${dueDate.getFullYear()}-${String(dueDate.getMonth() + 1).padStart(2, "0")}-${String(dueDate.getDate()).padStart(2, "0")}`,
@@ -22,6 +22,12 @@ import { DISCOUNT_TYPE, PAYMENT_STATUS } from "../../types";
22
22
  import { PAYMENT_STATUS_OPTIONS } from "./constants";
23
23
  import { Loader2 } from "lucide-react";
24
24
  import { DATE_FORMATS, formatDate, } from "@react-pakistan/util-functions/general/format-date";
25
+ function toLocalDateString(date) {
26
+ const year = date.getFullYear();
27
+ const month = String(date.getMonth() + 1).padStart(2, "0");
28
+ const day = String(date.getDate()).padStart(2, "0");
29
+ return `${year}-${month}-${day}`;
30
+ }
25
31
  export const StudentFeeSingle = () => {
26
32
  var _a, _b, _c, _d, _e, _f, _g, _h;
27
33
  const { dispatch, handleChange, state } = useStudentFeeModule();
@@ -40,13 +46,14 @@ export const StudentFeeSingle = () => {
40
46
  var _a;
41
47
  if (!debouncedComputerNumber)
42
48
  return;
49
+ // When the chosen payment date differs from today, ask the API to recompute
50
+ // the fines as of that back-dated (or future) payment date.
51
+ const today = toLocalDateString(new Date());
52
+ const useAsOf = state.paidAt && state.paidAt !== today;
43
53
  fetchByCNRef.current(undefined, {
44
- params: {
45
- computerNumber: debouncedComputerNumber,
46
- schoolId: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id,
47
- },
54
+ params: Object.assign({ computerNumber: debouncedComputerNumber, schoolId: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id }, (useAsOf ? { asOf: state.paidAt } : {})),
48
55
  });
49
- }, [debouncedComputerNumber, (_c = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _c === void 0 ? void 0 : _c.id]);
56
+ }, [debouncedComputerNumber, (_c = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _c === void 0 ? void 0 : _c.id, state.paidAt]);
50
57
  const accumulatedAmount = useMemo(() => {
51
58
  var _a;
52
59
  if (!((_a = feeByComputerNumber === null || feeByComputerNumber === void 0 ? void 0 : feeByComputerNumber.studentFees) === null || _a === void 0 ? void 0 : _a.length))
@@ -4,12 +4,14 @@ import { showErrorToast, showSuccessToast, showInfoToast, } from "@appcorp/shadc
4
4
  import { getCachedWorkspaceSync } from "../workspace/cache";
5
5
  import { useTranslations } from "next-intl";
6
6
  import { STUDENT_FEE_API_ROUTES } from "../../constants";
7
+ import { buildAutoPostPayload } from "./auto-post-payload";
7
8
  import { STUDENT_FEE_ACTION_TYPES, useStudentFeeModule } from "./context";
8
9
  import { useRef, useEffect, useCallback, useState } from "react";
9
10
  import { Button } from "@appcorp/shadcn/components/ui/button";
10
11
  import { Separator } from "@appcorp/shadcn/components/ui/separator";
11
12
  import { EnhancedInput } from "@appcorp/shadcn/components/enhanced-input";
12
13
  import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
14
+ import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
13
15
  const workspace = getCachedWorkspaceSync();
14
16
  const POLL_INTERVAL_MS = 2000;
15
17
  const POLL_TIMEOUT_MS = 300000;
@@ -61,6 +63,7 @@ export const StudentFeeMoreActions = () => {
61
63
  const abortRef = useRef(null);
62
64
  const [autoPostDate, setAutoPostDate] = useState("");
63
65
  const [computerNumbersText, setComputerNumbersText] = useState("");
66
+ const [skipFine, setSkipFine] = useState(false);
64
67
  const [submitting, setSubmitting] = useState(false);
65
68
  useEffect(() => {
66
69
  return () => {
@@ -127,11 +130,12 @@ export const StudentFeeMoreActions = () => {
127
130
  headers: {
128
131
  "Content-Type": "application/json",
129
132
  },
130
- body: JSON.stringify({
133
+ body: JSON.stringify(buildAutoPostPayload({
131
134
  schoolId,
132
135
  computerNumbers: uniqueNumbers,
133
136
  paidAt: autoPostDate,
134
- }),
137
+ skipFine,
138
+ })),
135
139
  signal,
136
140
  });
137
141
  if (!res.ok) {
@@ -187,9 +191,9 @@ export const StudentFeeMoreActions = () => {
187
191
  finally {
188
192
  setSubmitting(false);
189
193
  }
190
- }, [t, dispatch, closeDrawer, refreshList, computerNumbersText, autoPostDate]);
194
+ }, [t, dispatch, closeDrawer, refreshList, computerNumbersText, autoPostDate, skipFine]);
191
195
  const canSubmit = autoPostDate.trim() !== "" &&
192
196
  computerNumbersText.trim() !== "" &&
193
197
  !submitting;
194
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Button, { disabled: new Date().getDate() !== 1, onClick: handleCreateMonthly, children: t("actionsButtonCreateMonthly") }), _jsx(Button, { onClick: handleCreateSingleEntry, children: t("actionsButtonSingleEntry") }), _jsx(Separator, {}), _jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { id: "autoPostDate", info: t("formAutoPostDateInfo"), label: t("formAutoPostDateLabel"), onChange: (e) => setAutoPostDate(e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, type: "date", value: autoPostDate }), _jsx(EnhancedTextarea, { id: "autoPostComputerNumbers", info: t("formAutoPostComputerNumbersInfo"), label: t("formAutoPostComputerNumbersLabel"), onChange: (e) => setComputerNumbersText(e.target.value), placeholder: t("formAutoPostComputerNumbersPlaceholder"), rows: 8, value: computerNumbersText }), _jsx(Button, { disabled: !canSubmit, onClick: handleAutoPost, children: t("actionsButtonAutoPost") })] })] }));
198
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Button, { disabled: new Date().getDate() !== 1, onClick: handleCreateMonthly, children: t("actionsButtonCreateMonthly") }), _jsx(Button, { onClick: handleCreateSingleEntry, children: t("actionsButtonSingleEntry") }), _jsx(Separator, {}), _jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { id: "autoPostDate", info: t("formAutoPostDateInfo"), label: t("formAutoPostDateLabel"), onChange: (e) => setAutoPostDate(e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, type: "date", value: autoPostDate }), _jsx(EnhancedTextarea, { id: "autoPostComputerNumbers", info: t("formAutoPostComputerNumbersInfo"), label: t("formAutoPostComputerNumbersLabel"), onChange: (e) => setComputerNumbersText(e.target.value), placeholder: t("formAutoPostComputerNumbersPlaceholder"), rows: 8, value: computerNumbersText }), _jsx(EnhancedCheckbox, { id: "autoPostSkipFine", checked: skipFine, info: t("formSkipFineInfo"), label: t("formSkipFineLabel"), onCheckedChange: (checked) => setSkipFine(!!checked) }), _jsx(Button, { disabled: !canSubmit, onClick: handleAutoPost, children: t("actionsButtonAutoPost") })] })] }));
195
199
  };
@@ -34,6 +34,7 @@ interface ConfigProps {
34
34
  tableColumnHeaderAmount: string;
35
35
  tableColumnHeaderAmountDue: string;
36
36
  tableColumnHeaderAmountPaid: string;
37
+ tableColumnHeaderFine: string;
37
38
  tableColumnHeaderDueDate: string;
38
39
  tableColumnHeaderFeeStructure: string;
39
40
  tableColumnHeaderId: string;
@@ -26,7 +26,7 @@ import { StudentFeeMoreActions } from "./more-actions";
26
26
  import { StudentFeeView } from "./view";
27
27
  import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
28
28
  import { RbacNoAccess } from "../../components/rbac-no-access";
29
- import { formatStudentName, formatAmount, formatAmountPaid, formatAmountDue, } from "./constants";
29
+ import { formatStudentName, formatAmount, formatAmountPaid, formatAmountDue, formatFine, } from "./constants";
30
30
  import { StudentFeeMonthly } from "./misc-1";
31
31
  import { StudentFeeSingle } from "./misc-2";
32
32
  // ============================================================================
@@ -50,6 +50,11 @@ const tableBodyCols = [
50
50
  key: "amountPaid",
51
51
  textFormatter: formatAmountPaid,
52
52
  },
53
+ {
54
+ componentType: COMPONENT_TYPE.TEXT,
55
+ key: "fine",
56
+ textFormatter: formatFine,
57
+ },
53
58
  {
54
59
  componentType: COMPONENT_TYPE.TEXT,
55
60
  key: "amountDue",
@@ -79,7 +84,7 @@ const createComponentInstances = () => ({
79
84
  misc1: _jsx(StudentFeeMonthly, {}),
80
85
  misc2: _jsx(StudentFeeSingle, {}),
81
86
  });
82
- const createStudentFeeConfig = ({ clearFilters, drawerButtonCancel, drawerButtonSave, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMisc1Description, drawerMisc1Title, drawerMisc2Description, drawerMisc2Title, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, tableColumnHeaderActions, tableColumnHeaderAmount, tableColumnHeaderAmountDue, tableColumnHeaderAmountPaid, tableColumnHeaderDueDate, tableColumnHeaderFeeStructure, tableColumnHeaderId, tableColumnHeaderRemarks, tableColumnHeaderStatus, tableColumnHeaderStudent, tableDescription, tableSearchPlaceholder, tableTitle, }) => {
87
+ const createStudentFeeConfig = ({ clearFilters, drawerButtonCancel, drawerButtonSave, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMisc1Description, drawerMisc1Title, drawerMisc2Description, drawerMisc2Title, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, tableColumnHeaderActions, tableColumnHeaderAmount, tableColumnHeaderAmountDue, tableColumnHeaderAmountPaid, tableColumnHeaderFine, tableColumnHeaderDueDate, tableColumnHeaderFeeStructure, tableColumnHeaderId, tableColumnHeaderRemarks, tableColumnHeaderStatus, tableColumnHeaderStudent, tableDescription, tableSearchPlaceholder, tableTitle, }) => {
83
88
  const components = createComponentInstances();
84
89
  return {
85
90
  cancelLabel: drawerButtonCancel,
@@ -110,6 +115,7 @@ const createStudentFeeConfig = ({ clearFilters, drawerButtonCancel, drawerButton
110
115
  { label: tableColumnHeaderFeeStructure, width: "12%" },
111
116
  { label: tableColumnHeaderAmount, width: "10%" },
112
117
  { label: tableColumnHeaderAmountPaid, width: "10%" },
118
+ { label: tableColumnHeaderFine, width: "8%" },
113
119
  { label: tableColumnHeaderAmountDue, width: "10%" },
114
120
  { label: tableColumnHeaderDueDate, width: "10%" },
115
121
  { label: tableColumnHeaderStatus, width: "10%" },
@@ -151,6 +157,7 @@ const StudentFeePageInner = (props) => {
151
157
  tableColumnHeaderAmount: props.tableColumnHeaderAmount,
152
158
  tableColumnHeaderAmountDue: props.tableColumnHeaderAmountDue,
153
159
  tableColumnHeaderAmountPaid: props.tableColumnHeaderAmountPaid,
160
+ tableColumnHeaderFine: props.tableColumnHeaderFine,
154
161
  tableColumnHeaderDueDate: props.tableColumnHeaderDueDate,
155
162
  tableColumnHeaderFeeStructure: props.tableColumnHeaderFeeStructure,
156
163
  tableColumnHeaderId: props.tableColumnHeaderId,
@@ -179,6 +186,7 @@ const StudentFeePageInner = (props) => {
179
186
  props.tableColumnHeaderAmount,
180
187
  props.tableColumnHeaderAmountDue,
181
188
  props.tableColumnHeaderAmountPaid,
189
+ props.tableColumnHeaderFine,
182
190
  props.tableColumnHeaderDueDate,
183
191
  props.tableColumnHeaderFeeStructure,
184
192
  props.tableColumnHeaderId,
@@ -14,7 +14,7 @@ import { useTranslations } from "next-intl";
14
14
  export const StudentFeeView = () => {
15
15
  var _a, _b, _c;
16
16
  const { state } = useStudentFeeModule();
17
- const { amount, amountDue, amountPaid, dueDate, enabled, feeStructureId, paidAt, remarks, status, studentProfileId, } = state;
17
+ const { amount, amountDue, amountPaid, fine, dueDate, enabled, feeStructureId, paidAt, remarks, status, studentProfileId, } = state;
18
18
  const workspace = getCachedWorkspaceSync();
19
19
  const currency = (_b = (_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.currency) !== null && _b !== void 0 ? _b : "";
20
20
  const t = useTranslations("studentFee");
@@ -30,5 +30,5 @@ export const StudentFeeView = () => {
30
30
  ? `${studentProfile.firstName} ${studentProfile.lastName}`
31
31
  : "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldComputerNumber") }), _jsx("p", { className: "text-base", children: ((_c = studentProfile === null || studentProfile === void 0 ? void 0 : studentProfile.computerNumber) !== null && _c !== void 0 ? _c : "").split(":")[1] ||
32
32
  (studentProfile === null || studentProfile === void 0 ? void 0 : studentProfile.computerNumber) ||
33
- "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formFeeStructureLabel") }), _jsx("p", { className: "text-base", children: (feeStructure === null || feeStructure === void 0 ? void 0 : feeStructure.name) || "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formTotalAmountLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amount !== null && amount !== void 0 ? amount : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formAmountPaidLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amountPaid !== null && amountPaid !== void 0 ? amountPaid : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formAmountDueLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amountDue !== null && amountDue !== void 0 ? amountDue : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formDueDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(dueDate, DATE_FORMATS.LOCALE_DATE) })] }), paidAt && (_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formPaidAtLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(paidAt, DATE_FORMATS.LOCALE_DATE) })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formStatusLabel") }), _jsx(Badge, { variant: "secondary", children: status || "—" })] }), remarks && (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formRemarksLabel") }), _jsx("p", { className: "text-base", children: remarks })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRecordState") }), _jsxs(Badge, { className: "gap-1", variant: enabled ? "default" : "destructive", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("badgeActive") : t("badgeInactive")] })] })] }) })] }) }));
33
+ "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formFeeStructureLabel") }), _jsx("p", { className: "text-base", children: (feeStructure === null || feeStructure === void 0 ? void 0 : feeStructure.name) || "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formTotalAmountLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amount !== null && amount !== void 0 ? amount : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formAmountPaidLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amountPaid !== null && amountPaid !== void 0 ? amountPaid : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFine") }), _jsxs("p", { className: "text-base", children: [currency, " ", (fine !== null && fine !== void 0 ? fine : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formAmountDueLabel") }), _jsxs("p", { className: "text-base", children: [currency, " ", (amountDue !== null && amountDue !== void 0 ? amountDue : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formDueDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(dueDate, DATE_FORMATS.LOCALE_DATE) })] }), paidAt && (_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formPaidAtLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(paidAt, DATE_FORMATS.LOCALE_DATE) })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formStatusLabel") }), _jsx(Badge, { variant: "secondary", children: status || "—" })] }), remarks && (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("formRemarksLabel") }), _jsx("p", { className: "text-base", children: remarks })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRecordState") }), _jsxs(Badge, { className: "gap-1", variant: enabled ? "default" : "destructive", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("badgeActive") : t("badgeInactive")] })] })] }) })] }) }));
34
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",