@appcorp/fusion-storybook 0.1.93 → 0.1.94

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 (69) 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/filter.js +4 -4
  37. package/base-modules/fee-structure/form.js +4 -4
  38. package/base-modules/fee-structure/view.js +1 -1
  39. package/base-modules/school/context.js +1 -1
  40. package/base-modules/school/view.js +4 -4
  41. package/base-modules/section/context.js +7 -7
  42. package/base-modules/section/filter.js +4 -4
  43. package/base-modules/section/form.js +2 -2
  44. package/base-modules/section/view.js +1 -1
  45. package/base-modules/student-fee/filter.js +4 -4
  46. package/base-modules/student-fee/form.js +3 -3
  47. package/base-modules/student-fee/view.js +2 -2
  48. package/base-modules/student-profile/context.js +9 -9
  49. package/base-modules/student-profile/filter.js +4 -4
  50. package/base-modules/student-profile/form.js +3 -3
  51. package/base-modules/student-profile/view.js +3 -3
  52. package/base-modules/subject/context.js +6 -6
  53. package/base-modules/subject/filter.js +4 -4
  54. package/base-modules/subject/form.js +1 -1
  55. package/base-modules/subject/view.js +1 -1
  56. package/base-modules/teacher/context.js +8 -8
  57. package/base-modules/teacher/filter.js +4 -4
  58. package/base-modules/teacher/form.js +3 -3
  59. package/base-modules/teacher/page.d.ts +0 -1
  60. package/base-modules/teacher/page.js +1 -3
  61. package/base-modules/teacher/view.js +3 -3
  62. package/base-modules/workspace/form.js +1 -1
  63. package/base-modules/workspace/view.js +5 -5
  64. package/base-modules/workspace-user/context.js +6 -4
  65. package/base-modules/workspace-user/filter.js +4 -4
  66. package/base-modules/workspace-user/form.js +1 -1
  67. package/base-modules/workspace-user/view.js +1 -1
  68. package/package.json +1 -1
  69. package/tsconfig.build.tsbuildinfo +1 -1
@@ -291,7 +291,7 @@ export const useTeacherModule = () => {
291
291
  });
292
292
  }, [byIdFetchNow, dispatch]);
293
293
  const handleDelete = useCallback((row) => {
294
- if (!confirm(t("areYouSureYouWantToDeleteThisTeacher")))
294
+ if (!confirm(t("actionDeleteConfirmation")))
295
295
  return;
296
296
  deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
297
297
  body: JSON.stringify({ id: row === null || row === void 0 ? void 0 : row.id }),
@@ -408,19 +408,19 @@ export const useTeacherModule = () => {
408
408
  {
409
409
  enabled: false,
410
410
  handleOnClick: handleMoreActions,
411
- label: t("headerActionsMoreActions"),
411
+ label: t("actionHeaderMoreActions"),
412
412
  order: 0,
413
413
  },
414
414
  {
415
415
  enabled: true,
416
416
  handleOnClick: handleFilters,
417
- label: t("headerActionsFilters"),
417
+ label: t("actionHeaderFilters"),
418
418
  order: 1,
419
419
  },
420
420
  {
421
421
  enabled: true,
422
422
  handleOnClick: handleCreate,
423
- label: t("headerActionsAdd"),
423
+ label: t("actionHeaderAdd"),
424
424
  order: 2,
425
425
  },
426
426
  ], [handleCreate, handleFilters, handleMoreActions, t]);
@@ -428,26 +428,26 @@ export const useTeacherModule = () => {
428
428
  {
429
429
  enabled: true,
430
430
  handleOnClick: handleView,
431
- label: t("rowActionsView"),
431
+ label: t("actionRowView"),
432
432
  order: 1,
433
433
  },
434
434
  {
435
435
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === true,
436
436
  handleOnClick: handleEdit,
437
- label: t("rowActionsEdit"),
437
+ label: t("actionRowEdit"),
438
438
  order: 2,
439
439
  },
440
440
  {
441
441
  enabled: (row) => (row === null || row === void 0 ? void 0 : row.enabled) === false,
442
442
  handleOnClick: handleDelete,
443
- label: t("rowActionsDelete"),
443
+ label: t("actionRowDelete"),
444
444
  order: 3,
445
445
  variant: "destructive",
446
446
  },
447
447
  {
448
448
  enabled: false,
449
449
  handleOnClick: toggleStatus,
450
- label: t("rowActionsToggleStatus"),
450
+ label: t("actionRowToggleStatus"),
451
451
  order: 4,
452
452
  },
453
453
  ], [handleDelete, handleEdit, handleView, t, toggleStatus]);
