@appcorp/fusion-storybook 0.1.100 → 0.2.0
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.js +4 -3
- package/base-modules/admission/page.js +12 -6
- package/base-modules/admission/view.js +2 -2
- package/base-modules/campus/context.js +3 -2
- package/base-modules/campus/view.js +5 -3
- package/base-modules/class/view.js +4 -2
- package/base-modules/course/view.js +4 -2
- package/base-modules/discount-code/view.js +1 -1
- package/base-modules/expense/view.js +6 -4
- package/base-modules/family/view.js +1 -1
- package/base-modules/family-member/context.js +4 -3
- package/base-modules/family-member/view.js +7 -4
- package/base-modules/fee-structure/view.js +4 -2
- package/base-modules/school/context.js +3 -2
- package/base-modules/school/view.js +2 -2
- package/base-modules/section/view.js +4 -2
- package/base-modules/student-profile/context.js +4 -3
- package/base-modules/student-profile/view.js +2 -2
- package/base-modules/subject/view.js +4 -2
- package/base-modules/teacher/context.js +4 -3
- package/base-modules/teacher/view.js +2 -2
- package/base-modules/user/context.js +3 -2
- package/base-modules/user/view.js +2 -2
- package/base-modules/workspace/view.js +1 -1
- package/base-modules/workspace-user/view.js +1 -1
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/admission-pdf.js +2 -6
- package/utils/format-value.d.ts +0 -1
- package/utils/format-value.js +3 -1
- package/utils/phone-helpers.d.ts +0 -2
- package/utils/phone-helpers.js +26 -28
- package/utils/clear-cache.d.ts +0 -1
- package/utils/clear-cache.js +0 -8
|
@@ -34,7 +34,8 @@ import { invalidateWorkspaceUsersCache } from "../workspace-user/cache";
|
|
|
34
34
|
import { blobToWebP } from "webp-converter-browser";
|
|
35
35
|
import { supabasePublicStorageUrl } from "../../constants";
|
|
36
36
|
import { toastNetworkError } from "../../utils/toast-network-error";
|
|
37
|
-
import {
|
|
37
|
+
import { formatNumber } from "@react-pakistan/util-functions/general/format-number";
|
|
38
|
+
import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
|
|
38
39
|
// ============================================================================
|
|
39
40
|
// 1.1 DRAWER TYPES
|
|
40
41
|
// ============================================================================
|
|
@@ -111,7 +112,7 @@ export const useUserModule = () => {
|
|
|
111
112
|
id: state.id,
|
|
112
113
|
name: (state.name || "").trim(),
|
|
113
114
|
password: state.password,
|
|
114
|
-
phone:
|
|
115
|
+
phone: formatNumber(state.phone),
|
|
115
116
|
userRole: state.userRole,
|
|
116
117
|
workspaceId: workspace === null || workspace === void 0 ? void 0 : workspace.id,
|
|
117
118
|
}), [state, workspace === null || workspace === void 0 ? void 0 : workspace.id]);
|
|
@@ -6,8 +6,8 @@ import { Badge } from "@appcorp/shadcn/components/ui/badge";
|
|
|
6
6
|
import { Separator } from "@appcorp/shadcn/components/ui/separator";
|
|
7
7
|
import { Avatar, AvatarFallback, AvatarImage, } from "@appcorp/shadcn/components/ui/avatar";
|
|
8
8
|
import { User, Phone, Mail, CheckCircle2, XCircle } from "lucide-react";
|
|
9
|
-
import { formatValue } from "
|
|
10
|
-
import { formatPhoneDisplay } from "
|
|
9
|
+
import { formatValue } from "@react-pakistan/util-functions/general/format-value";
|
|
10
|
+
import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
|
|
11
11
|
const getInitials = (fullName) => {
|
|
12
12
|
if (!fullName)
|
|
13
13
|
return "U";
|
|
@@ -13,7 +13,7 @@ import { Badge } from "@appcorp/shadcn/components/ui/badge";
|
|
|
13
13
|
import { Separator } from "@appcorp/shadcn/components/ui/separator";
|
|
14
14
|
import { Building2, Globe, FileText, Image as LucideImage, CheckCircle2, XCircle, Calendar, CreditCard, Users, BookOpen, GraduationCap, Home, HardDrive, Clock, Shield, } from "lucide-react";
|
|
15
15
|
import { DATE_FORMATS, formatDate } from "@react-pakistan/util-functions";
|
|
16
|
-
import { formatValue } from "
|
|
16
|
+
import { formatValue } from "@react-pakistan/util-functions/general/format-value";
|
|
17
17
|
export const WorkspaceView = () => {
|
|
18
18
|
const { state } = useWorkspaceModule();
|
|
19
19
|
const t = useTranslations("workspace");
|
|
@@ -11,7 +11,7 @@ import { Badge } from "@appcorp/shadcn/components/ui/badge";
|
|
|
11
11
|
import { Separator } from "@appcorp/shadcn/components/ui/separator";
|
|
12
12
|
import { Users, Building2, Shield, CheckCircle2, XCircle } from "lucide-react";
|
|
13
13
|
import { useTranslations } from "next-intl";
|
|
14
|
-
import { formatValue } from "
|
|
14
|
+
import { formatValue } from "@react-pakistan/util-functions/general/format-value";
|
|
15
15
|
export const WorkspaceUserView = () => {
|
|
16
16
|
const { state } = useWorkspaceUserModule();
|
|
17
17
|
const { enabled, role, workspace, workspaceId } = state;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/fusion-storybook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build-storybook": "storybook build",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@radix-ui/react-slider": "^1.3.6",
|
|
59
59
|
"@radix-ui/react-slot": "^1.2.4",
|
|
60
60
|
"@radix-ui/react-toast": "^1.2.15",
|
|
61
|
-
"@react-pakistan/util-functions": "^1.25.
|
|
61
|
+
"@react-pakistan/util-functions": "^1.25.82",
|
|
62
62
|
"@storybook/addon-a11y": "^10.3.4",
|
|
63
63
|
"@storybook/addon-docs": "^10.3.4",
|
|
64
64
|
"@storybook/addon-onboarding": "^10.3.4",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"jest": "^30.3.0",
|
|
89
89
|
"jest-environment-jsdom": "^30.3.0",
|
|
90
90
|
"json-2-csv": "^5.5.10",
|
|
91
|
-
"libphonenumber-js": "^1.
|
|
91
|
+
"libphonenumber-js": "^1.13.3",
|
|
92
92
|
"lint-staged": "^16.4.0",
|
|
93
93
|
"lucide-react": "^1.8.0",
|
|
94
94
|
"next": "^16.2.3",
|