@appcorp/fusion-storybook 0.1.20 → 0.1.21

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.
@@ -1,5 +1,5 @@
1
1
  import { type RowAction, type TableRow } from "@appcorp/shadcn/components/enhanced-table";
2
- import { DiscountCodeBE } from "@/type";
2
+ import { DiscountCodeBE } from "../../type";
3
3
  export declare const DISCOUNT_CODE_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
5
5
  readonly FORM_DRAWER: string;
@@ -19,7 +19,7 @@ import { EnhancedTextarea } from "@appcorp/shadcn/components/enhanced-textarea";
19
19
  import { EnhancedCombobox } from "@appcorp/shadcn/components/enhanced-combobox";
20
20
  import { EnhancedCheckbox } from "@appcorp/shadcn/components/enhanced-checkbox";
21
21
  import { Percent, DollarSign } from "lucide-react";
22
- import { DISCOUNT_TYPE } from "@/type";
22
+ import { DISCOUNT_TYPE } from "../../type";
23
23
  export const DiscountCodeForm = () => {
24
24
  const { state, handleChange } = useDiscountCodeModule();
25
25
  const t = useTranslations("discountCode");
@@ -10,7 +10,7 @@
10
10
  * - permission guard
11
11
  */
12
12
  import { FC } from "react";
13
- import { USER_ROLE } from "@/type";
13
+ import { USER_ROLE } from "../../type";
14
14
  interface Props {
15
15
  cancelLabel: string;
16
16
  drawerTitle: string;
@@ -19,8 +19,8 @@ import { DiscountCodeFilter } from "./filter";
19
19
  import { DiscountCodeForm } from "./form";
20
20
  import { DiscountCodeMoreActions } from "./more-actions";
21
21
  import { DiscountCodeView } from "./view";
22
- import { resolveRbacPermissions } from "@/utils/resolve-rbac-permissions";
23
- import { RbacNoAccess } from "@/components/rbac-no-access";
22
+ import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
23
+ import { RbacNoAccess } from "../../components/rbac-no-access";
24
24
  // ============================================================================
25
25
  // TABLE COLUMN CONFIGURATION (static — no runtime deps)
26
26
  // ============================================================================
@@ -9,7 +9,7 @@
9
9
  * Keep messages human-friendly as they are surfaced directly to the UI.
10
10
  */
11
11
  import { z } from "zod";
12
- import { DISCOUNT_TYPE } from "@/type";
12
+ import { DISCOUNT_TYPE } from "../../type";
13
13
  export declare const accountDiscountCodeFormValidation: z.ZodObject<{
14
14
  code: z.ZodString;
15
15
  description: z.ZodOptional<z.ZodString>;
@@ -9,7 +9,7 @@
9
9
  * Keep messages human-friendly as they are surfaced directly to the UI.
10
10
  */
11
11
  import { z } from "zod";
12
- import { DISCOUNT_TYPE } from "@/type";
12
+ import { DISCOUNT_TYPE } from "../../type";
13
13
  // ============================================================================
14
14
  // VALIDATION SCHEMA
15
15
  // ============================================================================
@@ -14,13 +14,13 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@app
14
14
  import { Badge } from "@appcorp/shadcn/components/ui/badge";
15
15
  import { Separator } from "@appcorp/shadcn/components/ui/separator";
16
16
  import { CheckCircle2, XCircle } from "lucide-react";
17
- import { DISCOUNT_TYPE } from "@/type";
18
- import { formatValue } from "@/utils/format-value";
17
+ import { DISCOUNT_TYPE } from "../../type";
18
+ import { formatValue } from "../../utils/format-value";
19
19
  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 md:grid-cols-2 gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDiscountCode") }), _jsx("p", { className: "mt-1 text-lg font-mono 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: "h-3 w-3 mr-1" }), t("viewStatusEnabled")] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-3 w-3 mr-1" }), t("viewStatusDisabled")] })) }) })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700", children: t("viewLabelsDiscountType") }), _jsx("p", { className: "mt-1 text-gray-900 font-medium", 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("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
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: "mt-1 text-xl font-semibold text-primary" })] })] }), _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("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) })] })] })] }) }));
26
26
  };
@@ -1,4 +1,4 @@
1
- import { FamilyBE } from "@/type";
1
+ import { FamilyBE } from "../../type";
2
2
  import { TableRow, type RowAction } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const FAMILY_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -10,7 +10,7 @@
10
10
  * - permission guard
11
11
  */
12
12
  import { FC } from "react";