@@ -18,10 +18,10 @@ export const TeacherFilter = () => {
18
18
  : filterEnabled
19
19
  ? "true"
20
20
  : "false";
21
- 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: [
22
- { label: t("all"), value: "undefined" },
23
- { label: t("enabled"), value: "true" },
24
- { label: t("disabled"), value: "false" },
21
+ 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: [
22
+ { label: t("filterOptionAll"), value: "undefined" },
23
+ { label: t("filterOptionEnabled"), value: "true" },
24
+ { label: t("filterOptionDisabled"), value: "false" },
25
25
  ], onValueChange: (next) => {
26
26
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
27
27
  handleChange("filterEnabled", parsed);
@@ -18,13 +18,13 @@ export const TeacherForm = () => {
18
18
  const stateValue = context.state.state;
19
19
  const { handleChange } = context;
20
20
  const users = getCachedUsersSync();
21
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.teacherCode, id: "teacherCode", info: t("uniqueTeacherIdentifier"), label: t("teacherCode"), onChange: (e) => handleChange("teacherCode", e.target.value), placeholder: t("teacherCodePlaceholder"), required: true, value: teacherCode }), _jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("teachersFirstName"), 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("teachersLastName"), label: t("lastName"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("lastNamePlaceholder"), required: true, value: lastName }), _jsx(EnhancedInput, { error: errors.joiningDate, id: "joiningDate", info: t("dateTeacherJoinedTheSchool"), label: t("joiningDate"), onChange: (e) => handleChange("joiningDate", e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, required: true, type: "date", value: joiningDate ? new Date(joiningDate).toISOString().split("T")[0] : "" }), _jsx(EnhancedCombobox, { emptyText: t("noTeacherUsersFound"), error: errors.userId, id: "userId", info: t("linkedSystemUser"), label: t("selectTeacherUser"), onValueChange: (value) => handleChange("userId", value || null), options: (_a = users.items) === null || _a === void 0 ? void 0 : _a.filter(({ workspaces }) => workspaces === null || workspaces === void 0 ? void 0 : workspaces.filter(({ role }) => (role === null || role === void 0 ? void 0 : role.userRole) === USER_ROLE.TEACHER).length).map((u) => ({
21
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(EnhancedInput, { error: errors.teacherCode, id: "teacherCode", info: t("formUniqueTeacherIdentifierLabel"), label: t("formTeacherCodeLabel"), onChange: (e) => handleChange("teacherCode", e.target.value), placeholder: t("formTeacherCodePlaceholder"), required: true, value: teacherCode }), _jsx(EnhancedInput, { error: errors.firstName, id: "firstName", info: t("formTeachersFirstNameLabel"), 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("formTeachersLastNameLabel"), label: t("formLastNameLabel"), onChange: (e) => handleChange("lastName", e.target.value), placeholder: t("formLastNamePlaceholder"), required: true, value: lastName }), _jsx(EnhancedInput, { error: errors.joiningDate, id: "joiningDate", info: t("formDateTeacherJoinedTheSchoolLabel"), label: t("formJoiningDateLabel"), onChange: (e) => handleChange("joiningDate", e.target.value), onClick: (e) => { var _a, _b; return (_b = (_a = e.currentTarget).showPicker) === null || _b === void 0 ? void 0 : _b.call(_a); }, required: true, type: "date", value: joiningDate ? new Date(joiningDate).toISOString().split("formTLabel")[0] : "" }), _jsx(EnhancedCombobox, { emptyText: t("formNoTeacherUsersEmpty"), error: errors.userId, id: "userId", info: t("formLinkedSystemUserLabel"), label: t("formTeacherUserPlaceholder"), onValueChange: (value) => handleChange("userId", value || null), options: (_a = users.items) === null || _a === void 0 ? void 0 : _a.filter(({ workspaces }) => workspaces === null || workspaces === void 0 ? void 0 : workspaces.filter(({ role }) => (role === null || role === void 0 ? void 0 : role.userRole) === USER_ROLE.TEACHER).length).map((u) => ({
22
22
  label: (u === null || u === void 0 ? void 0 : u.name) || (u === null || u === void 0 ? void 0 : u.email) || u.id,
23
23
  value: u.id,
24
- })), placeholder: t("selectLinkedUserPlaceholder"), searchPlaceholder: t("searchUsersPlaceholder"), value: userId || "" }), _jsx(EnhancedCombobox, { error: errors.gender, id: "gender", info: t("selectTeachersGender"), label: t("gender"), onValueChange: (value) => handleChange("gender", value || null), options: GENDER_OPTIONS.slice(1), value: gender || "" }), _jsx(EnhancedInput, { error: errors.dateOfBirth, id: "dateOfBirth", info: t("teachersDateOfBirth"), label: t("dateOfBirth"), onChange: (e) => handleChange("dateOfBirth", 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: dateOfBirth ? new Date(dateOfBirth).toISOString().split("T")[0] : "" }), _jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("teachersPhoneNumber"), label: t("phone"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("phonePlaceholder"), type: "tel", value: phone || "" }), _jsx(EnhancedInput, { error: errors.emergencyPhone, id: "emergencyPhone", info: t("emergencyContactNumber"), label: t("emergencyPhone"), onChange: (e) => handleChange("emergencyPhone", e.target.value), placeholder: t("emergencyPhonePlaceholder"), type: "tel", value: emergencyPhone || "" }), _jsx(EnhancedInput, { error: errors.qualification, id: "qualification", info: t("teachersEducationalQualification"), label: t("qualification"), onChange: (e) => handleChange("qualification", e.target.value), placeholder: t("qualificationPlaceholder"), value: qualification || "" }), _jsx(EnhancedInput, { error: errors.specialization, id: "specialization", info: t("teachersAreaOfSpecialization"), label: t("specialization"), onChange: (e) => handleChange("specialization", e.target.value), placeholder: t("specializationPlaceholder"), value: specialization || "" }), _jsx(EnhancedInput, { error: errors.experience, id: "experience", info: t("yearsOfTeachingExperience"), label: t("experience"), onChange: (e) => handleChange("experience", parseInt(e.target.value) || null), placeholder: t("experiencePlaceholder"), type: "number", value: (experience === null || experience === void 0 ? void 0 : experience.toString()) || "" }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("streetAddress"), label: t("address"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("addressPlaceholder"), value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("cityName"), label: t("city"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("cityPlaceholder"), value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("stateOrProvince"), label: t("stateProvince"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("statePlaceholder"), value: stateValue || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("countryName"), label: t("country"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("countryPlaceholder"), value: country || "" }), _jsx(EnhancedInput, { error: errors.postalCode, id: "postalCode", info: t("postalOrZipCode"), label: t("postalCode"), onChange: (e) => handleChange("postalCode", e.target.value), placeholder: t("postalCodePlaceholder"), value: postalCode || "" }), _jsx(EnhancedDropzone, { accept: ["image/*"], error: errors.avatar, id: "avatar", info: t("uploadTeachersPhoto"), label: t("avatar"), maxFiles: 1, maxSize: 1 * 1024 * 1024, onChange: (files) => {
24
+ })), placeholder: t("formSelectLinkedUserPlaceholder"), searchPlaceholder: t("formSearchUsersPlaceholder"), value: userId || "" }), _jsx(EnhancedCombobox, { error: errors.gender, id: "gender", info: t("formTeachersGenderPlaceholder"), label: t("formGenderLabel"), onValueChange: (value) => handleChange("gender", value || null), options: GENDER_OPTIONS.slice(1), value: gender || "" }), _jsx(EnhancedInput, { error: errors.dateOfBirth, id: "dateOfBirth", info: t("formTeachersDateOfBirthLabel"), label: t("formDateOfBirthLabel"), onChange: (e) => handleChange("dateOfBirth", 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: dateOfBirth ? new Date(dateOfBirth).toISOString().split("formTLabel")[0] : "" }), _jsx(EnhancedInput, { error: errors.phone, id: "phone", info: t("formTeachersPhoneNumberLabel"), label: t("formPhoneLabel"), onChange: (e) => handleChange("phone", e.target.value), placeholder: t("formPhonePlaceholder"), type: "tel", value: phone || "" }), _jsx(EnhancedInput, { error: errors.emergencyPhone, id: "emergencyPhone", info: t("formEmergencyContactNumberLabel"), label: t("formEmergencyPhoneLabel"), onChange: (e) => handleChange("emergencyPhone", e.target.value), placeholder: t("formEmergencyPhonePlaceholder"), type: "tel", value: emergencyPhone || "" }), _jsx(EnhancedInput, { error: errors.qualification, id: "qualification", info: t("formTeachersEducationalQualificationLabel"), label: t("formQualificationLabel"), onChange: (e) => handleChange("qualification", e.target.value), placeholder: t("formQualificationPlaceholder"), value: qualification || "" }), _jsx(EnhancedInput, { error: errors.specialization, id: "specialization", info: t("formTeachersAreaOfSpecializationLabel"), label: t("formSpecializationLabel"), onChange: (e) => handleChange("specialization", e.target.value), placeholder: t("formSpecializationPlaceholder"), value: specialization || "" }), _jsx(EnhancedInput, { error: errors.experience, id: "experience", info: t("formYearsOfTeachingExperienceLabel"), label: t("formExperienceLabel"), onChange: (e) => handleChange("experience", parseInt(e.target.value) || null), placeholder: t("formExperiencePlaceholder"), type: "number", value: (experience === null || experience === void 0 ? void 0 : experience.toString()) || "" }), _jsx(EnhancedInput, { error: errors.address, id: "address", info: t("formStreetAddressLabel"), label: t("formAddressLabel"), onChange: (e) => handleChange("address", e.target.value), placeholder: t("formAddressPlaceholder"), value: address || "" }), _jsx(EnhancedInput, { error: errors.city, id: "city", info: t("formCityNameLabel"), label: t("formCityLabel"), onChange: (e) => handleChange("city", e.target.value), placeholder: t("formCityPlaceholder"), value: city || "" }), _jsx(EnhancedInput, { error: errors.state, id: "state", info: t("formStateOrProvinceLabel"), label: t("formStateProvinceLabel"), onChange: (e) => handleChange("state", e.target.value), placeholder: t("formStatePlaceholder"), value: stateValue || "" }), _jsx(EnhancedInput, { error: errors.country, id: "country", info: t("formCountryNameLabel"), label: t("formCountryLabel"), onChange: (e) => handleChange("country", e.target.value), placeholder: t("formCountryPlaceholder"), value: country || "" }), _jsx(EnhancedInput, { error: errors.postalCode, id: "postalCode", info: t("formPostalOrZipCodeLabel"), label: t("formPostalCodeLabel"), onChange: (e) => handleChange("postalCode", e.target.value), placeholder: t("formPostalCodePlaceholder"), value: postalCode || "" }), _jsx(EnhancedDropzone, { accept: ["image/*"], error: errors.avatar, id: "avatar", info: t("formUploadTeachersPhoto"), label: t("formAvatarLabel"), maxFiles: 1, maxSize: 1 * 1024 * 1024, onChange: (files) => {
25
25
  if (files.length > 0) {
26
26
  const fileUrl = URL.createObjectURL(files[0]);
27
27
  handleChange("avatar", fileUrl);
28
28
  }
29
- }, onRemoveRemote: () => handleChange("avatar", null), value: avatar ? [avatar] : [] }), _jsx(EnhancedTextarea, { error: errors.bio, id: "bio", info: t("briefBiographyOrDescription"), label: t("bio"), onChange: (e) => handleChange("bio", e.target.value), placeholder: t("bioPlaceholder"), rows: 4, value: bio || "" }), _jsx(EnhancedCheckbox, { checked: enabled, info: t("toggleToActivateOrDeactivateTeacher"), label: t("activeTeacher"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
29
+ }, onRemoveRemote: () => handleChange("avatar", null), value: avatar ? [avatar] : [] }), _jsx(EnhancedTextarea, { error: errors.bio, id: "bio", info: t("formBriefBiographyOrDescriptionLabel"), label: t("formBioLabel"), onChange: (e) => handleChange("bio", e.target.value), placeholder: t("formBioPlaceholder"), rows: 4, value: bio || "" }), _jsx(EnhancedCheckbox, { checked: enabled, info: t("actionToggleActivateOrDeactivateTeacher"), label: t("formActiveTeacherLabel"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
30
30
  };
@@ -21,7 +21,6 @@ interface Props {
21
21
  cancelLabel: string;
22
22
  drawerTitle: string;
23
23
  labelActions: string;
24
- labelEmail: string;
25
24
  labelEnabled: string;
26
25
  labelId: string;
27
26
  labelName: string;
@@ -55,7 +55,7 @@ const createComponentInstances = () => ({
55
55
  moreActions: _jsx(TeacherMoreActions, {}),
56
56
  view: _jsx(TeacherView, {}),
57
57
  });
58
- const createTeacherConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelEmail, labelEnabled, labelId, labelName, labelPhone, labelSpecialization, labelTeacherCode, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
58
+ const createTeacherConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelEnabled, labelId, labelName, labelPhone, labelSpecialization, labelTeacherCode, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
59
59
  const components = createComponentInstances();
60
60
  return {
61
61
  moduleName: "teacher",
@@ -94,7 +94,6 @@ const TeacherPageInner = (props) => {
94
94
  cancelLabel: props.cancelLabel,
95
95
  drawerTitle: props.drawerTitle,
96
96
  labelActions: props.labelActions,
97
- labelEmail: props.labelEmail,
98
97
  labelEnabled: props.labelEnabled,
99
98
  labelId: props.labelId,
100
99
  labelName: props.labelName,
@@ -110,7 +109,6 @@ const TeacherPageInner = (props) => {
110
109
  props.cancelLabel,
111
110
  props.drawerTitle,
112
111
  props.labelActions,
113
- props.labelEmail,
114
112
  props.labelEnabled,
115
113
  props.labelId,
116
114
  props.labelName,
@@ -22,8 +22,8 @@ export const TeacherView = () => {
22
22
  const last = (lastName === null || lastName === void 0 ? void 0 : lastName.charAt(0)) || "";
23
23
  return (first + last).toUpperCase() || "T";
24
24
  };
25
- 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(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("basicInformation") })] }), _jsx(CardDescription, { children: t("teachersPersonalDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("profilePicture") }), _jsxs(Avatar, { className: "h-20 w-20", children: [_jsx(AvatarImage, { src: avatar || undefined, alt: fullName }), _jsx(AvatarFallback, { className: "text-lg", children: getInitials() })] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("teacherCode") }), _jsx("p", { className: "font-mono text-base", children: formatValue(teacherCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("name") }), _jsx("p", { className: "text-base", children: fullName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("gender") }), _jsx("p", { className: "text-base", children: formatValue(gender) })] }), _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("status") }), _jsx("div", { className: "flex items-center gap-2", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-4 w-4 text-green-600" }), _jsx(Badge, { variant: "default", children: t("active") })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-4 w-4 text-red-600" }), _jsx(Badge, { variant: "destructive", children: t("inactive") })] })) })] })] }) })] }), _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("howToReachTheTeacher") })] }), _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(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(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) ||
26
- formatValue(emergencyPhone) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("professionalInformation") })] }), _jsx(CardDescription, { children: t("teachingCredentialsAndExperience") })] }), _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-muted-foreground text-sm font-medium", children: t("qualification") }), _jsx("p", { className: "text-base", children: formatValue(qualification) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("specialization") }), _jsx("p", { className: "text-base", children: formatValue(specialization) })] }), _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("experience") })] }), _jsx("p", { className: "text-base", children: experience
25
+ 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(User, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionBasicInformation") })] }), _jsx(CardDescription, { children: t("viewSectionTeachersPersonalDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldProfilePicture") }), _jsxs(Avatar, { className: "h-20 w-20", children: [_jsx(AvatarImage, { src: avatar || undefined, alt: fullName }), _jsx(AvatarFallback, { className: "text-lg", children: getInitials() })] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldTeacherCode") }), _jsx("p", { className: "font-mono text-base", children: formatValue(teacherCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldName") }), _jsx("p", { className: "text-base", children: fullName })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldGender") }), _jsx("p", { className: "text-base", children: formatValue(gender) })] }), _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("viewFieldStatus") }), _jsx("div", { className: "flex items-center gap-2", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-4 w-4 text-green-600" }), _jsx(Badge, { variant: "default", children: t("badgeActive") })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-4 w-4 text-red-600" }), _jsx(Badge, { variant: "destructive", children: t("badgeInactive") })] })) })] })] }) })] }), _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("viewFieldHowToReachTheTeacher") })] }), _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(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(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) ||
26
+ formatValue(emergencyPhone) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionProfessionalInformation") })] }), _jsx(CardDescription, { children: t("viewFieldTeachingCredentialsAndExperience") })] }), _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-muted-foreground text-sm font-medium", children: t("viewFieldQualification") }), _jsx("p", { className: "text-base", children: formatValue(qualification) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldSpecialization") }), _jsx("p", { className: "text-base", children: formatValue(specialization) })] }), _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("viewFieldExperience") })] }), _jsx("p", { className: "text-base", children: experience
27
27
  ? t("experienceYears", { years: experience })
28
- : "\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("joiningDate") })] }), _jsx("p", { className: "text-base", children: formatDateValue(joiningDate) })] })] }) })] }), _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("teachersResidentialAddress") })] }), _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-muted-foreground text-sm font-medium", children: t("address") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_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(stateValue) })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_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) })] })] })] }) })] }), bio && (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsx(CardTitle, { className: "text-lg", children: t("biography") }), _jsx(CardDescription, { children: t("aboutTheTeacher") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("p", { className: "text-base", children: bio }) })] }))] }));
28
+ : "\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("viewFieldJoiningDate") })] }), _jsx("p", { className: "text-base", children: formatDateValue(joiningDate) })] })] }) })] }), _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("viewFieldTeachersResidentialAddress") })] }), _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-muted-foreground text-sm font-medium", children: t("viewFieldAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_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(stateValue) })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_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) })] })] })] }) })] }), bio && (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsx(CardTitle, { className: "text-lg", children: t("viewFieldBiography") }), _jsx(CardDescription, { children: t("viewFieldAboutTheTeacher") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("p", { className: "text-base", children: bio }) })] }))] }));
29
29
  };
