@hub-kit/core 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/cli/hub-kit.mjs +112 -0
- package/dist/adapters/bank-reconciliation.d.ts +100 -0
- package/dist/adapters/bank-reconciliation.js +1 -0
- package/dist/adapters/bank-sync-log.d.ts +46 -0
- package/dist/adapters/bank-sync-log.js +1 -0
- package/dist/adapters/category-rules.d.ts +94 -0
- package/dist/adapters/category-rules.js +1 -0
- package/dist/adapters/companies.d.ts +85 -0
- package/dist/adapters/companies.js +3 -0
- package/dist/adapters/customers.d.ts +71 -0
- package/dist/adapters/customers.js +1 -0
- package/dist/adapters/exclusion-rules.d.ts +34 -0
- package/dist/adapters/exclusion-rules.js +15 -0
- package/dist/adapters/file-naming.d.ts +36 -0
- package/dist/adapters/file-naming.js +1 -0
- package/dist/adapters/index.d.ts +24 -0
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/invoice-detail.d.ts +126 -0
- package/dist/adapters/invoice-detail.js +1 -0
- package/dist/adapters/invoice-list.d.ts +63 -0
- package/dist/adapters/invoice-list.js +1 -0
- package/dist/adapters/invoice-upload.d.ts +26 -0
- package/dist/adapters/invoice-upload.js +1 -0
- package/dist/adapters/manual-bookings.d.ts +56 -0
- package/dist/adapters/manual-bookings.js +1 -0
- package/dist/adapters/notifications.d.ts +31 -0
- package/dist/adapters/notifications.js +1 -0
- package/dist/adapters/open-items.d.ts +42 -0
- package/dist/adapters/open-items.js +1 -0
- package/dist/adapters/opos-whitelist.d.ts +38 -0
- package/dist/adapters/opos-whitelist.js +1 -0
- package/dist/adapters/outgoing-invoices.d.ts +32 -0
- package/dist/adapters/outgoing-invoices.js +1 -0
- package/dist/adapters/overview.d.ts +68 -0
- package/dist/adapters/overview.js +1 -0
- package/dist/adapters/processing-log.d.ts +48 -0
- package/dist/adapters/processing-log.js +1 -0
- package/dist/adapters/properties.d.ts +87 -0
- package/dist/adapters/properties.js +1 -0
- package/dist/adapters/supplier-detail.d.ts +64 -0
- package/dist/adapters/supplier-detail.js +1 -0
- package/dist/adapters/supplier-list.d.ts +21 -0
- package/dist/adapters/supplier-list.js +1 -0
- package/dist/adapters/team.d.ts +79 -0
- package/dist/adapters/team.js +1 -0
- package/dist/adapters/trash.d.ts +26 -0
- package/dist/adapters/trash.js +1 -0
- package/dist/adapters/vat-rules.d.ts +83 -0
- package/dist/adapters/vat-rules.js +1 -0
- package/dist/components/access/index.d.ts +3 -0
- package/dist/components/access/index.js +3 -0
- package/dist/components/access/permission-checklist.d.ts +13 -0
- package/dist/components/access/permission-checklist.js +19 -0
- package/dist/components/access/permission-matrix.d.ts +12 -0
- package/dist/components/access/permission-matrix.js +18 -0
- package/dist/components/access/types.d.ts +15 -0
- package/dist/components/access/types.js +1 -0
- package/dist/components/dashboard/date-range-calendar.d.ts +19 -0
- package/dist/components/dashboard/date-range-calendar.js +97 -0
- package/dist/components/dashboard/index.d.ts +23 -0
- package/dist/components/dashboard/index.js +14 -0
- package/dist/components/dashboard/kpi-card.d.ts +13 -0
- package/dist/components/dashboard/kpi-card.js +7 -0
- package/dist/components/dashboard/money-cards-row.d.ts +29 -0
- package/dist/components/dashboard/money-cards-row.js +28 -0
- package/dist/components/dashboard/money-trend-chart.d.ts +13 -0
- package/dist/components/dashboard/money-trend-chart.js +16 -0
- package/dist/components/dashboard/panel.d.ts +9 -0
- package/dist/components/dashboard/panel.js +5 -0
- package/dist/components/dashboard/period-picker.d.ts +25 -0
- package/dist/components/dashboard/period-picker.js +82 -0
- package/dist/components/dashboard/periods.d.ts +13 -0
- package/dist/components/dashboard/periods.js +63 -0
- package/dist/components/dashboard/pipeline-stages-panel.d.ts +14 -0
- package/dist/components/dashboard/pipeline-stages-panel.js +12 -0
- package/dist/components/dashboard/processing-summary-panel.d.ts +34 -0
- package/dist/components/dashboard/processing-summary-panel.js +11 -0
- package/dist/components/dashboard/ranked-bars.d.ts +15 -0
- package/dist/components/dashboard/ranked-bars.js +16 -0
- package/dist/components/dashboard/ranked-list-panel.d.ts +14 -0
- package/dist/components/dashboard/ranked-list-panel.js +9 -0
- package/dist/components/dashboard/stage-tiles.d.ts +15 -0
- package/dist/components/dashboard/stage-tiles.js +6 -0
- package/dist/components/dashboard/stat-rows-panel.d.ts +25 -0
- package/dist/components/dashboard/stat-rows-panel.js +7 -0
- package/dist/components/dashboard/stat-tile.d.ts +20 -0
- package/dist/components/dashboard/stat-tile.js +9 -0
- package/dist/components/feedback/index.d.ts +4 -0
- package/dist/components/feedback/index.js +2 -0
- package/dist/components/feedback/query-states.d.ts +27 -0
- package/dist/components/feedback/query-states.js +38 -0
- package/dist/components/feedback/table-pagination.d.ts +20 -0
- package/dist/components/feedback/table-pagination.js +15 -0
- package/dist/components/invoice-queue/index.d.ts +5 -0
- package/dist/components/invoice-queue/index.js +3 -0
- package/dist/components/invoice-queue/next-action-cell.d.ts +5 -0
- package/dist/components/invoice-queue/next-action-cell.js +9 -0
- package/dist/components/invoice-queue/queue-kpi-card.d.ts +19 -0
- package/dist/components/invoice-queue/queue-kpi-card.js +31 -0
- package/dist/components/invoice-queue/queue-kpi-row.d.ts +22 -0
- package/dist/components/invoice-queue/queue-kpi-row.js +12 -0
- package/dist/components/notifications/alerts.d.ts +25 -0
- package/dist/components/notifications/alerts.js +66 -0
- package/dist/components/notifications/bell.d.ts +14 -0
- package/dist/components/notifications/bell.js +17 -0
- package/dist/components/notifications/highlight.d.ts +4 -0
- package/dist/components/notifications/highlight.js +7 -0
- package/dist/components/notifications/index.d.ts +7 -0
- package/dist/components/notifications/index.js +6 -0
- package/dist/components/notifications/reminder-dialog.d.ts +24 -0
- package/dist/components/notifications/reminder-dialog.js +54 -0
- package/dist/components/notifications/types.d.ts +27 -0
- package/dist/components/notifications/types.js +1 -0
- package/dist/components/notifications/use-notification-acks.d.ts +7 -0
- package/dist/components/notifications/use-notification-acks.js +37 -0
- package/dist/components/shell/breadcrumbs.d.ts +7 -0
- package/dist/components/shell/breadcrumbs.js +38 -0
- package/dist/components/shell/index.d.ts +3 -0
- package/dist/components/shell/index.js +3 -0
- package/dist/components/shell/shell.d.ts +30 -0
- package/dist/components/shell/shell.js +110 -0
- package/dist/components/shell/types.d.ts +23 -0
- package/dist/components/shell/types.js +3 -0
- package/dist/components/tour/find-target.d.ts +1 -0
- package/dist/components/tour/find-target.js +3 -0
- package/dist/components/tour/index.d.ts +14 -0
- package/dist/components/tour/index.js +8 -0
- package/dist/components/tour/labels.d.ts +10 -0
- package/dist/components/tour/labels.js +9 -0
- package/dist/components/tour/seen-store.d.ts +3 -0
- package/dist/components/tour/seen-store.js +34 -0
- package/dist/components/tour/tour-blocks.d.ts +4 -0
- package/dist/components/tour/tour-blocks.js +27 -0
- package/dist/components/tour/tour-button.d.ts +4 -0
- package/dist/components/tour/tour-button.js +12 -0
- package/dist/components/tour/tour-card.d.ts +11 -0
- package/dist/components/tour/tour-card.js +7 -0
- package/dist/components/tour/tour-context.d.ts +16 -0
- package/dist/components/tour/tour-context.js +2 -0
- package/dist/components/tour/tour-overlay.d.ts +1 -0
- package/dist/components/tour/tour-overlay.js +165 -0
- package/dist/components/tour/tour-provider.d.ts +9 -0
- package/dist/components/tour/tour-provider.js +80 -0
- package/dist/components/tour/types.d.ts +44 -0
- package/dist/components/tour/types.js +1 -0
- package/dist/components/tour/use-tour.d.ts +3 -0
- package/dist/components/tour/use-tour.js +9 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/i18n/index.d.ts +15 -0
- package/dist/i18n/index.js +15 -0
- package/dist/lib/bank-import/classify.d.ts +8 -0
- package/dist/lib/bank-import/classify.js +89 -0
- package/dist/lib/bank-import/column-guess.d.ts +2 -0
- package/dist/lib/bank-import/column-guess.js +40 -0
- package/dist/lib/bank-import/csv.d.ts +3 -0
- package/dist/lib/bank-import/csv.js +20 -0
- package/dist/lib/bank-import/duplicates.d.ts +2 -0
- package/dist/lib/bank-import/duplicates.js +21 -0
- package/dist/lib/bank-import/index.d.ts +12 -0
- package/dist/lib/bank-import/index.js +9 -0
- package/dist/lib/bank-import/mapping-storage.d.ts +3 -0
- package/dist/lib/bank-import/mapping-storage.js +29 -0
- package/dist/lib/bank-import/normalize.d.ts +4 -0
- package/dist/lib/bank-import/normalize.js +82 -0
- package/dist/lib/bank-import/parse-file.d.ts +7 -0
- package/dist/lib/bank-import/parse-file.js +23 -0
- package/dist/lib/bank-import/types.d.ts +31 -0
- package/dist/lib/bank-import/types.js +1 -0
- package/dist/lib/bank-import/xlsx.d.ts +2 -0
- package/dist/lib/bank-import/xlsx.js +25 -0
- package/dist/lib/class-names.d.ts +2 -0
- package/dist/lib/class-names.js +5 -0
- package/dist/lib/download.d.ts +2 -0
- package/dist/lib/download.js +14 -0
- package/dist/lib/formatters.d.ts +6 -0
- package/dist/lib/formatters.js +24 -0
- package/dist/lib/index.d.ts +9 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/opos-whitelist/index.d.ts +2 -0
- package/dist/lib/opos-whitelist/index.js +1 -0
- package/dist/lib/opos-whitelist/opos.d.ts +14 -0
- package/dist/lib/opos-whitelist/opos.js +49 -0
- package/dist/lib/query-result.d.ts +12 -0
- package/dist/lib/query-result.js +1 -0
- package/dist/lib/tour-placeholders/index.d.ts +2 -0
- package/dist/lib/tour-placeholders/index.js +1 -0
- package/dist/lib/tour-placeholders/overview.d.ts +12 -0
- package/dist/lib/tour-placeholders/overview.js +139 -0
- package/dist/pages/bank-accounts/BankAccountsPage.d.ts +7 -0
- package/dist/pages/bank-accounts/BankAccountsPage.js +21 -0
- package/dist/pages/bank-accounts/index.d.ts +4 -0
- package/dist/pages/bank-accounts/index.js +2 -0
- package/dist/pages/bank-accounts/labels.d.ts +15 -0
- package/dist/pages/bank-accounts/labels.js +14 -0
- package/dist/pages/bank-import/BankImportWizard.d.ts +9 -0
- package/dist/pages/bank-import/BankImportWizard.js +158 -0
- package/dist/pages/bank-import/index.d.ts +4 -0
- package/dist/pages/bank-import/index.js +2 -0
- package/dist/pages/bank-import/labels.d.ts +44 -0
- package/dist/pages/bank-import/labels.js +43 -0
- package/dist/pages/bank-sync-log/BankSyncLogPage.d.ts +7 -0
- package/dist/pages/bank-sync-log/BankSyncLogPage.js +77 -0
- package/dist/pages/bank-sync-log/index.d.ts +4 -0
- package/dist/pages/bank-sync-log/index.js +2 -0
- package/dist/pages/bank-sync-log/labels.d.ts +21 -0
- package/dist/pages/bank-sync-log/labels.js +20 -0
- package/dist/pages/bank-transactions/BankMatchPanel.d.ts +8 -0
- package/dist/pages/bank-transactions/BankMatchPanel.js +75 -0
- package/dist/pages/bank-transactions/BankTransactionsPage.d.ts +7 -0
- package/dist/pages/bank-transactions/BankTransactionsPage.js +59 -0
- package/dist/pages/bank-transactions/badges.d.ts +8 -0
- package/dist/pages/bank-transactions/badges.js +24 -0
- package/dist/pages/bank-transactions/index.d.ts +6 -0
- package/dist/pages/bank-transactions/index.js +4 -0
- package/dist/pages/bank-transactions/labels.d.ts +41 -0
- package/dist/pages/bank-transactions/labels.js +40 -0
- package/dist/pages/bank-transactions/sort-control.d.ts +17 -0
- package/dist/pages/bank-transactions/sort-control.js +8 -0
- package/dist/pages/bank-transactions/use-table-view.d.ts +23 -0
- package/dist/pages/bank-transactions/use-table-view.js +54 -0
- package/dist/pages/category-rules/CategoryRulesPage.d.ts +7 -0
- package/dist/pages/category-rules/CategoryRulesPage.js +160 -0
- package/dist/pages/category-rules/index.d.ts +4 -0
- package/dist/pages/category-rules/index.js +2 -0
- package/dist/pages/category-rules/labels.d.ts +66 -0
- package/dist/pages/category-rules/labels.js +72 -0
- package/dist/pages/companies/company-detail-page.d.ts +10 -0
- package/dist/pages/companies/company-detail-page.js +184 -0
- package/dist/pages/companies/company-form.d.ts +20 -0
- package/dist/pages/companies/company-form.js +23 -0
- package/dist/pages/companies/company-list-page.d.ts +9 -0
- package/dist/pages/companies/company-list-page.js +109 -0
- package/dist/pages/companies/known-spellings-card.d.ts +8 -0
- package/dist/pages/companies/known-spellings-card.js +65 -0
- package/dist/pages/companies/labels.d.ts +105 -0
- package/dist/pages/companies/labels.js +104 -0
- package/dist/pages/companies/sort-control.d.ts +17 -0
- package/dist/pages/companies/sort-control.js +8 -0
- package/dist/pages/companies/use-infinite-rows.d.ts +6 -0
- package/dist/pages/companies/use-infinite-rows.js +24 -0
- package/dist/pages/companies/use-table-view.d.ts +23 -0
- package/dist/pages/companies/use-table-view.js +56 -0
- package/dist/pages/customers/company-chip.d.ts +6 -0
- package/dist/pages/customers/company-chip.js +9 -0
- package/dist/pages/customers/copy-button.d.ts +6 -0
- package/dist/pages/customers/copy-button.js +31 -0
- package/dist/pages/customers/customer-detail-page.d.ts +10 -0
- package/dist/pages/customers/customer-detail-page.js +83 -0
- package/dist/pages/customers/customer-list-page.d.ts +9 -0
- package/dist/pages/customers/customer-list-page.js +65 -0
- package/dist/pages/customers/edit-customer-dialog.d.ts +9 -0
- package/dist/pages/customers/edit-customer-dialog.js +72 -0
- package/dist/pages/customers/form-hints.d.ts +6 -0
- package/dist/pages/customers/form-hints.js +9 -0
- package/dist/pages/customers/invoice-status-badge.d.ts +10 -0
- package/dist/pages/customers/invoice-status-badge.js +22 -0
- package/dist/pages/customers/labels.d.ts +116 -0
- package/dist/pages/customers/labels.js +117 -0
- package/dist/pages/customers/new-customer-dialog.d.ts +6 -0
- package/dist/pages/customers/new-customer-dialog.js +93 -0
- package/dist/pages/customers/sort-control.d.ts +14 -0
- package/dist/pages/customers/sort-control.js +9 -0
- package/dist/pages/customers/use-table-view.d.ts +23 -0
- package/dist/pages/customers/use-table-view.js +56 -0
- package/dist/pages/exclusion-rules/exclusion-rules-page.d.ts +7 -0
- package/dist/pages/exclusion-rules/exclusion-rules-page.js +114 -0
- package/dist/pages/exclusion-rules/labels.d.ts +53 -0
- package/dist/pages/exclusion-rules/labels.js +61 -0
- package/dist/pages/file-naming/build-filename.d.ts +3 -0
- package/dist/pages/file-naming/build-filename.js +82 -0
- package/dist/pages/file-naming/file-naming-page.d.ts +10 -0
- package/dist/pages/file-naming/file-naming-page.js +120 -0
- package/dist/pages/file-naming/labels.d.ts +44 -0
- package/dist/pages/file-naming/labels.js +44 -0
- package/dist/pages/index.d.ts +63 -0
- package/dist/pages/index.js +48 -0
- package/dist/pages/invoice-detail/InvoiceDetailPage.d.ts +11 -0
- package/dist/pages/invoice-detail/InvoiceDetailPage.js +292 -0
- package/dist/pages/invoice-detail/OutgoingInvoiceFlag.d.ts +26 -0
- package/dist/pages/invoice-detail/OutgoingInvoiceFlag.js +16 -0
- package/dist/pages/invoice-detail/ReviewBadge.d.ts +15 -0
- package/dist/pages/invoice-detail/ReviewBadge.js +23 -0
- package/dist/pages/invoice-detail/ReviewCard.d.ts +17 -0
- package/dist/pages/invoice-detail/ReviewCard.js +12 -0
- package/dist/pages/invoice-detail/SideBySide.d.ts +5 -0
- package/dist/pages/invoice-detail/SideBySide.js +5 -0
- package/dist/pages/invoice-detail/WorkflowHistoryList.d.ts +23 -0
- package/dist/pages/invoice-detail/WorkflowHistoryList.js +32 -0
- package/dist/pages/invoice-detail/WorkflowLadder.d.ts +20 -0
- package/dist/pages/invoice-detail/WorkflowLadder.js +16 -0
- package/dist/pages/invoice-detail/history.d.ts +23 -0
- package/dist/pages/invoice-detail/history.js +76 -0
- package/dist/pages/invoice-detail/index.d.ts +21 -0
- package/dist/pages/invoice-detail/index.js +11 -0
- package/dist/pages/invoice-detail/labels.d.ts +79 -0
- package/dist/pages/invoice-detail/labels.js +139 -0
- package/dist/pages/invoice-detail/pipeline-types.d.ts +58 -0
- package/dist/pages/invoice-detail/pipeline-types.js +1 -0
- package/dist/pages/invoice-detail/review-recheck.d.ts +8 -0
- package/dist/pages/invoice-detail/review-recheck.js +103 -0
- package/dist/pages/invoice-detail/review.d.ts +91 -0
- package/dist/pages/invoice-detail/review.js +310 -0
- package/dist/pages/invoice-list/badges.d.ts +23 -0
- package/dist/pages/invoice-list/badges.js +26 -0
- package/dist/pages/invoice-list/index.d.ts +5 -0
- package/dist/pages/invoice-list/index.js +3 -0
- package/dist/pages/invoice-list/invoice-list-page.d.ts +13 -0
- package/dist/pages/invoice-list/invoice-list-page.js +114 -0
- package/dist/pages/invoice-list/labels.d.ts +36 -0
- package/dist/pages/invoice-list/labels.js +29 -0
- package/dist/pages/invoice-list/sort-control.d.ts +17 -0
- package/dist/pages/invoice-list/sort-control.js +8 -0
- package/dist/pages/invoice-list/use-table-view.d.ts +23 -0
- package/dist/pages/invoice-list/use-table-view.js +54 -0
- package/dist/pages/invoice-upload/InvoiceUploadPage.d.ts +7 -0
- package/dist/pages/invoice-upload/InvoiceUploadPage.js +115 -0
- package/dist/pages/invoice-upload/index.d.ts +4 -0
- package/dist/pages/invoice-upload/index.js +2 -0
- package/dist/pages/invoice-upload/labels.d.ts +29 -0
- package/dist/pages/invoice-upload/labels.js +28 -0
- package/dist/pages/manual-bookings/ManualBookingsPage.d.ts +7 -0
- package/dist/pages/manual-bookings/ManualBookingsPage.js +161 -0
- package/dist/pages/manual-bookings/index.d.ts +4 -0
- package/dist/pages/manual-bookings/index.js +2 -0
- package/dist/pages/manual-bookings/labels.d.ts +53 -0
- package/dist/pages/manual-bookings/labels.js +52 -0
- package/dist/pages/notifications/labels.d.ts +22 -0
- package/dist/pages/notifications/labels.js +21 -0
- package/dist/pages/notifications/notifications-page.d.ts +14 -0
- package/dist/pages/notifications/notifications-page.js +81 -0
- package/dist/pages/open-items/OpenItemsPage.d.ts +11 -0
- package/dist/pages/open-items/OpenItemsPage.js +110 -0
- package/dist/pages/open-items/index.d.ts +6 -0
- package/dist/pages/open-items/index.js +3 -0
- package/dist/pages/open-items/labels.d.ts +37 -0
- package/dist/pages/open-items/labels.js +36 -0
- package/dist/pages/open-items/urgency.d.ts +8 -0
- package/dist/pages/open-items/urgency.js +27 -0
- package/dist/pages/opos-whitelist/OposWhitelistPage.d.ts +7 -0
- package/dist/pages/opos-whitelist/OposWhitelistPage.js +165 -0
- package/dist/pages/opos-whitelist/index.d.ts +4 -0
- package/dist/pages/opos-whitelist/index.js +2 -0
- package/dist/pages/opos-whitelist/labels.d.ts +56 -0
- package/dist/pages/opos-whitelist/labels.js +70 -0
- package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.d.ts +7 -0
- package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.js +169 -0
- package/dist/pages/outgoing-invoices/index.d.ts +4 -0
- package/dist/pages/outgoing-invoices/index.js +2 -0
- package/dist/pages/outgoing-invoices/labels.d.ts +43 -0
- package/dist/pages/outgoing-invoices/labels.js +42 -0
- package/dist/pages/outgoing-invoices/sort-control.d.ts +17 -0
- package/dist/pages/outgoing-invoices/sort-control.js +8 -0
- package/dist/pages/outgoing-invoices/use-table-view.d.ts +23 -0
- package/dist/pages/outgoing-invoices/use-table-view.js +54 -0
- package/dist/pages/overview/labels.d.ts +35 -0
- package/dist/pages/overview/labels.js +34 -0
- package/dist/pages/overview/overview-page.d.ts +22 -0
- package/dist/pages/overview/overview-page.js +127 -0
- package/dist/pages/processing-log/labels.d.ts +54 -0
- package/dist/pages/processing-log/labels.js +53 -0
- package/dist/pages/processing-log/mail-parsing.d.ts +21 -0
- package/dist/pages/processing-log/mail-parsing.js +52 -0
- package/dist/pages/processing-log/processing-log-page.d.ts +9 -0
- package/dist/pages/processing-log/processing-log-page.js +206 -0
- package/dist/pages/properties/badges.d.ts +20 -0
- package/dist/pages/properties/badges.js +45 -0
- package/dist/pages/properties/company-assignment-field.d.ts +11 -0
- package/dist/pages/properties/company-assignment-field.js +13 -0
- package/dist/pages/properties/form-field.d.ts +6 -0
- package/dist/pages/properties/form-field.js +9 -0
- package/dist/pages/properties/labels.d.ts +124 -0
- package/dist/pages/properties/labels.js +128 -0
- package/dist/pages/properties/name-variants-card.d.ts +7 -0
- package/dist/pages/properties/name-variants-card.js +60 -0
- package/dist/pages/properties/property-detail-page.d.ts +10 -0
- package/dist/pages/properties/property-detail-page.js +150 -0
- package/dist/pages/properties/property-list-page.d.ts +13 -0
- package/dist/pages/properties/property-list-page.js +201 -0
- package/dist/pages/properties/sort-control.d.ts +14 -0
- package/dist/pages/properties/sort-control.js +9 -0
- package/dist/pages/properties/use-infinite-rows.d.ts +6 -0
- package/dist/pages/properties/use-infinite-rows.js +26 -0
- package/dist/pages/properties/use-table-view.d.ts +23 -0
- package/dist/pages/properties/use-table-view.js +56 -0
- package/dist/pages/supplier-detail/SupplierDetailPage.d.ts +10 -0
- package/dist/pages/supplier-detail/SupplierDetailPage.js +157 -0
- package/dist/pages/supplier-detail/index.d.ts +4 -0
- package/dist/pages/supplier-detail/index.js +2 -0
- package/dist/pages/supplier-detail/labels.d.ts +46 -0
- package/dist/pages/supplier-detail/labels.js +45 -0
- package/dist/pages/supplier-list/SupplierListPage.d.ts +9 -0
- package/dist/pages/supplier-list/SupplierListPage.js +102 -0
- package/dist/pages/supplier-list/index.d.ts +4 -0
- package/dist/pages/supplier-list/index.js +2 -0
- package/dist/pages/supplier-list/labels.d.ts +33 -0
- package/dist/pages/supplier-list/labels.js +32 -0
- package/dist/pages/supplier-list/sort-control.d.ts +17 -0
- package/dist/pages/supplier-list/sort-control.js +8 -0
- package/dist/pages/supplier-list/use-table-view.d.ts +23 -0
- package/dist/pages/supplier-list/use-table-view.js +54 -0
- package/dist/pages/team/account-dialogs.d.ts +12 -0
- package/dist/pages/team/account-dialogs.js +49 -0
- package/dist/pages/team/employee-editor.d.ts +19 -0
- package/dist/pages/team/employee-editor.js +124 -0
- package/dist/pages/team/labels.d.ts +99 -0
- package/dist/pages/team/labels.js +98 -0
- package/dist/pages/team/new-employee.d.ts +8 -0
- package/dist/pages/team/new-employee.js +103 -0
- package/dist/pages/team/roles-tab.d.ts +6 -0
- package/dist/pages/team/roles-tab.js +46 -0
- package/dist/pages/team/team-page.d.ts +7 -0
- package/dist/pages/team/team-page.js +81 -0
- package/dist/pages/team/temp-password-dialog.d.ts +11 -0
- package/dist/pages/team/temp-password-dialog.js +23 -0
- package/dist/pages/trash/labels.d.ts +68 -0
- package/dist/pages/trash/labels.js +69 -0
- package/dist/pages/trash/trash-page.d.ts +9 -0
- package/dist/pages/trash/trash-page.js +259 -0
- package/dist/pages/vat-rules/labels.d.ts +110 -0
- package/dist/pages/vat-rules/labels.js +109 -0
- package/dist/pages/vat-rules/new-rule-dialog.d.ts +7 -0
- package/dist/pages/vat-rules/new-rule-dialog.js +134 -0
- package/dist/pages/vat-rules/rule-row.d.ts +20 -0
- package/dist/pages/vat-rules/rule-row.js +120 -0
- package/dist/pages/vat-rules/vat-rules-page.d.ts +9 -0
- package/dist/pages/vat-rules/vat-rules-page.js +61 -0
- package/dist/ui/alert-dialog.d.ts +20 -0
- package/dist/ui/alert-dialog.js +41 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/badge.js +20 -0
- package/dist/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/breadcrumb.js +23 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.js +33 -0
- package/dist/ui/calendar.d.ts +8 -0
- package/dist/ui/calendar.js +75 -0
- package/dist/ui/card.d.ts +8 -0
- package/dist/ui/card.js +16 -0
- package/dist/ui/chart.d.ts +62 -0
- package/dist/ui/chart.js +118 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.js +11 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/collapsible.js +5 -0
- package/dist/ui/combobox.d.ts +24 -0
- package/dist/ui/combobox.js +55 -0
- package/dist/ui/command.d.ts +80 -0
- package/dist/ui/command.js +29 -0
- package/dist/ui/dialog.d.ts +19 -0
- package/dist/ui/dialog.js +58 -0
- package/dist/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/dropdown-menu.js +33 -0
- package/dist/ui/field-context.d.ts +4 -0
- package/dist/ui/field-context.js +6 -0
- package/dist/ui/field.d.ts +3 -0
- package/dist/ui/field.js +8 -0
- package/dist/ui/icon-action.d.ts +3 -0
- package/dist/ui/icon-action.js +8 -0
- package/dist/ui/index.d.ts +32 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +11 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.js +15 -0
- package/dist/ui/multi-combobox.d.ts +18 -0
- package/dist/ui/multi-combobox.js +40 -0
- package/dist/ui/popover.d.ts +9 -0
- package/dist/ui/popover.js +12 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/scroll-area.js +9 -0
- package/dist/ui/scroll-shadow.d.ts +8 -0
- package/dist/ui/scroll-shadow.js +57 -0
- package/dist/ui/select.d.ts +13 -0
- package/dist/ui/select.js +31 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.js +7 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.js +40 -0
- package/dist/ui/sidebar.d.ts +65 -0
- package/dist/ui/sidebar.js +207 -0
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +6 -0
- package/dist/ui/sonner.d.ts +5 -0
- package/dist/ui/sonner.js +13 -0
- package/dist/ui/switch.d.ts +4 -0
- package/dist/ui/switch.js +7 -0
- package/dist/ui/table.d.ts +12 -0
- package/dist/ui/table.js +24 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.js +12 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +11 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +11 -0
- package/package.json +80 -0
- package/themes/TOKENS.md +57 -0
- package/themes/default.css +60 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { ArrowLeft, Pencil, Trash2 } from "lucide-react";
|
|
4
|
+
import { toast } from "sonner";
|
|
5
|
+
import { Button } from "../../ui/button.js";
|
|
6
|
+
import { Input } from "../../ui/input.js";
|
|
7
|
+
import { Skeleton } from "../../ui/skeleton.js";
|
|
8
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "../../ui/alert-dialog.js";
|
|
9
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../../ui/table.js";
|
|
10
|
+
import { ErrorState, readableErrorMessage } from "../../components/feedback/query-states.js";
|
|
11
|
+
import { englishFormatters } from "../../lib/formatters.js";
|
|
12
|
+
import { CopyButton } from "./copy-button.js";
|
|
13
|
+
import { EditCustomerDialog } from "./edit-customer-dialog.js";
|
|
14
|
+
import { countsAsRevenue, InvoiceStatusBadge } from "./invoice-status-badge.js";
|
|
15
|
+
import { englishCustomersLabels } from "./labels.js";
|
|
16
|
+
export function CustomerDetailPage({ adapter, customerId, labels = englishCustomersLabels, formatters = englishFormatters, }) {
|
|
17
|
+
const customerQuery = adapter.useCustomer(customerId);
|
|
18
|
+
const invoicesQuery = adapter.useCustomerInvoices(customerId);
|
|
19
|
+
const companiesQuery = adapter.useCompanies();
|
|
20
|
+
const customer = customerQuery.data ?? null;
|
|
21
|
+
const [deleteReason, setDeleteReason] = useState("");
|
|
22
|
+
const [isDeleting, setIsDeleting] = useState(false);
|
|
23
|
+
const [editOpen, setEditOpen] = useState(false);
|
|
24
|
+
const company = useMemo(() => (companiesQuery.data ?? []).find((c) => c.id === customer?.companyId) ?? null, [companiesQuery.data, customer]);
|
|
25
|
+
const invoices = invoicesQuery.data ?? [];
|
|
26
|
+
// Every invoice stays in the table, but the headline sum only counts real revenue.
|
|
27
|
+
const countedInvoices = invoices.filter((invoice) => countsAsRevenue(invoice.status));
|
|
28
|
+
const totalAmount = countedInvoices.reduce((sum, invoice) => sum + (invoice.amountGross ?? 0), 0);
|
|
29
|
+
const notCountedCount = invoices.length - countedInvoices.length;
|
|
30
|
+
if (customerQuery.isLoading) {
|
|
31
|
+
return (_jsxs("div", { className: "space-y-6", children: [_jsx(Skeleton, { className: "h-8 w-64" }), _jsx(Skeleton, { className: "h-64 w-full rounded-xl" })] }));
|
|
32
|
+
}
|
|
33
|
+
if (customerQuery.isError) {
|
|
34
|
+
return _jsx(ErrorState, { error: customerQuery.error, onRetry: customerQuery.refetch });
|
|
35
|
+
}
|
|
36
|
+
if (!customer) {
|
|
37
|
+
return (_jsxs("div", { className: "mx-auto max-w-md py-20 text-center", children: [_jsx("h1", { className: "text-xl font-semibold tracking-tight text-foreground", children: labels.detail.notFoundTitle }), _jsx(Button, { className: "mt-6", onClick: () => adapter.openCustomerList(), children: labels.detail.toList })] }));
|
|
38
|
+
}
|
|
39
|
+
async function deleteCustomer() {
|
|
40
|
+
setIsDeleting(true);
|
|
41
|
+
try {
|
|
42
|
+
await adapter.deleteCustomer(customerId, deleteReason.trim());
|
|
43
|
+
toast.success(labels.detail.deleteDialog.deleted);
|
|
44
|
+
adapter.openCustomerList();
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
toast.error(labels.detail.deleteDialog.failed(readableErrorMessage(error, "")));
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
setIsDeleting(false);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const readFields = [
|
|
54
|
+
{ label: labels.fields.name, value: customer.name },
|
|
55
|
+
{ label: labels.fields.company, value: company?.code ?? "—" },
|
|
56
|
+
{ label: labels.fields.contactPerson, value: customer.contactPerson ?? "—" },
|
|
57
|
+
{
|
|
58
|
+
label: labels.fields.address,
|
|
59
|
+
value: [
|
|
60
|
+
customer.addressStreet,
|
|
61
|
+
[customer.addressZip, customer.addressCity].filter(Boolean).join(" "),
|
|
62
|
+
]
|
|
63
|
+
.filter(Boolean)
|
|
64
|
+
.join(", ") || "—",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: labels.fields.vatId,
|
|
68
|
+
value: customer.vatId ?? "—",
|
|
69
|
+
copyValue: customer.vatId ?? undefined,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: labels.fields.phone,
|
|
73
|
+
value: customer.phone ?? "—",
|
|
74
|
+
copyValue: customer.phone ?? undefined,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: labels.fields.email,
|
|
78
|
+
value: customer.email ?? "—",
|
|
79
|
+
copyValue: customer.email ?? undefined,
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => adapter.openCustomerList(), className: "inline-flex cursor-pointer items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground", children: [_jsx(ArrowLeft, { className: "size-4" }), " ", labels.detail.back] }), _jsxs("div", { className: "mt-2 flex flex-wrap items-end justify-between gap-4", children: [_jsx("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: customer.name }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs(Button, { variant: "outline", className: "gap-2", onClick: () => setEditOpen(true), children: [_jsx(Pencil, { className: "size-4" }), " ", labels.detail.editButton] }), _jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", className: "gap-2 text-destructive hover:bg-destructive/10 hover:text-destructive", children: [_jsx(Trash2, { className: "size-4" }), " ", labels.detail.deleteButton] }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: labels.detail.deleteDialog.title }), _jsx(AlertDialogDescription, { children: labels.detail.deleteDialog.description })] }), _jsx(Input, { value: deleteReason, onChange: (event) => setDeleteReason(event.target.value), placeholder: labels.detail.deleteDialog.reasonPlaceholder }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: labels.detail.deleteDialog.cancel }), _jsx(AlertDialogAction, { disabled: !deleteReason.trim() || isDeleting, onClick: deleteCustomer, className: "bg-destructive text-destructive-foreground hover:bg-destructive/90", children: labels.detail.deleteDialog.confirm })] })] })] })] })] }), _jsx(EditCustomerDialog, { open: editOpen, onOpenChange: setEditOpen, customer: customer, adapter: adapter, labels: labels }), _jsxs("div", { className: "mt-6 grid gap-6 lg:grid-cols-[1fr_1.1fr]", children: [_jsxs("section", { className: "rounded-xl border border-border bg-card p-5", children: [_jsx("h2", { className: "mb-4 text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: labels.detail.masterDataSection }), _jsx("p", { className: "mb-4 text-xs text-muted-foreground", children: labels.detail.masterDataHint }), _jsx("dl", { className: "space-y-3", children: readFields.map((field) => (_jsxs("div", { className: "flex items-start justify-between gap-2 border-b border-border/60 pb-3 last:border-0 last:pb-0", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("dt", { className: "text-xs text-muted-foreground", children: field.label }), _jsx("dd", { className: "text-sm text-foreground", children: field.value })] }), field.copyValue ? (_jsx(CopyButton, { value: field.copyValue, fieldLabel: field.label, labels: labels.copy })) : null] }, field.label))) })] }), _jsxs("section", { className: "rounded-xl border border-border bg-card p-5", children: [_jsx("h2", { className: "mb-4 text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: labels.detail.invoicesSection }), _jsxs("div", { className: "mb-4 rounded-lg bg-muted/40 px-3 py-2", children: [_jsx("div", { className: "text-xs text-muted-foreground", children: labels.detail.invoiceTotal(countedInvoices.length) }), _jsx("div", { className: "text-lg font-semibold tabular-nums text-foreground", children: formatters.formatMoney(totalAmount) }), notCountedCount > 0 && (_jsx("div", { className: "mt-0.5 text-xs text-muted-foreground", children: labels.detail.notCounted(notCountedCount) }))] }), _jsx("div", { className: "overflow-hidden rounded-lg border border-border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { className: "bg-muted/40", children: [_jsx(TableHead, { children: labels.detail.invoiceColumns.number }), _jsx(TableHead, { children: labels.detail.invoiceColumns.date }), _jsx(TableHead, { className: "text-right", children: labels.detail.invoiceColumns.amount }), _jsx(TableHead, { children: labels.detail.invoiceColumns.status })] }) }), _jsxs(TableBody, { children: [invoices.map((invoice) => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-medium text-foreground", children: invoice.invoiceNumber ?? labels.detail.draftNumber }), _jsx(TableCell, { className: "text-sm text-muted-foreground tabular-nums", children: formatters.formatDate(invoice.invoiceDate) }), _jsx(TableCell, { className: "text-right font-medium tabular-nums", children: formatters.formatMoney(invoice.amountGross ?? 0) }), _jsx(TableCell, { children: _jsx(InvoiceStatusBadge, { status: invoice.status, dueDate: invoice.dueDate, labels: labels.detail.invoiceStatus }) })] }, invoice.id))), invoices.length === 0 && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 4, className: "py-8 text-center text-muted-foreground", children: labels.detail.invoicesEmpty }) }))] })] }) })] })] })] }));
|
|
83
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Formatters } from "../../lib/formatters";
|
|
2
|
+
import type { CustomersAdapter } from "../../adapters/customers";
|
|
3
|
+
import { type CustomersLabels } from "./labels";
|
|
4
|
+
export interface CustomerListPageProps {
|
|
5
|
+
adapter: CustomersAdapter;
|
|
6
|
+
labels?: CustomersLabels;
|
|
7
|
+
formatters?: Formatters;
|
|
8
|
+
}
|
|
9
|
+
export declare function CustomerListPage({ adapter, labels, formatters, }: CustomerListPageProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { Search } from "lucide-react";
|
|
4
|
+
import { Input } from "../../ui/input.js";
|
|
5
|
+
import { Skeleton } from "../../ui/skeleton.js";
|
|
6
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../../ui/table.js";
|
|
7
|
+
import { ErrorState, TableSkeleton } from "../../components/feedback/query-states.js";
|
|
8
|
+
import { TablePagination } from "../../components/feedback/table-pagination.js";
|
|
9
|
+
import { englishFormatters } from "../../lib/formatters.js";
|
|
10
|
+
import { CompanyChip } from "./company-chip.js";
|
|
11
|
+
import { NewCustomerDialog } from "./new-customer-dialog.js";
|
|
12
|
+
import { SortControl } from "./sort-control.js";
|
|
13
|
+
import { useTableView } from "./use-table-view.js";
|
|
14
|
+
import { englishCustomersLabels } from "./labels.js";
|
|
15
|
+
const NO_TOTALS = { invoiceCount: 0, totalAmount: 0, overdueCount: 0 };
|
|
16
|
+
export function CustomerListPage({ adapter, labels = englishCustomersLabels, formatters = englishFormatters, }) {
|
|
17
|
+
const [searchInput, setSearchInput] = useState("");
|
|
18
|
+
const customersQuery = adapter.useCustomers();
|
|
19
|
+
const totalsQuery = adapter.useInvoiceTotalsByCustomer();
|
|
20
|
+
const companiesQuery = adapter.useCompanies();
|
|
21
|
+
const companyById = useMemo(() => new Map((companiesQuery.data ?? []).map((c) => [c.id, c])), [companiesQuery.data]);
|
|
22
|
+
// Totals load separately from the list, so they keep their own skeletons: a fabricated 0.00 reads as fact.
|
|
23
|
+
const totalsReady = totalsQuery.data !== undefined;
|
|
24
|
+
const totals = totalsQuery.data ?? {};
|
|
25
|
+
// Search covers every column the table shows: name, email and company code.
|
|
26
|
+
const filteredCustomers = useMemo(() => {
|
|
27
|
+
const term = searchInput.trim().toLowerCase();
|
|
28
|
+
if (!term)
|
|
29
|
+
return customersQuery.data ?? [];
|
|
30
|
+
return (customersQuery.data ?? []).filter((customer) => [customer.name, customer.email, companyById.get(customer.companyId)?.code]
|
|
31
|
+
.filter(Boolean)
|
|
32
|
+
.some((field) => String(field).toLowerCase().includes(term)));
|
|
33
|
+
}, [customersQuery.data, searchInput, companyById]);
|
|
34
|
+
const view = useTableView(filteredCustomers, {
|
|
35
|
+
initialSort: "name",
|
|
36
|
+
initialDirection: "asc",
|
|
37
|
+
resetKey: searchInput,
|
|
38
|
+
sortValue: (customer, key) => {
|
|
39
|
+
const customerTotals = totals[customer.id] ?? NO_TOTALS;
|
|
40
|
+
switch (key) {
|
|
41
|
+
case "company":
|
|
42
|
+
return companyById.get(customer.companyId)?.code ?? "";
|
|
43
|
+
case "totalAmount":
|
|
44
|
+
return customerTotals.totalAmount;
|
|
45
|
+
case "invoiceCount":
|
|
46
|
+
return customerTotals.invoiceCount;
|
|
47
|
+
default:
|
|
48
|
+
return customer.name ?? "";
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const sortColumns = [
|
|
53
|
+
{ value: "name", label: labels.list.columns.name },
|
|
54
|
+
{ value: "company", label: labels.list.columns.company },
|
|
55
|
+
{ value: "invoiceCount", label: labels.list.columns.invoices },
|
|
56
|
+
{ value: "totalAmount", label: labels.list.columns.amount },
|
|
57
|
+
];
|
|
58
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h1", { className: "mt-2 text-2xl font-semibold tracking-tight text-foreground", children: labels.list.title }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: labels.list.subtitle })] }), _jsx(NewCustomerDialog, { adapter: adapter, labels: labels })] }), _jsxs("div", { className: "mt-6 flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { className: "relative w-full max-w-sm", children: [_jsx(Search, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { value: searchInput, onChange: (event) => setSearchInput(event.target.value), placeholder: labels.list.searchPlaceholder, className: "pl-9" })] }), _jsx(SortControl, { columns: sortColumns, sort: view.sort, direction: view.direction, onSort: view.setSort, onDirection: view.setDirection, labels: labels.sort })] }), customersQuery.isError ? (_jsx("div", { className: "mt-4", children: _jsx(ErrorState, { error: customersQuery.error, onRetry: customersQuery.refetch }) })) : customersQuery.isLoading ? (_jsx("div", { className: "mt-4", children: _jsx(TableSkeleton, { rows: 8, columns: 5 }) })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-4 hidden overflow-hidden rounded-xl border border-border bg-card sm:block", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { className: "bg-muted/40", children: [_jsx(TableHead, { className: "min-w-[200px]", children: labels.list.columns.name }), _jsx(TableHead, { children: labels.list.columns.company }), _jsx(TableHead, { children: labels.list.columns.email }), _jsx(TableHead, { className: "text-right", children: labels.list.columns.invoices }), _jsx(TableHead, { className: "text-right", children: labels.list.columns.amount }), _jsx(TableHead, { className: "text-right", children: labels.list.columns.overdue })] }) }), _jsxs(TableBody, { children: [view.pageRows.map((customer) => {
|
|
59
|
+
const customerTotals = totals[customer.id] ?? NO_TOTALS;
|
|
60
|
+
return (_jsxs(TableRow, { className: "cursor-pointer", onClick: () => adapter.openCustomer(customer.id), children: [_jsx(TableCell, { className: "min-w-[200px] font-medium text-foreground", children: customer.name }), _jsx(TableCell, { children: _jsx(CompanyChip, { code: companyById.get(customer.companyId)?.code ?? null, labels: labels.companyChip }) }), _jsx(TableCell, { className: "text-sm text-muted-foreground", children: customer.email ?? "—" }), _jsx(TableCell, { className: "text-right tabular-nums", children: totalsReady ? (customerTotals.invoiceCount) : (_jsx(Skeleton, { className: "ml-auto h-4 w-8" })) }), _jsx(TableCell, { className: "text-right font-medium tabular-nums", children: totalsReady ? (formatters.formatMoney(customerTotals.totalAmount)) : (_jsx(Skeleton, { className: "ml-auto h-4 w-24" })) }), _jsx(TableCell, { className: "text-right tabular-nums", children: !totalsReady ? (_jsx(Skeleton, { className: "ml-auto h-4 w-8" })) : customerTotals.overdueCount > 0 ? (_jsx("span", { className: "text-destructive", children: customerTotals.overdueCount })) : ("—") })] }, customer.id));
|
|
61
|
+
}), view.total === 0 && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 6, className: "py-12 text-center text-muted-foreground", children: labels.list.empty }) }))] })] }) }), _jsx("div", { className: "mt-4 space-y-3 sm:hidden", children: view.total === 0 ? (_jsx("p", { className: "rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground", children: labels.list.empty })) : (view.pageRows.map((customer) => {
|
|
62
|
+
const customerTotals = totals[customer.id] ?? NO_TOTALS;
|
|
63
|
+
return (_jsxs("div", { className: "cursor-pointer rounded-xl border border-border bg-card p-4", onClick: () => adapter.openCustomer(customer.id), children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium text-foreground", children: customer.name }), _jsx("div", { className: "mt-1.5", children: _jsx(CompanyChip, { code: companyById.get(customer.companyId)?.code ?? null, labels: labels.companyChip }) })] }), _jsxs("div", { className: "shrink-0 text-right", children: [_jsx("div", { className: "font-medium tabular-nums text-foreground", children: totalsReady ? (formatters.formatMoney(customerTotals.totalAmount)) : (_jsx(Skeleton, { className: "ml-auto h-4 w-24" })) }), _jsxs("div", { className: "flex items-center justify-end gap-1.5 text-xs text-muted-foreground", children: [labels.list.columns.invoices, ":", " ", totalsReady ? (customerTotals.invoiceCount) : (_jsx(Skeleton, { className: "h-3 w-6" }))] })] })] }), customer.email && (_jsx("p", { className: "mt-2 truncate text-sm text-muted-foreground", children: customer.email })), totalsReady && customerTotals.overdueCount > 0 && (_jsxs("p", { className: "mt-2 text-xs text-destructive", children: [labels.list.columns.overdue, ": ", customerTotals.overdueCount] }))] }, customer.id));
|
|
64
|
+
})) })] })), !customersQuery.isError && !customersQuery.isLoading && view.total > 0 && (_jsx(TablePagination, { page: view.page, totalPages: view.totalPages, pageSize: view.pageSize, total: view.total, from: view.from, to: view.to, onPage: view.setPage, onPageSize: view.setPageSize }))] }));
|
|
65
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Customer, CustomersAdapter } from "../../adapters/customers";
|
|
2
|
+
import type { CustomersLabels } from "./labels";
|
|
3
|
+
export declare function EditCustomerDialog({ open, onOpenChange, customer, adapter, labels, }: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
customer: Customer;
|
|
7
|
+
adapter: CustomersAdapter;
|
|
8
|
+
labels: CustomersLabels;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { toast } from "sonner";
|
|
4
|
+
import { Button } from "../../ui/button.js";
|
|
5
|
+
import { Input } from "../../ui/input.js";
|
|
6
|
+
import { Label } from "../../ui/label.js";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "../../ui/dialog.js";
|
|
8
|
+
import { readableErrorMessage } from "../../components/feedback/query-states.js";
|
|
9
|
+
import { FieldErrorText, RequiredMark } from "./form-hints.js";
|
|
10
|
+
export function EditCustomerDialog({ open, onOpenChange, customer, adapter, labels, }) {
|
|
11
|
+
const dialogLabels = labels.detail.editDialog;
|
|
12
|
+
const [name, setName] = useState(customer.name);
|
|
13
|
+
const [contactPerson, setContactPerson] = useState(customer.contactPerson ?? "");
|
|
14
|
+
const [email, setEmail] = useState(customer.email ?? "");
|
|
15
|
+
const [phone, setPhone] = useState(customer.phone ?? "");
|
|
16
|
+
const [street, setStreet] = useState(customer.addressStreet ?? "");
|
|
17
|
+
const [zip, setZip] = useState(customer.addressZip ?? "");
|
|
18
|
+
const [city, setCity] = useState(customer.addressCity ?? "");
|
|
19
|
+
const [vatId, setVatId] = useState(customer.vatId ?? "");
|
|
20
|
+
const [customerNumber, setCustomerNumber] = useState(customer.customerNumber ?? "");
|
|
21
|
+
const [nameError, setNameError] = useState("");
|
|
22
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
23
|
+
// Reopening must show the stored record, not an abandoned draft; a save elsewhere refreshes too.
|
|
24
|
+
const [syncedFrom, setSyncedFrom] = useState(customer.updatedAt);
|
|
25
|
+
if (open && syncedFrom !== customer.updatedAt) {
|
|
26
|
+
setSyncedFrom(customer.updatedAt);
|
|
27
|
+
setName(customer.name);
|
|
28
|
+
setContactPerson(customer.contactPerson ?? "");
|
|
29
|
+
setEmail(customer.email ?? "");
|
|
30
|
+
setPhone(customer.phone ?? "");
|
|
31
|
+
setStreet(customer.addressStreet ?? "");
|
|
32
|
+
setZip(customer.addressZip ?? "");
|
|
33
|
+
setCity(customer.addressCity ?? "");
|
|
34
|
+
setVatId(customer.vatId ?? "");
|
|
35
|
+
setCustomerNumber(customer.customerNumber ?? "");
|
|
36
|
+
setNameError("");
|
|
37
|
+
}
|
|
38
|
+
async function saveCustomer() {
|
|
39
|
+
if (!name.trim()) {
|
|
40
|
+
setNameError(labels.validation.name);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
setNameError("");
|
|
44
|
+
setIsSaving(true);
|
|
45
|
+
try {
|
|
46
|
+
await adapter.updateCustomer(customer.id, {
|
|
47
|
+
name: name.trim(),
|
|
48
|
+
contactPerson: contactPerson.trim() || null,
|
|
49
|
+
email: email.trim() || null,
|
|
50
|
+
phone: phone.trim() || null,
|
|
51
|
+
addressStreet: street.trim() || null,
|
|
52
|
+
addressZip: zip.trim() || null,
|
|
53
|
+
addressCity: city.trim() || null,
|
|
54
|
+
vatId: vatId.trim() || null,
|
|
55
|
+
customerNumber: customerNumber.trim() || null,
|
|
56
|
+
});
|
|
57
|
+
toast.success(dialogLabels.saved);
|
|
58
|
+
onOpenChange(false);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
toast.error(dialogLabels.failed(readableErrorMessage(error, "")));
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
setIsSaving(false);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-lg", onClick: (event) => event.stopPropagation(), children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: dialogLabels.title }), _jsx(DialogDescription, { children: dialogLabels.description })] }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs(Label, { className: "text-xs text-muted-foreground", children: [labels.fields.name, " ", _jsx(RequiredMark, { title: labels.requiredField })] }), _jsx(Input, { value: name, onChange: (event) => {
|
|
68
|
+
setName(event.target.value);
|
|
69
|
+
if (nameError)
|
|
70
|
+
setNameError("");
|
|
71
|
+
}, "aria-invalid": !!nameError }), _jsx(FieldErrorText, { text: nameError })] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.contactPerson }), _jsx(Input, { value: contactPerson, onChange: (event) => setContactPerson(event.target.value) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.customerNumber }), _jsx(Input, { value: customerNumber, onChange: (event) => setCustomerNumber(event.target.value) })] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.street }), _jsx(Input, { value: street, onChange: (event) => setStreet(event.target.value) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.zip }), _jsx(Input, { value: zip, onChange: (event) => setZip(event.target.value) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.city }), _jsx(Input, { value: city, onChange: (event) => setCity(event.target.value) })] })] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.phone }), _jsx(Input, { value: phone, onChange: (event) => setPhone(event.target.value) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.email }), _jsx(Input, { value: email, onChange: (event) => setEmail(event.target.value) })] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { className: "text-xs text-muted-foreground", children: labels.fields.vatId }), _jsx(Input, { value: vatId, onChange: (event) => setVatId(event.target.value) })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), children: dialogLabels.cancel }), _jsx(Button, { onClick: saveCustomer, disabled: isSaving, children: isSaving ? dialogLabels.saving : dialogLabels.save })] })] }) }));
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function RequiredMark({ title }) {
|
|
3
|
+
return (_jsx("span", { className: "text-destructive", title: title, "aria-hidden": true, children: "*" }));
|
|
4
|
+
}
|
|
5
|
+
export function FieldErrorText({ text }) {
|
|
6
|
+
if (!text)
|
|
7
|
+
return null;
|
|
8
|
+
return _jsx("p", { className: "text-xs text-destructive", children: text });
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomerInvoiceStatus } from "../../adapters/customers";
|
|
2
|
+
import type { CustomersLabels } from "./labels";
|
|
3
|
+
export declare function countsAsRevenue(status: CustomerInvoiceStatus): boolean;
|
|
4
|
+
export declare function isInvoiceOverdue(status: CustomerInvoiceStatus, dueDate: string | null | undefined, today: string): boolean;
|
|
5
|
+
export declare function InvoiceStatusBadge({ status, dueDate, labels, className, }: {
|
|
6
|
+
status: CustomerInvoiceStatus;
|
|
7
|
+
dueDate: string | null | undefined;
|
|
8
|
+
labels: CustomersLabels["detail"]["invoiceStatus"];
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/class-names.js";
|
|
3
|
+
// Drafts and voided invoices stay visible in the table but never count as revenue.
|
|
4
|
+
export function countsAsRevenue(status) {
|
|
5
|
+
return status !== "voided" && status !== "draft";
|
|
6
|
+
}
|
|
7
|
+
// Overdue is derived, not stored: an open invoice whose due date lies in the past.
|
|
8
|
+
export function isInvoiceOverdue(status, dueDate, today) {
|
|
9
|
+
return status === "open" && !!dueDate && dueDate < today;
|
|
10
|
+
}
|
|
11
|
+
const STATUS_STYLE = {
|
|
12
|
+
paid: "bg-success-soft text-success",
|
|
13
|
+
voided: "bg-muted text-muted-foreground line-through",
|
|
14
|
+
overdue: "bg-danger-soft text-danger",
|
|
15
|
+
draft: "bg-warning-soft text-warning",
|
|
16
|
+
open: "bg-muted text-muted-foreground",
|
|
17
|
+
};
|
|
18
|
+
export function InvoiceStatusBadge({ status, dueDate, labels, className, }) {
|
|
19
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
20
|
+
const key = isInvoiceOverdue(status, dueDate, today) ? "overdue" : status;
|
|
21
|
+
return (_jsx("span", { className: cn("inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium", STATUS_STYLE[key], className), children: labels[key] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export interface CustomersLabels {
|
|
2
|
+
list: {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
searchPlaceholder: string;
|
|
6
|
+
empty: string;
|
|
7
|
+
columns: {
|
|
8
|
+
name: string;
|
|
9
|
+
company: string;
|
|
10
|
+
email: string;
|
|
11
|
+
invoices: string;
|
|
12
|
+
amount: string;
|
|
13
|
+
overdue: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
sort: {
|
|
17
|
+
label: string;
|
|
18
|
+
ascending: string;
|
|
19
|
+
descending: string;
|
|
20
|
+
};
|
|
21
|
+
fields: {
|
|
22
|
+
name: string;
|
|
23
|
+
company: string;
|
|
24
|
+
contactPerson: string;
|
|
25
|
+
customerNumber: string;
|
|
26
|
+
address: string;
|
|
27
|
+
street: string;
|
|
28
|
+
zip: string;
|
|
29
|
+
city: string;
|
|
30
|
+
vatId: string;
|
|
31
|
+
phone: string;
|
|
32
|
+
email: string;
|
|
33
|
+
};
|
|
34
|
+
examples: {
|
|
35
|
+
name: string;
|
|
36
|
+
street: string;
|
|
37
|
+
zip: string;
|
|
38
|
+
city: string;
|
|
39
|
+
email: string;
|
|
40
|
+
};
|
|
41
|
+
validation: {
|
|
42
|
+
company: string;
|
|
43
|
+
name: string;
|
|
44
|
+
zip: string;
|
|
45
|
+
email: string;
|
|
46
|
+
};
|
|
47
|
+
requiredField: string;
|
|
48
|
+
copy: {
|
|
49
|
+
action: (fieldLabel: string) => string;
|
|
50
|
+
copied: (fieldLabel: string) => string;
|
|
51
|
+
failed: string;
|
|
52
|
+
};
|
|
53
|
+
companyChip: {
|
|
54
|
+
missing: string;
|
|
55
|
+
missingTitle: string;
|
|
56
|
+
};
|
|
57
|
+
newCustomer: {
|
|
58
|
+
button: string;
|
|
59
|
+
title: string;
|
|
60
|
+
description: string;
|
|
61
|
+
companyPlaceholder: string;
|
|
62
|
+
isCompany: string;
|
|
63
|
+
cancel: string;
|
|
64
|
+
create: string;
|
|
65
|
+
creating: string;
|
|
66
|
+
formIncomplete: string;
|
|
67
|
+
created: string;
|
|
68
|
+
createFailed: (error: string) => string;
|
|
69
|
+
};
|
|
70
|
+
detail: {
|
|
71
|
+
back: string;
|
|
72
|
+
notFoundTitle: string;
|
|
73
|
+
toList: string;
|
|
74
|
+
editButton: string;
|
|
75
|
+
deleteButton: string;
|
|
76
|
+
masterDataSection: string;
|
|
77
|
+
masterDataHint: string;
|
|
78
|
+
invoicesSection: string;
|
|
79
|
+
invoiceTotal: (count: number) => string;
|
|
80
|
+
notCounted: (count: number) => string;
|
|
81
|
+
invoicesEmpty: string;
|
|
82
|
+
draftNumber: string;
|
|
83
|
+
invoiceColumns: {
|
|
84
|
+
number: string;
|
|
85
|
+
date: string;
|
|
86
|
+
amount: string;
|
|
87
|
+
status: string;
|
|
88
|
+
};
|
|
89
|
+
invoiceStatus: {
|
|
90
|
+
draft: string;
|
|
91
|
+
open: string;
|
|
92
|
+
overdue: string;
|
|
93
|
+
paid: string;
|
|
94
|
+
voided: string;
|
|
95
|
+
};
|
|
96
|
+
deleteDialog: {
|
|
97
|
+
title: string;
|
|
98
|
+
description: string;
|
|
99
|
+
reasonPlaceholder: string;
|
|
100
|
+
cancel: string;
|
|
101
|
+
confirm: string;
|
|
102
|
+
deleted: string;
|
|
103
|
+
failed: (error: string) => string;
|
|
104
|
+
};
|
|
105
|
+
editDialog: {
|
|
106
|
+
title: string;
|
|
107
|
+
description: string;
|
|
108
|
+
cancel: string;
|
|
109
|
+
save: string;
|
|
110
|
+
saving: string;
|
|
111
|
+
saved: string;
|
|
112
|
+
failed: (error: string) => string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export declare const englishCustomersLabels: CustomersLabels;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export const englishCustomersLabels = {
|
|
2
|
+
list: {
|
|
3
|
+
title: "Customers",
|
|
4
|
+
subtitle: "Customer master data and their outgoing invoices.",
|
|
5
|
+
searchPlaceholder: "Search name, email or company …",
|
|
6
|
+
empty: "No customers found.",
|
|
7
|
+
columns: {
|
|
8
|
+
name: "Name",
|
|
9
|
+
company: "Company",
|
|
10
|
+
email: "Email",
|
|
11
|
+
invoices: "Invoices",
|
|
12
|
+
amount: "Amount",
|
|
13
|
+
overdue: "Overdue",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
sort: {
|
|
17
|
+
label: "Sort by",
|
|
18
|
+
ascending: "Ascending",
|
|
19
|
+
descending: "Descending",
|
|
20
|
+
},
|
|
21
|
+
fields: {
|
|
22
|
+
name: "Name",
|
|
23
|
+
company: "Company",
|
|
24
|
+
contactPerson: "Contact person",
|
|
25
|
+
customerNumber: "Customer number",
|
|
26
|
+
address: "Address",
|
|
27
|
+
street: "Street",
|
|
28
|
+
zip: "Postal code",
|
|
29
|
+
city: "City",
|
|
30
|
+
vatId: "VAT ID",
|
|
31
|
+
phone: "Phone",
|
|
32
|
+
email: "Email",
|
|
33
|
+
},
|
|
34
|
+
examples: {
|
|
35
|
+
name: "e.g. Acme Ltd",
|
|
36
|
+
street: "e.g. Main Street 12",
|
|
37
|
+
zip: "e.g. 10115",
|
|
38
|
+
city: "e.g. Berlin",
|
|
39
|
+
email: "e.g. billing@acme.com",
|
|
40
|
+
},
|
|
41
|
+
validation: {
|
|
42
|
+
company: "Please choose a company.",
|
|
43
|
+
name: "Please enter a name.",
|
|
44
|
+
zip: "Please enter a valid postal code.",
|
|
45
|
+
email: "Please enter a valid email address.",
|
|
46
|
+
},
|
|
47
|
+
requiredField: "Required field",
|
|
48
|
+
copy: {
|
|
49
|
+
action: (fieldLabel) => `Copy ${fieldLabel}`,
|
|
50
|
+
copied: (fieldLabel) => `${fieldLabel} copied.`,
|
|
51
|
+
failed: "Copying failed.",
|
|
52
|
+
},
|
|
53
|
+
companyChip: {
|
|
54
|
+
missing: "No company",
|
|
55
|
+
missingTitle: "No company is assigned yet.",
|
|
56
|
+
},
|
|
57
|
+
newCustomer: {
|
|
58
|
+
button: "New customer",
|
|
59
|
+
title: "Create customer",
|
|
60
|
+
description: "Create a new customer record.",
|
|
61
|
+
companyPlaceholder: "Choose a company …",
|
|
62
|
+
isCompany: "This customer is a company",
|
|
63
|
+
cancel: "Cancel",
|
|
64
|
+
create: "Create",
|
|
65
|
+
creating: "Creating …",
|
|
66
|
+
formIncomplete: "Please complete the highlighted fields.",
|
|
67
|
+
created: "Customer created.",
|
|
68
|
+
createFailed: (error) => `Creating the customer failed: ${error}`,
|
|
69
|
+
},
|
|
70
|
+
detail: {
|
|
71
|
+
back: "Back to customers",
|
|
72
|
+
notFoundTitle: "Customer not found.",
|
|
73
|
+
toList: "To the customer list",
|
|
74
|
+
editButton: "Edit",
|
|
75
|
+
deleteButton: "Delete",
|
|
76
|
+
masterDataSection: "Master data",
|
|
77
|
+
masterDataHint: "Use the Edit button above to change these fields.",
|
|
78
|
+
invoicesSection: "Outgoing invoices",
|
|
79
|
+
invoiceTotal: (count) => `Total of ${count} ${count === 1 ? "invoice" : "invoices"}`,
|
|
80
|
+
notCounted: (count) => count === 1
|
|
81
|
+
? "1 draft or voided invoice is not counted"
|
|
82
|
+
: `${count} draft or voided invoices are not counted`,
|
|
83
|
+
invoicesEmpty: "No invoices for this customer yet.",
|
|
84
|
+
draftNumber: "Draft",
|
|
85
|
+
invoiceColumns: {
|
|
86
|
+
number: "Number",
|
|
87
|
+
date: "Date",
|
|
88
|
+
amount: "Amount",
|
|
89
|
+
status: "Status",
|
|
90
|
+
},
|
|
91
|
+
invoiceStatus: {
|
|
92
|
+
draft: "Draft",
|
|
93
|
+
open: "Open",
|
|
94
|
+
overdue: "Overdue",
|
|
95
|
+
paid: "Paid",
|
|
96
|
+
voided: "Voided",
|
|
97
|
+
},
|
|
98
|
+
deleteDialog: {
|
|
99
|
+
title: "Delete this customer?",
|
|
100
|
+
description: "The customer is removed from the list and can be restored later.",
|
|
101
|
+
reasonPlaceholder: "Reason for deleting …",
|
|
102
|
+
cancel: "Cancel",
|
|
103
|
+
confirm: "Delete",
|
|
104
|
+
deleted: "Customer deleted.",
|
|
105
|
+
failed: (error) => `Deleting the customer failed: ${error}`,
|
|
106
|
+
},
|
|
107
|
+
editDialog: {
|
|
108
|
+
title: "Edit customer",
|
|
109
|
+
description: "Change the customer's master data.",
|
|
110
|
+
cancel: "Cancel",
|
|
111
|
+
save: "Save",
|
|
112
|
+
saving: "Saving …",
|
|
113
|
+
saved: "Customer saved.",
|
|
114
|
+
failed: (error) => `Saving the customer failed: ${error}`,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CustomersAdapter } from "../../adapters/customers";
|
|
2
|
+
import type { CustomersLabels } from "./labels";
|
|
3
|
+
export declare function NewCustomerDialog({ adapter, labels, }: {
|
|
4
|
+
adapter: CustomersAdapter;
|
|
5
|
+
labels: CustomersLabels;
|
|
6
|
+
}): import("react").JSX.Element;
|