13
- import { USER_ROLE } from "@/type";
13
+ import { USER_ROLE } from "../../type";
14
14
  interface Props {
15
15
  cancelLabel: string;
16
16
  drawerTitle: string;
@@ -19,8 +19,8 @@ import { FamilyFilter } from "./filter";
19
19
  import { FamilyForm } from "./form";
20
20
  import { FamilyMoreActions } from "./more-actions";
21
21
  import { FamilyView } from "./view";
22
- import { resolveRbacPermissions } from "@/utils/resolve-rbac-permissions";
23
- import { RbacNoAccess } from "@/components/rbac-no-access";
22
+ import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
23
+ import { RbacNoAccess } from "../../components/rbac-no-access";
24
24
  // ============================================================================
25
25
  // TABLE COLUMN CONFIGURATION (static — no runtime deps)
26
26
  // ============================================================================
@@ -6,7 +6,7 @@ import { Separator } from "@appcorp/shadcn/components/ui/separator";
6
6
  import { CheckCircle2, Home, MapPin, Users, XCircle } from "lucide-react";
7
7
  import { useFamilyModule } from "./context";
8
8
  import { useTranslations } from "next-intl";
9
- import { formatValue } from "@/utils/format-value";
9
+ import { formatValue } from "../../utils/format-value";
10
10
  export const FamilyView = () => {
11
11
  const { state } = useFamilyModule();
12
12
  const { address, city, country, enabled, familyCode, postalCode, stateProvince, } = state;
@@ -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: "flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: _jsx(Home, { className: "h-8 w-8 text-primary" }) }), _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-sm text-muted-foreground mt-1", children: t("familyProfile") })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MapPin, { className: "h-5 w-5 text-primary" }), _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-sm font-medium text-muted-foreground", children: t("fullAddress") }), _jsx("p", { className: "text-base", children: fullAddress || t("noAddressProvided") })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("streetAddress") }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("city") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("stateProvince") }), _jsx("p", { className: "text-base", children: formatValue(stateProvince) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("country") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", 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: "h-5 w-5 text-primary" }), _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-sm text-muted-foreground", 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-sm text-muted-foreground", 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("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") })] })] })) }) })] })] }));
18
18
  };
@@ -1,4 +1,4 @@
1
- import { FamilyMemberBE } from "@/type";
1
+ import { FamilyMemberBE } from "../../type";
2
2
  import { type RowAction } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const FAMILY_MEMBER_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -10,7 +10,7 @@
10
10
  * - permission guard
11
11
  */
12
12
  import { FC } from "react";
13
- import { USER_ROLE } from "@/type";
13
+ import { USER_ROLE } from "../../type";
14
14
  interface Props {
15
15
  cancelLabel: string;
16
16
  drawerTitle: string;
@@ -19,8 +19,8 @@ import { FamilyMemberFilter } from "./filter";
19
19
  import { FamilyMemberForm } from "./form";
20
20
  import { FamilyMemberMoreActions } from "./more-actions";
21
21
  import { FamilyMemberView } from "./view";
22
- import { resolveRbacPermissions } from "@/utils/resolve-rbac-permissions";
23
- import { RbacNoAccess } from "@/components/rbac-no-access";
22
+ import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
23
+ import { RbacNoAccess } from "../../components/rbac-no-access";
24
24
  // ============================================================================
25
25
  // TABLE COLUMN CONFIGURATION (static — no runtime deps)
26
26
  // ============================================================================
@@ -13,7 +13,7 @@ import { DATE_FORMATS, formatDate } from "@react-pakistan/util-functions";
13
13
  import { Briefcase, Calendar, CheckCircle2, Heart, Mail, Phone, ShieldCheck, User, Users, XCircle, } from "lucide-react";
14
14
  import { useFamilyMemberModule } from "./context";
15
15
  import { useTranslations } from "next-intl";
16
- import { formatValue } from "@/utils/format-value";
16
+ import { formatValue } from "../../utils/format-value";
17
17
  export const FamilyMemberView = () => {
18
18
  const { state } = useFamilyMemberModule();
19
19
  const { avatar, bloodGroup, dateOfBirth, email, emergencyPhone, enabled, firstName, gender, idNumber, isPrimary, lastName, occupation, phone, relationship, role, } = state;
@@ -32,9 +32,9 @@ export const FamilyMemberView = () => {
32
32
  return "—";
33
33
  return formatDate(new Date(value).toISOString(), DATE_FORMATS.LOCALE_DATE);
34
34
  };
35
- 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: "mt-1 text-sm text-muted-foreground", 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: "h-5 w-5 text-primary" }), _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-sm font-medium text-muted-foreground", children: t("firstName") }), _jsx("p", { className: "text-base", children: formatValue(firstName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("lastName") }), _jsx("p", { className: "text-base", children: formatValue(lastName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", 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: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("dateOfBirth") })] }), _jsx("p", { className: "text-base", children: formatDateValue(dateOfBirth) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", 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: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", 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-sm font-medium text-muted-foreground", 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: "h-5 w-5 text-primary" }), _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: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("phone") })] }), _jsx("p", { className: "text-base", children: formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Mail, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", 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: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("emergencyPhone") })] }), _jsx("p", { className: "text-base", children: formatValue(emergencyPhone) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Users, { className: "h-5 w-5 text-primary" }), _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-sm font-medium text-muted-foreground", 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: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", 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: "h-5 w-5 text-primary" }), _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: "mt-0.5 h-5 w-5 text-primary" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: isPrimary ? t("primaryContact") : t("secondaryContact") }), _jsx("p", { className: "text-sm text-muted-foreground", children: isPrimary
35
+ 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: 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: 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
36
36
  ? t("thisIsPrimaryFamilyContact")
37
- : 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-sm text-muted-foreground", children: enabled
37
+ : 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
38
38
  ? t("thisAccountIsCurrentlyActive")
39
39
  : t("thisAccountIsCurrentlyInactive") })] })] })] }) })] })] }));
