@spaceinvoices/react-ui 0.4.11 → 0.4.12
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/cli/dist/index.js +1 -1
- package/package.json +3 -2
- package/registry.json +30 -31
- package/src/common/autocomplete.tsx +41 -25
- package/src/components/activities/locales/bg.ts +21 -0
- package/src/components/activities/locales/cs.ts +21 -0
- package/src/components/activities/locales/en.ts +21 -0
- package/src/components/activities/locales/et.ts +21 -0
- package/src/components/activities/locales/fi.ts +21 -0
- package/src/components/activities/locales/is.ts +21 -0
- package/src/components/activities/locales/nb.ts +21 -0
- package/src/components/activities/locales/sk.ts +21 -0
- package/src/components/activities/locales/sv.ts +21 -0
- package/src/components/advance-invoices/advance-invoices.hooks.ts +2 -3
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +290 -69
- package/src/components/advance-invoices/create/locales/bg.ts +48 -0
- package/src/components/advance-invoices/create/locales/cs.ts +48 -0
- package/src/components/advance-invoices/create/locales/en.ts +48 -0
- package/src/components/advance-invoices/create/locales/et.ts +48 -0
- package/src/components/advance-invoices/create/locales/fi.ts +48 -0
- package/src/components/advance-invoices/create/locales/hr.ts +17 -17
- package/src/components/advance-invoices/create/locales/is.ts +48 -0
- package/src/components/advance-invoices/create/locales/nb.ts +48 -0
- package/src/components/advance-invoices/create/locales/sk.ts +48 -0
- package/src/components/advance-invoices/create/locales/sl.ts +9 -7
- package/src/components/advance-invoices/create/locales/sv.ts +48 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +16 -2
- package/src/components/advance-invoices/list/list-row-actions.tsx +48 -16
- package/src/components/advance-invoices/list/list-table.tsx +33 -8
- package/src/components/advance-invoices/list/locales/bg.ts +51 -0
- package/src/components/advance-invoices/list/locales/cs.ts +51 -0
- package/src/components/advance-invoices/list/locales/en.ts +33 -2
- package/src/components/advance-invoices/list/locales/et.ts +51 -0
- package/src/components/advance-invoices/list/locales/fi.ts +51 -0
- package/src/components/advance-invoices/list/locales/hr.ts +15 -15
- package/src/components/advance-invoices/list/locales/is.ts +51 -0
- package/src/components/advance-invoices/list/locales/nb.ts +51 -0
- package/src/components/advance-invoices/list/locales/sk.ts +51 -0
- package/src/components/advance-invoices/list/locales/sv.ts +51 -0
- package/src/components/advance-invoices/list/use-advance-invoice-download.ts +3 -5
- package/src/components/common/autocomplete-locales.ts +101 -0
- package/src/components/company-registry/company-registry.hooks.ts +3 -7
- package/src/components/credit-notes/create/create-credit-note-form.tsx +211 -22
- package/src/components/credit-notes/create/locales/bg.ts +87 -0
- package/src/components/credit-notes/create/locales/cs.ts +87 -0
- package/src/components/credit-notes/create/locales/en.ts +87 -0
- package/src/components/credit-notes/create/locales/et.ts +87 -0
- package/src/components/credit-notes/create/locales/fi.ts +87 -0
- package/src/components/credit-notes/create/locales/hr.ts +24 -24
- package/src/components/credit-notes/create/locales/is.ts +87 -0
- package/src/components/credit-notes/create/locales/nb.ts +87 -0
- package/src/components/credit-notes/create/locales/sk.ts +87 -0
- package/src/components/credit-notes/create/locales/sl.ts +9 -9
- package/src/components/credit-notes/create/locales/sv.ts +87 -0
- package/src/components/credit-notes/create/prepare-credit-note-submission.ts +32 -0
- package/src/components/credit-notes/credit-notes.hooks.ts +15 -3
- package/src/components/credit-notes/list/list-row-actions.tsx +19 -7
- package/src/components/credit-notes/list/list-table.tsx +58 -7
- package/src/components/credit-notes/list/locales/bg.ts +48 -0
- package/src/components/credit-notes/list/locales/cs.ts +48 -0
- package/src/components/credit-notes/list/locales/en.ts +31 -2
- package/src/components/credit-notes/list/locales/et.ts +48 -0
- package/src/components/credit-notes/list/locales/fi.ts +48 -0
- package/src/components/credit-notes/list/locales/hr.ts +12 -12
- package/src/components/credit-notes/list/locales/is.ts +48 -0
- package/src/components/credit-notes/list/locales/nb.ts +48 -0
- package/src/components/credit-notes/list/locales/sk.ts +48 -0
- package/src/components/credit-notes/list/locales/sv.ts +48 -0
- package/src/components/credit-notes/list/use-credit-note-download.ts +3 -5
- package/src/components/customers/create-customer-form/locales/bg.ts +21 -0
- package/src/components/customers/create-customer-form/locales/cs.ts +21 -0
- package/src/components/customers/create-customer-form/locales/en.ts +21 -0
- package/src/components/customers/create-customer-form/locales/et.ts +21 -0
- package/src/components/customers/create-customer-form/locales/fi.ts +21 -0
- package/src/components/customers/create-customer-form/locales/hr.ts +11 -11
- package/src/components/customers/create-customer-form/locales/is.ts +21 -0
- package/src/components/customers/create-customer-form/locales/nb.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sk.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sv.ts +21 -0
- package/src/components/customers/customer-autocomplete.tsx +32 -4
- package/src/components/customers/customer-list-table/customer-list-table.tsx +8 -6
- package/src/components/customers/customer-list-table/locales/bg.ts +25 -0
- package/src/components/customers/customer-list-table/locales/cs.ts +25 -0
- package/src/components/customers/customer-list-table/locales/en.ts +17 -2
- package/src/components/customers/customer-list-table/locales/et.ts +25 -0
- package/src/components/customers/customer-list-table/locales/fi.ts +25 -0
- package/src/components/customers/customer-list-table/locales/hr.ts +11 -11
- package/src/components/customers/customer-list-table/locales/is.ts +25 -0
- package/src/components/customers/customer-list-table/locales/nb.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sk.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sv.ts +25 -0
- package/src/components/customers/customers.hooks.ts +14 -17
- package/src/components/customers/edit-customer-form/locales/bg.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/cs.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/en.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/et.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/fi.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/hr.ts +5 -5
- package/src/components/customers/edit-customer-form/locales/is.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/nb.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sk.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sv.ts +13 -0
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +7 -6
- package/src/components/dashboard/collection-rate-card/locales/en.ts +3 -0
- package/src/components/dashboard/collection-rate-card/use-collection-rate.ts +8 -7
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +7 -4
- package/src/components/dashboard/invoice-status-chart/locales/bg.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/cs.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/en.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/et.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/fi.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/is.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/nb.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/sk.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/sl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/sv.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/bg.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/cs.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/en.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/et.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/fi.ts +6 -6
- package/src/components/dashboard/payment-methods-chart/locales/hr.ts +3 -3
- package/src/components/dashboard/payment-methods-chart/locales/is.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/nb.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/sk.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/sv.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +4 -3
- package/src/components/dashboard/payment-trend-chart/locales/bg.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/cs.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/en.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/et.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/fi.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/is.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/nb.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/sk.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/sv.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +4 -3
- package/src/components/dashboard/payment-trend-chart/use-payment-trend.ts +12 -9
- package/src/components/dashboard/revenue-card.tsx +3 -3
- package/src/components/dashboard/revenue-trend-chart/locales/bg.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/cs.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/en.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/et.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/fi.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/is.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/nb.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/sk.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/sv.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +4 -3
- package/src/components/dashboard/revenue-trend-chart/use-revenue-trend.ts +4 -3
- package/src/components/dashboard/shared/local-date.ts +11 -0
- package/src/components/dashboard/shared/use-revenue-data.ts +6 -5
- package/src/components/dashboard/shared/use-stats-query.ts +7 -11
- package/src/components/dashboard/stat-card.tsx +3 -3
- package/src/components/dashboard/tax-collected-card/tax-collected-card.tsx +11 -9
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +3 -2
- package/src/components/dashboard/top-customers-chart/locales/bg.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/cs.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/en.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/et.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/fi.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/is.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/nb.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/sk.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/sv.ts +2 -2
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +4 -3
- package/src/components/dashboard/top-customers-chart/use-top-customers.ts +7 -20
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +61 -31
- package/src/components/delivery-notes/create/locales/bg.ts +68 -0
- package/src/components/delivery-notes/create/locales/cs.ts +68 -0
- package/src/components/delivery-notes/create/locales/en.ts +68 -0
- package/src/components/delivery-notes/create/locales/et.ts +68 -0
- package/src/components/delivery-notes/create/locales/fi.ts +68 -0
- package/src/components/delivery-notes/create/locales/hr.ts +6 -6
- package/src/components/delivery-notes/create/locales/is.ts +68 -0
- package/src/components/delivery-notes/create/locales/nb.ts +68 -0
- package/src/components/delivery-notes/create/locales/sk.ts +68 -0
- package/src/components/delivery-notes/create/locales/sl.ts +5 -5
- package/src/components/delivery-notes/create/locales/sv.ts +68 -0
- package/src/components/delivery-notes/delivery-notes.hooks.ts +20 -3
- package/src/components/delivery-notes/list/list-row-actions.tsx +62 -16
- package/src/components/delivery-notes/list/list-table.tsx +42 -9
- package/src/components/delivery-notes/list/locales/bg.ts +40 -0
- package/src/components/delivery-notes/list/locales/cs.ts +40 -0
- package/src/components/delivery-notes/list/locales/et.ts +40 -0
- package/src/components/delivery-notes/list/locales/fi.ts +40 -0
- package/src/components/delivery-notes/list/locales/is.ts +40 -0
- package/src/components/delivery-notes/list/locales/nb.ts +40 -0
- package/src/components/delivery-notes/list/locales/sk.ts +40 -0
- package/src/components/delivery-notes/list/locales/sv.ts +40 -0
- package/src/components/delivery-notes/list/use-delivery-note-download.ts +3 -5
- package/src/components/documents/create/document-add-item-form.tsx +256 -147
- package/src/components/documents/create/document-add-item-tax-rate-field.tsx +2 -1
- package/src/components/documents/create/document-details-section.tsx +30 -12
- package/src/components/documents/create/document-item-validation.ts +50 -0
- package/src/components/documents/create/document-items-section.tsx +44 -6
- package/src/components/documents/create/document-recipient-section.tsx +10 -2
- package/src/components/documents/create/linked-documents-info.tsx +4 -3
- package/src/components/documents/create/live-preview.tsx +19 -15
- package/src/components/documents/create/mark-as-paid-section.tsx +77 -20
- package/src/components/documents/create/payment-rows.ts +291 -0
- package/src/components/documents/create/prepare-document-submission.ts +24 -13
- package/src/components/documents/create/scroll-to-first-invalid-field.ts +27 -0
- package/src/components/documents/create/smart-code-insert-button.tsx +5 -53
- package/src/components/documents/create/use-document-customer-form.ts +74 -25
- package/src/components/documents/documents.hooks.ts +3 -5
- package/src/components/documents/index.ts +1 -0
- package/src/components/documents/public/index.ts +1 -0
- package/src/components/documents/public/public-document-summary.tsx +343 -0
- package/src/components/documents/shared/document-preview-display.tsx +65 -39
- package/src/components/documents/shared/index.ts +6 -1
- package/src/components/documents/shared/scaled-document-preview.tsx +33 -19
- package/src/components/documents/types.ts +24 -0
- package/src/components/documents/view/document-actions-bar.tsx +241 -62
- package/src/components/documents/view/document-activities-list.tsx +23 -11
- package/src/components/documents/view/document-details-card.tsx +7 -27
- package/src/components/documents/view/document-payments-list.tsx +114 -57
- package/src/components/documents/view/document-relations-list.tsx +26 -6
- package/src/components/documents/view/document-sidebar.tsx +25 -3
- package/src/components/documents/view/document-version-history.tsx +137 -0
- package/src/components/documents/view/index.ts +1 -0
- package/src/components/documents/view/locales/bg.ts +143 -0
- package/src/components/documents/view/locales/cs.ts +143 -0
- package/src/components/documents/view/locales/de.ts +13 -0
- package/src/components/documents/view/locales/en.ts +143 -0
- package/src/components/documents/view/locales/es.ts +13 -0
- package/src/components/documents/view/locales/et.ts +143 -0
- package/src/components/documents/view/locales/fi.ts +143 -0
- package/src/components/documents/view/locales/fr.ts +13 -0
- package/src/components/documents/view/locales/hr.ts +13 -0
- package/src/components/documents/view/locales/is.ts +143 -0
- package/src/components/documents/view/locales/it.ts +13 -0
- package/src/components/documents/view/locales/nb.ts +143 -0
- package/src/components/documents/view/locales/nl.ts +13 -0
- package/src/components/documents/view/locales/pl.ts +13 -0
- package/src/components/documents/view/locales/pt.ts +13 -0
- package/src/components/documents/view/locales/sk.ts +143 -0
- package/src/components/documents/view/locales/sl.ts +13 -0
- package/src/components/documents/view/locales/sv.ts +143 -0
- package/src/components/documents/view/use-document-download.ts +18 -17
- package/src/components/entities/create-entity-form.tsx +200 -12
- package/src/components/entities/entities.hooks.ts +15 -7
- package/src/components/entities/entity-settings-form/entity-settings-form.tsx +121 -65
- package/src/components/entities/entity-settings-form/input-with-preview.tsx +28 -4
- package/src/components/entities/entity-settings-form/locales/bg.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/cs.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/de.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/en.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/es.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/et.ts +198 -0
- package/src/components/entities/entity-settings-form/locales/fi.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/hr.ts +16 -11
- package/src/components/entities/entity-settings-form/locales/is.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/nb.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/pl.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/pt.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/sk.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +20 -15
- package/src/components/entities/entity-settings-form/locales/sv.ts +205 -0
- package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +34 -9
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +2 -0
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +14 -45
- package/src/components/entities/fina-settings-form/locales/bg.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/cs.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/et.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/fi.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/hr.ts +11 -10
- package/src/components/entities/fina-settings-form/locales/is.ts +164 -0
- package/src/components/entities/fina-settings-form/locales/nb.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/sk.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/sl.ts +8 -7
- package/src/components/entities/fina-settings-form/locales/sv.ts +165 -0
- package/src/components/entities/furs-settings-form/furs-operator-required-dialog.tsx +34 -9
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +13 -1
- package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +141 -42
- package/src/components/entities/furs-settings-form/locales/bg.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/cs.ts +241 -0
- package/src/components/entities/furs-settings-form/locales/de.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/en.ts +24 -0
- package/src/components/entities/furs-settings-form/locales/es.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/et.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/fi.ts +243 -0
- package/src/components/entities/furs-settings-form/locales/fr.ts +43 -15
- package/src/components/entities/furs-settings-form/locales/hr.ts +44 -19
- package/src/components/entities/furs-settings-form/locales/is.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/it.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/nb.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/nl.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/pl.ts +40 -15
- package/src/components/entities/furs-settings-form/locales/pt.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/sk.ts +243 -0
- package/src/components/entities/furs-settings-form/locales/sl.ts +34 -10
- package/src/components/entities/furs-settings-form/locales/sv.ts +242 -0
- package/src/components/entities/furs-settings-form/sections/enable-fiscalization-section.tsx +11 -0
- package/src/components/entities/furs-settings-form/sections/furs-internal-act-download-card.tsx +111 -0
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +27 -0
- package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +23 -16
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +89 -31
- package/src/components/entities/settings/branding-settings-form.tsx +11 -30
- package/src/components/entities/settings/company-settings-form.tsx +2 -1
- package/src/components/entities/settings/defaults-settings-form.tsx +106 -3
- package/src/components/entities/settings/email-settings-form.tsx +245 -3
- package/src/components/entities/settings/eslog-settings-form.tsx +2 -1
- package/src/components/entities/settings/number-format-settings-form.tsx +2 -1
- package/src/components/entities/settings/pdf-template-selector/locales/bg.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/cs.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/en.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/et.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/fi.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/is.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/nb.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/sk.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/sv.ts +19 -0
- package/src/components/entities/settings/tax-rules-settings-form.tsx +21 -6
- package/src/components/estimates/create/create-estimate-form.tsx +70 -34
- package/src/components/estimates/create/locales/bg.ts +76 -0
- package/src/components/estimates/create/locales/cs.ts +76 -0
- package/src/components/estimates/create/locales/en.ts +76 -0
- package/src/components/estimates/create/locales/et.ts +76 -0
- package/src/components/estimates/create/locales/fi.ts +76 -0
- package/src/components/estimates/create/locales/hr.ts +8 -8
- package/src/components/estimates/create/locales/is.ts +76 -0
- package/src/components/estimates/create/locales/nb.ts +76 -0
- package/src/components/estimates/create/locales/sk.ts +76 -0
- package/src/components/estimates/create/locales/sl.ts +8 -8
- package/src/components/estimates/create/locales/sv.ts +76 -0
- package/src/components/estimates/create/prepare-estimate-submission.ts +4 -1
- package/src/components/estimates/estimates.hooks.ts +15 -3
- package/src/components/estimates/list/list-row-actions.tsx +34 -7
- package/src/components/estimates/list/list-table.tsx +78 -10
- package/src/components/estimates/list/locales/bg.ts +38 -0
- package/src/components/estimates/list/locales/cs.ts +38 -0
- package/src/components/estimates/list/locales/en.ts +27 -2
- package/src/components/estimates/list/locales/et.ts +38 -0
- package/src/components/estimates/list/locales/fi.ts +38 -0
- package/src/components/estimates/list/locales/hr.ts +2 -2
- package/src/components/estimates/list/locales/is.ts +38 -0
- package/src/components/estimates/list/locales/nb.ts +38 -0
- package/src/components/estimates/list/locales/sk.ts +38 -0
- package/src/components/estimates/list/locales/sv.ts +38 -0
- package/src/components/estimates/list/use-estimate-download.ts +3 -5
- package/src/components/export/document-export-form.tsx +72 -15
- package/src/components/export/sales-per-item-export-form.tsx +3 -2
- package/src/components/invoices/create/create-invoice-form.tsx +294 -76
- package/src/components/invoices/create/eslog-validation.ts +97 -8
- package/src/components/invoices/create/locales/bg.ts +164 -0
- package/src/components/invoices/create/locales/cs.ts +164 -0
- package/src/components/invoices/create/locales/de.ts +24 -0
- package/src/components/invoices/create/locales/en.ts +164 -0
- package/src/components/invoices/create/locales/es.ts +24 -0
- package/src/components/invoices/create/locales/et.ts +164 -0
- package/src/components/invoices/create/locales/fi.ts +164 -0
- package/src/components/invoices/create/locales/fr.ts +23 -0
- package/src/components/invoices/create/locales/hr.ts +32 -9
- package/src/components/invoices/create/locales/is.ts +164 -0
- package/src/components/invoices/create/locales/it.ts +24 -0
- package/src/components/invoices/create/locales/nb.ts +164 -0
- package/src/components/invoices/create/locales/nl.ts +23 -0
- package/src/components/invoices/create/locales/pl.ts +23 -0
- package/src/components/invoices/create/locales/pt.ts +24 -0
- package/src/components/invoices/create/locales/sk.ts +164 -0
- package/src/components/invoices/create/locales/sl.ts +32 -9
- package/src/components/invoices/create/locales/sv.ts +166 -0
- package/src/components/invoices/create/prepare-invoice-submission.ts +19 -2
- package/src/components/invoices/invoices-furs.hooks.ts +11 -8
- package/src/components/invoices/invoices.hooks.ts +27 -10
- package/src/components/invoices/list/list-row-actions.tsx +54 -21
- package/src/components/invoices/list/list-table.tsx +92 -11
- package/src/components/invoices/list/locales/bg.ts +49 -0
- package/src/components/invoices/list/locales/cs.ts +49 -0
- package/src/components/invoices/list/locales/en.ts +34 -2
- package/src/components/invoices/list/locales/et.ts +49 -0
- package/src/components/invoices/list/locales/fi.ts +49 -0
- package/src/components/invoices/list/locales/is.ts +49 -0
- package/src/components/invoices/list/locales/nb.ts +49 -0
- package/src/components/invoices/list/locales/sk.ts +49 -0
- package/src/components/invoices/list/locales/sv.ts +49 -0
- package/src/components/invoices/list/use-invoice-download.ts +3 -5
- package/src/components/invoices/send-email-dialog/locales/bg.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/cs.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/de.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/en.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/et.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/fi.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/is.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/nb.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/sk.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/sl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/sv.ts +58 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +188 -93
- package/src/components/invoices/view/eslog-info-display.tsx +2 -0
- package/src/components/invoices/view/fiscalization-status-card.tsx +2 -0
- package/src/components/items/create-item-form/create-item-form.tsx +29 -0
- package/src/components/items/create-item-form/locales/bg.ts +13 -0
- package/src/components/items/create-item-form/locales/cs.ts +13 -0
- package/src/components/items/create-item-form/locales/et.ts +13 -0
- package/src/components/items/create-item-form/locales/fi.ts +13 -0
- package/src/components/items/create-item-form/locales/is.ts +13 -0
- package/src/components/items/create-item-form/locales/nb.ts +13 -0
- package/src/components/items/create-item-form/locales/sk.ts +13 -0
- package/src/components/items/create-item-form/locales/sv.ts +13 -0
- package/src/components/items/edit-item-form/edit-item-form.tsx +39 -1
- package/src/components/items/edit-item-form/locales/bg.ts +12 -0
- package/src/components/items/edit-item-form/locales/cs.ts +12 -0
- package/src/components/items/edit-item-form/locales/en.ts +12 -0
- package/src/components/items/edit-item-form/locales/et.ts +12 -0
- package/src/components/items/edit-item-form/locales/fi.ts +12 -0
- package/src/components/items/edit-item-form/locales/is.ts +12 -0
- package/src/components/items/edit-item-form/locales/nb.ts +12 -0
- package/src/components/items/edit-item-form/locales/sk.ts +12 -0
- package/src/components/items/edit-item-form/locales/sv.ts +12 -0
- package/src/components/items/item-combobox.tsx +51 -18
- package/src/components/items/item-list-table/item-list-table.tsx +47 -23
- package/src/components/items/item-list-table/locales/bg.ts +16 -0
- package/src/components/items/item-list-table/locales/cs.ts +16 -0
- package/src/components/items/item-list-table/locales/en.ts +4 -3
- package/src/components/items/item-list-table/locales/et.ts +16 -0
- package/src/components/items/item-list-table/locales/fi.ts +16 -0
- package/src/components/items/item-list-table/locales/is.ts +16 -0
- package/src/components/items/item-list-table/locales/nb.ts +16 -0
- package/src/components/items/item-list-table/locales/sk.ts +16 -0
- package/src/components/items/item-list-table/locales/sv.ts +16 -0
- package/src/components/items/items.hooks.ts +15 -15
- package/src/components/payments/create-payment-form/create-payment-form.tsx +11 -7
- package/src/components/payments/create-payment-form/locales/bg.ts +20 -0
- package/src/components/payments/create-payment-form/locales/cs.ts +20 -0
- package/src/components/payments/create-payment-form/locales/en.ts +20 -0
- package/src/components/payments/create-payment-form/locales/et.ts +20 -0
- package/src/components/payments/create-payment-form/locales/fi.ts +20 -0
- package/src/components/payments/create-payment-form/locales/hr.ts +2 -2
- package/src/components/payments/create-payment-form/locales/is.ts +20 -0
- package/src/components/payments/create-payment-form/locales/nb.ts +20 -0
- package/src/components/payments/create-payment-form/locales/sk.ts +20 -0
- package/src/components/payments/create-payment-form/locales/sl.ts +4 -4
- package/src/components/payments/create-payment-form/locales/sv.ts +20 -0
- package/src/components/payments/edit-payment-form/edit-payment-form.tsx +5 -1
- package/src/components/payments/edit-payment-form/locales/bg.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/cs.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/en.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/et.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/fi.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/hr.ts +2 -2
- package/src/components/payments/edit-payment-form/locales/is.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/nb.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/sk.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/sl.ts +4 -4
- package/src/components/payments/edit-payment-form/locales/sv.ts +20 -0
- package/src/components/payments/list/list-row-actions.tsx +10 -2
- package/src/components/payments/list/list-table.tsx +51 -45
- package/src/components/payments/list/locales/bg.ts +42 -0
- package/src/components/payments/list/locales/cs.ts +42 -0
- package/src/components/payments/list/locales/de.ts +18 -0
- package/src/components/payments/list/locales/en.ts +37 -2
- package/src/components/payments/list/locales/es.ts +18 -0
- package/src/components/payments/list/locales/et.ts +42 -0
- package/src/components/payments/list/locales/fi.ts +42 -0
- package/src/components/payments/list/locales/fr.ts +18 -0
- package/src/components/payments/list/locales/hr.ts +18 -0
- package/src/components/payments/list/locales/is.ts +42 -0
- package/src/components/payments/list/locales/it.ts +18 -0
- package/src/components/payments/list/locales/nb.ts +42 -0
- package/src/components/payments/list/locales/nl.ts +18 -0
- package/src/components/payments/list/locales/pl.ts +18 -0
- package/src/components/payments/list/locales/pt.ts +18 -0
- package/src/components/payments/list/locales/sk.ts +42 -0
- package/src/components/payments/list/locales/sl.ts +18 -1
- package/src/components/payments/list/locales/sv.ts +42 -0
- package/src/components/payments/payments.hooks.ts +13 -6
- package/src/components/recurring-invoices/create-recurring-invoice-form/create-recurring-invoice-form.tsx +23 -17
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/bg.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/cs.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/en.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/et.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/fi.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/hr.ts +6 -6
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/is.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/nb.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sk.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sl.ts +4 -4
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sv.ts +44 -0
- package/src/components/recurring-invoices/list/list-row-actions.tsx +3 -5
- package/src/components/recurring-invoices/list/list-table.tsx +10 -7
- package/src/components/recurring-invoices/list/locales/bg.ts +28 -0
- package/src/components/recurring-invoices/list/locales/cs.ts +28 -0
- package/src/components/recurring-invoices/list/locales/en.ts +23 -0
- package/src/components/recurring-invoices/list/locales/et.ts +28 -0
- package/src/components/recurring-invoices/list/locales/fi.ts +28 -0
- package/src/components/recurring-invoices/list/locales/is.ts +28 -0
- package/src/components/recurring-invoices/list/locales/nb.ts +28 -0
- package/src/components/recurring-invoices/list/locales/sk.ts +28 -0
- package/src/components/recurring-invoices/list/locales/sv.ts +28 -0
- package/src/components/recurring-invoices/recurring-invoices.hooks.ts +11 -8
- package/src/components/request-logs/request-log-detail.tsx +30 -23
- package/src/components/request-logs/request-log-list-table.tsx +88 -45
- package/src/components/table/README.md +47 -9
- package/src/components/table/data-table.tsx +232 -92
- package/src/components/table/filter-bar.tsx +1 -1
- package/src/components/table/filter-panel.tsx +51 -22
- package/src/components/table/hooks/use-table-state.ts +64 -11
- package/src/components/table/index.ts +3 -0
- package/src/components/table/locales.ts +119 -4
- package/src/components/table/selection-toolbar.tsx +65 -9
- package/src/components/table/sorting.ts +80 -0
- package/src/components/table/table-skeleton.tsx +15 -9
- package/src/components/table/types.ts +17 -0
- package/src/components/tax-reports/index.ts +8 -0
- package/src/components/tax-reports/kir-export-form.tsx +4 -5
- package/src/components/tax-reports/slovenia-accounting-mappings-fields.tsx +271 -0
- package/src/components/tax-reports/slovenia-tax-profile-step.tsx +21 -10
- package/src/components/tax-reports/slovenia-vod-export-form.tsx +452 -0
- package/src/components/tax-reports/slovenia-yearly-export-form.tsx +17 -16
- package/src/components/tax-reports/slovenia-yearly-review-step.tsx +40 -18
- package/src/components/taxes/create-tax-form/create-tax-form.tsx +48 -2
- package/src/components/taxes/create-tax-form/locales/bg.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/cs.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/et.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/fi.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/is.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/nb.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/sk.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/sv.ts +8 -0
- package/src/components/taxes/edit-tax-form/edit-tax-form.tsx +80 -11
- package/src/components/taxes/edit-tax-form/locales/bg.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/cs.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/en.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/et.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/fi.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/is.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/nb.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sk.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sv.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/bg.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/cs.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/en.ts +4 -3
- package/src/components/taxes/tax-list-table/locales/et.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/fi.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/is.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/nb.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sk.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sv.ts +17 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +53 -19
- package/src/components/taxes/taxes.hooks.ts +53 -12
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/drawer.tsx +2 -2
- package/src/components/ui/form.tsx +118 -2
- package/src/components/ui/progress.tsx +6 -4
- package/src/components/ui/select.tsx +118 -1
- package/src/components/ui/sonner.tsx +17 -36
- package/src/components/ui/sticky-form-footer.tsx +6 -1
- package/src/components/ui/tooltip.tsx +15 -2
- package/src/components/webhook-logs/webhook-delivery-detail.tsx +22 -22
- package/src/components/webhook-logs/webhook-delivery-list-table.tsx +92 -17
- package/src/components/wl-subscription/locked-feature.tsx +11 -10
- package/src/components/wl-subscription/paywall.tsx +184 -72
- package/src/components/wl-subscription/upgrade-modal.tsx +28 -31
- package/src/generate-schemas.ts +14 -4
- package/src/generated/schemas/account_webhook.ts +43 -0
- package/src/generated/schemas/accountwebhook.ts +67 -0
- package/src/generated/schemas/entity.ts +255 -16
- package/src/generated/schemas/exportsloveniavodxml_body.ts +16 -0
- package/src/generated/schemas/furssettings.ts +1 -0
- package/src/generated/schemas/incomingpurchasedocument.ts +198 -0
- package/src/generated/schemas/incomingpurchasedocumentpayment.ts +38 -0
- package/src/generated/schemas/index.ts +10 -0
- package/src/generated/schemas/item.ts +36 -0
- package/src/generated/schemas/me.ts +23 -19
- package/src/generated/schemas/order.ts +2 -0
- package/src/generated/schemas/orderintegration.ts +8 -4
- package/src/generated/schemas/payment.ts +5 -0
- package/src/generated/schemas/ptatcudseries.ts +30 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +35 -3
- package/src/generated/schemas/rendercreditnotepreview_body.ts +35 -3
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +12 -5
- package/src/generated/schemas/renderestimatepreview_body.ts +38 -5
- package/src/generated/schemas/renderinvoicepreview_body.ts +39 -5
- package/src/generated/schemas/senddocument_body.ts +1 -0
- package/src/generated/schemas/sendemail_body.ts +67 -39
- package/src/generated/schemas/sloveniataxprofile.ts +97 -21
- package/src/generated/schemas/starteslogexport_body.ts +33 -0
- package/src/generated/schemas/startpdfexport_body.ts +94 -78
- package/src/generated/schemas/supplier.ts +59 -0
- package/src/generated/schemas/syncshopifyorders_body.ts +20 -0
- package/src/generated/schemas/tax.ts +2 -0
- package/src/generated/schemas/uploadfile_body.ts +1 -0
- package/src/generated/schemas/userptsettings.ts +26 -0
- package/src/generated/schemas/voidinvoice_body.ts +20 -0
- package/src/generated/schemas/webhook.ts +2 -0
- package/src/hooks/create-resource-hooks.ts +22 -19
- package/src/hooks/use-duplicate-document.ts +10 -8
- package/src/hooks/use-eslog-validation.ts +5 -1
- package/src/hooks/use-next-document-number.ts +13 -6
- package/src/hooks/use-resolved-entity-id.ts +14 -0
- package/src/hooks/use-resource-mutation.ts +11 -30
- package/src/hooks/use-transaction-type-check.ts +3 -8
- package/src/lib/browser-cookies.ts +1 -1
- package/src/lib/country-capabilities.ts +114 -0
- package/src/lib/date-fns-locale.ts +1 -20
- package/src/lib/eslog-export.ts +32 -0
- package/src/lib/fiscalization-options.ts +21 -1
- package/src/lib/formatting.ts +27 -0
- package/src/lib/furs-error-utils.ts +29 -0
- package/src/lib/locale.ts +4 -0
- package/src/lib/payment-display.ts +95 -0
- package/src/lib/pt-document-input.ts +67 -0
- package/src/lib/schemas/shared.ts +1 -0
- package/src/lib/template-variables.tsx +102 -4
- package/src/lib/translation.ts +51 -33
- package/src/lib/white-label-capabilities.ts +626 -0
- package/src/lib/zod-validation-message.ts +291 -0
- package/src/providers/entities-provider.tsx +32 -14
- package/src/providers/sdk-provider.tsx +112 -12
- package/src/providers/space-invoices-provider.tsx +129 -0
- package/src/providers/white-label-provider.tsx +96 -4
- package/src/providers/wl-subscription-provider.tsx +144 -10
|
@@ -49,6 +49,10 @@ const defaultsSettingsSchema = z.object({
|
|
|
49
49
|
// Credit note defaults
|
|
50
50
|
default_credit_note_note: z.union([z.string(), z.null()]).optional(),
|
|
51
51
|
default_credit_note_payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
52
|
+
// Advance invoice defaults
|
|
53
|
+
default_advance_invoice_note: z.union([z.string(), z.null()]).optional(),
|
|
54
|
+
// Delivery note defaults
|
|
55
|
+
default_delivery_note_note: z.union([z.string(), z.null()]).optional(),
|
|
52
56
|
// Shared
|
|
53
57
|
document_footer: z.union([z.string(), z.null()]).optional(),
|
|
54
58
|
default_document_signature: z.union([z.string(), z.null()]).optional(),
|
|
@@ -71,11 +75,12 @@ export function DefaultsSettingsForm({
|
|
|
71
75
|
t: translateProp,
|
|
72
76
|
namespace,
|
|
73
77
|
locale,
|
|
78
|
+
translationLocale,
|
|
74
79
|
onSuccess,
|
|
75
80
|
onError,
|
|
76
81
|
renderSection,
|
|
77
82
|
}: DefaultsSettingsFormProps) {
|
|
78
|
-
const t = createTranslation({ t: translateProp, namespace, locale, translations });
|
|
83
|
+
const t = createTranslation({ t: translateProp, namespace, locale, translationLocale, translations });
|
|
79
84
|
|
|
80
85
|
const currentSettings = (entity.settings as any) || {};
|
|
81
86
|
|
|
@@ -88,6 +93,10 @@ export function DefaultsSettingsForm({
|
|
|
88
93
|
// Refs for smart code insert buttons - Credit Note
|
|
89
94
|
const creditNoteNoteRef = useRef<HTMLTextAreaElement>(null);
|
|
90
95
|
const creditNotePaymentTermsRef = useRef<HTMLTextAreaElement>(null);
|
|
96
|
+
// Refs for smart code insert buttons - Advance Invoice
|
|
97
|
+
const advanceInvoiceNoteRef = useRef<HTMLTextAreaElement>(null);
|
|
98
|
+
// Refs for smart code insert buttons - Delivery Note
|
|
99
|
+
const deliveryNoteNoteRef = useRef<HTMLTextAreaElement>(null);
|
|
91
100
|
// Ref for document footer (shared)
|
|
92
101
|
const documentFooterRef = useRef<HTMLTextAreaElement>(null);
|
|
93
102
|
// Ref for document signature (shared)
|
|
@@ -107,6 +116,10 @@ export function DefaultsSettingsForm({
|
|
|
107
116
|
// Credit Note
|
|
108
117
|
default_credit_note_note: currentSettings.default_credit_note_note || null,
|
|
109
118
|
default_credit_note_payment_terms: currentSettings.default_credit_note_payment_terms || null,
|
|
119
|
+
// Advance Invoice
|
|
120
|
+
default_advance_invoice_note: currentSettings.default_advance_invoice_note || null,
|
|
121
|
+
// Delivery Note
|
|
122
|
+
default_delivery_note_note: currentSettings.default_delivery_note_note || null,
|
|
110
123
|
// Shared
|
|
111
124
|
document_footer: currentSettings.document_footer || null,
|
|
112
125
|
default_document_signature: currentSettings.default_document_signature || null,
|
|
@@ -142,6 +155,10 @@ export function DefaultsSettingsForm({
|
|
|
142
155
|
// Credit Note
|
|
143
156
|
default_credit_note_note: values.default_credit_note_note || null,
|
|
144
157
|
default_credit_note_payment_terms: values.default_credit_note_payment_terms || null,
|
|
158
|
+
// Advance Invoice
|
|
159
|
+
default_advance_invoice_note: values.default_advance_invoice_note || null,
|
|
160
|
+
// Delivery Note
|
|
161
|
+
default_delivery_note_note: values.default_delivery_note_note || null,
|
|
145
162
|
// Shared
|
|
146
163
|
document_footer: values.document_footer || null,
|
|
147
164
|
default_document_signature: values.default_document_signature || null,
|
|
@@ -237,6 +254,12 @@ export function DefaultsSettingsForm({
|
|
|
237
254
|
<TabsTrigger value="credit_note" className="cursor-pointer">
|
|
238
255
|
{t("Credit Note")}
|
|
239
256
|
</TabsTrigger>
|
|
257
|
+
<TabsTrigger value="advance_invoice" className="cursor-pointer">
|
|
258
|
+
{t("Advance Invoice")}
|
|
259
|
+
</TabsTrigger>
|
|
260
|
+
<TabsTrigger value="delivery_note" className="cursor-pointer">
|
|
261
|
+
{t("Delivery Note")}
|
|
262
|
+
</TabsTrigger>
|
|
240
263
|
</TabsList>
|
|
241
264
|
|
|
242
265
|
{/* Invoice Tab */}
|
|
@@ -260,8 +283,9 @@ export function DefaultsSettingsForm({
|
|
|
260
283
|
ref={invoiceNoteRef}
|
|
261
284
|
value={field.value || ""}
|
|
262
285
|
onChange={field.onChange}
|
|
263
|
-
placeholder={t("
|
|
286
|
+
placeholder={t("Optional note for the document.")}
|
|
264
287
|
entity={entity}
|
|
288
|
+
translatePreviewLabel={t}
|
|
265
289
|
multiline
|
|
266
290
|
rows={3}
|
|
267
291
|
className="resize-y"
|
|
@@ -294,8 +318,9 @@ export function DefaultsSettingsForm({
|
|
|
294
318
|
ref={invoicePaymentTermsRef}
|
|
295
319
|
value={field.value || ""}
|
|
296
320
|
onChange={field.onChange}
|
|
297
|
-
placeholder={t("
|
|
321
|
+
placeholder={t("Please remit payment using the bank details shown on the document.")}
|
|
298
322
|
entity={entity}
|
|
323
|
+
translatePreviewLabel={t}
|
|
299
324
|
multiline
|
|
300
325
|
rows={3}
|
|
301
326
|
className="resize-y"
|
|
@@ -333,6 +358,7 @@ export function DefaultsSettingsForm({
|
|
|
333
358
|
onChange={field.onChange}
|
|
334
359
|
placeholder={t("This estimate is valid until {document_valid_until}.")}
|
|
335
360
|
entity={entity}
|
|
361
|
+
translatePreviewLabel={t}
|
|
336
362
|
multiline
|
|
337
363
|
rows={3}
|
|
338
364
|
className="resize-y"
|
|
@@ -367,6 +393,7 @@ export function DefaultsSettingsForm({
|
|
|
367
393
|
onChange={field.onChange}
|
|
368
394
|
placeholder={t("Payment due upon acceptance.")}
|
|
369
395
|
entity={entity}
|
|
396
|
+
translatePreviewLabel={t}
|
|
370
397
|
multiline
|
|
371
398
|
rows={3}
|
|
372
399
|
className="resize-y"
|
|
@@ -404,6 +431,7 @@ export function DefaultsSettingsForm({
|
|
|
404
431
|
onChange={field.onChange}
|
|
405
432
|
placeholder={t("Credit note for invoice {document_number}.")}
|
|
406
433
|
entity={entity}
|
|
434
|
+
translatePreviewLabel={t}
|
|
407
435
|
multiline
|
|
408
436
|
rows={3}
|
|
409
437
|
className="resize-y"
|
|
@@ -438,6 +466,7 @@ export function DefaultsSettingsForm({
|
|
|
438
466
|
onChange={field.onChange}
|
|
439
467
|
placeholder={t("Credit will be applied to your account.")}
|
|
440
468
|
entity={entity}
|
|
469
|
+
translatePreviewLabel={t}
|
|
441
470
|
multiline
|
|
442
471
|
rows={3}
|
|
443
472
|
className="resize-y"
|
|
@@ -451,6 +480,78 @@ export function DefaultsSettingsForm({
|
|
|
451
480
|
)}
|
|
452
481
|
/>
|
|
453
482
|
</TabsContent>
|
|
483
|
+
|
|
484
|
+
{/* Advance Invoice Tab */}
|
|
485
|
+
<TabsContent value="advance_invoice" className="mt-4 space-y-4">
|
|
486
|
+
<FormField
|
|
487
|
+
control={form.control}
|
|
488
|
+
name="default_advance_invoice_note"
|
|
489
|
+
render={({ field }) => (
|
|
490
|
+
<FormItem>
|
|
491
|
+
<div className="flex items-center justify-between">
|
|
492
|
+
<FormLabel className="font-medium text-sm">{t("Default Note")}</FormLabel>
|
|
493
|
+
<SmartCodeInsertButton
|
|
494
|
+
textareaRef={advanceInvoiceNoteRef}
|
|
495
|
+
value={field.value || ""}
|
|
496
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
497
|
+
t={t}
|
|
498
|
+
/>
|
|
499
|
+
</div>
|
|
500
|
+
<FormControl>
|
|
501
|
+
<InputWithPreview
|
|
502
|
+
ref={advanceInvoiceNoteRef}
|
|
503
|
+
value={field.value || ""}
|
|
504
|
+
onChange={field.onChange}
|
|
505
|
+
placeholder={t("Default note for advance invoices")}
|
|
506
|
+
entity={entity}
|
|
507
|
+
translatePreviewLabel={t}
|
|
508
|
+
multiline
|
|
509
|
+
className="min-h-[100px] resize-none"
|
|
510
|
+
rows={4}
|
|
511
|
+
/>
|
|
512
|
+
</FormControl>
|
|
513
|
+
<FormDescription className="text-xs">{t("Default note for all new advance invoices")}</FormDescription>
|
|
514
|
+
<FormMessage />
|
|
515
|
+
</FormItem>
|
|
516
|
+
)}
|
|
517
|
+
/>
|
|
518
|
+
</TabsContent>
|
|
519
|
+
|
|
520
|
+
{/* Delivery Note Tab */}
|
|
521
|
+
<TabsContent value="delivery_note" className="mt-4 space-y-4">
|
|
522
|
+
<FormField
|
|
523
|
+
control={form.control}
|
|
524
|
+
name="default_delivery_note_note"
|
|
525
|
+
render={({ field }) => (
|
|
526
|
+
<FormItem>
|
|
527
|
+
<div className="flex items-center justify-between">
|
|
528
|
+
<FormLabel className="font-medium text-sm">{t("Default Note")}</FormLabel>
|
|
529
|
+
<SmartCodeInsertButton
|
|
530
|
+
textareaRef={deliveryNoteNoteRef}
|
|
531
|
+
value={field.value || ""}
|
|
532
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
533
|
+
t={t}
|
|
534
|
+
/>
|
|
535
|
+
</div>
|
|
536
|
+
<FormControl>
|
|
537
|
+
<InputWithPreview
|
|
538
|
+
ref={deliveryNoteNoteRef}
|
|
539
|
+
value={field.value || ""}
|
|
540
|
+
onChange={field.onChange}
|
|
541
|
+
placeholder={t("Default note for delivery notes")}
|
|
542
|
+
entity={entity}
|
|
543
|
+
translatePreviewLabel={t}
|
|
544
|
+
multiline
|
|
545
|
+
className="min-h-[100px] resize-none"
|
|
546
|
+
rows={4}
|
|
547
|
+
/>
|
|
548
|
+
</FormControl>
|
|
549
|
+
<FormDescription className="text-xs">{t("Default note for all new delivery notes")}</FormDescription>
|
|
550
|
+
<FormMessage />
|
|
551
|
+
</FormItem>
|
|
552
|
+
)}
|
|
553
|
+
/>
|
|
554
|
+
</TabsContent>
|
|
454
555
|
</Tabs>
|
|
455
556
|
</div>
|
|
456
557
|
);
|
|
@@ -479,6 +580,7 @@ export function DefaultsSettingsForm({
|
|
|
479
580
|
onChange={field.onChange}
|
|
480
581
|
placeholder={t("{entity_name}")}
|
|
481
582
|
entity={entity}
|
|
583
|
+
translatePreviewLabel={t}
|
|
482
584
|
multiline
|
|
483
585
|
rows={2}
|
|
484
586
|
className="resize-y"
|
|
@@ -511,6 +613,7 @@ export function DefaultsSettingsForm({
|
|
|
511
613
|
onChange={field.onChange}
|
|
512
614
|
placeholder={t("{entity_name} | Due Date: {document_due_date} | Invoice #{document_number}")}
|
|
513
615
|
entity={entity}
|
|
616
|
+
translatePreviewLabel={t}
|
|
514
617
|
multiline
|
|
515
618
|
rows={2}
|
|
516
619
|
className="resize-y"
|
|
@@ -37,6 +37,12 @@ const emailSettingsSchema = z.object({
|
|
|
37
37
|
invoice_email_body: z.union([z.string(), z.null()]).optional(),
|
|
38
38
|
estimate_email_subject: z.union([z.string(), z.null()]).optional(),
|
|
39
39
|
estimate_email_body: z.union([z.string(), z.null()]).optional(),
|
|
40
|
+
credit_note_email_subject: z.union([z.string(), z.null()]).optional(),
|
|
41
|
+
credit_note_email_body: z.union([z.string(), z.null()]).optional(),
|
|
42
|
+
advance_invoice_email_subject: z.union([z.string(), z.null()]).optional(),
|
|
43
|
+
advance_invoice_email_body: z.union([z.string(), z.null()]).optional(),
|
|
44
|
+
delivery_note_email_subject: z.union([z.string(), z.null()]).optional(),
|
|
45
|
+
delivery_note_email_body: z.union([z.string(), z.null()]).optional(),
|
|
40
46
|
});
|
|
41
47
|
|
|
42
48
|
type EmailSettingsSchema = z.infer<typeof emailSettingsSchema>;
|
|
@@ -52,10 +58,11 @@ export function EmailSettingsForm({
|
|
|
52
58
|
t: translateProp,
|
|
53
59
|
namespace,
|
|
54
60
|
locale,
|
|
61
|
+
translationLocale,
|
|
55
62
|
onSuccess,
|
|
56
63
|
onError,
|
|
57
64
|
}: EmailSettingsFormProps) {
|
|
58
|
-
const t = createTranslation({ t: translateProp, namespace, locale, translations });
|
|
65
|
+
const t = createTranslation({ t: translateProp, namespace, locale, translationLocale, translations });
|
|
59
66
|
|
|
60
67
|
const currentSettings = (entity.settings as any) || {};
|
|
61
68
|
|
|
@@ -63,6 +70,12 @@ export function EmailSettingsForm({
|
|
|
63
70
|
const invoiceEmailBodyRef = useRef<HTMLTextAreaElement>(null);
|
|
64
71
|
const estimateEmailSubjectRef = useRef<HTMLInputElement>(null);
|
|
65
72
|
const estimateEmailBodyRef = useRef<HTMLTextAreaElement>(null);
|
|
73
|
+
const creditNoteEmailSubjectRef = useRef<HTMLInputElement>(null);
|
|
74
|
+
const creditNoteEmailBodyRef = useRef<HTMLTextAreaElement>(null);
|
|
75
|
+
const advanceInvoiceEmailSubjectRef = useRef<HTMLInputElement>(null);
|
|
76
|
+
const advanceInvoiceEmailBodyRef = useRef<HTMLTextAreaElement>(null);
|
|
77
|
+
const deliveryNoteEmailSubjectRef = useRef<HTMLInputElement>(null);
|
|
78
|
+
const deliveryNoteEmailBodyRef = useRef<HTMLTextAreaElement>(null);
|
|
66
79
|
|
|
67
80
|
const form = useForm<EmailSettingsSchema>({
|
|
68
81
|
resolver: zodResolver(emailSettingsSchema),
|
|
@@ -72,6 +85,12 @@ export function EmailSettingsForm({
|
|
|
72
85
|
invoice_email_body: currentSettings.email_defaults?.invoice_body || null,
|
|
73
86
|
estimate_email_subject: currentSettings.email_defaults?.estimate_subject || null,
|
|
74
87
|
estimate_email_body: currentSettings.email_defaults?.estimate_body || null,
|
|
88
|
+
credit_note_email_subject: currentSettings.email_defaults?.credit_note_subject || null,
|
|
89
|
+
credit_note_email_body: currentSettings.email_defaults?.credit_note_body || null,
|
|
90
|
+
advance_invoice_email_subject: currentSettings.email_defaults?.advance_invoice_subject || null,
|
|
91
|
+
advance_invoice_email_body: currentSettings.email_defaults?.advance_invoice_body || null,
|
|
92
|
+
delivery_note_email_subject: currentSettings.email_defaults?.delivery_note_subject || null,
|
|
93
|
+
delivery_note_email_body: currentSettings.email_defaults?.delivery_note_body || null,
|
|
75
94
|
},
|
|
76
95
|
});
|
|
77
96
|
|
|
@@ -103,6 +122,12 @@ export function EmailSettingsForm({
|
|
|
103
122
|
invoice_body: values.invoice_email_body || undefined,
|
|
104
123
|
estimate_subject: values.estimate_email_subject || undefined,
|
|
105
124
|
estimate_body: values.estimate_email_body || undefined,
|
|
125
|
+
credit_note_subject: values.credit_note_email_subject || undefined,
|
|
126
|
+
credit_note_body: values.credit_note_email_body || undefined,
|
|
127
|
+
advance_invoice_subject: values.advance_invoice_email_subject || undefined,
|
|
128
|
+
advance_invoice_body: values.advance_invoice_email_body || undefined,
|
|
129
|
+
delivery_note_subject: values.delivery_note_email_subject || undefined,
|
|
130
|
+
delivery_note_body: values.delivery_note_email_body || undefined,
|
|
106
131
|
},
|
|
107
132
|
},
|
|
108
133
|
},
|
|
@@ -151,6 +176,15 @@ export function EmailSettingsForm({
|
|
|
151
176
|
<TabsTrigger value="estimate" className="cursor-pointer">
|
|
152
177
|
{t("Estimate")}
|
|
153
178
|
</TabsTrigger>
|
|
179
|
+
<TabsTrigger value="credit_note" className="cursor-pointer">
|
|
180
|
+
{t("Credit Note")}
|
|
181
|
+
</TabsTrigger>
|
|
182
|
+
<TabsTrigger value="advance_invoice" className="cursor-pointer">
|
|
183
|
+
{t("Advance Invoice")}
|
|
184
|
+
</TabsTrigger>
|
|
185
|
+
<TabsTrigger value="delivery_note" className="cursor-pointer">
|
|
186
|
+
{t("Delivery Note")}
|
|
187
|
+
</TabsTrigger>
|
|
154
188
|
</TabsList>
|
|
155
189
|
|
|
156
190
|
<TabsContent value="invoice" className="mt-4 space-y-4">
|
|
@@ -175,6 +209,7 @@ export function EmailSettingsForm({
|
|
|
175
209
|
onChange={field.onChange}
|
|
176
210
|
placeholder="Invoice {document_number} from {entity_name}"
|
|
177
211
|
entity={entity}
|
|
212
|
+
translatePreviewLabel={t}
|
|
178
213
|
className="h-10"
|
|
179
214
|
/>
|
|
180
215
|
</FormControl>
|
|
@@ -203,8 +238,9 @@ export function EmailSettingsForm({
|
|
|
203
238
|
ref={invoiceEmailBodyRef}
|
|
204
239
|
value={field.value || ""}
|
|
205
240
|
onChange={field.onChange}
|
|
206
|
-
placeholder="Please find
|
|
241
|
+
placeholder={"Please find invoice {document_number} attached.\nDue date: {document_due_date}."}
|
|
207
242
|
entity={entity}
|
|
243
|
+
translatePreviewLabel={t}
|
|
208
244
|
multiline
|
|
209
245
|
className="min-h-[200px] resize-none"
|
|
210
246
|
rows={8}
|
|
@@ -239,6 +275,7 @@ export function EmailSettingsForm({
|
|
|
239
275
|
onChange={field.onChange}
|
|
240
276
|
placeholder="Estimate {document_number} from {entity_name}"
|
|
241
277
|
entity={entity}
|
|
278
|
+
translatePreviewLabel={t}
|
|
242
279
|
className="h-10"
|
|
243
280
|
/>
|
|
244
281
|
</FormControl>
|
|
@@ -267,8 +304,11 @@ export function EmailSettingsForm({
|
|
|
267
304
|
ref={estimateEmailBodyRef}
|
|
268
305
|
value={field.value || ""}
|
|
269
306
|
onChange={field.onChange}
|
|
270
|
-
placeholder=
|
|
307
|
+
placeholder={
|
|
308
|
+
"Please find estimate {document_number} attached.\nValid until: {document_valid_until}."
|
|
309
|
+
}
|
|
271
310
|
entity={entity}
|
|
311
|
+
translatePreviewLabel={t}
|
|
272
312
|
multiline
|
|
273
313
|
className="min-h-[200px] resize-none"
|
|
274
314
|
rows={8}
|
|
@@ -280,6 +320,208 @@ export function EmailSettingsForm({
|
|
|
280
320
|
)}
|
|
281
321
|
/>
|
|
282
322
|
</TabsContent>
|
|
323
|
+
|
|
324
|
+
<TabsContent value="credit_note" className="mt-4 space-y-4">
|
|
325
|
+
<FormField
|
|
326
|
+
control={form.control}
|
|
327
|
+
name="credit_note_email_subject"
|
|
328
|
+
render={({ field }) => (
|
|
329
|
+
<FormItem>
|
|
330
|
+
<div className="flex items-center justify-between">
|
|
331
|
+
<FormLabel className="font-medium text-sm">{t("Email Subject")}</FormLabel>
|
|
332
|
+
<SmartCodeInsertButton
|
|
333
|
+
textareaRef={creditNoteEmailSubjectRef as React.RefObject<HTMLTextAreaElement | null>}
|
|
334
|
+
value={field.value || ""}
|
|
335
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
336
|
+
t={t}
|
|
337
|
+
/>
|
|
338
|
+
</div>
|
|
339
|
+
<FormControl>
|
|
340
|
+
<InputWithPreview
|
|
341
|
+
ref={creditNoteEmailSubjectRef}
|
|
342
|
+
value={field.value || ""}
|
|
343
|
+
onChange={field.onChange}
|
|
344
|
+
placeholder="Credit note {document_number} from {entity_name}"
|
|
345
|
+
entity={entity}
|
|
346
|
+
translatePreviewLabel={t}
|
|
347
|
+
className="h-10"
|
|
348
|
+
/>
|
|
349
|
+
</FormControl>
|
|
350
|
+
<FormDescription className="text-xs">{t("Subject line for credit note emails")}</FormDescription>
|
|
351
|
+
<FormMessage />
|
|
352
|
+
</FormItem>
|
|
353
|
+
)}
|
|
354
|
+
/>
|
|
355
|
+
|
|
356
|
+
<FormField
|
|
357
|
+
control={form.control}
|
|
358
|
+
name="credit_note_email_body"
|
|
359
|
+
render={({ field }) => (
|
|
360
|
+
<FormItem>
|
|
361
|
+
<div className="flex items-center justify-between">
|
|
362
|
+
<FormLabel className="font-medium text-sm">{t("Email Body")}</FormLabel>
|
|
363
|
+
<SmartCodeInsertButton
|
|
364
|
+
textareaRef={creditNoteEmailBodyRef}
|
|
365
|
+
value={field.value || ""}
|
|
366
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
367
|
+
t={t}
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
<FormControl>
|
|
371
|
+
<InputWithPreview
|
|
372
|
+
ref={creditNoteEmailBodyRef}
|
|
373
|
+
value={field.value || ""}
|
|
374
|
+
onChange={field.onChange}
|
|
375
|
+
placeholder="Please find credit note {document_number} attached."
|
|
376
|
+
entity={entity}
|
|
377
|
+
translatePreviewLabel={t}
|
|
378
|
+
multiline
|
|
379
|
+
className="min-h-[200px] resize-none"
|
|
380
|
+
rows={8}
|
|
381
|
+
/>
|
|
382
|
+
</FormControl>
|
|
383
|
+
<FormDescription className="text-xs">{t("Body content for credit note emails")}</FormDescription>
|
|
384
|
+
<FormMessage />
|
|
385
|
+
</FormItem>
|
|
386
|
+
)}
|
|
387
|
+
/>
|
|
388
|
+
</TabsContent>
|
|
389
|
+
|
|
390
|
+
<TabsContent value="advance_invoice" className="mt-4 space-y-4">
|
|
391
|
+
<FormField
|
|
392
|
+
control={form.control}
|
|
393
|
+
name="advance_invoice_email_subject"
|
|
394
|
+
render={({ field }) => (
|
|
395
|
+
<FormItem>
|
|
396
|
+
<div className="flex items-center justify-between">
|
|
397
|
+
<FormLabel className="font-medium text-sm">{t("Email Subject")}</FormLabel>
|
|
398
|
+
<SmartCodeInsertButton
|
|
399
|
+
textareaRef={advanceInvoiceEmailSubjectRef as React.RefObject<HTMLTextAreaElement | null>}
|
|
400
|
+
value={field.value || ""}
|
|
401
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
402
|
+
t={t}
|
|
403
|
+
/>
|
|
404
|
+
</div>
|
|
405
|
+
<FormControl>
|
|
406
|
+
<InputWithPreview
|
|
407
|
+
ref={advanceInvoiceEmailSubjectRef}
|
|
408
|
+
value={field.value || ""}
|
|
409
|
+
onChange={field.onChange}
|
|
410
|
+
placeholder="Advance invoice {document_number} from {entity_name}"
|
|
411
|
+
entity={entity}
|
|
412
|
+
translatePreviewLabel={t}
|
|
413
|
+
className="h-10"
|
|
414
|
+
/>
|
|
415
|
+
</FormControl>
|
|
416
|
+
<FormDescription className="text-xs">
|
|
417
|
+
{t("Subject line for advance invoice emails")}
|
|
418
|
+
</FormDescription>
|
|
419
|
+
<FormMessage />
|
|
420
|
+
</FormItem>
|
|
421
|
+
)}
|
|
422
|
+
/>
|
|
423
|
+
|
|
424
|
+
<FormField
|
|
425
|
+
control={form.control}
|
|
426
|
+
name="advance_invoice_email_body"
|
|
427
|
+
render={({ field }) => (
|
|
428
|
+
<FormItem>
|
|
429
|
+
<div className="flex items-center justify-between">
|
|
430
|
+
<FormLabel className="font-medium text-sm">{t("Email Body")}</FormLabel>
|
|
431
|
+
<SmartCodeInsertButton
|
|
432
|
+
textareaRef={advanceInvoiceEmailBodyRef}
|
|
433
|
+
value={field.value || ""}
|
|
434
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
435
|
+
t={t}
|
|
436
|
+
/>
|
|
437
|
+
</div>
|
|
438
|
+
<FormControl>
|
|
439
|
+
<InputWithPreview
|
|
440
|
+
ref={advanceInvoiceEmailBodyRef}
|
|
441
|
+
value={field.value || ""}
|
|
442
|
+
onChange={field.onChange}
|
|
443
|
+
placeholder="Please find advance invoice {document_number} attached."
|
|
444
|
+
entity={entity}
|
|
445
|
+
translatePreviewLabel={t}
|
|
446
|
+
multiline
|
|
447
|
+
className="min-h-[200px] resize-none"
|
|
448
|
+
rows={8}
|
|
449
|
+
/>
|
|
450
|
+
</FormControl>
|
|
451
|
+
<FormDescription className="text-xs">
|
|
452
|
+
{t("Body content for advance invoice emails")}
|
|
453
|
+
</FormDescription>
|
|
454
|
+
<FormMessage />
|
|
455
|
+
</FormItem>
|
|
456
|
+
)}
|
|
457
|
+
/>
|
|
458
|
+
</TabsContent>
|
|
459
|
+
|
|
460
|
+
<TabsContent value="delivery_note" className="mt-4 space-y-4">
|
|
461
|
+
<FormField
|
|
462
|
+
control={form.control}
|
|
463
|
+
name="delivery_note_email_subject"
|
|
464
|
+
render={({ field }) => (
|
|
465
|
+
<FormItem>
|
|
466
|
+
<div className="flex items-center justify-between">
|
|
467
|
+
<FormLabel className="font-medium text-sm">{t("Email Subject")}</FormLabel>
|
|
468
|
+
<SmartCodeInsertButton
|
|
469
|
+
textareaRef={deliveryNoteEmailSubjectRef as React.RefObject<HTMLTextAreaElement | null>}
|
|
470
|
+
value={field.value || ""}
|
|
471
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
472
|
+
t={t}
|
|
473
|
+
/>
|
|
474
|
+
</div>
|
|
475
|
+
<FormControl>
|
|
476
|
+
<InputWithPreview
|
|
477
|
+
ref={deliveryNoteEmailSubjectRef}
|
|
478
|
+
value={field.value || ""}
|
|
479
|
+
onChange={field.onChange}
|
|
480
|
+
placeholder="Delivery note {document_number} from {entity_name}"
|
|
481
|
+
entity={entity}
|
|
482
|
+
translatePreviewLabel={t}
|
|
483
|
+
className="h-10"
|
|
484
|
+
/>
|
|
485
|
+
</FormControl>
|
|
486
|
+
<FormDescription className="text-xs">{t("Subject line for delivery note emails")}</FormDescription>
|
|
487
|
+
<FormMessage />
|
|
488
|
+
</FormItem>
|
|
489
|
+
)}
|
|
490
|
+
/>
|
|
491
|
+
|
|
492
|
+
<FormField
|
|
493
|
+
control={form.control}
|
|
494
|
+
name="delivery_note_email_body"
|
|
495
|
+
render={({ field }) => (
|
|
496
|
+
<FormItem>
|
|
497
|
+
<div className="flex items-center justify-between">
|
|
498
|
+
<FormLabel className="font-medium text-sm">{t("Email Body")}</FormLabel>
|
|
499
|
+
<SmartCodeInsertButton
|
|
500
|
+
textareaRef={deliveryNoteEmailBodyRef}
|
|
501
|
+
value={field.value || ""}
|
|
502
|
+
onInsert={(newValue) => field.onChange(newValue)}
|
|
503
|
+
t={t}
|
|
504
|
+
/>
|
|
505
|
+
</div>
|
|
506
|
+
<FormControl>
|
|
507
|
+
<InputWithPreview
|
|
508
|
+
ref={deliveryNoteEmailBodyRef}
|
|
509
|
+
value={field.value || ""}
|
|
510
|
+
onChange={field.onChange}
|
|
511
|
+
placeholder="Please find delivery note {document_number} attached."
|
|
512
|
+
entity={entity}
|
|
513
|
+
translatePreviewLabel={t}
|
|
514
|
+
multiline
|
|
515
|
+
className="min-h-[200px] resize-none"
|
|
516
|
+
rows={8}
|
|
517
|
+
/>
|
|
518
|
+
</FormControl>
|
|
519
|
+
<FormDescription className="text-xs">{t("Body content for delivery note emails")}</FormDescription>
|
|
520
|
+
<FormMessage />
|
|
521
|
+
</FormItem>
|
|
522
|
+
)}
|
|
523
|
+
/>
|
|
524
|
+
</TabsContent>
|
|
283
525
|
</Tabs>
|
|
284
526
|
</div>
|
|
285
527
|
</form>
|
|
@@ -39,10 +39,11 @@ export function EslogSettingsForm({
|
|
|
39
39
|
t: translateProp,
|
|
40
40
|
namespace,
|
|
41
41
|
locale,
|
|
42
|
+
translationLocale,
|
|
42
43
|
onSuccess,
|
|
43
44
|
onError,
|
|
44
45
|
}: EslogSettingsFormProps) {
|
|
45
|
-
const t = createTranslation({ t: translateProp, namespace, locale, translations });
|
|
46
|
+
const t = createTranslation({ t: translateProp, namespace, locale, translationLocale, translations });
|
|
46
47
|
|
|
47
48
|
const currentSettings = (entity.settings as Record<string, unknown>) || {};
|
|
48
49
|
|
|
@@ -63,10 +63,11 @@ export function NumberFormatSettingsForm({
|
|
|
63
63
|
t: translateProp,
|
|
64
64
|
namespace,
|
|
65
65
|
locale,
|
|
66
|
+
translationLocale,
|
|
66
67
|
onSuccess,
|
|
67
68
|
onError,
|
|
68
69
|
}: NumberFormatSettingsFormProps) {
|
|
69
|
-
const t = createTranslation({ t: translateProp, namespace, locale, translations });
|
|
70
|
+
const t = createTranslation({ t: translateProp, namespace, locale, translationLocale, translations });
|
|
70
71
|
|
|
71
72
|
const currentSettings = (entity.settings as any) || {};
|
|
72
73
|
const numberFormats = currentSettings.number_formats || {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"PDF Template": "PDF шаблон",
|
|
3
|
+
"Choose the design template for your invoices and documents":
|
|
4
|
+
"Изберете дизайнерски шаблон за вашите фактури и документи",
|
|
5
|
+
Preview: "Преглед",
|
|
6
|
+
Template: "Шаблон",
|
|
7
|
+
Modern: "Модерен",
|
|
8
|
+
"Modern template description": "Modern template description",
|
|
9
|
+
Classic: "Класически",
|
|
10
|
+
"Classic template description": "Classic template description",
|
|
11
|
+
Condensed: "Компактен",
|
|
12
|
+
"Condensed template description": "Condensed template description",
|
|
13
|
+
Minimal: "Минимален",
|
|
14
|
+
"Minimal template description": "Minimal template description",
|
|
15
|
+
Fashion: "Моден",
|
|
16
|
+
"Fashion template description": "Fashion template description",
|
|
17
|
+
"Save Template": "Запази шаблон",
|
|
18
|
+
"Template saved successfully": "Шаблонът е запазен успешно",
|
|
19
|
+
"Failed to save template": "Неуспешно запазване на шаблон",
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"PDF Template": "PDF šablona",
|
|
3
|
+
"Choose the design template for your invoices and documents":
|
|
4
|
+
"Vyberte designovou šablonu pro své faktury a dokumenty",
|
|
5
|
+
Preview: "Náhled",
|
|
6
|
+
Template: "Šablona",
|
|
7
|
+
Modern: "Moderní",
|
|
8
|
+
"Modern template description": "Modern template description",
|
|
9
|
+
Classic: "Klasická",
|
|
10
|
+
"Classic template description": "Classic template description",
|
|
11
|
+
Condensed: "Kompaktní",
|
|
12
|
+
"Condensed template description": "Condensed template description",
|
|
13
|
+
Minimal: "Minimalistická",
|
|
14
|
+
"Minimal template description": "Minimal template description",
|
|
15
|
+
Fashion: "Fashion",
|
|
16
|
+
"Fashion template description": "Fashion template description",
|
|
17
|
+
"Save Template": "Uložit šablonu",
|
|
18
|
+
"Template saved successfully": "Šablona byla úspěšně uložena",
|
|
19
|
+
"Failed to save template": "Uložení šablony se nezdařilo",
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"PDF Template": "PDF Template",
|
|
3
|
+
"Choose the design template for your invoices and documents":
|
|
4
|
+
"Choose the design template for your invoices and documents",
|
|
5
|
+
Preview: "Preview",
|
|
6
|
+
Template: "Template",
|
|
7
|
+
Modern: "Modern",
|
|
8
|
+
"Modern template description": "Modern template description",
|
|
9
|
+
Classic: "Classic",
|
|
10
|
+
"Classic template description": "Classic template description",
|
|
11
|
+
Condensed: "Condensed",
|
|
12
|
+
"Condensed template description": "Condensed template description",
|
|
13
|
+
Minimal: "Minimal",
|
|
14
|
+
"Minimal template description": "Minimal template description",
|
|
15
|
+
Fashion: "Fashion",
|
|
16
|
+
"Fashion template description": "Fashion template description",
|
|
17
|
+
"Save Template": "Save Template",
|
|
18
|
+
"Template saved successfully": "Template saved successfully",
|
|
19
|
+
"Failed to save template": "Failed to save template",
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"PDF Template": "PDF-mall",
|
|
3
|
+
"Choose the design template for your invoices and documents": "Valige oma arvete ja dokumentide kujundusmall",
|
|
4
|
+
Preview: "Eelvaade",
|
|
5
|
+
Template: "Mall",
|
|
6
|
+
Modern: "Moodne",
|
|
7
|
+
"Modern template description": "Modern template description",
|
|
8
|
+
Classic: "Klassikaline",
|
|
9
|
+
"Classic template description": "Classic template description",
|
|
10
|
+
Condensed: "Kompaktne",
|
|
11
|
+
"Condensed template description": "Condensed template description",
|
|
12
|
+
Minimal: "Minimalistlik",
|
|
13
|
+
"Minimal template description": "Minimal template description",
|
|
14
|
+
Fashion: "Moeline",
|
|
15
|
+
"Fashion template description": "Fashion template description",
|
|
16
|
+
"Save Template": "Salvesta mall",
|
|
17
|
+
"Template saved successfully": "Mall edukalt salvestatud",
|
|
18
|
+
"Failed to save template": "Malli salvestamine ebaõnnestus",
|
|
19
|
+
} as const;
|