@spaceinvoices/react-ui 0.4.7 → 0.4.10

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.
Files changed (312) hide show
  1. package/cli/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/common/autocomplete.tsx +69 -6
  4. package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +124 -285
  5. package/src/components/advance-invoices/create/locales/de.ts +2 -1
  6. package/src/components/advance-invoices/create/locales/es.ts +2 -1
  7. package/src/components/advance-invoices/create/locales/fr.ts +2 -1
  8. package/src/components/advance-invoices/create/locales/hr.ts +2 -1
  9. package/src/components/advance-invoices/create/locales/it.ts +2 -1
  10. package/src/components/advance-invoices/create/locales/nl.ts +2 -1
  11. package/src/components/advance-invoices/create/locales/pl.ts +2 -1
  12. package/src/components/advance-invoices/create/locales/pt.ts +2 -1
  13. package/src/components/advance-invoices/create/locales/sl.ts +2 -1
  14. package/src/components/advance-invoices/list/list-table.tsx +10 -3
  15. package/src/components/advance-invoices/list/locales/de.ts +2 -0
  16. package/src/components/advance-invoices/list/locales/en.ts +1 -0
  17. package/src/components/advance-invoices/list/locales/es.ts +1 -0
  18. package/src/components/advance-invoices/list/locales/fr.ts +1 -0
  19. package/src/components/advance-invoices/list/locales/hr.ts +1 -0
  20. package/src/components/advance-invoices/list/locales/it.ts +1 -0
  21. package/src/components/advance-invoices/list/locales/nl.ts +1 -0
  22. package/src/components/advance-invoices/list/locales/pl.ts +1 -0
  23. package/src/components/advance-invoices/list/locales/pt.ts +1 -0
  24. package/src/components/advance-invoices/list/locales/sl.ts +1 -0
  25. package/src/components/advance-invoices/list/use-advance-invoice-download.ts +1 -12
  26. package/src/components/credit-notes/create/create-credit-note-form.tsx +116 -238
  27. package/src/components/credit-notes/create/locales/de.ts +2 -1
  28. package/src/components/credit-notes/create/locales/es.ts +2 -1
  29. package/src/components/credit-notes/create/locales/fr.ts +2 -1
  30. package/src/components/credit-notes/create/locales/hr.ts +2 -1
  31. package/src/components/credit-notes/create/locales/it.ts +2 -1
  32. package/src/components/credit-notes/create/locales/nl.ts +2 -1
  33. package/src/components/credit-notes/create/locales/pl.ts +2 -1
  34. package/src/components/credit-notes/create/locales/pt.ts +2 -1
  35. package/src/components/credit-notes/create/locales/sl.ts +2 -1
  36. package/src/components/credit-notes/list/list-table.tsx +6 -3
  37. package/src/components/credit-notes/list/use-credit-note-download.ts +1 -12
  38. package/src/components/customers/customer-autocomplete.tsx +64 -11
  39. package/src/components/customers/customer-list-table/customer-list-table.tsx +3 -2
  40. package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +9 -1
  41. package/src/components/dashboard/collection-rate-card/locales/bg.ts +3 -0
  42. package/src/components/dashboard/collection-rate-card/locales/cs.ts +3 -0
  43. package/src/components/dashboard/collection-rate-card/locales/et.ts +3 -0
  44. package/src/components/dashboard/collection-rate-card/locales/fi.ts +3 -0
  45. package/src/components/dashboard/collection-rate-card/locales/is.ts +3 -0
  46. package/src/components/dashboard/collection-rate-card/locales/nb.ts +3 -0
  47. package/src/components/dashboard/collection-rate-card/locales/sk.ts +3 -0
  48. package/src/components/dashboard/collection-rate-card/locales/sv.ts +3 -0
  49. package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +10 -2
  50. package/src/components/dashboard/invoice-status-chart/locales/bg.ts +10 -0
  51. package/src/components/dashboard/invoice-status-chart/locales/cs.ts +10 -0
  52. package/src/components/dashboard/invoice-status-chart/locales/de.ts +1 -0
  53. package/src/components/dashboard/invoice-status-chart/locales/es.ts +1 -0
  54. package/src/components/dashboard/invoice-status-chart/locales/et.ts +10 -0
  55. package/src/components/dashboard/invoice-status-chart/locales/fi.ts +10 -0
  56. package/src/components/dashboard/invoice-status-chart/locales/fr.ts +1 -0
  57. package/src/components/dashboard/invoice-status-chart/locales/hr.ts +1 -0
  58. package/src/components/dashboard/invoice-status-chart/locales/is.ts +10 -0
  59. package/src/components/dashboard/invoice-status-chart/locales/it.ts +1 -0
  60. package/src/components/dashboard/invoice-status-chart/locales/nb.ts +10 -0
  61. package/src/components/dashboard/invoice-status-chart/locales/nl.ts +1 -0
  62. package/src/components/dashboard/invoice-status-chart/locales/pl.ts +1 -0
  63. package/src/components/dashboard/invoice-status-chart/locales/pt.ts +1 -0
  64. package/src/components/dashboard/invoice-status-chart/locales/sk.ts +10 -0
  65. package/src/components/dashboard/invoice-status-chart/locales/sl.ts +1 -0
  66. package/src/components/dashboard/invoice-status-chart/locales/sv.ts +10 -0
  67. package/src/components/dashboard/payment-methods-chart/locales/bg.ts +12 -0
  68. package/src/components/dashboard/payment-methods-chart/locales/cs.ts +12 -0
  69. package/src/components/dashboard/payment-methods-chart/locales/et.ts +12 -0
  70. package/src/components/dashboard/payment-methods-chart/locales/fi.ts +12 -0
  71. package/src/components/dashboard/payment-methods-chart/locales/is.ts +12 -0
  72. package/src/components/dashboard/payment-methods-chart/locales/nb.ts +12 -0
  73. package/src/components/dashboard/payment-methods-chart/locales/sk.ts +12 -0
  74. package/src/components/dashboard/payment-methods-chart/locales/sv.ts +12 -0
  75. package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +9 -1
  76. package/src/components/dashboard/payment-trend-chart/locales/bg.ts +6 -0
  77. package/src/components/dashboard/payment-trend-chart/locales/cs.ts +6 -0
  78. package/src/components/dashboard/payment-trend-chart/locales/de.ts +1 -0
  79. package/src/components/dashboard/payment-trend-chart/locales/es.ts +1 -0
  80. package/src/components/dashboard/payment-trend-chart/locales/et.ts +6 -0
  81. package/src/components/dashboard/payment-trend-chart/locales/fi.ts +6 -0
  82. package/src/components/dashboard/payment-trend-chart/locales/fr.ts +1 -0
  83. package/src/components/dashboard/payment-trend-chart/locales/hr.ts +1 -0
  84. package/src/components/dashboard/payment-trend-chart/locales/is.ts +6 -0
  85. package/src/components/dashboard/payment-trend-chart/locales/it.ts +1 -0
  86. package/src/components/dashboard/payment-trend-chart/locales/nb.ts +6 -0
  87. package/src/components/dashboard/payment-trend-chart/locales/nl.ts +1 -0
  88. package/src/components/dashboard/payment-trend-chart/locales/pl.ts +1 -0
  89. package/src/components/dashboard/payment-trend-chart/locales/pt.ts +1 -0
  90. package/src/components/dashboard/payment-trend-chart/locales/sk.ts +6 -0
  91. package/src/components/dashboard/payment-trend-chart/locales/sl.ts +1 -0
  92. package/src/components/dashboard/payment-trend-chart/locales/sv.ts +6 -0
  93. package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +15 -8
  94. package/src/components/dashboard/revenue-trend-chart/locales/bg.ts +6 -0
  95. package/src/components/dashboard/revenue-trend-chart/locales/cs.ts +6 -0
  96. package/src/components/dashboard/revenue-trend-chart/locales/de.ts +1 -0
  97. package/src/components/dashboard/revenue-trend-chart/locales/es.ts +1 -0
  98. package/src/components/dashboard/revenue-trend-chart/locales/et.ts +6 -0
  99. package/src/components/dashboard/revenue-trend-chart/locales/fi.ts +6 -0
  100. package/src/components/dashboard/revenue-trend-chart/locales/fr.ts +1 -0
  101. package/src/components/dashboard/revenue-trend-chart/locales/hr.ts +1 -0
  102. package/src/components/dashboard/revenue-trend-chart/locales/is.ts +6 -0
  103. package/src/components/dashboard/revenue-trend-chart/locales/it.ts +1 -0
  104. package/src/components/dashboard/revenue-trend-chart/locales/nb.ts +6 -0
  105. package/src/components/dashboard/revenue-trend-chart/locales/nl.ts +1 -0
  106. package/src/components/dashboard/revenue-trend-chart/locales/pl.ts +1 -0
  107. package/src/components/dashboard/revenue-trend-chart/locales/pt.ts +1 -0
  108. package/src/components/dashboard/revenue-trend-chart/locales/sk.ts +6 -0
  109. package/src/components/dashboard/revenue-trend-chart/locales/sl.ts +1 -0
  110. package/src/components/dashboard/revenue-trend-chart/locales/sv.ts +6 -0
  111. package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +15 -8
  112. package/src/components/dashboard/tax-collected-card/locales.ts +110 -0
  113. package/src/components/dashboard/tax-collected-card/tax-collected-card.tsx +8 -2
  114. package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +4 -4
  115. package/src/components/dashboard/top-customers-chart/locales/bg.ts +7 -0
  116. package/src/components/dashboard/top-customers-chart/locales/cs.ts +7 -0
  117. package/src/components/dashboard/top-customers-chart/locales/de.ts +2 -0
  118. package/src/components/dashboard/top-customers-chart/locales/es.ts +2 -0
  119. package/src/components/dashboard/top-customers-chart/locales/et.ts +7 -0
  120. package/src/components/dashboard/top-customers-chart/locales/fi.ts +7 -0
  121. package/src/components/dashboard/top-customers-chart/locales/fr.ts +2 -0
  122. package/src/components/dashboard/top-customers-chart/locales/hr.ts +2 -0
  123. package/src/components/dashboard/top-customers-chart/locales/is.ts +7 -0
  124. package/src/components/dashboard/top-customers-chart/locales/it.ts +2 -0
  125. package/src/components/dashboard/top-customers-chart/locales/nb.ts +7 -0
  126. package/src/components/dashboard/top-customers-chart/locales/nl.ts +2 -0
  127. package/src/components/dashboard/top-customers-chart/locales/pl.ts +2 -0
  128. package/src/components/dashboard/top-customers-chart/locales/pt.ts +2 -0
  129. package/src/components/dashboard/top-customers-chart/locales/sk.ts +7 -0
  130. package/src/components/dashboard/top-customers-chart/locales/sl.ts +2 -0
  131. package/src/components/dashboard/top-customers-chart/locales/sv.ts +7 -0
  132. package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +23 -12
  133. package/src/components/delivery-notes/create/create-delivery-note-form.tsx +33 -20
  134. package/src/components/delivery-notes/create/locales/de.ts +2 -1
  135. package/src/components/delivery-notes/create/locales/es.ts +2 -1
  136. package/src/components/delivery-notes/create/locales/fr.ts +2 -1
  137. package/src/components/delivery-notes/create/locales/hr.ts +2 -1
  138. package/src/components/delivery-notes/create/locales/it.ts +2 -1
  139. package/src/components/delivery-notes/create/locales/nl.ts +2 -1
  140. package/src/components/delivery-notes/create/locales/pl.ts +2 -1
  141. package/src/components/delivery-notes/create/locales/pt.ts +2 -1
  142. package/src/components/delivery-notes/create/locales/sl.ts +2 -1
  143. package/src/components/delivery-notes/list/list-table.tsx +22 -13
  144. package/src/components/delivery-notes/list/locales/de.ts +2 -0
  145. package/src/components/delivery-notes/list/locales/en.ts +1 -0
  146. package/src/components/delivery-notes/list/locales/es.ts +1 -0
  147. package/src/components/delivery-notes/list/locales/fr.ts +1 -0
  148. package/src/components/delivery-notes/list/locales/hr.ts +1 -0
  149. package/src/components/delivery-notes/list/locales/it.ts +1 -0
  150. package/src/components/delivery-notes/list/locales/nl.ts +1 -0
  151. package/src/components/delivery-notes/list/locales/pl.ts +1 -0
  152. package/src/components/delivery-notes/list/locales/pt.ts +1 -0
  153. package/src/components/delivery-notes/list/locales/sl.ts +1 -0
  154. package/src/components/delivery-notes/list/use-delivery-note-download.ts +1 -12
  155. package/src/components/documents/create/document-add-item-form.tsx +28 -16
  156. package/src/components/documents/create/document-add-item-tax-rate-field.tsx +12 -2
  157. package/src/components/documents/create/document-items-section.tsx +70 -39
  158. package/src/components/documents/create/document-recipient-section.tsx +10 -1
  159. package/src/components/documents/create/live-preview.tsx +113 -15
  160. package/src/components/documents/create/prepare-document-submission.ts +35 -16
  161. package/src/components/documents/create/use-document-customer-form.ts +14 -3
  162. package/src/components/documents/documents.hooks.ts +7 -2
  163. package/src/components/documents/shared/document-preview-display.tsx +136 -67
  164. package/src/components/documents/shared/scaled-document-preview.tsx +45 -5
  165. package/src/components/documents/view/document-actions-bar.tsx +284 -182
  166. package/src/components/documents/view/document-activities-list.tsx +3 -0
  167. package/src/components/documents/view/document-payments-list.tsx +3 -0
  168. package/src/components/documents/view/locales/de.ts +8 -0
  169. package/src/components/documents/view/locales/es.ts +8 -0
  170. package/src/components/documents/view/locales/fr.ts +8 -0
  171. package/src/components/documents/view/locales/hr.ts +8 -0
  172. package/src/components/documents/view/locales/it.ts +8 -0
  173. package/src/components/documents/view/locales/nl.ts +8 -0
  174. package/src/components/documents/view/locales/pl.ts +8 -0
  175. package/src/components/documents/view/locales/pt.ts +8 -0
  176. package/src/components/documents/view/locales/sl.ts +8 -0
  177. package/src/components/documents/view/use-document-download.ts +14 -25
  178. package/src/components/entities/create-entity-form.tsx +101 -16
  179. package/src/components/entities/entity-settings-form/locales/de.ts +6 -3
  180. package/src/components/entities/entity-settings-form/locales/es.ts +6 -3
  181. package/src/components/entities/entity-settings-form/locales/fr.ts +6 -3
  182. package/src/components/entities/entity-settings-form/locales/hr.ts +4 -2
  183. package/src/components/entities/entity-settings-form/locales/it.ts +6 -3
  184. package/src/components/entities/entity-settings-form/locales/nl.ts +6 -3
  185. package/src/components/entities/entity-settings-form/locales/pl.ts +6 -2
  186. package/src/components/entities/entity-settings-form/locales/pt.ts +6 -3
  187. package/src/components/entities/entity-settings-form/locales/sl.ts +4 -2
  188. package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +3 -3
  189. package/src/components/entities/fina-settings-form/fina-settings-form.tsx +78 -124
  190. package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +8 -1
  191. package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +14 -2
  192. package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +7 -2
  193. package/src/components/entities/furs-settings-form/furs-settings-form.tsx +56 -130
  194. package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +8 -1
  195. package/src/components/entities/furs-settings-form/sections/enable-fiscalization-section.tsx +1 -0
  196. package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +15 -2
  197. package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +20 -3
  198. package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +38 -12
  199. package/src/components/entities/settings/eslog-settings-form.tsx +13 -1
  200. package/src/components/entities/settings/pdf-template-selector/demo-invoice-data.ts +3 -22
  201. package/src/components/entities/shared/fiscalization-step-flow.ts +77 -0
  202. package/src/components/entities/shared/fiscalization-step-tabs.tsx +71 -0
  203. package/src/components/estimates/create/create-estimate-form.tsx +34 -21
  204. package/src/components/estimates/create/locales/de.ts +2 -1
  205. package/src/components/estimates/create/locales/es.ts +2 -1
  206. package/src/components/estimates/create/locales/fr.ts +2 -1
  207. package/src/components/estimates/create/locales/hr.ts +2 -1
  208. package/src/components/estimates/create/locales/it.ts +2 -1
  209. package/src/components/estimates/create/locales/nl.ts +2 -1
  210. package/src/components/estimates/create/locales/pl.ts +2 -1
  211. package/src/components/estimates/create/locales/pt.ts +2 -1
  212. package/src/components/estimates/create/locales/sl.ts +2 -1
  213. package/src/components/estimates/list/list-table.tsx +23 -14
  214. package/src/components/estimates/list/locales/de.ts +2 -0
  215. package/src/components/estimates/list/locales/en.ts +1 -0
  216. package/src/components/estimates/list/locales/es.ts +1 -0
  217. package/src/components/estimates/list/locales/fr.ts +1 -0
  218. package/src/components/estimates/list/locales/hr.ts +1 -0
  219. package/src/components/estimates/list/locales/it.ts +1 -0
  220. package/src/components/estimates/list/locales/nl.ts +1 -0
  221. package/src/components/estimates/list/locales/pl.ts +1 -0
  222. package/src/components/estimates/list/locales/pt.ts +1 -0
  223. package/src/components/estimates/list/locales/sl.ts +1 -0
  224. package/src/components/estimates/list/use-estimate-download.ts +1 -12
  225. package/src/components/export/document-export-form.tsx +33 -7
  226. package/src/components/export/sales-per-item-export-form.tsx +23 -7
  227. package/src/components/invoices/create/create-invoice-form.tsx +295 -329
  228. package/src/components/invoices/create/locales/de.ts +2 -1
  229. package/src/components/invoices/create/locales/es.ts +2 -1
  230. package/src/components/invoices/create/locales/fr.ts +2 -1
  231. package/src/components/invoices/create/locales/hr.ts +2 -1
  232. package/src/components/invoices/create/locales/it.ts +2 -1
  233. package/src/components/invoices/create/locales/nl.ts +2 -1
  234. package/src/components/invoices/create/locales/pl.ts +2 -1
  235. package/src/components/invoices/create/locales/pt.ts +2 -1
  236. package/src/components/invoices/create/locales/sl.ts +2 -1
  237. package/src/components/invoices/create/prepare-invoice-submission.ts +0 -8
  238. package/src/components/invoices/list/list-table.tsx +7 -4
  239. package/src/components/invoices/list/use-invoice-download.ts +1 -11
  240. package/src/components/invoices/send-email-dialog/locales/de.ts +2 -0
  241. package/src/components/invoices/send-email-dialog/locales/es.ts +2 -0
  242. package/src/components/invoices/send-email-dialog/locales/fr.ts +2 -0
  243. package/src/components/invoices/send-email-dialog/locales/hr.ts +2 -0
  244. package/src/components/invoices/send-email-dialog/locales/it.ts +2 -0
  245. package/src/components/invoices/send-email-dialog/locales/nl.ts +2 -0
  246. package/src/components/invoices/send-email-dialog/locales/pl.ts +2 -0
  247. package/src/components/invoices/send-email-dialog/locales/pt.ts +2 -0
  248. package/src/components/invoices/send-email-dialog/locales/sl.ts +2 -0
  249. package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +77 -8
  250. package/src/components/invoices/view/eslog-info-display.tsx +17 -1
  251. package/src/components/invoices/view/fiscalization-status-card.tsx +7 -3
  252. package/src/components/items/item-combobox.tsx +26 -6
  253. package/src/components/items/item-list-table/item-list-table.tsx +5 -2
  254. package/src/components/payments/list/list-table.tsx +14 -4
  255. package/src/components/recurring-invoices/list/list-table.tsx +7 -4
  256. package/src/components/request-logs/locales.ts +412 -0
  257. package/src/components/request-logs/request-log-detail.tsx +37 -21
  258. package/src/components/request-logs/request-log-list-table.tsx +57 -11
  259. package/src/components/table/data-table.tsx +5 -2
  260. package/src/components/table/date-cell.tsx +3 -1
  261. package/src/components/table/filter-bar.tsx +14 -2
  262. package/src/components/table/hooks/use-table-query.ts +1 -1
  263. package/src/components/table/locales.ts +1116 -0
  264. package/src/components/table/search-input.tsx +12 -3
  265. package/src/components/table/selection-toolbar.tsx +23 -6
  266. package/src/components/table/table-empty-state.tsx +43 -3
  267. package/src/components/table/table-no-results.tsx +3 -3
  268. package/src/components/table/table-pagination.tsx +4 -3
  269. package/src/components/table/types.ts +1 -0
  270. package/src/components/tax-reports/index.ts +1 -0
  271. package/src/components/tax-reports/kir-export-form.tsx +46 -8
  272. package/src/components/tax-reports/slovenia-tax-profile-step.tsx +191 -0
  273. package/src/components/tax-reports/slovenia-yearly-export-form.tsx +509 -0
  274. package/src/components/tax-reports/slovenia-yearly-review-step.tsx +253 -0
  275. package/src/components/tax-reports/slovenia-yearly-summary.tsx +19 -0
  276. package/src/components/taxes/tax-list-table/tax-list-table.tsx +3 -2
  277. package/src/components/ui/sticky-form-footer.tsx +7 -1
  278. package/src/components/webhook-logs/index.ts +6 -0
  279. package/src/components/webhook-logs/locales.ts +392 -0
  280. package/src/components/webhook-logs/webhook-delivery-detail.tsx +255 -0
  281. package/src/components/webhook-logs/webhook-delivery-list-table.tsx +278 -0
  282. package/src/components/wl-subscription/index.ts +1 -0
  283. package/src/components/wl-subscription/locked-feature.tsx +1 -0
  284. package/src/components/wl-subscription/paywall.tsx +193 -0
  285. package/src/components/wl-subscription/upgrade-modal.tsx +93 -29
  286. package/src/generate-schemas.ts +10 -5
  287. package/src/generated/schemas/customer.ts +2 -0
  288. package/src/generated/schemas/entity.ts +34 -0
  289. package/src/generated/schemas/me.ts +20 -1
  290. package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +40 -34
  291. package/src/generated/schemas/rendercreditnotepreview_body.ts +42 -36
  292. package/src/generated/schemas/renderdeliverynotepreview_body.ts +23 -13
  293. package/src/generated/schemas/renderestimatepreview_body.ts +23 -13
  294. package/src/generated/schemas/renderinvoicepreview_body.ts +40 -34
  295. package/src/generated/schemas/sendemail_body.ts +44 -0
  296. package/src/generated/schemas/startpdfexport_body.ts +91 -1
  297. package/src/generated/schemas/webhook.ts +10 -0
  298. package/src/hooks/use-duplicate-document.ts +51 -13
  299. package/src/hooks/use-eslog-validation.ts +59 -0
  300. package/src/hooks/use-premise-selection.ts +186 -0
  301. package/src/lib/browser-cookies.ts +4 -4
  302. package/src/lib/date-fns-locale.ts +48 -0
  303. package/src/lib/fiscalization-options.ts +81 -0
  304. package/src/lib/locale.ts +38 -0
  305. package/src/lib/template-variables.tsx +1 -1
  306. package/src/lib/translation.ts +14 -3
  307. package/src/providers/entities-context.tsx +1 -0
  308. package/src/providers/entities-provider.tsx +102 -3
  309. package/src/providers/form-footer-context.tsx +37 -4
  310. package/src/providers/sdk-provider.tsx +7 -2
  311. package/src/providers/white-label-provider.tsx +4 -1
  312. package/src/providers/wl-subscription-provider.tsx +90 -3