40
40
  };
@@ -1,4 +1,4 @@
1
- import { StudentProfileBE } from "@/type";
1
+ import { StudentProfileBE } from "../../type";
2
2
  import { type RowAction } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const STUDENT_PROFILE_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -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 { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
29
- import { STUDENT_STATUS } from "@/type";
29
+ import { STUDENT_STATUS } from "../../type";
30
30
  import { useTranslations } from "next-intl";
31
31
  import { STUDENT_PROFILE_API_ROUTES, pageLimit } from "./constants";
32
32
  import { studentProfileFormValidation } from "./validate";
@@ -6,7 +6,7 @@
6
6
  * via the `ComponentConfig`.
7
7
  */
8
8
  import { FC } from "react";
9
- import { USER_ROLE } from "@/type";
9
+ import { USER_ROLE } from "../../type";
10
10
  interface Props {
11
11
  cancelLabel: string;
12
12
  drawerTitle: string;
@@ -15,8 +15,8 @@ import { StudentProfileFilter } from "./filter";
15
15
  import { StudentProfileForm } from "./form";
16
16
  import { StudentProfileMoreActions } from "./more-actions";
17
17
  import { StudentProfileView } from "./view";
18
- import { resolveRbacPermissions } from "@/utils/resolve-rbac-permissions";
19
- import { RbacNoAccess } from "@/components/rbac-no-access";
18
+ import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
19
+ import { RbacNoAccess } from "../../components/rbac-no-access";
20
20
  // ============================================================================
21
21
  // TABLE COLUMN CONFIGURATION (static — no runtime deps)
22
22
  // ============================================================================
@@ -8,7 +8,7 @@ import { formatDate, DATE_FORMATS } from "@react-pakistan/util-functions";
8
8
  import { User, Phone, MapPin, Calendar, GraduationCap, CheckCircle2, XCircle, } from "lucide-react";
9
9
  import { useTranslations } from "next-intl";
10
10
  import { useStudentProfileModule } from "./context";
11
- import { formatValue } from "@/utils/format-value";
11
+ import { formatValue } from "../../utils/format-value";
12
12
  export const StudentProfileView = () => {
13
13
  const t = useTranslations("studentProfile");
14
14
  const context = useStudentProfileModule();
@@ -21,9 +21,9 @@ export const StudentProfileView = () => {
21
21
  return "\u2014";
22
22
  return formatDate(new Date(date).toISOString(), DATE_FORMATS.LOCALE_DATE);
23
23
  };
24
- 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 })] }), _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 ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("studentCode"), ": ", studentCode || "N/A"] }), email && (_jsx("p", { className: "text-sm text-muted-foreground mt-1", children: email }))] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(User, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("personalInformation") })] }), _jsx(CardDescription, { children: t("basicPersonalDetails") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("firstName") }), _jsx("p", { className: "text-base", children: formatValue(firstName) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("lastName") }), _jsx("p", { className: "text-base", children: formatValue(lastName) })] }), _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("dateOfBirth") })] }), _jsx("p", { className: "text-base", children: formatDateValue(dateOfBirth) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("gender") }), _jsx(Badge, { variant: "secondary", className: "capitalize", children: formatValue(gender === null || gender === void 0 ? void 0 : gender.toLowerCase()) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Phone, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("contactInformation") })] }), _jsx(CardDescription, { children: t("contactDetailsAndLocation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [email && (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("email") }), _jsx("p", { className: "text-base", children: formatValue(email) })] })), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("phone") }), _jsx("p", { className: "text-base", children: formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("emergencyPhone") }), _jsx("p", { className: "text-base", children: formatValue(emergencyPhone) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MapPin, { className: "h-4 w-4 text-muted-foreground" }), _jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("address") })] }), _jsx("p", { className: "text-base", children: formatValue(address) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("city") }), _jsx("p", { className: "text-base", children: formatValue(city) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("stateProvince") }), _jsx("p", { className: "text-base", children: formatValue(stateValue) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("country") }), _jsx("p", { className: "text-base", children: formatValue(country) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", 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(GraduationCap, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("academicInformation") })] }), _jsx(CardDescription, { children: t("enrollmentAndAcademicStatus") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 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: status === "ACTIVE"
24
+ 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 })] }), _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 ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("studentCode"), ": ", studentCode || "N/A"] }), email && (_jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: email }))] })] }) }) }), _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("basicPersonalDetails") })] }), _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: [_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") }), _jsx(Badge, { variant: "secondary", className: "capitalize", children: formatValue(gender === null || gender === void 0 ? void 0 : gender.toLowerCase()) })] })] }) })] }), _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("contactDetailsAndLocation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [email && (_jsxs("div", { className: "space-y-1", children: [_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", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("phone") }), _jsx("p", { className: "text-base", children: formatValue(phone) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("emergencyPhone") }), _jsx("p", { className: "text-base", children: formatValue(emergencyPhone) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MapPin, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("address") })] }), _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(stateValue) })] }), _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(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("academicInformation") })] }), _jsx(CardDescription, { children: t("enrollmentAndAcademicStatus") })] }), _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("status") }), _jsx(Badge, { variant: status === "ACTIVE"
25
25
  ? "default"
26
26
  : status === "GRADUATED"
27
27
  ? "secondary"
28
- : "outline", className: "capitalize", children: formatValue(status === null || status === void 0 ? void 0 : status.toLowerCase().replace(/_/g, " ")) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("accountStatus") }), _jsx("div", { className: "flex items-center gap-2", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-green-600 dark:text-green-400" }), _jsx(Badge, { variant: "outline", className: "border-green-600 text-green-700 dark:border-green-400 dark:text-green-400", children: t("active") })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-5 w-5 text-gray-400" }), _jsx(Badge, { variant: "outline", className: "text-muted-foreground", children: t("inactive") })] })) })] })] }) })] })] }));
28
+ : "outline", className: "capitalize", children: formatValue(status === null || status === void 0 ? void 0 : status.toLowerCase().replace(/_/g, " ")) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("accountStatus") }), _jsx("div", { className: "flex items-center gap-2", children: enabled ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "h-5 w-5 text-green-600 dark:text-green-400" }), _jsx(Badge, { variant: "outline", className: "border-green-600 text-green-700 dark:border-green-400 dark:text-green-400", children: t("active") })] })) : (_jsxs(_Fragment, { children: [_jsx(XCircle, { className: "h-5 w-5 text-gray-400" }), _jsx(Badge, { variant: "outline", className: "text-muted-foreground", children: t("inactive") })] })) })] })] }) })] })] }));
29
29
  };
