@appcorp/fusion-storybook 0.1.43 → 0.1.45

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.
@@ -770,7 +770,8 @@ export const useAdmissionModule = () => {
770
770
  order: 4,
771
771
  },
772
772
  {
773
- enabled: hasGeminiSecrets,
773
+ enabled: (row) => hasGeminiSecrets &&
774
+ (row === null || row === void 0 ? void 0 : row.status) === ADMISSION_STATUS.PENDING,
774
775
  handleOnClick: handleAnalyze,
775
776
  label: t("rowActionsAnalyzeWithAi"),
776
777
  order: 5,
@@ -18,9 +18,14 @@ import { Button } from "@appcorp/shadcn/components/ui/button";
18
18
  import { useTranslations } from "next-intl";
19
19
  import { formatValue } from "../../utils/format-value";
20
20
  import { formatDate, DATE_FORMATS } from "@react-pakistan/util-functions";
21
+ import { getCachedWorkspaceSync } from "../workspace/cache";
22
+ import { ADMISSION_STATUS } from "@/type";
21
23
  export const AdmissionView = () => {
24
+ var _a, _b;
22
25
  const { state, handleAnalyze } = useAdmissionModule();
23
26
  const { address, admissionNotes, aiAnalysis, analyzeLoading, analyzeError, bForm, city, classForAdmission, country, discountCode, dob, emergencyContact, enabled, fatherCnic, fatherFirstName, fatherLastName, fatherMobile, fatherOccupation, fatherOrganization, firstName, gender, hafiz, id, lastName, motherCnic, motherFirstName, motherLastName, motherMobile, notes, orphan, postalCode, previousSchool, registrationCode, siblings, state: provinceState, status, } = state;
27
+ const workspace = getCachedWorkspaceSync();
28
+ const hasGeminiSecrets = Boolean(((_a = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _a === void 0 ? void 0 : _a.GEMINI_API_KEY) && ((_b = workspace === null || workspace === void 0 ? void 0 : workspace.secrets) === null || _b === void 0 ? void 0 : _b.GEMINI_MODEL));
24
29
  const t = useTranslations("admission");
25
30
  const decisionColor = (decision) => {
26
31
  if (decision === "APPROVED")
@@ -36,5 +41,5 @@ export const AdmissionView = () => {
36
41
  return _jsx(ShieldX, { className: "h-4 w-4" });
37
42
  return _jsx(AlertTriangle, { className: "h-4 w-4" });
38
43
  };
39
- return (_jsxs("div", { className: "space-y-6", children: [_jsxs(Card, { className: "border-primary/20 border-2", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Brain, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("aiAnalysis") })] }), _jsxs(Button, { variant: "outline", size: "sm", disabled: analyzeLoading, onClick: () => handleAnalyze({ id }), children: [analyzeLoading ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-4 w-4" })), aiAnalysis ? t("reRunAnalysis") : t("analyzeWithAi")] })] }), _jsx(CardDescription, { children: t("geminiPoweredAdmissionScoring") })] }), _jsx(Separator, {}), _jsxs(CardContent, { className: "pt-6", children: [analyzeLoading && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-3", children: [_jsx(Loader2, { className: "h-5 w-5 animate-spin" }), _jsx("span", { children: t("runningAiAnalysis") })] })), analyzeError && !analyzeLoading && (_jsxs("div", { className: "text-destructive flex items-center gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx("span", { children: analyzeError })] })), !analyzeLoading && aiAnalysis && (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsxs("div", { className: "bg-muted flex flex-col items-center rounded-lg px-6 py-3", children: [_jsx("span", { className: "text-primary text-3xl font-bold", children: aiAnalysis.score }), _jsx("span", { className: "text-muted-foreground text-xs tracking-wide uppercase", children: "/ 100" })] }), _jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm font-medium ${decisionColor(aiAnalysis.decision)}`, children: [decisionIcon(aiAnalysis.decision), aiAnalysis.decision.replace("_", " ")] }), _jsxs("div", { className: "text-muted-foreground text-sm", children: [_jsxs("span", { className: "font-medium", children: [t("confidence"), ": "] }), (aiAnalysis.confidence * 100).toFixed(0), "%"] })] }), aiAnalysis.reasons.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "mb-2 text-sm font-medium", children: t("aiReasoningAndRiskFlags") }), _jsx("ul", { className: "space-y-1.5", children: aiAnalysis.reasons.map((reason, i) => (_jsxs("li", { className: "flex items-start gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-yellow-500" }), _jsx("span", { children: reason })] }, i))) })] })), _jsxs("p", { className: "text-muted-foreground text-xs", children: [t("lastAnalyzed"), ":", " ", formatDate(String(aiAnalysis.processedAt), DATE_FORMATS.LOCALE_DATE)] })] })), !analyzeLoading && !aiAnalysis && !analyzeError && (_jsx("p", { className: "text-muted-foreground text-sm", children: t("noAiAnalysisYet") }))] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("admissionDetails") })] }), _jsx(CardDescription, { children: t("registrationAndAdmissionInformation") })] }), _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("registrationCode") }), _jsx("p", { className: "font-mono text-base", children: formatValue(registrationCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("classForAdmission") }), _jsx("p", { className: "text-base", children: formatValue(classForAdmission) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx("p", { className: "text-base", children: formatValue(status) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("previousSchool") }), _jsx("p", { className: "text-base", children: formatValue(previousSchool) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("siblings") }), _jsx("p", { className: "text-base", children: formatValue(siblings) })] })] }) })] }), _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("studentInformation") })] }), _jsx(CardDescription, { children: t("personalDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(firstName), " ", formatValue(lastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("dob") }), _jsx("p", { className: "text-base", children: formatDate(String(dob), DATE_FORMATS.LOCALE_DATE) })] }), _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: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("bForm") }), _jsx("p", { className: "text-base", children: formatValue(bForm) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("discountCode") }), _jsx("p", { className: "text-base", children: formatValue(discountCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("emergencyContact") }), _jsx("p", { className: "text-base", children: formatValue(emergencyContact) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("hafizEQuran") }), _jsx("p", { className: "text-base", children: hafiz ? t("yes") : t("no") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("orphan") }), _jsx("p", { className: "text-base", children: orphan ? t("yes") : t("no") })] })] }) })] }), _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("fatherInformation") })] }), _jsx(CardDescription, { children: t("fatherDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(fatherFirstName), " ", formatValue(fatherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("cnic") }), _jsx("p", { className: "text-base", children: formatValue(fatherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _jsx("p", { className: "text-base", children: formatValue(fatherMobile) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("occupation") }), _jsx("p", { className: "text-base", children: formatValue(fatherOccupation) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("organization") }), _jsx("p", { className: "text-base", children: formatValue(fatherOrganization) })] })] }) })] }), _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("motherInformation") })] }), _jsx(CardDescription, { children: t("motherDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(motherFirstName), " ", formatValue(motherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("cnic") }), _jsx("p", { className: "text-base", children: formatValue(motherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _jsx("p", { className: "text-base", children: formatValue(motherMobile) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("homeDetails") })] }), _jsx(CardDescription, { children: t("addressInformation") })] }), _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 md:col-span-2", 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: "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("state") }), _jsx("p", { className: "text-base", children: formatValue(provinceState) })] }), _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(FileText, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("officeUse") })] }), _jsx(CardDescription, { children: t("internalNotesAndProcessingInformation") })] }), _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("notes") }), _jsx("p", { className: "text-base", children: formatValue(notes) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("admissionNotes") }), _jsx("p", { className: "text-base", children: formatValue(admissionNotes) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("recordStatus") })] }), _jsx(CardDescription, { children: t("recordStateAndMetadata") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("enabled") }), _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")] })] }) })] })] }));
44
+ return (_jsxs("div", { className: "space-y-6", children: [hasGeminiSecrets && (_jsxs(Card, { className: "border-primary/20 border-2", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Brain, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("aiAnalysis") })] }), status === ADMISSION_STATUS.PENDING && (_jsxs(Button, { variant: "outline", size: "sm", disabled: analyzeLoading, onClick: () => handleAnalyze({ id }), children: [analyzeLoading ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-4 w-4" })), aiAnalysis ? t("reRunAnalysis") : t("analyzeWithAi")] }))] }), _jsx(CardDescription, { children: t("geminiPoweredAdmissionScoring") })] }), _jsx(Separator, {}), _jsxs(CardContent, { className: "pt-6", children: [analyzeLoading && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-3", children: [_jsx(Loader2, { className: "h-5 w-5 animate-spin" }), _jsx("span", { children: t("runningAiAnalysis") })] })), analyzeError && !analyzeLoading && (_jsxs("div", { className: "text-destructive flex items-center gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx("span", { children: analyzeError })] })), !analyzeLoading && aiAnalysis && (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [_jsxs("div", { className: "bg-muted flex flex-col items-center rounded-lg px-6 py-3", children: [_jsx("span", { className: "text-primary text-3xl font-bold", children: aiAnalysis.score }), _jsx("span", { className: "text-muted-foreground text-xs tracking-wide uppercase", children: "/ 100" })] }), _jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm font-medium ${decisionColor(aiAnalysis.decision)}`, children: [decisionIcon(aiAnalysis.decision), aiAnalysis.decision.replace("_", " ")] }), _jsxs("div", { className: "text-muted-foreground text-sm", children: [_jsxs("span", { className: "font-medium", children: [t("confidence"), ": "] }), (aiAnalysis.confidence * 100).toFixed(0), "%"] })] }), aiAnalysis.reasons.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "mb-2 text-sm font-medium", children: t("aiReasoningAndRiskFlags") }), _jsx("ul", { className: "space-y-1.5", children: aiAnalysis.reasons.map((reason, i) => (_jsxs("li", { className: "flex items-start gap-2 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-yellow-500" }), _jsx("span", { children: reason })] }, i))) })] })), _jsxs("p", { className: "text-muted-foreground text-xs", children: [t("lastAnalyzed"), ":", " ", formatDate(String(aiAnalysis.processedAt), DATE_FORMATS.LOCALE_DATE)] })] })), !analyzeLoading && !aiAnalysis && !analyzeError && (_jsx("p", { className: "text-muted-foreground text-sm", children: t("noAiAnalysisYet") }))] })] })), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BookOpen, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("admissionDetails") })] }), _jsx(CardDescription, { children: t("registrationAndAdmissionInformation") })] }), _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("registrationCode") }), _jsx("p", { className: "font-mono text-base", children: formatValue(registrationCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("classForAdmission") }), _jsx("p", { className: "text-base", children: formatValue(classForAdmission) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx("p", { className: "text-base", children: formatValue(status) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("previousSchool") }), _jsx("p", { className: "text-base", children: formatValue(previousSchool) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("siblings") }), _jsx("p", { className: "text-base", children: formatValue(siblings) })] })] }) })] }), _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("studentInformation") })] }), _jsx(CardDescription, { children: t("personalDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(firstName), " ", formatValue(lastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("dob") }), _jsx("p", { className: "text-base", children: formatDate(String(dob), DATE_FORMATS.LOCALE_DATE) })] }), _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: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("bForm") }), _jsx("p", { className: "text-base", children: formatValue(bForm) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("discountCode") }), _jsx("p", { className: "text-base", children: formatValue(discountCode) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("emergencyContact") }), _jsx("p", { className: "text-base", children: formatValue(emergencyContact) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("hafizEQuran") }), _jsx("p", { className: "text-base", children: hafiz ? t("yes") : t("no") })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("orphan") }), _jsx("p", { className: "text-base", children: orphan ? t("yes") : t("no") })] })] }) })] }), _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("fatherInformation") })] }), _jsx(CardDescription, { children: t("fatherDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(fatherFirstName), " ", formatValue(fatherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("cnic") }), _jsx("p", { className: "text-base", children: formatValue(fatherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _jsx("p", { className: "text-base", children: formatValue(fatherMobile) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("occupation") }), _jsx("p", { className: "text-base", children: formatValue(fatherOccupation) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("organization") }), _jsx("p", { className: "text-base", children: formatValue(fatherOrganization) })] })] }) })] }), _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("motherInformation") })] }), _jsx(CardDescription, { children: t("motherDetails") })] }), _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("fullName") }), _jsxs("p", { className: "text-base", children: [formatValue(motherFirstName), " ", formatValue(motherLastName)] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("cnic") }), _jsx("p", { className: "text-base", children: formatValue(motherCnic) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("mobile") }), _jsx("p", { className: "text-base", children: formatValue(motherMobile) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Home, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("homeDetails") })] }), _jsx(CardDescription, { children: t("addressInformation") })] }), _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 md:col-span-2", 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: "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("state") }), _jsx("p", { className: "text-base", children: formatValue(provinceState) })] }), _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(FileText, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("officeUse") })] }), _jsx(CardDescription, { children: t("internalNotesAndProcessingInformation") })] }), _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("notes") }), _jsx("p", { className: "text-base", children: formatValue(notes) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("admissionNotes") }), _jsx("p", { className: "text-base", children: formatValue(admissionNotes) })] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Calendar, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("recordStatus") })] }), _jsx(CardDescription, { children: t("recordStateAndMetadata") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("enabled") }), _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")] })] }) })] })] }));
40
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@appcorp/app-corp-vista": "^1.0.0",
40
- "@appcorp/shadcn": "^1.1.60",
40
+ "@appcorp/shadcn": "^1.1.75",
41
41
  "@chromatic-com/storybook": "^5.1.1",
42
42
  "@commitlint/cli": "^20.5.0",
43
43
  "@commitlint/config-conventional": "^20.5.0",
@@ -56,7 +56,7 @@
56
56
  "@radix-ui/react-separator": "^1.1.8",
57
57
  "@radix-ui/react-slot": "^1.2.4",
58
58
  "@radix-ui/react-toast": "^1.2.15",
59
- "@react-pakistan/util-functions": "^1.25.68",
59
+ "@react-pakistan/util-functions": "^1.25.69",
60
60
  "@storybook/addon-a11y": "^10.3.4",
61
61
  "@storybook/addon-docs": "^10.3.4",
62
62
  "@storybook/addon-onboarding": "^10.3.4",