@@ -36,5 +36,5 @@ export const WorkspaceForm = () => {
36
36
  .map((plan) => ({
37
37
  label: plan.name,
38
38
  value: plan.id,
39
- })), error: state.errors.planId, placeholder: t("formPlanPlaceholder"), info: t("formPlanInfo") }), _jsxs("div", { className: "mt-6 border-t pt-6", children: [_jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx(Shield, { className: "text-primary h-5 w-5" }), _jsx("h3", { className: "text-lg font-semibold", children: t("secretsTitle") })] }), _jsx("p", { className: "text-muted-foreground mb-4 text-sm", children: t("secretsDescription") }), _jsx(SecretsEditor, { secrets: secrets, errors: state.errors, onChange: handleSecretChange, secretPlaceholder: t("formSecretPlaceholder") })] })] }));
39
+ })), error: state.errors.planId, placeholder: t("formPlanPlaceholder"), info: t("formPlanInfo") }), _jsxs("div", { className: "mt-6 border-t pt-6", children: [_jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx(Shield, { className: "text-primary h-5 w-5" }), _jsx("h3", { className: "text-lg font-semibold", children: t("formSecretsTitleLabel") })] }), _jsx("p", { className: "text-muted-foreground mb-4 text-sm", children: t("formSecretsDescriptionLabel") }), _jsx(SecretsEditor, { secrets: secrets, errors: state.errors, onChange: handleSecretChange, secretPlaceholder: t("formSecretPlaceholder") })] })] }));
40
40
  };
