@appcorp/fusion-storybook 0.2.69 → 0.2.71

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.
@@ -16,9 +16,9 @@ import { getCachedWorkspaceSync } from "../workspace/cache";
16
16
  import { useTranslations } from "next-intl";
17
17
  import { useFetch } from "@react-pakistan/util-functions/hooks/use-fetch";
18
18
  import { API_METHODS } from "@react-pakistan/util-functions";
19
- import { useEffect } from "storybook/internal/preview-api";
19
+ import { useEffect } from "react";
20
20
  export const FeeStructureForm = () => {
21
- var _a, _b;
21
+ var _a, _b, _c;
22
22
  const { state, handleChange } = useFeeStructureModule();
23
23
  const { amount, classId, description, enabled, errors, feeType, frequency, name, } = state;
24
24
  const t = useTranslations("feeStructure");
@@ -101,7 +101,7 @@ export const FeeStructureForm = () => {
101
101
  info: t("formClassInfo"),
102
102
  label: t("formClassLabel"),
103
103
  onValueChange: (value) => handleChange("classId", value || null),
104
- options: classes === null || classes === void 0 ? void 0 : classes.map((cls) => ({
104
+ options: (_a = classes === null || classes === void 0 ? void 0 : classes.items) === null || _a === void 0 ? void 0 : _a.map((cls) => ({
105
105
  value: cls.id,
106
106
  label: `${cls.name} (${cls.code})`,
107
107
  })),
@@ -118,6 +118,6 @@ export const FeeStructureForm = () => {
118
118
  value: classId || "",
119
119
  });
120
120
  return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(EnhancedInput, { error: errors.name, id: "name", info: t("formNameInfo"), label: t("formNameLabel"), onChange: (e) => handleChange("name", e.target.value), placeholder: t("formNamePlaceholder"), required: true, value: name || "" }), feeTypeCombo, _jsx(EnhancedInput, { error: errors.amount, id: "amount", info: t(`amountInfo`, {
121
- 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 : "",
121
+ currency: (_c = (_b = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _b === void 0 ? void 0 : _b.currency) !== null && _c !== void 0 ? _c : "",
122
122
  }), label: t("formAmountLabel"), min: "0", onChange: (e) => handleChange("amount", Number(e.target.value)), placeholder: t("formAmountPlaceholder"), required: true, step: "0.01", type: "number", value: amount }), frequencyCombo, classIdCombo, _jsx(EnhancedTextarea, { error: errors.description, id: "description", info: t("formDescriptionInfo"), label: t("formDescriptionLabel"), onChange: (e) => handleChange("description", e.target.value), placeholder: t("formDescriptionPlaceholder"), rows: 3, value: description || "" })] }), _jsx(EnhancedCheckbox, { defaultChecked: enabled, label: t("formActiveFeeStructureLabel"), onCheckedChange: (checked) => handleChange("enabled", checked) })] }));
123
123
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",