@appcorp/fusion-storybook 0.1.93 → 0.1.95

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.
Files changed (74) hide show
  1. package/base-modules/admission/context.js +9 -9
  2. package/base-modules/admission/filter.js +4 -4
  3. package/base-modules/admission/form.js +6 -6
  4. package/base-modules/admission/view.js +1 -1
  5. package/base-modules/attendance/form.js +2 -2
  6. package/base-modules/attendance/view.js +1 -1
  7. package/base-modules/campus/context.js +7 -7
  8. package/base-modules/campus/filter.js +4 -4
  9. package/base-modules/campus/form.js +1 -1
  10. package/base-modules/campus/view.js +1 -1
  11. package/base-modules/class/context.js +7 -7
  12. package/base-modules/class/filter.js +4 -4
  13. package/base-modules/class/form.js +1 -1
  14. package/base-modules/class/view.js +1 -1
  15. package/base-modules/course/filter.js +4 -4
  16. package/base-modules/course/form.js +4 -4
  17. package/base-modules/course/view.js +1 -1
  18. package/base-modules/discount-code/context.js +7 -7
  19. package/base-modules/discount-code/filter.js +1 -1
  20. package/base-modules/discount-code/more-actions.js +1 -1
  21. package/base-modules/discount-code/view.js +2 -2
  22. package/base-modules/enrollment/filter.js +4 -4
  23. package/base-modules/enrollment/form.js +5 -5
  24. package/base-modules/enrollment/view.js +2 -2
  25. package/base-modules/expense/filter.js +4 -4
  26. package/base-modules/expense/form.js +2 -2
  27. package/base-modules/expense/view.js +3 -3
  28. package/base-modules/family/context.js +6 -6
  29. package/base-modules/family/filter.js +4 -4
  30. package/base-modules/family/form.js +1 -1
  31. package/base-modules/family/view.js +1 -1
  32. package/base-modules/family-member/context.js +6 -6
  33. package/base-modules/family-member/filter.js +4 -4
  34. package/base-modules/family-member/form.js +1 -1
  35. package/base-modules/family-member/view.js +7 -7
  36. package/base-modules/fee-structure/context.d.ts +6 -0
  37. package/base-modules/fee-structure/context.js +2 -1
  38. package/base-modules/fee-structure/filter.js +4 -4
  39. package/base-modules/fee-structure/form.js +14 -10
  40. package/base-modules/fee-structure/validate.d.ts +1 -0
  41. package/base-modules/fee-structure/validate.js +1 -0
  42. package/base-modules/fee-structure/view.js +1 -1
  43. package/base-modules/school/context.js +1 -1
  44. package/base-modules/school/view.js +4 -4
  45. package/base-modules/section/context.js +7 -7
  46. package/base-modules/section/filter.js +4 -4
  47. package/base-modules/section/form.js +2 -2
  48. package/base-modules/section/view.js +1 -1
  49. package/base-modules/student-fee/filter.js +4 -4
  50. package/base-modules/student-fee/form.js +3 -3
  51. package/base-modules/student-fee/view.js +2 -2
  52. package/base-modules/student-profile/context.js +9 -9
  53. package/base-modules/student-profile/filter.js +4 -4
  54. package/base-modules/student-profile/form.js +3 -3
  55. package/base-modules/student-profile/view.js +3 -3
  56. package/base-modules/subject/context.js +6 -6
  57. package/base-modules/subject/filter.js +4 -4
  58. package/base-modules/subject/form.js +1 -1
  59. package/base-modules/subject/view.js +1 -1
  60. package/base-modules/teacher/context.js +8 -8
  61. package/base-modules/teacher/filter.js +4 -4
  62. package/base-modules/teacher/form.js +3 -3
  63. package/base-modules/teacher/page.d.ts +0 -1
  64. package/base-modules/teacher/page.js +1 -3
  65. package/base-modules/teacher/view.js +3 -3
  66. package/base-modules/workspace/form.js +1 -1
  67. package/base-modules/workspace/view.js +5 -5
  68. package/base-modules/workspace-user/context.js +6 -4
  69. package/base-modules/workspace-user/filter.js +4 -4
  70. package/base-modules/workspace-user/form.js +1 -1
  71. package/base-modules/workspace-user/view.js +1 -1
  72. package/package.json +1 -1
  73. package/tsconfig.build.tsbuildinfo +1 -1
  74. package/type.d.ts +3 -0
@@ -287,7 +287,7 @@ export const useDiscountCodeModule = () => {
287
287
  });
288
288
  }, [byIdFetchNow, dispatch]);
289
289
  const handleDelete = useCallback((row) => {
290
- if (confirm(t("messagesDeleteConfirmation"))) {
290
+ if (confirm(t("actionDeleteConfirmation"))) {
291
291
  deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
292
292
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
293
293
  });
@@ -376,19 +376,19 @@ export const useDiscountCodeModule = () => {
376
376
  {
377
377
  enabled: true,
378
378
  handleOnClick: handleMoreActions,
379
- label: t("actionsButtonMoreActions"),
379
+ label: t("actionHeaderMoreActions"),
380
380
  order: 0,
381
381
  },
382
382
  {
383
383
  enabled: true,
384
384
  handleOnClick: handleFilters,
385
- label: t("actionsButtonFilters"),
385
+ label: t("actionHeaderFilters"),
386
386
  order: 1,
387
387
  },
388
388
  {
389
389
  enabled: true,
390
390
  handleOnClick: handleCreate,
391
- label: t("actionsButtonAddItem"),
391
+ label: t("actionHeaderAdd"),
392
392
  order: 2,
393
393
  },
394
394
  ], [handleCreate, handleFilters, handleMoreActions, t]);
@@ -396,19 +396,19 @@ export const useDiscountCodeModule = () => {
396
396
  {
397
397
  enabled: true,
398
398
  handleOnClick: handleView,
399
- label: t("actionsButtonView"),
399
+ label: t("actionRowView"),
400
400
  order: 1,
401
401
  },
402
402
  {
403
403
  enabled: true,
404
404
  handleOnClick: handleEdit,
405
- label: t("actionsButtonEdit"),
405
+ label: t("actionRowEdit"),
406
406
  order: 2,
407
407
  },
408
408
  {
409
409
  enabled: true,
410
410
  handleOnClick: handleDelete,
411
- label: t("actionsButtonDelete"),
411
+ label: t("actionRowDelete"),
412
412
  order: 3,
413
413
  },
414
414
  ], [handleDelete, handleEdit, handleView, t]);
@@ -10,5 +10,5 @@ import { useTranslations } from "next-intl";
10
10
  */
11
11
  export const DiscountCodeFilter = () => {
12
12
  const t = useTranslations("discountCode");
13
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "text-sm text-muted-foreground", children: t("filter") }) }));
13
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "text-sm text-muted-foreground", children: t("filterText") }) }));
14
14
  };
@@ -9,5 +9,5 @@ import { useTranslations } from "next-intl";
9
9
  */
10
10
  export const DiscountCodeMoreActions = () => {
11
11
  const t = useTranslations("discountCode");
12
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "text-sm text-muted-foreground", children: t("moreActions") }) }));
12
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "text-sm text-muted-foreground", children: t("actionMoreActions") }) }));
13
13
  };