@@ -40,14 +40,14 @@ export const WorkspaceView = () => {
40
40
  return `${mb} MB`;
41
41
  return `${(mb / 1024).toFixed(1)} GB`;
42
42
  };
43
- return (_jsxs("div", { className: "space-y-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("basicInfoTitle") })] }), _jsx(CardDescription, { children: t("basicInfoDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-2 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsName") })] }), _jsx("p", { className: "text-base", children: formatValue(state.name) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Globe, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsSubdomain") })] }), _jsx("p", { className: "text-base", children: formatValue(state.subdomain) }), state.subdomain && (_jsxs("p", { className: "text-muted-foreground text-sm", children: [t("urlPrefix"), state.subdomain, ".edupilotpro.com"] }))] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsDescription") })] }), _jsx("p", { className: "text-base", children: formatValue(state.description) === "—"
44
- ? t("noDescriptionProvided")
43
+ return (_jsxs("div", { className: "space-y-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionBasicInfo") })] }), _jsx(CardDescription, { children: t("viewBasicInfoDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-2 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Building2, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsName") })] }), _jsx("p", { className: "text-base", children: formatValue(state.name) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Globe, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsSubdomain") })] }), _jsx("p", { className: "text-base", children: formatValue(state.subdomain) }), state.subdomain && (_jsxs("p", { className: "text-muted-foreground text-sm", children: [t("viewFieldUrlPrefix"), state.subdomain, ".edupilotpro.com"] }))] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsDescription") })] }), _jsx("p", { className: "text-base", children: formatValue(state.description) === "—"
44
+ ? t("viewTextDescriptionNotProvided")
45
45
  : state.description })] }), state.logo && (_jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(LucideImage, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsLogo") })] }), _jsx("div", { className: "mt-2", children: _jsx(Image, { src: state.logo, alt: t("viewLabelsLogoAlt"), width: 64, height: 64, className: "h-16 w-16 rounded border object-contain", onError: (e) => {
46
46
  e.currentTarget.style.display = "none";
47
47
  } }) })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewLabelsStatus") }), _jsxs(Badge, { variant: state.enabled ? "default" : "destructive", className: "gap-1", children: [state.enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), state.enabled
