@retinalabsllc/zairusjs 0.5.4 → 0.5.6
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/dist/index.js +7 -29
- package/dist/index.mjs +7 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2404,8 +2404,10 @@ var UniversalBillingPage = ({
|
|
|
2404
2404
|
if (!selectedInvoice || isReadOnly || !onPayInvoice || isPaying) return;
|
|
2405
2405
|
setIsPaying(true);
|
|
2406
2406
|
try {
|
|
2407
|
-
await onPayInvoice(selectedInvoice.id);
|
|
2408
|
-
|
|
2407
|
+
const res = await onPayInvoice(selectedInvoice.id);
|
|
2408
|
+
if (res && res.success) {
|
|
2409
|
+
setSelectedInvoice({ ...selectedInvoice, status: "PAID" });
|
|
2410
|
+
}
|
|
2409
2411
|
} finally {
|
|
2410
2412
|
setIsPaying(false);
|
|
2411
2413
|
}
|
|
@@ -2439,15 +2441,7 @@ var UniversalBillingPage = ({
|
|
|
2439
2441
|
className: "px-4 py-3 text-sm bg-transparent border-b border-neutral-100 text-black outline-none focus:border-black shrink-0 text-left"
|
|
2440
2442
|
},
|
|
2441
2443
|
timeframe === "ALL" ? "All Time" : timeframe === "24H" ? "Past 24 Hours" : timeframe === "7D" ? "Past 7 Days" : "Past 30 Days"
|
|
2442
|
-
))) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons12.ArrowLeft01Icon, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit" }, "Read Only Access")), currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricPrimaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-black tracking-tight truncate" }, formatNaira(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricSecondaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatNaira(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Billing Status"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Next Billing Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Last Paid Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 truncate block uppercase" }, "Usage & Limits"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ import_react46.default.createElement("div", { key: idx, className: "flex justify-between border-b border-neutral-50 pb-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-4 truncate block uppercase" }, "Transaction History"), isLoading ? /* @__PURE__ */ import_react46.default.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ import_react46.default.createElement(import_react46.default.Fragment, null, /* @__PURE__ */ import_react46.default.createElement("
|
|
2443
|
-
"svg",
|
|
2444
|
-
{
|
|
2445
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2446
|
-
viewBox: "0 0 24 24",
|
|
2447
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2448
|
-
},
|
|
2449
|
-
/* @__PURE__ */ import_react46.default.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2450
|
-
)), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ import_react46.default.createElement("div", { key: inv.id, onClick: () => {
|
|
2444
|
+
))) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons12.ArrowLeft01Icon, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit" }, "Read Only Access")), currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricPrimaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-black tracking-tight truncate" }, formatNaira(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricSecondaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatNaira(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Billing Status"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Next Billing Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Last Paid Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 truncate block uppercase" }, "Usage & Limits"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ import_react46.default.createElement("div", { key: idx, className: "flex justify-between border-b border-neutral-50 pb-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-4 truncate block uppercase" }, "Transaction History"), isLoading ? /* @__PURE__ */ import_react46.default.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ import_react46.default.createElement(import_react46.default.Fragment, null, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ import_react46.default.createElement("div", { key: inv.id, onClick: () => {
|
|
2451
2445
|
setSelectedInvoice(inv);
|
|
2452
2446
|
setCurrentView("details");
|
|
2453
2447
|
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black" }, formatNaira(inv.amountDue)), /* @__PURE__ */ import_react46.default.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons12.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons12.ArrowRight01Icon, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-2xl animate-in fade-in duration-300" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Breakdown"), /* @__PURE__ */ import_react46.default.createElement("h2", { className: " font-serif text-xl text-black mb-1" }, selectedInvoice.name), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 p-6 sm:p-8 rounded-2xl border border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Amount"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xl text-black" }, formatNaira(selectedInvoice.amountDue))), /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Status"), isModMode ? /* @__PURE__ */ import_react46.default.createElement(
|
|
@@ -2665,15 +2659,7 @@ var UniversalAgentConsole = ({
|
|
|
2665
2659
|
if (entries.length === 0) return null;
|
|
2666
2660
|
return entries.map(([k, v]) => /* @__PURE__ */ import_react50.default.createElement("div", { key: k, className: "flex flex-col items-start min-w-0 wrap-break-word w-full mb-3 last:mb-0" }, /* @__PURE__ */ import_react50.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 uppercase" }, formatKeyName(k)), renderValue(k, v)));
|
|
2667
2661
|
};
|
|
2668
|
-
return /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react50.default.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ import_react50.default.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ import_react50.default.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ import_react50.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ import_react50.default.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "
|
|
2669
|
-
"svg",
|
|
2670
|
-
{
|
|
2671
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2672
|
-
viewBox: "0 0 24 24",
|
|
2673
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2674
|
-
},
|
|
2675
|
-
/* @__PURE__ */ import_react50.default.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2676
|
-
)), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ import_react50.default.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react50.default.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ import_react50.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ import_react50.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.ArrowRight01Icon, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => {
|
|
2662
|
+
return /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ import_react50.default.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ import_react50.default.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ import_react50.default.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ import_react50.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ import_react50.default.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ import_react50.default.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react50.default.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ import_react50.default.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ import_react50.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.ArrowRight01Icon, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ import_react50.default.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => {
|
|
2677
2663
|
onBackToList();
|
|
2678
2664
|
setPendingFiles([]);
|
|
2679
2665
|
}, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 14 }), " Back to List"), /* @__PURE__ */ import_react50.default.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ import_react50.default.createElement("h2", { className: " font-serif text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ import_react50.default.createElement("h3", { className: " font-serif text-sm text-black" }, "Official Archives"), /* @__PURE__ */ import_react50.default.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ import_react50.default.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react50.default.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ import_react50.default.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ import_react50.default.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Cancel01Icon, size: 16 })))), /* @__PURE__ */ import_react50.default.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react50.default.createElement(import_react51.HugeiconsIcon, { icon: import_core_free_icons14.Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ import_react50.default.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-200 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ import_react50.default.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ import_react50.default.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ import_react50.default.createElement(ThreeDActionButton, { onClick: async () => {
|
|
@@ -2890,15 +2876,7 @@ var UniversalDirectoryPage = ({
|
|
|
2890
2876
|
value: searchQuery,
|
|
2891
2877
|
onChange: onSearchChange
|
|
2892
2878
|
}
|
|
2893
|
-
)), headerAction && /* @__PURE__ */ import_react57.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react57.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react57.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react57.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react57.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("
|
|
2894
|
-
"svg",
|
|
2895
|
-
{
|
|
2896
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2897
|
-
viewBox: "0 0 24 24",
|
|
2898
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2899
|
-
},
|
|
2900
|
-
/* @__PURE__ */ import_react57.default.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2901
|
-
)), /* @__PURE__ */ import_react57.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ import_react57.default.createElement(
|
|
2879
|
+
)), headerAction && /* @__PURE__ */ import_react57.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react57.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react57.default.createElement(import_react58.HugeiconsIcon, { icon: import_core_free_icons17.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react57.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react57.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react57.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react57.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ import_react57.default.createElement(
|
|
2902
2880
|
"div",
|
|
2903
2881
|
{
|
|
2904
2882
|
key: item.id,
|
package/dist/index.mjs
CHANGED
|
@@ -2346,8 +2346,10 @@ var UniversalBillingPage = ({
|
|
|
2346
2346
|
if (!selectedInvoice || isReadOnly || !onPayInvoice || isPaying) return;
|
|
2347
2347
|
setIsPaying(true);
|
|
2348
2348
|
try {
|
|
2349
|
-
await onPayInvoice(selectedInvoice.id);
|
|
2350
|
-
|
|
2349
|
+
const res = await onPayInvoice(selectedInvoice.id);
|
|
2350
|
+
if (res && res.success) {
|
|
2351
|
+
setSelectedInvoice({ ...selectedInvoice, status: "PAID" });
|
|
2352
|
+
}
|
|
2351
2353
|
} finally {
|
|
2352
2354
|
setIsPaying(false);
|
|
2353
2355
|
}
|
|
@@ -2381,15 +2383,7 @@ var UniversalBillingPage = ({
|
|
|
2381
2383
|
className: "px-4 py-3 text-sm bg-transparent border-b border-neutral-100 text-black outline-none focus:border-black shrink-0 text-left"
|
|
2382
2384
|
},
|
|
2383
2385
|
timeframe === "ALL" ? "All Time" : timeframe === "24H" ? "Past 24 Hours" : timeframe === "7D" ? "Past 7 Days" : "Past 30 Days"
|
|
2384
|
-
))) : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React31.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React31.createElement(HugeiconsIcon16, { icon: ArrowLeft01Icon4, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ React31.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit" }, "Read Only Access")), currentView === "list" && /* @__PURE__ */ React31.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricPrimaryLabel), /* @__PURE__ */ React31.createElement("div", { className: "text-xl text-black tracking-tight truncate" }, formatNaira(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ React31.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricSecondaryLabel), /* @__PURE__ */ React31.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatNaira(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ React31.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Billing Status"), /* @__PURE__ */ React31.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React31.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Next Billing Date"), /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Last Paid Date"), /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ React31.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 truncate block uppercase" }, "Usage & Limits"), /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ React31.createElement("div", { key: idx, className: "flex justify-between border-b border-neutral-50 pb-2" }, /* @__PURE__ */ React31.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ React31.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ React31.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-4 truncate block uppercase" }, "Transaction History"), isLoading ? /* @__PURE__ */ React31.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement("
|
|
2385
|
-
"svg",
|
|
2386
|
-
{
|
|
2387
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2388
|
-
viewBox: "0 0 24 24",
|
|
2389
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2390
|
-
},
|
|
2391
|
-
/* @__PURE__ */ React31.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2392
|
-
)), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React31.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ React31.createElement("div", { key: inv.id, onClick: () => {
|
|
2386
|
+
))) : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React31.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React31.createElement(HugeiconsIcon16, { icon: ArrowLeft01Icon4, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ React31.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit" }, "Read Only Access")), currentView === "list" && /* @__PURE__ */ React31.createElement("div", { className: "w-full max-w-2xl" }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricPrimaryLabel), /* @__PURE__ */ React31.createElement("div", { className: "text-xl text-black tracking-tight truncate" }, formatNaira(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ React31.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-2 truncate block uppercase" }, metricSecondaryLabel), /* @__PURE__ */ React31.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatNaira(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ React31.createElement("p", { className: "text-[10px] text-neutral-500 mt-1 tracking-widest uppercase" }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Billing Status"), /* @__PURE__ */ React31.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React31.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Next Billing Date"), /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ React31.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-3 truncate block uppercase" }, "Last Paid Date"), /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ React31.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-6 truncate block uppercase" }, "Usage & Limits"), /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ React31.createElement("div", { key: idx, className: "flex justify-between border-b border-neutral-50 pb-2" }, /* @__PURE__ */ React31.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ React31.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ React31.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React31.createElement("h3", { className: " font-serif text-[10px] text-neutral-400 tracking-[0.2em] mb-4 truncate block uppercase" }, "Transaction History"), isLoading ? /* @__PURE__ */ React31.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React31.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ React31.createElement("div", { key: inv.id, onClick: () => {
|
|
2393
2387
|
setSelectedInvoice(inv);
|
|
2394
2388
|
setCurrentView("details");
|
|
2395
2389
|
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React31.createElement("p", { className: "text-sm text-black" }, formatNaira(inv.amountDue)), /* @__PURE__ */ React31.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ React31.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ React31.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React31.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React31.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React31.createElement(HugeiconsIcon16, { icon: ArrowLeft01Icon4, size: 14 })), /* @__PURE__ */ React31.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React31.createElement(HugeiconsIcon16, { icon: ArrowRight01Icon4, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ React31.createElement("div", { className: "w-full max-w-2xl animate-in fade-in duration-300" }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Breakdown"), /* @__PURE__ */ React31.createElement("h2", { className: " font-serif text-xl text-black mb-1" }, selectedInvoice.name), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 p-6 sm:p-8 rounded-2xl border border-neutral-100" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Amount"), /* @__PURE__ */ React31.createElement("p", { className: "text-xl text-black" }, formatNaira(selectedInvoice.amountDue))), /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1 uppercase" }, "Status"), isModMode ? /* @__PURE__ */ React31.createElement(
|
|
@@ -2618,15 +2612,7 @@ var UniversalAgentConsole = ({
|
|
|
2618
2612
|
if (entries.length === 0) return null;
|
|
2619
2613
|
return entries.map(([k, v]) => /* @__PURE__ */ React33.createElement("div", { key: k, className: "flex flex-col items-start min-w-0 wrap-break-word w-full mb-3 last:mb-0" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 uppercase" }, formatKeyName(k)), renderValue(k, v)));
|
|
2620
2614
|
};
|
|
2621
|
-
return /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ React33.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ React33.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ React33.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ React33.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ React33.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Loading03Icon9, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "
|
|
2622
|
-
"svg",
|
|
2623
|
-
{
|
|
2624
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2625
|
-
viewBox: "0 0 24 24",
|
|
2626
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2627
|
-
},
|
|
2628
|
-
/* @__PURE__ */ React33.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2629
|
-
)), /* @__PURE__ */ React33.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ React33.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 })), /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowRight01Icon5, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => {
|
|
2615
|
+
return /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ React33.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ React33.createElement("h1", { className: " font-serif text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "w-full rounded-2xl max-w-3xl overflow-hidden bg-white" }, /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-[10px] tracking-[0.2em] text-neutral-400 mb-1 truncate uppercase" }, stat.label), /* @__PURE__ */ React33.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ React33.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl max-w-3xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ React33.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Loading03Icon9, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ React33.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-3 py-1 rounded-full uppercase ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 })), /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowRight01Icon5, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ React33.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-3xl flex flex-col" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => {
|
|
2630
2616
|
onBackToList();
|
|
2631
2617
|
setPendingFiles([]);
|
|
2632
2618
|
}, className: "flex items-center gap-2 text-[10px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none uppercase" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: ArrowLeft01Icon5, size: 14 }), " Back to List"), /* @__PURE__ */ React33.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full uppercase ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ React33.createElement("h2", { className: " font-serif text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ React33.createElement("h3", { className: " font-serif text-sm text-black" }, "Official Archives"), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ React33.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React33.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Cancel01Icon2, size: 16 })))), /* @__PURE__ */ React33.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon18, { icon: Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-200 outline-none w-full sm:w-auto uppercase" }, "Clear All"), /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ React33.createElement(ThreeDActionButton, { onClick: async () => {
|
|
@@ -2843,15 +2829,7 @@ var UniversalDirectoryPage = ({
|
|
|
2843
2829
|
value: searchQuery,
|
|
2844
2830
|
onChange: onSearchChange
|
|
2845
2831
|
}
|
|
2846
|
-
)), headerAction && /* @__PURE__ */ React37.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React37.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon21, { icon: ArrowLeft01Icon6, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ React37.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ React37.createElement(PageSpinner4, null) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React37.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement("
|
|
2847
|
-
"svg",
|
|
2848
|
-
{
|
|
2849
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2850
|
-
viewBox: "0 0 24 24",
|
|
2851
|
-
className: "w-12 h-12 fill-neutral-200"
|
|
2852
|
-
},
|
|
2853
|
-
/* @__PURE__ */ React37.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
|
|
2854
|
-
)), /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ React37.createElement(
|
|
2832
|
+
)), headerAction && /* @__PURE__ */ React37.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React37.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon21, { icon: ArrowLeft01Icon6, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ React37.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ React37.createElement(PageSpinner4, null) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React37.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.")) : items.map((item) => /* @__PURE__ */ React37.createElement(
|
|
2855
2833
|
"div",
|
|
2856
2834
|
{
|
|
2857
2835
|
key: item.id,
|