@@ -20,7 +20,7 @@ export const DiscountCodeView = () => {
20
20
  const { state } = useDiscountCodeModule();
21
21
  const t = useTranslations("discountCode");
22
22
  const { code, description, discountType, enabled } = state;
23
- return (_jsx("div", { className: "space-y-6", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { className: "flex items-center gap-2", children: t("viewTitle") }), _jsx(CardDescription, { children: t("viewDescription") })] }), _jsxs(CardContent, { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [_jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDiscountCode") }), _jsx("p", { className: "mt-1 font-mono text-lg font-semibold", children: formatValue(code) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsStatus") }), _jsx("div", { className: "mt-1", children: _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "mr-1 h-3 w-3" }), t("viewStatusEnabled")] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "mr-1 h-3 w-3" }), t("viewStatusDisabled")] })) }) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDiscountType") }), _jsx("p", { className: "mt-1 font-medium text-gray-900", children: discountType === DISCOUNT_TYPE.PERCENTAGE
23
+ return (_jsx("div", { className: "space-y-6", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { className: "flex items-center gap-2", children: t("viewSectionDiscountCode") }), _jsx(CardDescription, { children: t("viewSectionDiscountCodeDescription") })] }), _jsxs(CardContent, { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [_jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewFieldDiscountCode") }), _jsx("p", { className: "mt-1 font-mono text-lg font-semibold", children: formatValue(code) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewFieldStatus") }), _jsx("div", { className: "mt-1", children: _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "mr-1 h-3 w-3" }), t("badgeEnabled")] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "mr-1 h-3 w-3" }), t("badgeDisabled")] })) }) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewFieldDiscountType") }), _jsx("p", { className: "mt-1 font-medium text-gray-900", children: discountType === DISCOUNT_TYPE.PERCENTAGE
24
24
  ? t("formDiscountTypeOptionsPercentage")
25
- : t("formDiscountTypeOptionsFixed") })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDiscountValue") }), _jsx("p", { className: "text-primary mt-1 text-xl font-semibold" })] })] }), _jsx(Separator, {}), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDescription") }), _jsx("p", { className: "mt-1 text-gray-900", children: formatValue(description) })] })] })] }) }));
25
+ : t("formDiscountTypeOptionsFixed") })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewFieldDiscountValue") }), _jsx("p", { className: "text-primary mt-1 text-xl font-semibold" })] })] }), _jsx(Separator, {}), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewFieldDescription") }), _jsx("p", { className: "mt-1 text-gray-900", children: formatValue(description) })] })] })] }) }));
26
26
  };
@@ -19,10 +19,10 @@ export const EnrollmentFilter = () => {
19
19
  : state.filterEnabled
20
20
  ? "true"
21
21
  : "false";
22
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
23
- { label: t("all"), value: "undefined" },
24
- { label: t("enabled"), value: "true" },
25
- { label: t("disabled"), value: "false" },
22
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
23
+ { label: t("filterOptionAll"), value: "undefined" },
24
+ { label: t("filterOptionEnabled"), value: "true" },
25
+ { label: t("filterOptionDisabled"), value: "false" },
26
26
  ], onValueChange: (next) => {
27
27
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
28
28
  handleChange("filterEnabled", parsed);
@@ -25,19 +25,19 @@ import { useTranslations } from "next-intl";
25
25
  export const EnrollmentForm = () => {
26
26
  const { state: { courseId, enabled, enrollmentDate, errors, sectionId, studentProfileId, }, handleChange, } = useEnrollmentModule();
27
27
  const t = useTranslations("enrollment");
28
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.enrollmentDate, id: "enrollmentDate", info: t("enrollmentDateInfo"), label: t("enrollmentDate"), onChange: (e) => handleChange("enrollmentDate", e.target.value), placeholder: t("enrollmentDatePlaceholder"), required: true, type: "date", value: enrollmentDate
28
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.enrollmentDate, id: "enrollmentDate", info: t("formEnrollmentDateInfo"), label: t("formEnrollmentDateLabel"), onChange: (e) => handleChange("enrollmentDate", e.target.value), placeholder: t("formEnrollmentDatePlaceholder"), required: true, type: "date", value: enrollmentDate
29
29
  ? formatDate(enrollmentDate, DATE_FORMATS.YYYY_MM_DD)
30
- : "" }), _jsx(Separator, {}), _jsx(EnhancedCombobox, { emptyText: t("noStudentFound"), error: errors.studentProfileId, id: "studentProfileId", info: t("studentInfo"), label: t("student"), onValueChange: (value) => handleChange("studentProfileId", value), options: (getCachedStudentProfilesSync().items || []).map((s) => ({
30
+ : "" }), _jsx(Separator, {}), _jsx(EnhancedCombobox, { emptyText: t("formNoStudentEmpty"), error: errors.studentProfileId, id: "studentProfileId", info: t("formStudentInfo"), label: t("formStudentLabel"), onValueChange: (value) => handleChange("studentProfileId", value), options: (getCachedStudentProfilesSync().items || []).map((s) => ({
31
31
  label: s.studentCode || s.id,
32
32
  value: s.id,
33
- })), placeholder: t("studentPlaceholder"), required: true, searchPlaceholder: t("searchStudents"), value: studentProfileId || "" }), _jsx(EnhancedCombobox, { emptyText: t("noCourseFound"), error: errors.courseId, id: "courseId", info: t("courseInfo"), label: t("course"), onValueChange: (value) => handleChange("courseId", value), options: (getCachedCoursesSync().items || []).map((c) => ({
33
+ })), placeholder: t("formStudentPlaceholder"), required: true, searchPlaceholder: t("formSearchStudentsPlaceholder"), value: studentProfileId || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoCourseEmpty"), error: errors.courseId, id: "courseId", info: t("formCourseInfo"), label: t("formCourseLabel"), onValueChange: (value) => handleChange("courseId", value), options: (getCachedCoursesSync().items || []).map((c) => ({
34
34
  label: c.code || c.id,
35
35
  value: c.id,
36
- })), placeholder: t("coursePlaceholder"), required: true, searchPlaceholder: t("searchCourses"), value: courseId || "" }), _jsx(EnhancedCombobox, { emptyText: t("noSectionFound"), error: errors.sectionId, id: "sectionId", info: t("sectionInfo"), label: t("section"), onValueChange: (value) => handleChange("sectionId", value), options: (getCachedSectionsSync().items || []).map((s) => {
36
+ })), placeholder: t("formCoursePlaceholder"), required: true, searchPlaceholder: t("formSearchCoursesPlaceholder"), value: courseId || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoSectionEmpty"), error: errors.sectionId, id: "sectionId", info: t("sectionInfo"), label: t("section"), onValueChange: (value) => handleChange("sectionId", value), options: (getCachedSectionsSync().items || []).map((s) => {
37
37
  var _a;
38
38
  return ({
39
39
  label: ((_a = s.class) === null || _a === void 0 ? void 0 : _a.code) ? `${s.class.code}-${s.name}` : s.name,
40
40
  value: s.id,
41
41
  });
42
- }), placeholder: t("sectionPlaceholder"), required: true, searchPlaceholder: t("searchSections"), value: sectionId || "" }), _jsx(EnhancedCheckbox, { checked: enabled, error: errors.enabled, id: "enabled", info: t("toggleToEnableOrDisableEnrollment"), label: t("activeEnrollment"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
42
+ }), placeholder: t("sectionPlaceholder"), required: true, searchPlaceholder: t("formSearchSectionsPlaceholder"), value: sectionId || "" }), _jsx(EnhancedCheckbox, { checked: enabled, error: errors.enabled, id: "enabled", info: t("actionToggleEnableOrDisableEnrollment"), label: t("formActiveEnrollmentLabel"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
43
43
  };
@@ -37,8 +37,8 @@ export const EnrollmentView = memo(() => {
37
37
  ? `${section.class.code}-${section.name}`
38
38
  : section.name
39
39
  : (sectionId !== null && sectionId !== void 0 ? sectionId : "—");
40
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("enrollmentDetails") })] }), _jsx(CardDescription, { children: t("completeEnrollmentInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("student") }), _jsx("p", { className: "text-base", children: studentName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("course") }), _jsx("p", { className: "text-base", children: courseName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("section") }), _jsx("p", { className: "text-base", children: sectionName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("enrollmentDate") }), _jsx("p", { className: "text-base", children: enrollmentDate
40
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionEnrollmentDetails") })] }), _jsx(CardDescription, { children: t("viewSectionCompleteEnrollmentInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldStudent") }), _jsx("p", { className: "text-base", children: studentName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldCourse") }), _jsx("p", { className: "text-base", children: courseName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("section") }), _jsx("p", { className: "text-base", children: sectionName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldEnrollmentDate") }), _jsx("p", { className: "text-base", children: enrollmentDate
41
41
  ? formatDate(enrollmentDate, DATE_FORMATS.LOCALE_DATE)
42
- : "—" })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("status") })] }), _jsx(CardDescription, { children: t("enrollmentAvailability") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "grid grid-cols-1 gap-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), " ", t("statusActive")] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-3 w-3" }), " ", t("statusInactive")] })) })] }) }) })] })] }));
42
+ : "—" })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewFieldStatus") })] }), _jsx(CardDescription, { children: t("viewFieldEnrollmentAvailability") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "grid grid-cols-1 gap-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldStatus") }), _jsx(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), " ", t("viewFieldStatusActive")] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-3 w-3" }), " ", t("viewFieldStatusInactive")] })) })] }) }) })] })] }));
43
43
  });