@@ -26,7 +26,7 @@ import { getCachedWorkspaceSync, invalidateWorkspaceCache } from "./cache";
26
26
  import { workspaceFormValidation } from "./validate";
27
27
  import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
28
28
  import { useTranslations } from "next-intl";
29
- import { AUTH_API_ROUTES } from "@/constants";
29
+ import { AUTH_API_ROUTES } from "../../constants";
30
30
  // ============================================================================
31
31
  // CONFIGURATION
32
32
  // ============================================================================
@@ -8,7 +8,7 @@
8
8
  * - `WorkspacePage`: main page component for workspace management.
9
9
  */
10
10
  import { FC } from "react";
11
- import { USER_ROLE } from "@/type";
11
+ import { USER_ROLE } from "../../type";
12
12
  interface Props {
13
13
  labelEdit: string;
14
14
  tableDescription: string;
@@ -5,8 +5,8 @@ import { WorkspaceView } from "./view";
5
5
  import { WorkspaceDrawer } from "./drawer";
6
6
  import { Button } from "@appcorp/shadcn/components/ui/button";
7
7
  import { Edit } from "lucide-react";
8
- import { resolveRbacPermissions } from "@/utils/resolve-rbac-permissions";
9
- import { RbacNoAccess } from "@/components/rbac-no-access";
8
+ import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
9
+ import { RbacNoAccess } from "../../components/rbac-no-access";
10
10
  // ============================================================================
11
11
  // WORKSPACE PAGE COMPONENT
12
12
  // ============================================================================
@@ -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 "@/utils/format-value";
16
+ import { formatValue } from "../../utils/format-value";
17
17
  export const WorkspaceView = () => {
18
18
  const { state } = useWorkspaceModule();
19
19
  const t = useTranslations("workspace");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",