@fayz-ai/plugin-financial 0.26.0 → 0.26.1

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.
@@ -6,7 +6,7 @@ import { FinancialContextProvider, useFinancialConfig, useFinancialStore, useFin
6
6
  import * as React14 from 'react';
7
7
  import React14__default, { useMemo, useCallback, useState, useEffect, useRef } from 'react';
8
8
  import { useTranslation, navigateApp, appHref, useUnitMode, useDataChanged, describeError, resolveCurrency, exportCSV, formatCurrency as formatCurrency$1 } from '@fayz-ai/core';
9
- import { PageTransition, ModulePage, Button, DashboardCanvas, ComingSoon, SubpageHeader, PageTabs, StatTiles, Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, ListView, Input, DatePicker, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DataTable, DateRangeControl, PageHeaderActions, FilterPanel, FilterPanelField, SearchSelect, SegmentedControl, Card, Hint, RequiredFilter, FilterMenuRow, toast, printDocument, ChoiceList, Skeleton, Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, Badge, AiActionButton, CurrencyInput, ModalFlow, useSaveBar, Switch, Textarea, RowActions, WizardSteps } from '@fayz-ai/ui';
9
+ import { PageTransition, ModulePage, Button, DashboardCanvas, ComingSoon, SubpageHeader, PageTabs, StatTiles, Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, ListView, Input, DatePicker, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DataTable, DateRangeControl, PageHeaderActions, FilterPanel, FilterPanelField, SearchSelect, SegmentedControl, Card, Pagination, Hint, RequiredFilter, FilterMenuRow, toast, printDocument, ChoiceList, Skeleton, Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, Badge, AiActionButton, CurrencyInput, ModalFlow, useSaveBar, Switch, Textarea, RowActions, WizardSteps } from '@fayz-ai/ui';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
11
  import { useTenantPluginSettings, useModuleNavigation, usePluginOnboardingGate, usePermissionOptional, useModuleNavAccess, PluginOnboardingGateSkeleton, PluginSettingsPanel, ModuleActionBar, EntitlementGate, UpgradePrompt, parseViewId, GetStarted, PermissionGate, PageActions, useUnitFilter, adminNavigateTo, PersonLink, createOneShotAsk, useLookupCreate, createArchetypeLookup, OrderFormSkeleton, OrderFormView, OrderFormBlock, OrderFormItemsCard, OrderFormItemRow, OrderFormAddItemStep, useAgentSurface, shrinkForVision, toInlineFile } from '@fayz-ai/admin';
12
12
  import { DollarSign, Landmark, CreditCard, BookOpen, Check, ChevronRight, Wallet, Receipt, CalendarClock, Plus, Loader2, BadgeCheck, Gift, Pencil, Target, Settings, Play, ArrowRight, Users, RefreshCw, CloudDownload, ListChecks, Search, ChevronDown, ArrowRightLeft, Building2, Download, Paperclip, CircleDashed, CircleEllipsis, CircleCheckBig, CircleAlert, Ban, Printer, FileText, Camera, Sparkles, Link2, FileSearch, Undo2, Eye, TriangleAlert, Trash2, CheckCheck, X, Pause, ShoppingCart, Car, Home, Utensils, Zap, Film, HeartPulse, Dumbbell, Music, ShoppingBag, CircleDollarSign, ArrowLeft, FileDown, AlertTriangle } from 'lucide-react';
@@ -5067,9 +5067,6 @@ function ReconciliationView() {
5067
5067
  }
5068
5068
  const rows = result?.rows ?? [];
5069
5069
  const total = result?.total ?? 0;
5070
- const pages = Math.max(1, Math.ceil(total / PAGE_SIZE));
5071
- const firstRow = total === 0 ? 0 : (page - 1) * PAGE_SIZE + 1;
5072
- const lastRow = Math.min(page * PAGE_SIZE, total);
5073
5070
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
5074
5071
  /* @__PURE__ */ jsxs(PageHeaderActions, { children: [
5075
5072
  /* @__PURE__ */ jsx(PageActions, { actions: headerActions }),
@@ -5291,16 +5288,17 @@ function ReconciliationView() {
5291
5288
  ))
5292
5289
  ] }, bucket);
5293
5290
  }) }),
5294
- applied.accountId && total > 0 && /* @__PURE__ */ jsxs(Card, { className: "flex flex-wrap items-center gap-2 px-3 py-2", children: [
5295
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t("financial.reconciliation.showing", { from: firstRow, to: lastRow, total }) }),
5296
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1", children: [
5297
- /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", disabled: page <= 1 || loading, onClick: () => setPage(1), children: t("financial.reconciliation.first") }),
5298
- /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", disabled: page <= 1 || loading, onClick: () => setPage((p) => p - 1), children: t("financial.reconciliation.previous") }),
5299
- /* @__PURE__ */ jsx("span", { className: "px-2 text-xs text-muted-foreground", children: t("financial.reconciliation.pageOf", { page, pages }) }),
5300
- /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", disabled: page >= pages || loading, onClick: () => setPage((p) => p + 1), children: t("financial.reconciliation.next") }),
5301
- /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", disabled: page >= pages || loading, onClick: () => setPage(pages), children: t("financial.reconciliation.last") })
5302
- ] })
5303
- ] }),
5291
+ applied.accountId && total > 0 && /* @__PURE__ */ jsx(Card, { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
5292
+ Pagination,
5293
+ {
5294
+ className: "border-t-0",
5295
+ page,
5296
+ pageSize: PAGE_SIZE,
5297
+ total,
5298
+ onPageChange: setPage,
5299
+ disabled: loading
5300
+ }
5301
+ ) }),
5304
5302
  applied.accountId && result && total > 0 && /* @__PURE__ */ jsx(Hint, { label: t("financial.reconciliation.pageTotalsHint"), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-3", children: [
5305
5303
  /* @__PURE__ */ jsx(TotalStat, { label: t("financial.reconciliation.pageCredits"), value: fmt(result.pageCredits), tone: "in" }),
5306
5304
  /* @__PURE__ */ jsx(TotalStat, { label: t("financial.reconciliation.pageDebits"), value: fmt(result.pageDebits), tone: "out" }),
@@ -6480,5 +6478,5 @@ function FinancialPage({ config: appConfig, provider, store, registries }) {
6480
6478
  }
6481
6479
 
6482
6480
  export { FinancialPage };
6483
- //# sourceMappingURL=FinancialPage-PGODULVH.js.map
6484
- //# sourceMappingURL=FinancialPage-PGODULVH.js.map
6481
+ //# sourceMappingURL=FinancialPage-3JOQUJ6B.js.map
6482
+ //# sourceMappingURL=FinancialPage-3JOQUJ6B.js.map