44
44
  EnrollmentView.displayName = "EnrollmentView";
@@ -20,10 +20,10 @@ export const ExpenseFilter = () => {
20
20
  : filterEnabled
21
21
  ? "true"
22
22
  : "false";
23
- return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedCombobox, { emptyText: t("noCategoryFound"), id: "filterCategory", info: t("filterByCategory"), label: t("category"), onValueChange: (value) => handleChange("filterCategory", value), options: EXPENSE_CATEGORY_OPTIONS, placeholder: t("allCategories"), searchPlaceholder: t("searchCategories"), value: filterCategory || "" }), _jsx(EnhancedCombobox, { emptyText: t("noStatusFound"), id: "filterStatus", info: t("filterByStatus"), label: t("status"), onValueChange: (value) => handleChange("filterStatus", value), options: EXPENSE_STATUS_OPTIONS, placeholder: t("allStatuses"), searchPlaceholder: t("searchStatus"), value: filterStatus || "" }), _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
24
- { label: t("all"), value: "undefined" },
25
- { label: t("enabled"), value: "true" },
26
- { label: t("disabled"), value: "false" },
23
+ return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedCombobox, { emptyText: t("filterNoCategoryFoundLabel"), id: "filterCategory", info: t("filterByCategory"), label: t("filterCategoryLabel"), onValueChange: (value) => handleChange("filterCategory", value), options: EXPENSE_CATEGORY_OPTIONS, placeholder: t("filterAllCategoriesLabel"), searchPlaceholder: t("filterSearchCategoriesLabel"), value: filterCategory || "" }), _jsx(EnhancedCombobox, { emptyText: t("filterNoStatusFoundLabel"), id: "filterStatus", info: t("filterByStatus"), label: t("filterOptionStatus"), onValueChange: (value) => handleChange("filterStatus", value), options: EXPENSE_STATUS_OPTIONS, placeholder: t("filterAllStatusesLabel"), searchPlaceholder: t("filterSearchStatusLabel"), value: filterStatus || "" }), _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
24
+ { label: t("filterOptionAll"), value: "undefined" },
25
+ { label: t("filterOptionEnabled"), value: "true" },
26
+ { label: t("filterOptionDisabled"), value: "false" },
27
27
  ], onValueChange: (next) => {
28
28
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
29
29
  handleChange("filterEnabled", parsed);
@@ -21,11 +21,11 @@ export const ExpenseForm = () => {
21
21
  const workspace = getCachedWorkspaceSync();
22
22
  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 : "";
23
23
  const t = useTranslations("expense");
24
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.title, id: "title", info: t("titleInfo"), label: t("title"), onChange: (e) => handleChange("title", e.target.value), placeholder: t("titlePlaceholder"), required: true, type: "text", value: title || "" }), _jsx(EnhancedCombobox, { emptyText: t("noCategoryFound"), error: errors.category, id: "category", info: t("categoryInfo"), label: t("category"), onValueChange: (value) => handleChange("category", value), options: EXPENSE_CATEGORY_OPTIONS, placeholder: t("selectCategory"), required: true, searchPlaceholder: t("searchCategories"), value: category || "" }), _jsx(EnhancedCombobox, { emptyText: t("noStatusFound"), error: errors.status, id: "status", info: t("statusInfo"), label: t("status"), onValueChange: (value) => handleChange("status", value), options: EXPENSE_STATUS_OPTIONS, placeholder: t("selectStatus"), required: true, searchPlaceholder: t("searchStatus"), value: status || "" }), _jsx(EnhancedInput, { error: errors.amount, id: "amount", info: `${t("amountInfo")} ${currency}`, label: t("amount"), min: "0", onChange: (e) => handleChange("amount", Number(e.target.value)), placeholder: "0.00", required: true, step: "0.01", type: "number", value: amount }), _jsx(EnhancedInput, { error: errors.expenseDate, id: "expenseDate", info: t("expenseDateInfo"), label: t("expenseDate"), onChange: (e) => handleChange("expenseDate", e.target.value), required: true, type: "date", value: expenseDate || "" }), _jsx(EnhancedTextarea, { error: errors.description, id: "description", label: t("description"), onChange: (e) => handleChange("description", e.target.value), placeholder: t("descriptionPlaceholder"), rows: 3, value: description || "" }), _jsx(EnhancedInput, { error: errors.vendorName, id: "vendorName", info: t("vendorNameInfo"), label: t("vendorName"), onChange: (e) => handleChange("vendorName", e.target.value), placeholder: t("vendorNamePlaceholder"), type: "text", value: vendorName || "" }), _jsx(EnhancedInput, { error: errors.vendorContact, id: "vendorContact", info: t("vendorContactInfo"), label: t("vendorContact"), onChange: (e) => handleChange("vendorContact", e.target.value), placeholder: t("vendorContactPlaceholder"), type: "text", value: vendorContact || "" }), _jsx(EnhancedInput, { error: errors.invoiceNumber, id: "invoiceNumber", info: t("invoiceNumberInfo"), label: t("invoiceNumber"), onChange: (e) => handleChange("invoiceNumber", e.target.value), placeholder: t("invoiceNumberPlaceholder"), type: "text", value: invoiceNumber || "" }), _jsx(EnhancedCombobox, { emptyText: t("noPaymentMethodFound"), error: errors.paymentMethod, id: "paymentMethod", info: t("paymentMethodInfo"), label: t("paymentMethod"), onValueChange: (value) => handleChange("paymentMethod", value), options: PAYMENT_METHOD_OPTIONS, placeholder: t("paymentMethodPlaceholder"), searchPlaceholder: t("searchPaymentMethods"), value: paymentMethod || "" }), _jsx(EnhancedInput, { error: errors.paymentDate, id: "paymentDate", info: t("paymentDateInfo"), label: t("paymentDate"), onChange: (e) => handleChange("paymentDate", e.target.value), type: "date", value: paymentDate || "" }), _jsx(EnhancedInput, { error: errors.receiptNumber, id: "receiptNumber", info: t("receiptNumberInfo"), label: t("receiptNumber"), onChange: (e) => handleChange("receiptNumber", e.target.value), placeholder: t("receiptNumberPlaceholder"), type: "text", value: receiptNumber || "" }), _jsx(EnhancedInput, { error: errors.transactionId, id: "transactionId", info: t("transactionIdInfo"), label: t("transactionId"), onChange: (e) => handleChange("transactionId", e.target.value), placeholder: t("transactionIdPlaceholder"), type: "text", value: transactionId || "" }), _jsx(EnhancedTextarea, { error: errors.remarks, id: "remarks", label: t("remarks"), onChange: (e) => handleChange("remarks", e.target.value), placeholder: t("remarksPlaceholder"), rows: 3, value: remarks || "" }), _jsx(EnhancedDropzone, { accept: ["image/*", "application/pdf"], error: errors.attachments, id: "attachments", info: t("attachmentsInfo"), label: t("attachments"), maxFiles: 10, onChange: (files) => {
24
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.title, id: "title", info: t("formTitleInfo"), label: t("formTitleLabel"), onChange: (e) => handleChange("title", e.target.value), placeholder: t("formTitlePlaceholder"), required: true, type: "text", value: title || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoCategoryEmpty"), error: errors.category, id: "category", info: t("formCategoryInfo"), label: t("formCategoryLabel"), onValueChange: (value) => handleChange("category", value), options: EXPENSE_CATEGORY_OPTIONS, placeholder: t("formCategoryPlaceholder"), required: true, searchPlaceholder: t("formSearchCategoriesPlaceholder"), value: category || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoStatusEmpty"), error: errors.status, id: "status", info: t("formStatusInfo"), label: t("formOptionStatus"), onValueChange: (value) => handleChange("status", value), options: EXPENSE_STATUS_OPTIONS, placeholder: t("formStatusPlaceholder"), required: true, searchPlaceholder: t("formSearchStatusPlaceholder"), value: status || "" }), _jsx(EnhancedInput, { error: errors.amount, id: "amount", info: `${t("formAmountInfo")} ${currency}`, label: t("formAmountLabel"), min: "0", onChange: (e) => handleChange("amount", Number(e.target.value)), placeholder: "0.00", required: true, step: "0.01", type: "number", value: amount }), _jsx(EnhancedInput, { error: errors.expenseDate, id: "expenseDate", info: t("formExpenseDateInfo"), label: t("formExpenseDateLabel"), onChange: (e) => handleChange("expenseDate", e.target.value), required: true, type: "date", value: expenseDate || "" }), _jsx(EnhancedTextarea, { error: errors.description, id: "description", label: t("formDescriptionLabel"), onChange: (e) => handleChange("description", e.target.value), placeholder: t("formDescriptionPlaceholder"), rows: 3, value: description || "" }), _jsx(EnhancedInput, { error: errors.vendorName, id: "vendorName", info: t("formVendorNameInfo"), label: t("formVendorNameLabel"), onChange: (e) => handleChange("vendorName", e.target.value), placeholder: t("formVendorNamePlaceholder"), type: "text", value: vendorName || "" }), _jsx(EnhancedInput, { error: errors.vendorContact, id: "vendorContact", info: t("formVendorContactInfo"), label: t("formVendorContactLabel"), onChange: (e) => handleChange("vendorContact", e.target.value), placeholder: t("formVendorContactPlaceholder"), type: "text", value: vendorContact || "" }), _jsx(EnhancedInput, { error: errors.invoiceNumber, id: "invoiceNumber", info: t("formInvoiceNumberInfo"), label: t("formInvoiceNumberLabel"), onChange: (e) => handleChange("invoiceNumber", e.target.value), placeholder: t("formInvoiceNumberPlaceholder"), type: "text", value: invoiceNumber || "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoPaymentMethodEmpty"), error: errors.paymentMethod, id: "paymentMethod", info: t("formPaymentMethodInfo"), label: t("formPaymentMethodLabel"), onValueChange: (value) => handleChange("paymentMethod", value), options: PAYMENT_METHOD_OPTIONS, placeholder: t("formPaymentMethodPlaceholder"), searchPlaceholder: t("formSearchPaymentMethodsPlaceholder"), value: paymentMethod || "" }), _jsx(EnhancedInput, { error: errors.paymentDate, id: "paymentDate", info: t("formPaymentDateInfo"), label: t("formPaymentDateLabel"), onChange: (e) => handleChange("paymentDate", e.target.value), type: "date", value: paymentDate || "" }), _jsx(EnhancedInput, { error: errors.receiptNumber, id: "receiptNumber", info: t("formReceiptNumberInfo"), label: t("formReceiptNumberLabel"), onChange: (e) => handleChange("receiptNumber", e.target.value), placeholder: t("formReceiptNumberPlaceholder"), type: "text", value: receiptNumber || "" }), _jsx(EnhancedInput, { error: errors.transactionId, id: "transactionId", info: t("formTransactionIdInfo"), label: t("formTransactionIdLabel"), onChange: (e) => handleChange("transactionId", e.target.value), placeholder: t("formTransactionIdPlaceholder"), type: "text", value: transactionId || "" }), _jsx(EnhancedTextarea, { error: errors.remarks, id: "remarks", label: t("formRemarksLabel"), onChange: (e) => handleChange("remarks", e.target.value), placeholder: t("formRemarksPlaceholder"), rows: 3, value: remarks || "" }), _jsx(EnhancedDropzone, { accept: ["image/*", "application/pdf"], error: errors.attachments, id: "attachments", info: t("formAttachmentsInfo"), label: t("formAttachmentsLabel"), maxFiles: 10, onChange: (files) => {
25
25
  const urls = files.map((f) => URL.createObjectURL(f));
26
26
  handleChange("attachments", urls);
27
27
  }, onRemoveRemote: (url) => {
28
28
  const newList = (attachments || []).filter((a) => a !== url);
29
29
  handleChange("attachments", newList);
30
- }, value: attachments || [] }), _jsx(EnhancedCheckbox, { checked: enabled, error: errors.enabled, id: "enabled", info: t("enabledInfo"), label: t("active"), onCheckedChange: (checked) => handleChange("enabled", !!checked) })] }));
30
+ }, value: attachments || [] }), _jsx(EnhancedCheckbox, { checked: enabled, error: errors.enabled, id: "enabled", info: t("formEnabledInfo"), label: t("badgeActive"), onCheckedChange: (checked) => handleChange("enabled", !!checked) })] }));
31
31
  };
