@appcorp/fusion-storybook 0.2.54 → 0.2.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base-modules/admission/context/use-admission-module.js +1 -1
- package/base-modules/admission/filter.js +1 -1
- package/base-modules/admission/form.js +1 -1
- package/base-modules/attendance/context.js +1 -1
- package/base-modules/attendance/form.js +1 -1
- package/base-modules/attendance/more-actions.js +2 -2
- package/base-modules/campus/context.js +1 -1
- package/base-modules/class/cache.js +1 -2
- package/base-modules/class/context.js +1 -1
- package/base-modules/class/more-actions.js +1 -1
- package/base-modules/course/context.js +1 -1
- package/base-modules/course/form.js +4 -4
- package/base-modules/discount-code/cache.js +1 -1
- package/base-modules/discount-code/context.js +1 -1
- package/base-modules/discount-code/form.js +1 -1
- package/base-modules/enrollment/context.js +1 -1
- package/base-modules/enrollment/form.js +3 -3
- package/base-modules/enrollment/more-actions.js +1 -1
- package/base-modules/expense/context.js +1 -1
- package/base-modules/expense/filter.js +2 -2
- package/base-modules/expense/form.js +1 -1
- package/base-modules/expense/more-actions.js +1 -1
- package/base-modules/family/context.js +1 -1
- package/base-modules/family-member/context.js +1 -1
- package/base-modules/fee-structure/cache.js +1 -1
- package/base-modules/fee-structure/context.js +1 -1
- package/base-modules/fee-structure/form.js +3 -3
- package/base-modules/fee-structure/more-actions.js +1 -1
- package/base-modules/rbac/context.js +1 -1
- package/base-modules/school/cache.js +1 -1
- package/base-modules/school/context.js +1 -1
- package/base-modules/school/form.js +1 -1
- package/base-modules/section/cache.js +1 -2
- package/base-modules/section/context.js +1 -1
- package/base-modules/section/form.js +2 -2
- package/base-modules/section/more-actions.js +1 -1
- package/base-modules/student-fee/context/use-student-fee-module.js +1 -1
- package/base-modules/student-fee/filter.js +1 -1
- package/base-modules/student-fee/form.js +2 -2
- package/base-modules/student-fee/more-actions.js +1 -1
- package/base-modules/student-profile/cache.js +1 -2
- package/base-modules/student-profile/context/use-student-profile-module.js +1 -1
- package/base-modules/student-profile/filter.js +1 -1
- package/base-modules/student-profile/form.js +2 -2
- package/base-modules/subject/cache.js +1 -2
- package/base-modules/subject/context.js +1 -1
- package/base-modules/subject/more-actions.js +1 -1
- package/base-modules/teacher/cache.js +1 -1
- package/base-modules/teacher/context.js +1 -1
- package/base-modules/teacher/form.js +1 -1
- package/base-modules/teacher/more-actions.js +1 -1
- package/base-modules/user/cache.js +1 -2
- package/base-modules/user/context/use-user-module.js +1 -1
- package/base-modules/user/form.js +1 -1
- package/base-modules/workspace/cache.js +1 -1
- package/base-modules/workspace/context.js +1 -1
- package/base-modules/workspace/form.js +2 -2
- package/base-modules/workspace-user/context.js +1 -1
- package/constants.d.ts +3 -0
- package/constants.js +3 -0
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -8,7 +8,7 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { useTeacherModule } from "./context";
|
|
10
10
|
import { GENDER_OPTIONS } from "./constants";
|
|
11
|
-
import { TEACHER_API_ROUTES } from "
|
|
11
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
12
12
|
export const TeacherForm = () => {
|
|
13
13
|
const t = useTranslations("teacher");
|
|
14
14
|
const genderLabelMap = {
|
|
@@ -8,7 +8,7 @@ import { Timeline } from "../../components/timeline";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { teacherFormValidation } from "./validate";
|
|
10
10
|
import { pageLimit } from "./constants";
|
|
11
|
-
import { TEACHER_API_ROUTES } from "
|
|
11
|
+
import { TEACHER_API_ROUTES } from "../../constants";
|
|
12
12
|
import { TEACHER_ACTION_TYPES, useTeacherContext } from "./context";
|
|
13
13
|
import { useRef, useEffect, useCallback } from "react";
|
|
14
14
|
const workspace = getCachedWorkspaceSync();
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides localStorage-based caching for users using generic cache system.
|
|
5
5
|
*/
|
|
6
|
-
import { LS_KEYS } from "../../constants";
|
|
7
|
-
import { USER_API_ROUTES } from "@/constants";
|
|
6
|
+
import { LS_KEYS, USER_API_ROUTES } from "../../constants";
|
|
8
7
|
import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
|
|
9
8
|
// ============================================================================
|
|
10
9
|
// CACHE CONFIGURATION
|
|
@@ -6,7 +6,7 @@ import { isCreatedOrUpdated, validateForm, API_METHODS, fetchData, } from "@reac
|
|
|
6
6
|
import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-module-entity-v2";
|
|
7
7
|
import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
8
8
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
9
|
-
import { USER_API_ROUTES } from "
|
|
9
|
+
import { USER_API_ROUTES } from "../../../constants";
|
|
10
10
|
import { userFormValidation } from "../validate";
|
|
11
11
|
import { getCachedWorkspaceSync } from "../../workspace/cache";
|
|
12
12
|
import { blobToWebP } from "webp-converter-browser";
|
|
@@ -7,7 +7,7 @@ import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox
|
|
|
7
7
|
import { EnhancedDropzone } from "@appcorp/shadcn/components/enhanced-dropzone";
|
|
8
8
|
import { useUserModule } from "./context";
|
|
9
9
|
import { USER_ROLE } from "../../type";
|
|
10
|
-
import { USER_API_ROUTES } from "
|
|
10
|
+
import { USER_API_ROUTES } from "../../constants";
|
|
11
11
|
import { formatPhone } from "@react-pakistan/util-functions/general/format-phone";
|
|
12
12
|
import { useState } from "react";
|
|
13
13
|
import { Eye, EyeOff } from "lucide-react";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Cache utilities for workspace data using generic cache system.
|
|
5
5
|
*/
|
|
6
6
|
import { getCachedSingleItem, getCachedSingleItemSync, invalidateCache, ONE_YEAR_IN_MS, } from "@react-pakistan/util-functions";
|
|
7
|
-
import { WORKSPACE_API_ROUTES } from "
|
|
7
|
+
import { WORKSPACE_API_ROUTES } from "../../constants";
|
|
8
8
|
import { LS_KEYS } from "../../constants";
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// CACHE CONFIGURATION
|
|
@@ -26,7 +26,7 @@ import { useModuleEntityV2, } from "@react-pakistan/util-functions/hooks/use-mod
|
|
|
26
26
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
29
|
-
import { WORKSPACE_API_ROUTES } from "
|
|
29
|
+
import { WORKSPACE_API_ROUTES } from "../../constants";
|
|
30
30
|
import { getCachedWorkspaceSync, invalidateWorkspaceCache } from "./cache";
|
|
31
31
|
import { workspaceFormValidation } from "./validate";
|
|
32
32
|
import { AUTH_API_ROUTES } from "../../constants";
|
|
@@ -13,7 +13,7 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
|
|
|
13
13
|
import { useEnhancedCombobox } from "@appcorp/shadcn/hooks/use-enhanced-combobox";
|
|
14
14
|
import { Shield, Eye, EyeOff } from "lucide-react";
|
|
15
15
|
import { secretKeys } from "./constants";
|
|
16
|
-
import {
|
|
16
|
+
import { PLAN_API_ROUTES } from "../../constants";
|
|
17
17
|
const SecretsEditor = ({ secrets, errors, onChange, secretPlaceholder, }) => {
|
|
18
18
|
const [visibleMap, setVisibleMap] = useState(() => Object.fromEntries(secretKeys.map((k) => [k, false])));
|
|
19
19
|
const toggle = (key) => setVisibleMap((s) => (Object.assign(Object.assign({}, s), { [key]: !s[key] })));
|
|
@@ -45,7 +45,7 @@ export const WorkspaceForm = () => {
|
|
|
45
45
|
})),
|
|
46
46
|
placeholder: t("formPlanPlaceholder"),
|
|
47
47
|
info: t("formPlanInfo"),
|
|
48
|
-
searchEndpoint:
|
|
48
|
+
searchEndpoint: PLAN_API_ROUTES.UNIT,
|
|
49
49
|
formatSearchResult: (item) => {
|
|
50
50
|
var _a, _b;
|
|
51
51
|
return ({
|
|
@@ -26,7 +26,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
|
|
|
26
26
|
import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
|
|
27
27
|
import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
28
28
|
import { pageLimit } from "./constants";
|
|
29
|
-
import { WORKSPACE_USER_API_ROUTES } from "
|
|
29
|
+
import { WORKSPACE_USER_API_ROUTES } from "../../constants";
|
|
30
30
|
import { workspaceUserFormValidation } from "./validate";
|
|
31
31
|
import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
|
|
32
32
|
import { useTranslations } from "next-intl";
|
package/constants.d.ts
CHANGED
|
@@ -46,6 +46,9 @@ export declare const FEE_STRUCTURE_API_ROUTES: {
|
|
|
46
46
|
readonly BULK: "/api/v1/fee-structure/bulk";
|
|
47
47
|
readonly BULK_STATUS: (jobId: string) => string;
|
|
48
48
|
};
|
|
49
|
+
export declare const PLAN_API_ROUTES: {
|
|
50
|
+
readonly UNIT: "/api/v1/plan";
|
|
51
|
+
};
|
|
49
52
|
export declare const RBAC_API_ROUTES: Record<string, string>;
|
|
50
53
|
export declare const SCHOOL_API_ROUTES: Record<string, string>;
|
|
51
54
|
export declare const SECTION_API_ROUTES: {
|
package/constants.js
CHANGED
|
@@ -53,6 +53,9 @@ export const FEE_STRUCTURE_API_ROUTES = {
|
|
|
53
53
|
BULK: "/api/v1/fee-structure/bulk",
|
|
54
54
|
BULK_STATUS: (jobId) => `/api/v1/fee-structure/bulk/${jobId}`,
|
|
55
55
|
};
|
|
56
|
+
export const PLAN_API_ROUTES = {
|
|
57
|
+
UNIT: "/api/v1/plan",
|
|
58
|
+
};
|
|
56
59
|
export const RBAC_API_ROUTES = {
|
|
57
60
|
UNIT: "/api/v1/role",
|
|
58
61
|
PERMISSIONS_LIST: "/api/v1/permission",
|