@@ -41,7 +41,8 @@ export default {
41
41
  Domestic: "Binnenland",
42
42
  "EU B2B": "EU B2B",
43
43
  "EU B2C": "EU B2C",
44
- Export: "Export",
44
+ "3W B2B": "3W B2B",
45
+ "3W B2C": "3W B2C",
45
46
  "Determining transaction type...": "Transactietype bepalen...",
46
47
  "This invoice will not be fiscalized (non-domestic transaction)":
47
48
  "Deze factuur wordt niet gefiscaliseerd (niet-binnenlandse transactie)",
@@ -40,7 +40,8 @@ export default {
40
40
  Domestic: "Krajowa",
41
41
  "EU B2B": "EU B2B",
42
42
  "EU B2C": "EU B2C",
43
- Export: "Eksport",
43
+ "3W B2B": "3W B2B",
44
+ "3W B2C": "3W B2C",
44
45
  "Determining transaction type...": "Określanie typu transakcji...",
45
46
  "This invoice will not be fiscalized (non-domestic transaction)":
46
47
  "Ta faktura nie będzie fiskalizowana (transakcja niekrajowa)",
@@ -41,7 +41,8 @@ export default {
41
41
  Domestic: "Nacional",
42
42
  "EU B2B": "EU B2B",
43
43
  "EU B2C": "EU B2C",
44
- Export: "Exportação",
44
+ "3W B2B": "3W B2B",
45
+ "3W B2C": "3W B2C",
45
46
  "Determining transaction type...": "Determinando tipo de transação...",
46
47
  "This invoice will not be fiscalized (non-domestic transaction)":
47
48
  "Esta fatura não será fiscalizada (transação não nacional)",
@@ -37,7 +37,8 @@ export default {
37
37
  Domestic: "Domača",
38
38
  "EU B2B": "EU B2B",
39
39
  "EU B2C": "EU B2C",
40
- Export: "Izvoz",
40
+ "3W B2B": "3W B2B",
41
+ "3W B2C": "3W B2C",
41
42
  "Determining transaction type...": "Določanje vrste transakcije...",
42
43
  "This invoice will not be fiscalized (non-domestic transaction)":
43
44
  "Ta račun ne bo fiskaliziran (nedomača transakcija)",
@@ -4,6 +4,7 @@ import { useCallback, useMemo, useState } from "react";
4
4
  import { DataTable } from "@/ui/components/table/data-table";
5
5
  import { FormattedDate } from "@/ui/components/table/date-cell";
6
6
  import { useTableFetch } from "@/ui/components/table/hooks/use-table-fetch";
7
+ import { withTableTranslations } from "@/ui/components/table/locales";
7
8
  import { SelectionToolbar } from "@/ui/components/table/selection-toolbar";
8
9
  import type {
9
10
  Column,
@@ -31,7 +32,7 @@ import pl from "./locales/pl";
31
32
  import pt from "./locales/pt";
32
33
  import sl from "./locales/sl";
33
34
 
34
- const translations = {
35
+ const translations = withTableTranslations({
35
36
  en,
36
37
  sl,
37
38
  de,
@@ -42,12 +43,13 @@ const translations = {
42
43
  nl,
43
44
  pl,
44
45
  hr,
45
- } as const;
46
+ } as const);
46
47
 
47
48
  type AdvanceInvoiceListTableProps = {
48
49
  t?: (key: string) => string;
49
50
  namespace?: string;
50
51
  locale?: string;
52
+ translationLocale?: string;
51
53
  entityId?: string;
52
54
  onView?: (advanceInvoice: AdvanceInvoice) => void;
53
55
  onAddPayment?: (advanceInvoice: AdvanceInvoice) => void;
@@ -86,6 +88,7 @@ export default function AdvanceInvoiceListTable({
86
88
  }: AdvanceInvoiceListTableProps) {
87
89
  const t = createTranslation({
88
90
  translations,
91
+ locale: i18nProps.translationLocale ?? i18nProps.locale,
89
92
  ...i18nProps,
90
93
  });
91
94
 
@@ -149,11 +152,15 @@ export default function AdvanceInvoiceListTable({
149
152
  const someFailed = failedCount > 0 && failedCount < selectedDocs.length;
150
153
  const showRetry = hasRetry && failedCount > 0;
151
154
 
155
+ const hasDrafts = selectedDocs.some((d) => (d as any).is_draft);
156
+
152
157
  return (
153
158
  <SelectionToolbar
154
159
  selectedCount={count}
155
160
  onExportPdfs={onExportSelected ? handleExportPdfs : undefined}
156
161
  onCopyToInvoice={onCopyToInvoice ? handleCopyToInvoice : undefined}
162
+ copyToInvoiceDisabled={hasDrafts}
163
+ copyToInvoiceTooltip={hasDrafts ? t("Finalize draft documents before copying to invoice") : undefined}
157
164
  onRetryFiscalization={showRetry ? () => onRetryFiscalization(failedDocs.map((d) => d.id)) : undefined}
158
165
  retryFiscalizationDisabled={someFailed && !allFailed}
159
166
  retryFiscalizationTooltip={
@@ -224,7 +231,7 @@ export default function AdvanceInvoiceListTable({
224
231
  {
225
232
  id: "date",
226
233
  header: t("Date"),
227
- cell: (advanceInvoice) => <FormattedDate date={advanceInvoice.date} />,
234
+ cell: (advanceInvoice) => <FormattedDate date={advanceInvoice.date} locale={i18nProps.locale} />,
228
235
  },
229
236
  {
230
237
  id: "total",
@@ -48,6 +48,8 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "In Rechnung kopieren",
51
+ "Finalize draft documents before copying to invoice":
52
+ "Entwurfsdokumente abschließen, bevor Sie in eine Rechnung kopieren",
51
53
  Void: "Stornieren",
52
54
  "Cannot void an advance invoice linked to an invoice":
53
55
  "Stornierung einer mit einer Rechnung verknüpften Anzahlungsrechnung nicht möglich",
@@ -14,6 +14,7 @@ export default {
14
14
  "Retry Fiscalization": "Retry Fiscalization",
15
15
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
16
16
  "Copy to Invoice": "Copy to Invoice",
17
+ "Finalize draft documents before copying to invoice": "Finalize draft documents before copying to invoice",
17
18
  Void: "Void",
18
19
  "Cannot void an advance invoice linked to an invoice": "Cannot void an advance invoice linked to an invoice",
19
20
  } as const;
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Copiar a factura",
51
+ "Finalize draft documents before copying to invoice": "Finalice los borradores antes de copiar a factura",
51
52
  Void: "Anular",
52
53
  "Cannot void an advance invoice linked to an invoice":
53
54
  "No se puede anular una factura anticipada vinculada a una factura",
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Copier vers facture",
51
+ "Finalize draft documents before copying to invoice": "Finalisez les brouillons avant de copier en facture",
51
52
  Void: "Annuler",
52
53
  "Cannot void an advance invoice linked to an invoice":
53
54
  "Impossible d'annuler une facture d'acompte liée à une facture",
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Ponovi fiskalizaciju",
49
49
  "Some selected documents don't have failed fiscalization": "Neki odabrani dokumenti nemaju neuspjelu fiskalizaciju",
50
50
  "Copy to Invoice": "Kopiraj u račun",
51
+ "Finalize draft documents before copying to invoice": "Dovršite skice dokumenata prije kopiranja u račun",
51
52
  Void: "Storniraj",
52
53
  "Cannot void an advance invoice linked to an invoice": "Nije moguće poništiti avansni račun povezan s računom",
53
54
  } as const;
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Copia in fattura",
51
+ "Finalize draft documents before copying to invoice": "Finalizzare i documenti bozza prima di copiare in fattura",
51
52
  Void: "Annulla",
52
53
  "Cannot void an advance invoice linked to an invoice":
53
54
  "Impossibile annullare una fattura anticipata collegata a una fattura",
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Kopieer naar factuur",
51
+ "Finalize draft documents before copying to invoice": "Rond conceptdocumenten af voordat u naar factuur kopieert",
51
52
  Void: "Nietig verklaren",
52
53
  "Cannot void an advance invoice linked to an invoice":
53
54
  "Kan een voorschotfactuur gekoppeld aan een factuur niet ongeldig maken",
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Kopiuj do faktury",
51
+ "Finalize draft documents before copying to invoice": "Sfinalizuj wersje robocze przed skopiowaniem do faktury",
51
52
  Void: "Anuluj",
52
53
  "Cannot void an advance invoice linked to an invoice": "Nie można anulować faktury zaliczkowej powiązanej z fakturą",
53
54
  } as const;
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Retry Fiscalization",
49
49
  "Some selected documents don't have failed fiscalization": "Some selected documents don't have failed fiscalization",
50
50
  "Copy to Invoice": "Copiar para fatura",
51
+ "Finalize draft documents before copying to invoice": "Finalize os rascunhos antes de copiar para fatura",
51
52
  Void: "Anular",
52
53
  "Cannot void an advance invoice linked to an invoice":
53
54
  "Não é possível anular uma fatura antecipada vinculada a uma fatura",
@@ -48,6 +48,7 @@ export default {
48
48
  "Retry Fiscalization": "Ponovi fiskalizacijo",
49
49
  "Some selected documents don't have failed fiscalization": "Nekateri izbrani dokumenti nimajo neuspele fiskalizacije",
50
50
  "Copy to Invoice": "Kopiraj v račun",
51
+ "Finalize draft documents before copying to invoice": "Dokončajte osnutke dokumentov pred kopiranjem v račun",
51
52
  Void: "Storniraj",
52
53
  "Cannot void an advance invoice linked to an invoice": "Ni mogoče razveljaviti predračuna, ki je povezan z računom",
53
54
  } as const;
@@ -33,19 +33,8 @@ export function useAdvanceInvoiceDownload({
33
33
  onDownloadStart?.();
34
34
 
35
35
  try {
36
- // SDK signature: renderPdf(id, params?, SDKMethodOptions?)
37
- // entity_id goes in SDKMethodOptions (last arg), not params
38
- // Note: renderPdf is on invoices module but works with any document ID
39
- const blob = await sdk.invoices.renderPdf(advanceInvoice.id, {}, { entity_id: activeEntity.id });
40
- const downloadUrl = window.URL.createObjectURL(blob);
41
- const link = document.createElement("a");
42
- link.href = downloadUrl;
43
36
  const fileName = `${t("Advance Invoice")} ${advanceInvoice.number}.pdf`;
44
- link.download = fileName;
45
- document.body.appendChild(link);
46
- link.click();
47
- document.body.removeChild(link);
48
- window.URL.revokeObjectURL(downloadUrl);
37
+ await sdk.invoices.downloadPdf(advanceInvoice.id, fileName, {}, { entity_id: activeEntity.id });
49
38
 
50
39
  onDownloadSuccess?.(fileName);
51
40
  } catch (error) {