@@ -44,9 +44,9 @@ export const ExpenseView = () => {
44
44
  return "secondary";
45
45
  }
46
46
  };
47
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("expenseInformation") })] }), _jsx(CardDescription, { children: t("readOnlyExpenseInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("title") }), _jsx("p", { className: "text-base font-semibold", children: formatValue(title) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("description") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(DollarSign, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("amount") })] }), _jsxs("p", { className: "text-base font-bold", children: [currency, " ", Number(amount !== null && amount !== void 0 ? amount : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("category") }), _jsx(Badge, { variant: "outline", children: formatValue(category) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("status") }), _jsxs(Badge, { className: "gap-1", variant: getStatusVariant(), children: [getStatusIcon(), formatValue(status)] })] }), remarks && (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("remarks") }), _jsx("p", { className: "text-base", children: remarks })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("recordState") }), _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("statusActive") : t("statusInactive")] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(DollarSign, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("paymentDetails") })] }), _jsx(CardDescription, { children: t("paymentDetailsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("expenseDate") })] }), _jsx("p", { className: "text-base", children: expenseDate
47
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionExpenseInformation") })] }), _jsx(CardDescription, { children: t("viewSectionReadOnlyExpenseInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldTitle") }), _jsx("p", { className: "text-base font-semibold", children: formatValue(title) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldDescription") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(DollarSign, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldAmount") })] }), _jsxs("p", { className: "text-base font-bold", children: [currency, " ", Number(amount !== null && amount !== void 0 ? amount : 0).toFixed(2)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldCategory") }), _jsx(Badge, { variant: "outline", children: formatValue(category) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldStatus") }), _jsxs(Badge, { className: "gap-1", variant: getStatusVariant(), children: [getStatusIcon(), formatValue(status)] })] }), remarks && (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldRemarks") }), _jsx("p", { className: "text-base", children: remarks })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", 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("viewFieldStatusActive") : t("viewFieldStatusInactive")] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(DollarSign, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionPaymentDetails") })] }), _jsx(CardDescription, { children: t("viewPaymentDetailsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldExpenseDate") })] }), _jsx("p", { className: "text-base", children: expenseDate
48
48
  ? formatDate(expenseDate, DATE_FORMATS.LOCALE_DATE)
49
- : "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("paymentDate") })] }), _jsx("p", { className: "text-base", children: paymentDate
49
+ : "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldPaymentDate") })] }), _jsx("p", { className: "text-base", children: paymentDate
50
50
  ? formatDate(paymentDate, DATE_FORMATS.LOCALE_DATE)
51
- : "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("paymentMethod") }), _jsx("p", { className: "text-base", children: formatValue(paymentMethod) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("invoiceNumber") }), _jsx("p", { className: "font-mono text-base", children: formatValue(invoiceNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("receiptNumber") }), _jsx("p", { className: "font-mono text-base", children: formatValue(receiptNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("transactionId") }), _jsx("p", { className: "font-mono text-base", children: formatValue(transactionId) })] })] }) })] }), (vendorName || vendorContact) && (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("vendorInformation") })] }), _jsx(CardDescription, { children: t("vendorDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("vendorName") }), _jsx("p", { className: "text-base", children: formatValue(vendorName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("vendorContact") }), _jsx("p", { className: "text-base", children: formatValue(vendorContact) })] })] }) })] }))] }));
51
+ : "—" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldPaymentMethod") }), _jsx("p", { className: "text-base", children: formatValue(paymentMethod) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldInvoiceNumber") }), _jsx("p", { className: "font-mono text-base", children: formatValue(invoiceNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldReceiptNumber") }), _jsx("p", { className: "font-mono text-base", children: formatValue(receiptNumber) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldTransactionId") }), _jsx("p", { className: "font-mono text-base", children: formatValue(transactionId) })] })] }) })] }), (vendorName || vendorContact) && (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionVendorInformation") })] }), _jsx(CardDescription, { children: t("viewSectionVendorDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldVendorName") }), _jsx("p", { className: "text-base", children: formatValue(vendorName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("viewFieldVendorContact") }), _jsx("p", { className: "text-base", children: formatValue(vendorContact) })] })] }) })] }))] }));
52
52
  };