48
48
  ? t("viewStatusEnabled")
49
- : t("viewStatusDisabled")] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CreditCard, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("planBillingTitle") })] }), _jsx(CardDescription, { children: t("planBillingDescription") })] }), _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(CreditCard, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("planIdLabel") })] }), _jsx("p", { className: "font-mono text-sm", children: formatValue(state.planId) })] }), _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("planStartDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(state.planStartDate || "", DATE_FORMATS.LOCALE_DATE) })] }), _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("planEndDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(state.planEndDate || "", DATE_FORMATS.LOCALE_DATE) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Clock, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("billingIntervalLabel") })] }), _jsx("p", { className: "text-base", children: formatBillingInterval(state.billingInterval) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CreditCard, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("agreedPriceLabel") })] }), _jsx("p", { className: "text-base", children: formatCurrency(state.agreedPrice, state.agreedCurrency) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Globe, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("currencyLabel") })] }), _jsx("p", { className: "text-base", children: formatValue(state.agreedCurrency) })] })] }) })] }), _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("usageStatsTitle") })] }), _jsx(CardDescription, { children: t("usageStatsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-2 gap-6 md:grid-cols-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("studentsLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.studentsCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("teachersLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.teachersCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("classesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.classesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("coursesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.coursesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("familiesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.familiesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(HardDrive, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("storageUsedLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: formatStorage(state.storageUsedMB) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Shield, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("secretsTitle") })] }), _jsx(CardDescription, { children: t("secretsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "space-y-4", children: _jsxs("div", { children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(Shield, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("secretsJsonLabel") })] }), state.secrets ? (_jsx("div", { className: "space-y-2", children: Object.keys(state.secrets)
50
- .length === 0 ? (_jsx("p", { className: "text-muted-foreground italic", children: t("noSecretsConfigured") })) : (Object.entries(state.secrets).map(([k, v]) => (_jsxs("div", { className: "bg-muted/10 border-border/60 flex items-center justify-between rounded-md border p-3", children: [_jsx("div", { className: "text-foreground text-sm font-medium", children: k }), _jsx("div", { className: "text-foreground/80 font-mono text-sm", children: typeof v === "string" && v.length > 0
49
+ : t("viewStatusDisabled")] })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CreditCard, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionPlanBilling") })] }), _jsx(CardDescription, { children: t("viewPlanBillingDescription") })] }), _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(CreditCard, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldPlanIdLabel") })] }), _jsx("p", { className: "font-mono text-sm", children: formatValue(state.planId) })] }), _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("viewFieldPlanStartDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(state.planStartDate || "", DATE_FORMATS.LOCALE_DATE) })] }), _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("viewFieldPlanEndDateLabel") })] }), _jsx("p", { className: "text-base", children: formatDate(state.planEndDate || "", DATE_FORMATS.LOCALE_DATE) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Clock, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldBillingIntervalLabel") })] }), _jsx("p", { className: "text-base", children: formatBillingInterval(state.billingInterval) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CreditCard, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldAgreedPriceLabel") })] }), _jsx("p", { className: "text-base", children: formatCurrency(state.agreedPrice, state.agreedCurrency) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Globe, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCurrencyLabel") })] }), _jsx("p", { className: "text-base", children: formatValue(state.agreedCurrency) })] })] }) })] }), _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("viewSectionUsageStats") })] }), _jsx(CardDescription, { children: t("viewUsageStatsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-2 gap-6 md:grid-cols-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStudentsLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.studentsCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldTeachersLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.teachersCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldClassesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.classesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldCoursesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.coursesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldFamiliesLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: state.familiesCount })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(HardDrive, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStorageUsedLabel") })] }), _jsx("p", { className: "text-primary text-2xl font-bold", children: formatStorage(state.storageUsedMB) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Shield, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionSecrets") })] }), _jsx(CardDescription, { children: t("viewSecretsDescription") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: "space-y-4", children: _jsxs("div", { children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx(Shield, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldSecretsJsonLabel") })] }), state.secrets ? (_jsx("div", { className: "space-y-2", children: Object.keys(state.secrets)
50
+ .length === 0 ? (_jsx("p", { className: "text-muted-foreground italic", children: t("viewFieldNoSecretsConfigured") })) : (Object.entries(state.secrets).map(([k, v]) => (_jsxs("div", { className: "bg-muted/10 border-border/60 flex items-center justify-between rounded-md border p-3", children: [_jsx("div", { className: "text-foreground text-sm font-medium", children: k }), _jsx("div", { className: "text-foreground/80 font-mono text-sm", children: typeof v === "string" && v.length > 0
51
51
  ? `${String(v).slice(0, 3)}${"*".repeat(Math.max(0, String(v).length - 3))}`
52
- : "—" })] }, k)))) })) : (_jsx("p", { className: "text-muted-foreground italic", children: t("noSecretsConfigured") })), _jsx("p", { className: "text-muted-foreground mt-2 text-xs", children: t("secretsHelpText") })] }) }) })] })] }));
52
+ : "—" })] }, k)))) })) : (_jsx("p", { className: "text-muted-foreground italic", children: t("viewFieldNoSecretsConfigured") })), _jsx("p", { className: "text-muted-foreground mt-2 text-xs", children: t("viewFieldSecretsHelpText") })] }) }) })] })] }));
53
53
  };