@@ -292,7 +292,7 @@ export const useFamilyModule = () => {
292
292
  });
293
293
  }, [dispatch, byIdFetchNow]);
294
294
  const handleDelete = useCallback((row) => {
295
- if (!confirm(t("areYouSureYouWantToDeleteThisFamily")))
295
+ if (!confirm(t("actionDeleteConfirmation")))
296
296
  return;
297
297
  deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
298
298
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
@@ -393,21 +393,21 @@ export const useFamilyModule = () => {
393
393
  {
394
394
  enabled: false,
395
395
  handleOnClick: handleMoreActions,
396
- label: t("headerActionsMoreActions"),
396
+ label: t("actionHeaderMoreActions"),
397
397
  order: 1,
398
398
  icon: MoreHorizontal,
399
399
  },
400
400
  {
401
401
  enabled: true,
402
402
  handleOnClick: handleFilters,
403
- label: t("headerActionsFilters"),
403
+ label: t("actionHeaderFilters"),
404
404
  order: 2,
405
405
  icon: Filter,
406
406
  },
407
407
  {
408
408
  enabled: false,
409
409
  handleOnClick: handleCreate,
410
- label: t("headerActionsAddFamily"),
410
+ label: t("actionHeaderAddFamily"),
411
411
  order: 3,
412
412
  icon: Plus,
413
413
  },
@@ -416,14 +416,14 @@ export const useFamilyModule = () => {
416
416
  {
417
417
  enabled: true,
418
418
  handleOnClick: handleView,
419
- label: t("rowActionsView"),
419
+ label: t("actionRowView"),
420
420
  order: 1,
421
421
  icon: Eye,
422
422
  },
423
423
  {
424
424
  enabled: true,
425
425
  handleOnClick: handleEdit,
426
- label: t("rowActionsEdit"),
426
+ label: t("actionRowEdit"),
427
427
  order: 2,
428
428
  icon: Pencil,
429
429
  },
@@ -17,10 +17,10 @@ export const FamilyFilter = () => {
17
17
  : filterEnabled
18
18
  ? "true"
19
19
  : "false";
20
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
- { label: t("all"), value: "undefined" },
22
- { label: t("enabled"), value: "true" },
23
- { label: t("disabled"), value: "false" },
20
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
+ { label: t("filterOptionAll"), value: "undefined" },
22
+ { label: t("filterOptionEnabled"), value: "true" },
23
+ { label: t("filterOptionDisabled"), value: "false" },
24
24
  ], onValueChange: (next) => {
25
25
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
26
26
  handleChange("filterEnabled", parsed);
@@ -8,5 +8,5 @@ export const FamilyForm = () => {
8
8
  const { state, handleChange } = useFamilyModule();
9
9
  const { address, city, country, enabled, errors, familyCode, postalCode, stateProvince, } = state;
10
10
  const t = useTranslations("family");
11
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { disabled: true, error: errors.familyCode, id: "familyCode", info: t("familyCodeAutoGenerated"), label: t("familyCode"), onChange: (e) => handleChange("familyCode", e.target.value), placeholder: "FAM2026001", required: true, value: familyCode }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("streetAddressPlaceholder"), label: t("streetAddress"), onChange: (e) => handleChange("address", e.target.value), placeholder: "123 Main Street", value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("cityName"), label: t("city"), onChange: (e) => handleChange("city", e.target.value), placeholder: "New York", value: city || "" }), _jsx(EnhancedInput, { error: errors.stateProvince, id: "stateProvince", info: t("stateOrProvince"), label: t("stateProvince"), onChange: (e) => handleChange("stateProvince", e.target.value), placeholder: "NY", value: stateProvince || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("countryName"), label: t("country"), onChange: (e) => handleChange("country", e.target.value), placeholder: "United States", value: country || "" }), _jsx(EnhancedInput, { error: errors.postalCode, id: "postalCode", info: t("postalOrZipCode"), label: t("postalCode"), onChange: (e) => handleChange("postalCode", e.target.value), placeholder: "10001", value: postalCode || "" }), _jsx(EnhancedCheckbox, { checked: enabled, id: "enabled", label: t("active"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
11
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { disabled: true, error: errors.familyCode, id: "familyCode", info: t("formFamilyCodeAutoGeneratedLabel"), label: t("formFamilyCodeLabel"), onChange: (e) => handleChange("familyCode", e.target.value), placeholder: "FAM2026001", required: true, value: familyCode }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("formStreetAddressPlaceholder"), label: t("formStreetAddressLabel"), onChange: (e) => handleChange("address", e.target.value), placeholder: "123 Main Street", value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("formCityNameLabel"), label: t("formCityLabel"), onChange: (e) => handleChange("city", e.target.value), placeholder: "New York", value: city || "" }), _jsx(EnhancedInput, { error: errors.stateProvince, id: "stateProvince", info: t("formStateOrProvinceLabel"), label: t("formStateProvinceLabel"), onChange: (e) => handleChange("stateProvince", e.target.value), placeholder: "NY", value: stateProvince || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("formCountryNameLabel"), label: t("formCountryLabel"), onChange: (e) => handleChange("country", e.target.value), placeholder: "United States", value: country || "" }), _jsx(EnhancedInput, { error: errors.postalCode, id: "postalCode", info: t("formPostalOrZipCodeLabel"), label: t("formPostalCodeLabel"), onChange: (e) => handleChange("postalCode", e.target.value), placeholder: "10001", value: postalCode || "" }), _jsx(EnhancedCheckbox, { checked: enabled, id: "enabled", label: t("badgeActive"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
12
12
  };
@@ -14,5 +14,5 @@ export const FamilyView = () => {
14
14
  const fullAddress = [address, city, stateProvince, country, postalCode]
15
15
  .filter(Boolean)
16
16
  .join(", ");
17
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-16 w-16 items-center justify-center rounded-full", children: _jsx(Home, { className: "text-primary h-8 w-8" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: familyCode }), enabled ? (_jsxs(Badge, { variant: "default", className: "gap-1", children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), t("active")] })) : (_jsxs(Badge, { variant: "secondary", className: "gap-1", children: [_jsx(XCircle, { className: "h-3 w-3" }), t("inactive")] }))] }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: t("familyProfile") })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MapPin, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("addressInformation") })] }), _jsx(CardDescription, { children: t("familyResidenceDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("fullAddress") }), _jsx("p", { className: "text-base", children: fullAddress || t("noAddressProvided") })] }), _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("streetAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("city") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("stateProvince") }), _jsx("p", { className: "text-base", children: formatValue(stateProvince) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("country") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("postalCode") }), _jsx("p", { className: "text-base", children: formatValue(postalCode) })] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("familyStatus") })] }), _jsx(CardDescription, { children: t("currentStatusInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "flex items-center gap-3", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("active") }), _jsx("p", { className: "text-muted-foreground text-sm", children: t("thisAccountIsCurrentlyActive") })] })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-5 w-5 text-red-500" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("inactive") }), _jsx("p", { className: "text-muted-foreground text-sm", children: t("thisAccountIsCurrentlyInactive") })] })] })) }) })] })] }));
17
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-16 w-16 items-center justify-center rounded-full", children: _jsx(Home, { className: "text-primary h-8 w-8" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: familyCode }), enabled ? (_jsxs(Badge, { variant: "default", className: "gap-1", children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), t("badgeActive")] })) : (_jsxs(Badge, { variant: "secondary", className: "gap-1", children: [_jsx(XCircle, { className: "h-3 w-3" }), t("badgeInactive")] }))] }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: t("viewFieldFamilyProfile") })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MapPin, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionAddressInformation") })] }), _jsx(CardDescription, { children: t("viewSectionFamilyResidenceDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFullAddress") }), _jsx("p", { className: "text-base", children: fullAddress || t("viewTextAddressNotProvided") })] }), _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStreetAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCity") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStateProvince") }), _jsx("p", { className: "text-base", children: formatValue(stateProvince) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCountry") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPostalCode") }), _jsx("p", { className: "text-base", children: formatValue(postalCode) })] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewFieldFamilyStatus") })] }), _jsx(CardDescription, { children: t("viewSectionCurrentStatusInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "flex items-center gap-3", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("badgeActive") }), _jsx("p", { className: "text-muted-foreground text-sm", children: t("viewFieldThisAccountIsCurrentlyActive") })] })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-5 w-5 text-red-500" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("badgeInactive") }), _jsx("p", { className: "text-muted-foreground text-sm", children: t("viewFieldThisAccountIsCurrentlyInactive") })] })] })) }) })] })] }));
18
18
  };
@@ -352,7 +352,7 @@ export const useFamilyMemberModule = () => {
352
352
  });
353
353
  }, [dispatch, byIdFetchNow]);
354
354
  const handleDelete = useCallback((row) => {
355
- if (!confirm(t("areYouSureYouWantToDeleteThisFamilyMember")))
355
+ if (!confirm(t("actionDeleteConfirmation")))
356
356
  return;
357
357
  deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
358
358
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
@@ -435,21 +435,21 @@ export const useFamilyMemberModule = () => {
435
435
  {
436
436
  enabled: false,
437
437
  handleOnClick: handleMoreActions,
438
- label: t("headerActionsMoreActions"),
438
+ label: t("actionHeaderMoreActions"),
439
439
  order: 1,
440
440
  icon: MoreHorizontal,
441
441
  },
442
442
  {
443
443
  enabled: true,
444
444
  handleOnClick: handleFilters,
445
- label: t("headerActionsFilters"),
445
+ label: t("actionHeaderFilters"),
446
446
  order: 2,
447
447
  icon: Filter,
448
448
  },
449
449
  {
450
450
  enabled: false,
451
451
  handleOnClick: handleCreate,
452
- label: t("headerActionsAddFamilyMember"),
452
+ label: t("actionHeaderAddFamilyMember"),
453
453
  order: 3,
454
454
  icon: Plus,
455
455
  },
@@ -458,14 +458,14 @@ export const useFamilyMemberModule = () => {
458
458
  {
459
459
  enabled: true,
460
460
  handleOnClick: handleView,
461
- label: t("rowActionsView"),
461
+ label: t("actionRowView"),
462
462
  order: 1,
463
463
  icon: Eye,
464
464
  },
465
465
  {
466
466
  enabled: true,
467
467
  handleOnClick: handleEdit,
468
- label: t("rowActionsEdit"),
468
+ label: t("actionRowEdit"),
469
469
  order: 2,
470
470
  icon: Pencil,
471
471
  },
@@ -17,10 +17,10 @@ export const FamilyMemberFilter = () => {
17
17
  : filterEnabled
18
18
  ? "true"
19
19
  : "false";
20
- return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("enabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
- { label: t("all"), value: "undefined" },
22
- { label: t("enabled"), value: "true" },
23
- { label: t("disabled"), value: "false" },
20
+ return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "grid grid-cols-1 gap-4", children: _jsx(EnhancedRadio, { label: t("filterOptionEnabled"), name: "filterEnabled", value: filterEnabledValue, options: [
21
+ { label: t("filterOptionAll"), value: "undefined" },
22
+ { label: t("filterOptionEnabled"), value: "true" },
23
+ { label: t("filterOptionDisabled"), value: "false" },
24
24
  ], onValueChange: (next) => {
25
25
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
26
26
  handleChange("filterEnabled", parsed);
@@ -13,5 +13,5 @@ export const FamilyMemberForm = () => {
13
13
  const { handleChange, state } = useFamilyMemberModule();
14
14
  const { bloodGroup, dateOfBirth, email, emergencyPhone, enabled, errors, firstName, gender, idNumber, isPrimary, lastName, occupation, phone, relationship, role, } = state;
15
15
  const t = useTranslations("familyMember");
16
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("personalInformation") }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("firstNameInfo"), label: t("firstName"), onChange: (e) => handleChange("firstName", e.target.value), placeholder: t("firstNamePlaceholder"), required: true, value: firstName }), _jsx(EnhancedInput, { error: errors.lastName, id: "lastName", info: t("lastNameInfo"), label: t("lastName"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("lastNamePlaceholder"), required: true, value: lastName })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.role, id: "role", info: t("roleInfo"), label: t("role"), onChange: (e) => handleChange("role", e.target.value), placeholder: t("rolePlaceholder"), required: true, value: role }), _jsx(EnhancedInput, { error: errors.dateOfBirth, id: "dateOfBirth", info: t("dateOfBirthInfo"), label: t("dateOfBirth"), onChange: (e) => handleChange("dateOfBirth", e.target.value), placeholder: "YYYY-MM-DD", type: "date", value: dateOfBirth })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.gender, id: "gender", info: t("genderInfo"), label: t("gender"), onChange: (e) => handleChange("gender", e.target.value), placeholder: t("genderPlaceholder"), value: gender }), _jsx(EnhancedInput, { error: errors.bloodGroup, id: "bloodGroup", info: t("bloodGroupInfo"), label: t("bloodGroup"), onChange: (e) => handleChange("bloodGroup", e.target.value), placeholder: t("bloodGroupPlaceholder"), value: bloodGroup })] }), _jsx(EnhancedInput, { error: errors.idNumber, id: "idNumber", info: t("idNumberInfo"), label: t("idNumber"), onChange: (e) => handleChange("idNumber", e.target.value), placeholder: t("idNumberPlaceholder"), value: idNumber })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("contactInformation") }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("phoneInfo"), label: t("phone"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("phonePlaceholder"), type: "tel", value: phone }), _jsx(EnhancedInput, { error: errors.email, id: "email", info: t("emailInfo"), label: t("email"), onChange: (e) => handleChange("email", e.target.value), placeholder: t("emailPlaceholder"), type: "email", value: email })] }), _jsx(EnhancedInput, { error: errors.emergencyPhone, id: "emergencyPhone", info: t("emergencyPhoneInfo"), label: t("emergencyPhone"), onChange: (e) => handleChange("emergencyPhone", e.target.value), placeholder: t("emergencyPhonePlaceholder"), type: "tel", value: emergencyPhone })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("additionalInformation") }), _jsx(EnhancedInput, { error: errors.relationship, id: "relationship", info: t("relationshipInfo"), label: t("relationship"), onChange: (e) => handleChange("relationship", e.target.value), placeholder: t("relationshipPlaceholder"), value: relationship }), _jsx(EnhancedInput, { error: errors.occupation, id: "occupation", info: t("occupationInfo"), label: t("occupation"), onChange: (e) => handleChange("occupation", e.target.value), placeholder: t("occupationPlaceholder"), value: occupation })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("status") }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(EnhancedCheckbox, { checked: isPrimary, id: "isPrimary", label: t("primaryContact"), onCheckedChange: (checked) => handleChange("isPrimary", checked === true) }), _jsx(EnhancedCheckbox, { checked: enabled, id: "enabled", label: t("active"), onCheckedChange: (checked) => handleChange("enabled", checked === true) })] })] })] }));
16
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("formSectionPersonalInformation") }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("formFirstNameInfo"), label: t("formFirstNameLabel"), onChange: (e) => handleChange("firstName", e.target.value), placeholder: t("formFirstNamePlaceholder"), required: true, value: firstName }), _jsx(EnhancedInput, { error: errors.lastName, id: "lastName", info: t("formLastNameInfo"), label: t("formLastNameLabel"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, value: lastName })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.role, id: "role", info: t("formRoleInfo"), label: t("formRoleLabel"), onChange: (e) => handleChange("role", e.target.value), placeholder: t("formRolePlaceholder"), required: true, value: role }), _jsx(EnhancedInput, { error: errors.dateOfBirth, id: "dateOfBirth", info: t("formDateOfBirthInfo"), label: t("formDateOfBirthLabel"), onChange: (e) => handleChange("dateOfBirth", e.target.value), placeholder: "YYYY-MM-DD", type: "date", value: dateOfBirth })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.gender, id: "gender", info: t("formGenderInfo"), label: t("formGenderLabel"), onChange: (e) => handleChange("gender", e.target.value), placeholder: t("formGenderPlaceholder"), value: gender }), _jsx(EnhancedInput, { error: errors.bloodGroup, id: "bloodGroup", info: t("formBloodGroupInfo"), label: t("formBloodGroupLabel"), onChange: (e) => handleChange("bloodGroup", e.target.value), placeholder: t("formBloodGroupPlaceholder"), value: bloodGroup })] }), _jsx(EnhancedInput, { error: errors.idNumber, id: "idNumber", info: t("formIdNumberInfo"), label: t("formIdNumberLabel"), onChange: (e) => handleChange("idNumber", e.target.value), placeholder: t("formIdNumberPlaceholder"), value: idNumber })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("formSectionContactInformation") }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("formPhoneInfo"), label: t("formPhoneLabel"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("formPhonePlaceholder"), type: "tel", value: phone }), _jsx(EnhancedInput, { error: errors.email, id: "email", info: t("formEmailInfo"), label: t("formEmailLabel"), onChange: (e) => handleChange("email", e.target.value), placeholder: t("formEmailPlaceholder"), type: "email", value: email })] }), _jsx(EnhancedInput, { error: errors.emergencyPhone, id: "emergencyPhone", info: t("formEmergencyPhoneInfo"), label: t("formEmergencyPhoneLabel"), onChange: (e) => handleChange("emergencyPhone", e.target.value), placeholder: t("formEmergencyPhonePlaceholder"), type: "tel", value: emergencyPhone })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("formSectionAdditionalInformation") }), _jsx(EnhancedInput, { error: errors.relationship, id: "relationship", info: t("formRelationshipInfo"), label: t("formRelationshipLabel"), onChange: (e) => handleChange("relationship", e.target.value), placeholder: t("formRelationshipPlaceholder"), value: relationship }), _jsx(EnhancedInput, { error: errors.occupation, id: "occupation", info: t("formOccupationInfo"), label: t("formOccupationLabel"), onChange: (e) => handleChange("occupation", e.target.value), placeholder: t("formOccupationPlaceholder"), value: occupation })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("formOptionStatus") }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(EnhancedCheckbox, { checked: isPrimary, id: "isPrimary", label: t("formPrimaryContactLabel"), onCheckedChange: (checked) => handleChange("isPrimary", checked === true) }), _jsx(EnhancedCheckbox, { checked: enabled, id: "enabled", label: t("badgeActive"), onCheckedChange: (checked) => handleChange("enabled", checked === true) })] })] })] }));
17
17
  };