@@ -217,7 +217,9 @@ export const useWorkspaceUserModule = () => {
217
217
  "x-api-token": process.env.NEXT_PUBLIC_API_KEY,
218
218
  },
219
219
  });
220
- listFetchNowRef.current = listFetchNow;
220
+ useEffect(() => {
221
+ listFetchNowRef.current = listFetchNow;
222
+ }, [listFetchNow]);
221
223
  // ============================================================================
222
224
  // 1.4.6 HANDLERS
223
225
  // ============================================================================
@@ -336,14 +338,14 @@ export const useWorkspaceUserModule = () => {
336
338
  {
337
339
  enabled: false,
338
340
  handleOnClick: handleFilters,
339
- label: t("headerActionsFilters"),
341
+ label: t("actionHeaderFilters"),
340
342
  order: 1,
341
343
  icon: Filter,
342
344
  },
343
345
  {
344
346
  enabled: false,
345
347
  handleOnClick: handleMoreActions,
346
- label: t("headerActionsMoreActions"),
348
+ label: t("actionHeaderMoreActions"),
347
349
  order: 2,
348
350
  icon: Plus,
349
351
  },
@@ -352,7 +354,7 @@ export const useWorkspaceUserModule = () => {
352
354
  {
353
355
  enabled: true,
354
356
  handleOnClick: handleView,
355
- label: t("rowActionsView"),
357
+ label: t("actionRowView"),
356
358
  order: 1,
357
359
  icon: Eye,
358
360
  },
@@ -12,10 +12,10 @@ export const WorkspaceUserFilter = () => {
12
12
  : filterEnabled
13
13
  ? "true"
14
14
  : "false";
15
- 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: [
16
- { label: t("all"), value: "undefined" },
17
- { label: t("enabled"), value: "true" },
18
- { label: t("disabled"), value: "false" },
15
+ 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: [
16
+ { label: t("filterOptionAll"), value: "undefined" },
17
+ { label: t("filterOptionEnabled"), value: "true" },
18
+ { label: t("filterOptionDisabled"), value: "false" },
19
19
  ], onValueChange: (next) => {
20
20
  const parsed = next === "true" ? true : next === "false" ? false : undefined;
21
21
  handleChange("filterEnabled", parsed);
@@ -8,5 +8,5 @@ export const WorkspaceUserForm = () => {
8
8
  const { state, handleChange } = useWorkspaceUserModule();
9
9
  const { enabled, errors, roleId, userId, workspaceId } = state;
10
10
  const t = useTranslations("workspaceUser");
11
- return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("workspaceUserInformation") }), _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.workspaceId, id: "workspaceId", info: t("enterTheWorkspaceId"), label: t("workspaceId"), onChange: (e) => handleChange("workspaceId", e.target.value), placeholder: t("enterWorkspaceId"), required: true, value: workspaceId }), _jsx(EnhancedInput, { error: errors.userId, id: "userId", info: t("enterTheUserId"), label: t("userId"), onChange: (e) => handleChange("userId", e.target.value), placeholder: t("enterUserId"), required: true, value: userId }), _jsx(EnhancedInput, { error: errors.roleId, id: "roleId", info: t("enterTheRoleId"), label: t("roleId"), onChange: (e) => handleChange("roleId", e.target.value), placeholder: t("enterRoleId"), value: roleId || "" })] }), _jsx(EnhancedCheckbox, { defaultChecked: enabled, label: t("active"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }) }));
11
+ return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: t("formSectionWorkspaceUserInformation") }), _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.workspaceId, id: "workspaceId", info: t("formTheWorkspaceIdPlaceholder"), label: t("formWorkspaceIdLabel"), onChange: (e) => handleChange("workspaceId", e.target.value), placeholder: t("formWorkspaceIdPlaceholder"), required: true, value: workspaceId }), _jsx(EnhancedInput, { error: errors.userId, id: "userId", info: t("formTheUserIdPlaceholder"), label: t("formUserIdLabel"), onChange: (e) => handleChange("userId", e.target.value), placeholder: t("formUserIdPlaceholder"), required: true, value: userId }), _jsx(EnhancedInput, { error: errors.roleId, id: "roleId", info: t("formTheRoleIdPlaceholder"), label: t("formRoleIdLabel"), onChange: (e) => handleChange("roleId", e.target.value), placeholder: t("formRoleIdPlaceholder"), value: roleId || "" })] }), _jsx(EnhancedCheckbox, { defaultChecked: enabled, label: t("badgeActive"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }) }));
12
12
  };