@@ -19,7 +19,7 @@ export const FamilyMemberView = () => {
19
19
  const { state } = useFamilyMemberModule();
20
20
  const { avatar, bloodGroup, dateOfBirth, email, emergencyPhone, enabled, firstName, gender, idNumber, isPrimary, lastName, occupation, phone, relationship, role, } = state;
21
21
  const t = useTranslations("familyMember");
22
- const fullName = [firstName, lastName].filter(Boolean).join(" ") || t("familyMember");
22
+ const fullName = [firstName, lastName].filter(Boolean).join(" ") || t("viewFieldFamilyMember");
23
23
  const initials = `${(firstName === null || firstName === void 0 ? void 0 : firstName[0]) || ""}${(lastName === null || lastName === void 0 ? void 0 : lastName[0]) || ""}`
24
24
  .toUpperCase()
25
25
  .slice(0, 2);
@@ -33,10 +33,10 @@ export const FamilyMemberView = () => {
33
33
  return "—";
34
34
  return formatDate(new Date(value).toISOString(), DATE_FORMATS.LOCALE_DATE);
35
35
  };
36
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsxs(Avatar, { className: "h-24 w-24", children: [_jsx(AvatarImage, { src: avatar || undefined, alt: fullName }), _jsx(AvatarFallback, { className: "text-2xl", children: initials || "FM" })] }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: fullName }), enabled ? (_jsxs(Badge, { variant: "default", className: "gap-1", children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), t("active")] })) : (_jsxs(Badge, { variant: "secondary", className: "gap-1", children: [_jsx(XCircle, { className: "h-3 w-3" }), t("inactive")] })), isPrimary && (_jsxs(Badge, { variant: "outline", className: "gap-1", children: [_jsx(ShieldCheck, { className: "h-3 w-3" }), t("primaryContact")] }))] }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: t("familyMemberProfile") }), _jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [role ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(role) })) : null, relationship ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(relationship) })) : null, gender ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(gender) })) : null] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("personalInformation") })] }), _jsx(CardDescription, { children: t("basicIdentityAndProfileDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("firstName") }), _jsx("p", { className: "text-base", children: formatValue(firstName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("lastName") }), _jsx("p", { className: "text-base", children: formatValue(lastName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("role") }), role ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(role) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _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("dateOfBirth") })] }), _jsx("p", { className: "text-base", children: formatDateValue(dateOfBirth) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("gender") }), gender ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(gender) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Heart, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("bloodGroup") })] }), _jsx("p", { className: "text-base", children: formatValue(bloodGroup) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("idNumber") }), _jsx("p", { className: "text-base", children: formatValue(idNumber) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("contactInformation") })] }), _jsx(CardDescription, { children: t("reachabilityAndEmergencyContactDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("phone") })] }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(phone) || formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Mail, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("email") })] }), _jsx("p", { className: "text-base", children: formatValue(email) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("emergencyPhone") })] }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(emergencyPhone) ||
37
- formatValue(emergencyPhone) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("familyRole") })] }), _jsx(CardDescription, { children: t("relationshipAndHouseholdResponsibilities") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("relationship") }), relationship ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(relationship) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Briefcase, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("occupation") })] }), _jsx("p", { className: "text-base", children: formatValue(occupation) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(ShieldCheck, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("status") })] }), _jsx(CardDescription, { children: t("primaryContactAndAccountActivity") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx(ShieldCheck, { className: "text-primary mt-0.5 h-5 w-5" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: isPrimary ? t("primaryContact") : t("secondaryContact") }), _jsx("p", { className: "text-muted-foreground text-sm", children: isPrimary
38
- ? t("thisIsPrimaryFamilyContact")
39
- : t("thisIsAdditionalFamilyContact") })] })] }), _jsxs("div", { className: "flex items-start gap-3", children: [enabled ? (_jsx(CheckCircle2, { className: "mt-0.5 h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "mt-0.5 h-5 w-5 text-red-500" })), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: enabled ? t("active") : t("inactive") }), _jsx("p", { className: "text-muted-foreground text-sm", children: enabled
40
- ? t("thisAccountIsCurrentlyActive")
41
- : t("thisAccountIsCurrentlyInactive") })] })] })] }) })] })] }));
36
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsxs(Avatar, { className: "h-24 w-24", children: [_jsx(AvatarImage, { src: avatar || undefined, alt: fullName }), _jsx(AvatarFallback, { className: "text-2xl", children: initials || "FM" })] }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: fullName }), enabled ? (_jsxs(Badge, { variant: "default", className: "gap-1", children: [_jsx(CheckCircle2, { className: "h-3 w-3" }), t("badgeActive")] })) : (_jsxs(Badge, { variant: "secondary", className: "gap-1", children: [_jsx(XCircle, { className: "h-3 w-3" }), t("badgeInactive")] })), isPrimary && (_jsxs(Badge, { variant: "outline", className: "gap-1", children: [_jsx(ShieldCheck, { className: "h-3 w-3" }), t("viewFieldPrimaryContact")] }))] }), _jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: t("viewFieldFamilyMemberProfile") }), _jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [role ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(role) })) : null, relationship ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(relationship) })) : null, gender ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(gender) })) : null] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionPersonalInformation") })] }), _jsx(CardDescription, { children: t("viewSectionBasicIdentityAndProfileDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFirstName") }), _jsx("p", { className: "text-base", children: formatValue(firstName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldLastName") }), _jsx("p", { className: "text-base", children: formatValue(lastName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRole") }), role ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(role) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _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("viewFieldDateOfBirth") })] }), _jsx("p", { className: "text-base", children: formatDateValue(dateOfBirth) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldGender") }), gender ? (_jsx(Badge, { variant: "outline", className: "capitalize", children: formatEnumValue(gender) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Heart, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldBloodGroup") })] }), _jsx("p", { className: "text-base", children: formatValue(bloodGroup) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldIdNumber") }), _jsx("p", { className: "text-base", children: formatValue(idNumber) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionContactInformation") })] }), _jsx(CardDescription, { children: t("viewSectionReachabilityAndEmergencyContactDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPhone") })] }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(phone) || formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Mail, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEmail") })] }), _jsx("p", { className: "text-base", children: formatValue(email) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldEmergencyPhone") })] }), _jsx("p", { className: "text-base", children: formatPhoneDisplay(emergencyPhone) ||
37
+ formatValue(emergencyPhone) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewFieldFamilyRole") })] }), _jsx(CardDescription, { children: t("viewFieldRelationshipAndHouseholdResponsibilities") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRelationship") }), relationship ? (_jsx(Badge, { variant: "secondary", className: "capitalize", children: formatEnumValue(relationship) })) : (_jsx("p", { className: "text-base", children: "\u2014" }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Briefcase, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldOccupation") })] }), _jsx("p", { className: "text-base", children: formatValue(occupation) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(ShieldCheck, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewFieldStatus") })] }), _jsx(CardDescription, { children: t("viewFieldPrimaryContactAndAccountActivity") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx(ShieldCheck, { className: "text-primary mt-0.5 h-5 w-5" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: isPrimary ? t("viewFieldPrimaryContact") : t("viewFieldSecondaryContact") }), _jsx("p", { className: "text-muted-foreground text-sm", children: isPrimary
38
+ ? t("viewFieldThisIsPrimaryFamilyContact")
39
+ : t("viewFieldThisIsAdditionalFamilyContact") })] })] }), _jsxs("div", { className: "flex items-start gap-3", children: [enabled ? (_jsx(CheckCircle2, { className: "mt-0.5 h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "mt-0.5 h-5 w-5 text-red-500" })), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: enabled ? t("badgeActive") : t("badgeInactive") }), _jsx("p", { className: "text-muted-foreground text-sm", children: enabled
40
+ ? t("viewFieldThisAccountIsCurrentlyActive")
41
+ : t("viewFieldThisAccountIsCurrentlyInactive") })] })] })] }) })] })] }));
42
42
  };