@@ -16,5 +16,5 @@ export const WorkspaceUserView = () => {
16
16
  const { state } = useWorkspaceUserModule();
17
17
  const { enabled, role, workspace, workspaceId } = state;
18
18
  const t = useTranslations("workspaceUser");
19
- return (_jsx("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(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("workspaceUserInformation") })] }), _jsx(CardDescription, { children: t("workspaceUserAssignmentDetails") })] }), _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(Building2, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("workspace") })] }), _jsx("p", { className: "text-base", children: formatValue((workspace === null || workspace === void 0 ? void 0 : workspace.name) || workspaceId) }), (workspace === null || workspace === void 0 ? void 0 : workspace.subdomain) && (_jsxs("p", { className: "text-muted-foreground text-sm", children: [t("subdomain"), workspace.subdomain] }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Shield, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("role") })] }), _jsx(Badge, { variant: "secondary", className: "gap-1", children: (role === null || role === void 0 ? void 0 : role.userRole) || t("noRoleAssigned") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsxs(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("active") : t("inactive")] })] })] }) })] }) }));
19
+ return (_jsx("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(Users, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("viewSectionWorkspaceUserInformation") })] }), _jsx(CardDescription, { children: t("viewSectionWorkspaceUserAssignmentDetails") })] }), _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(Building2, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldWorkspace") })] }), _jsx("p", { className: "text-base", children: formatValue((workspace === null || workspace === void 0 ? void 0 : workspace.name) || workspaceId) }), (workspace === null || workspace === void 0 ? void 0 : workspace.subdomain) && (_jsxs("p", { className: "text-muted-foreground text-sm", children: [t("viewFieldSubdomain"), workspace.subdomain] }))] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Shield, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldRole") })] }), _jsx(Badge, { variant: "secondary", className: "gap-1", children: (role === null || role === void 0 ? void 0 : role.userRole) || t("viewFieldNoRoleAssigned") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("viewFieldStatus") }), _jsxs(Badge, { variant: enabled ? "default" : "destructive", className: "gap-1", children: [enabled ? (_jsx(CheckCircle2, { className: "h-3 w-3" })) : (_jsx(XCircle, { className: "h-3 w-3" })), enabled ? t("badgeActive") : t("badgeInactive")] })] })] }) })] }) }));
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.93",
3
+ "version": "0.1.94",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",