@open-mercato/core 0.6.7-develop.6756.1.5300c41145 → 0.6.7-develop.6766.1.40c9011995

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 (276) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/api_keys/backend/api-keys/page.js +2 -1
  3. package/dist/modules/api_keys/backend/api-keys/page.js.map +2 -2
  4. package/dist/modules/api_keys/extension-points.js +16 -0
  5. package/dist/modules/api_keys/extension-points.js.map +7 -0
  6. package/dist/modules/audit_logs/components/AccessLogsTable.js +2 -1
  7. package/dist/modules/audit_logs/components/AccessLogsTable.js.map +2 -2
  8. package/dist/modules/audit_logs/components/AuditLogsActions.js +2 -1
  9. package/dist/modules/audit_logs/components/AuditLogsActions.js.map +2 -2
  10. package/dist/modules/audit_logs/extension-points.js +14 -0
  11. package/dist/modules/audit_logs/extension-points.js.map +7 -0
  12. package/dist/modules/auth/backend/roles/page.js +2 -1
  13. package/dist/modules/auth/backend/roles/page.js.map +2 -2
  14. package/dist/modules/auth/backend/users/page.js +2 -1
  15. package/dist/modules/auth/backend/users/page.js.map +2 -2
  16. package/dist/modules/auth/extension-points.js +21 -0
  17. package/dist/modules/auth/extension-points.js.map +7 -0
  18. package/dist/modules/auth/frontend/login.js +2 -1
  19. package/dist/modules/auth/frontend/login.js.map +2 -2
  20. package/dist/modules/business_rules/backend/rules/page.js +2 -1
  21. package/dist/modules/business_rules/backend/rules/page.js.map +2 -2
  22. package/dist/modules/business_rules/events.js +13 -0
  23. package/dist/modules/business_rules/events.js.map +7 -0
  24. package/dist/modules/business_rules/extension-points.js +13 -0
  25. package/dist/modules/business_rules/extension-points.js.map +7 -0
  26. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +2 -1
  27. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  28. package/dist/modules/catalog/backend/catalog/products/create/page.js +2 -1
  29. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  30. package/dist/modules/catalog/components/categories/CategoriesDataTable.js +2 -1
  31. package/dist/modules/catalog/components/categories/CategoriesDataTable.js.map +2 -2
  32. package/dist/modules/catalog/components/products/ProductsDataTable.js +3 -2
  33. package/dist/modules/catalog/components/products/ProductsDataTable.js.map +2 -2
  34. package/dist/modules/catalog/events.js +1 -0
  35. package/dist/modules/catalog/events.js.map +2 -2
  36. package/dist/modules/catalog/extension-points.js +27 -0
  37. package/dist/modules/catalog/extension-points.js.map +7 -0
  38. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +2 -1
  39. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
  40. package/dist/modules/communication_channels/backend/profile/communication-channels/page.js +3 -2
  41. package/dist/modules/communication_channels/backend/profile/communication-channels/page.js.map +2 -2
  42. package/dist/modules/communication_channels/extension-points.js +20 -0
  43. package/dist/modules/communication_channels/extension-points.js.map +7 -0
  44. package/dist/modules/configs/backend/config/system-status/page.js +2 -1
  45. package/dist/modules/configs/backend/config/system-status/page.js.map +2 -2
  46. package/dist/modules/configs/extension-points.js +18 -0
  47. package/dist/modules/configs/extension-points.js.map +7 -0
  48. package/dist/modules/currencies/backend/currencies/page.js +2 -1
  49. package/dist/modules/currencies/backend/currencies/page.js.map +2 -2
  50. package/dist/modules/currencies/backend/exchange-rates/page.js +2 -1
  51. package/dist/modules/currencies/backend/exchange-rates/page.js.map +2 -2
  52. package/dist/modules/currencies/extension-points.js +14 -0
  53. package/dist/modules/currencies/extension-points.js.map +7 -0
  54. package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js +2 -1
  55. package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js.map +2 -2
  56. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +2 -1
  57. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
  58. package/dist/modules/customer_accounts/extension-points.js +14 -0
  59. package/dist/modules/customer_accounts/extension-points.js.map +7 -0
  60. package/dist/modules/customers/backend/customers/companies/[id]/page.js +2 -1
  61. package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
  62. package/dist/modules/customers/backend/customers/companies/page.js +2 -1
  63. package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
  64. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +5 -4
  65. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
  66. package/dist/modules/customers/backend/customers/deals/[id]/page.js +5 -4
  67. package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
  68. package/dist/modules/customers/backend/customers/deals/page.js +2 -1
  69. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  70. package/dist/modules/customers/backend/customers/people/[id]/page.js +2 -1
  71. package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
  72. package/dist/modules/customers/backend/customers/people/page.js +2 -1
  73. package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
  74. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +5 -4
  75. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
  76. package/dist/modules/customers/components/CustomerTodosTable.js +2 -1
  77. package/dist/modules/customers/components/CustomerTodosTable.js.map +2 -2
  78. package/dist/modules/customers/extension-points.js +42 -0
  79. package/dist/modules/customers/extension-points.js.map +7 -0
  80. package/dist/modules/customers/lib/calendar/format.js +8 -4
  81. package/dist/modules/customers/lib/calendar/format.js.map +2 -2
  82. package/dist/modules/data_sync/backend/data-sync/page.js +2 -1
  83. package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
  84. package/dist/modules/data_sync/extension-points.js +13 -0
  85. package/dist/modules/data_sync/extension-points.js.map +7 -0
  86. package/dist/modules/directory/backend/directory/organizations/page.js +2 -1
  87. package/dist/modules/directory/backend/directory/organizations/page.js.map +2 -2
  88. package/dist/modules/directory/backend/directory/tenants/page.js +2 -1
  89. package/dist/modules/directory/backend/directory/tenants/page.js.map +2 -2
  90. package/dist/modules/directory/extension-points.js +14 -0
  91. package/dist/modules/directory/extension-points.js.map +7 -0
  92. package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +5 -1
  93. package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
  94. package/dist/modules/entities/components/SystemEntitiesTable.js +2 -1
  95. package/dist/modules/entities/components/SystemEntitiesTable.js.map +2 -2
  96. package/dist/modules/entities/components/UserEntitiesTable.js +2 -1
  97. package/dist/modules/entities/components/UserEntitiesTable.js.map +2 -2
  98. package/dist/modules/entities/extension-points.js +21 -0
  99. package/dist/modules/entities/extension-points.js.map +7 -0
  100. package/dist/modules/integrations/backend/integrations/[id]/page.js +2 -4
  101. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  102. package/dist/modules/integrations/extension-points.js +30 -0
  103. package/dist/modules/integrations/extension-points.js.map +7 -0
  104. package/dist/modules/messages/components/ComposeMessagePageClient.js +2 -1
  105. package/dist/modules/messages/components/ComposeMessagePageClient.js.map +2 -2
  106. package/dist/modules/messages/components/MessageDetailPageClient.js +3 -2
  107. package/dist/modules/messages/components/MessageDetailPageClient.js.map +2 -2
  108. package/dist/modules/messages/components/MessagesInboxPageClient.js +2 -1
  109. package/dist/modules/messages/components/MessagesInboxPageClient.js.map +2 -2
  110. package/dist/modules/messages/extension-points.js +16 -0
  111. package/dist/modules/messages/extension-points.js.map +7 -0
  112. package/dist/modules/payment_gateways/backend/payment-gateways/page.js +3 -2
  113. package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
  114. package/dist/modules/payment_gateways/extension-points.js +19 -0
  115. package/dist/modules/payment_gateways/extension-points.js.map +7 -0
  116. package/dist/modules/portal/extension-points.js +32 -0
  117. package/dist/modules/portal/extension-points.js.map +7 -0
  118. package/dist/modules/portal/frontend/[orgSlug]/portal/dashboard/page.js +3 -3
  119. package/dist/modules/portal/frontend/[orgSlug]/portal/dashboard/page.js.map +2 -2
  120. package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js +3 -3
  121. package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js.map +2 -2
  122. package/dist/modules/portal/frontend/[orgSlug]/portal/page.js +3 -3
  123. package/dist/modules/portal/frontend/[orgSlug]/portal/page.js.map +2 -2
  124. package/dist/modules/portal/frontend/[orgSlug]/portal/profile/page.js +3 -3
  125. package/dist/modules/portal/frontend/[orgSlug]/portal/profile/page.js.map +2 -2
  126. package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js +3 -3
  127. package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js.map +2 -2
  128. package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js +3 -3
  129. package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js.map +2 -2
  130. package/dist/modules/query_index/components/QueryIndexesTable.js +2 -1
  131. package/dist/modules/query_index/components/QueryIndexesTable.js.map +2 -2
  132. package/dist/modules/query_index/events.js +20 -0
  133. package/dist/modules/query_index/events.js.map +7 -0
  134. package/dist/modules/query_index/extension-points.js +13 -0
  135. package/dist/modules/query_index/extension-points.js.map +7 -0
  136. package/dist/modules/resources/backend/resources/resource-types/page.js +2 -1
  137. package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
  138. package/dist/modules/resources/backend/resources/resources/page.js +2 -1
  139. package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
  140. package/dist/modules/resources/extension-points.js +14 -0
  141. package/dist/modules/resources/extension-points.js.map +7 -0
  142. package/dist/modules/sales/api/document-history/route.js +2 -1
  143. package/dist/modules/sales/api/document-history/route.js.map +2 -2
  144. package/dist/modules/sales/backend/sales/documents/[id]/page.js +11 -3
  145. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  146. package/dist/modules/sales/components/documents/ItemsSection.js +2 -1
  147. package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
  148. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +4 -1
  149. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  150. package/dist/modules/sales/events.js +1 -0
  151. package/dist/modules/sales/events.js.map +2 -2
  152. package/dist/modules/sales/extension-points.js +36 -0
  153. package/dist/modules/sales/extension-points.js.map +7 -0
  154. package/dist/modules/sales/lib/historyHelpers.js +69 -1
  155. package/dist/modules/sales/lib/historyHelpers.js.map +2 -2
  156. package/dist/modules/sales/widgets/injection/document-history/widget.client.js +51 -2
  157. package/dist/modules/sales/widgets/injection/document-history/widget.client.js.map +2 -2
  158. package/dist/modules/wms/components/backend/WmsConfigurationPage.js +5 -4
  159. package/dist/modules/wms/components/backend/WmsConfigurationPage.js.map +2 -2
  160. package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js +4 -3
  161. package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js.map +2 -2
  162. package/dist/modules/wms/components/backend/WmsLocationDetailPage.js +3 -2
  163. package/dist/modules/wms/components/backend/WmsLocationDetailPage.js.map +2 -2
  164. package/dist/modules/wms/components/backend/WmsLotDetailPage.js +3 -2
  165. package/dist/modules/wms/components/backend/WmsLotDetailPage.js.map +2 -2
  166. package/dist/modules/wms/components/backend/WmsLotsListPage.js +2 -1
  167. package/dist/modules/wms/components/backend/WmsLotsListPage.js.map +2 -2
  168. package/dist/modules/wms/components/backend/WmsSkuDetailPage.js +3 -2
  169. package/dist/modules/wms/components/backend/WmsSkuDetailPage.js.map +2 -2
  170. package/dist/modules/wms/extension-points.js +26 -0
  171. package/dist/modules/wms/extension-points.js.map +7 -0
  172. package/dist/modules/workflows/backend/definitions/page.js +2 -1
  173. package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
  174. package/dist/modules/workflows/backend/instances/page.js +2 -1
  175. package/dist/modules/workflows/backend/instances/page.js.map +2 -2
  176. package/dist/modules/workflows/backend/tasks/page.js +2 -1
  177. package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
  178. package/dist/modules/workflows/events.js +1 -0
  179. package/dist/modules/workflows/events.js.map +2 -2
  180. package/dist/modules/workflows/extension-points.js +15 -0
  181. package/dist/modules/workflows/extension-points.js.map +7 -0
  182. package/package.json +7 -7
  183. package/src/modules/api_keys/backend/api-keys/page.tsx +2 -1
  184. package/src/modules/api_keys/extension-points.ts +13 -0
  185. package/src/modules/audit_logs/components/AccessLogsTable.tsx +2 -1
  186. package/src/modules/audit_logs/components/AuditLogsActions.tsx +2 -1
  187. package/src/modules/audit_logs/extension-points.ts +11 -0
  188. package/src/modules/auth/backend/roles/page.tsx +2 -1
  189. package/src/modules/auth/backend/users/page.tsx +2 -1
  190. package/src/modules/auth/extension-points.ts +18 -0
  191. package/src/modules/auth/frontend/login.tsx +2 -1
  192. package/src/modules/business_rules/backend/rules/page.tsx +2 -1
  193. package/src/modules/business_rules/events.ts +10 -0
  194. package/src/modules/business_rules/extension-points.ts +10 -0
  195. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +2 -1
  196. package/src/modules/catalog/backend/catalog/products/create/page.tsx +2 -1
  197. package/src/modules/catalog/components/categories/CategoriesDataTable.tsx +2 -1
  198. package/src/modules/catalog/components/products/ProductsDataTable.tsx +3 -2
  199. package/src/modules/catalog/events.ts +1 -0
  200. package/src/modules/catalog/extension-points.ts +24 -0
  201. package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +2 -1
  202. package/src/modules/communication_channels/backend/profile/communication-channels/page.tsx +3 -2
  203. package/src/modules/communication_channels/extension-points.ts +17 -0
  204. package/src/modules/configs/backend/config/system-status/page.tsx +2 -1
  205. package/src/modules/configs/extension-points.ts +15 -0
  206. package/src/modules/currencies/backend/currencies/page.tsx +2 -1
  207. package/src/modules/currencies/backend/exchange-rates/page.tsx +2 -1
  208. package/src/modules/currencies/extension-points.ts +11 -0
  209. package/src/modules/customer_accounts/backend/customer_accounts/roles/page.tsx +2 -1
  210. package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +2 -1
  211. package/src/modules/customer_accounts/extension-points.ts +11 -0
  212. package/src/modules/customers/backend/customers/companies/[id]/page.tsx +2 -1
  213. package/src/modules/customers/backend/customers/companies/page.tsx +2 -1
  214. package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +5 -4
  215. package/src/modules/customers/backend/customers/deals/[id]/page.tsx +5 -4
  216. package/src/modules/customers/backend/customers/deals/page.tsx +2 -1
  217. package/src/modules/customers/backend/customers/people/[id]/page.tsx +2 -1
  218. package/src/modules/customers/backend/customers/people/page.tsx +2 -1
  219. package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +5 -4
  220. package/src/modules/customers/components/CustomerTodosTable.tsx +2 -1
  221. package/src/modules/customers/extension-points.ts +40 -0
  222. package/src/modules/customers/lib/calendar/format.ts +10 -4
  223. package/src/modules/data_sync/backend/data-sync/page.tsx +2 -1
  224. package/src/modules/data_sync/extension-points.ts +10 -0
  225. package/src/modules/directory/backend/directory/organizations/page.tsx +2 -1
  226. package/src/modules/directory/backend/directory/tenants/page.tsx +2 -1
  227. package/src/modules/directory/extension-points.ts +11 -0
  228. package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +5 -1
  229. package/src/modules/entities/components/SystemEntitiesTable.tsx +2 -1
  230. package/src/modules/entities/components/UserEntitiesTable.tsx +2 -1
  231. package/src/modules/entities/extension-points.ts +18 -0
  232. package/src/modules/integrations/backend/integrations/[id]/page.tsx +2 -2
  233. package/src/modules/integrations/extension-points.ts +27 -0
  234. package/src/modules/messages/components/ComposeMessagePageClient.tsx +2 -1
  235. package/src/modules/messages/components/MessageDetailPageClient.tsx +3 -2
  236. package/src/modules/messages/components/MessagesInboxPageClient.tsx +2 -1
  237. package/src/modules/messages/extension-points.ts +13 -0
  238. package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +3 -2
  239. package/src/modules/payment_gateways/extension-points.ts +16 -0
  240. package/src/modules/portal/extension-points.ts +30 -0
  241. package/src/modules/portal/frontend/[orgSlug]/portal/dashboard/page.tsx +3 -3
  242. package/src/modules/portal/frontend/[orgSlug]/portal/login/page.tsx +3 -3
  243. package/src/modules/portal/frontend/[orgSlug]/portal/page.tsx +3 -3
  244. package/src/modules/portal/frontend/[orgSlug]/portal/profile/page.tsx +3 -3
  245. package/src/modules/portal/frontend/[orgSlug]/portal/reset-password/page.tsx +4 -4
  246. package/src/modules/portal/frontend/[orgSlug]/portal/signup/page.tsx +3 -3
  247. package/src/modules/query_index/components/QueryIndexesTable.tsx +2 -1
  248. package/src/modules/query_index/events.ts +17 -0
  249. package/src/modules/query_index/extension-points.ts +10 -0
  250. package/src/modules/resources/backend/resources/resource-types/page.tsx +2 -1
  251. package/src/modules/resources/backend/resources/resources/page.tsx +2 -1
  252. package/src/modules/resources/extension-points.ts +11 -0
  253. package/src/modules/sales/api/document-history/route.ts +1 -0
  254. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +11 -3
  255. package/src/modules/sales/components/documents/ItemsSection.tsx +2 -1
  256. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +6 -1
  257. package/src/modules/sales/events.ts +1 -0
  258. package/src/modules/sales/extension-points.ts +33 -0
  259. package/src/modules/sales/i18n/de.json +19 -0
  260. package/src/modules/sales/i18n/en.json +19 -0
  261. package/src/modules/sales/i18n/es.json +19 -0
  262. package/src/modules/sales/i18n/pl.json +19 -0
  263. package/src/modules/sales/lib/historyHelpers.ts +88 -1
  264. package/src/modules/sales/widgets/injection/document-history/widget.client.tsx +64 -3
  265. package/src/modules/wms/components/backend/WmsConfigurationPage.tsx +5 -4
  266. package/src/modules/wms/components/backend/WmsInventoryConsolePage.tsx +4 -3
  267. package/src/modules/wms/components/backend/WmsLocationDetailPage.tsx +3 -2
  268. package/src/modules/wms/components/backend/WmsLotDetailPage.tsx +3 -2
  269. package/src/modules/wms/components/backend/WmsLotsListPage.tsx +2 -1
  270. package/src/modules/wms/components/backend/WmsSkuDetailPage.tsx +3 -2
  271. package/src/modules/wms/extension-points.ts +23 -0
  272. package/src/modules/workflows/backend/definitions/page.tsx +2 -1
  273. package/src/modules/workflows/backend/instances/page.tsx +2 -1
  274. package/src/modules/workflows/backend/tasks/page.tsx +2 -1
  275. package/src/modules/workflows/events.ts +1 -0
  276. package/src/modules/workflows/extension-points.ts +12 -0
@@ -0,0 +1,33 @@
1
+ import { dataTableExtensionHost, defineModuleExtensionPoints, injectionExtensionHost } from '@open-mercato/shared/modules/widgets/extension-points'
2
+
3
+ export const extensionPoints = defineModuleExtensionPoints({
4
+ moduleId: 'sales',
5
+ hosts: {
6
+ ordersTable: dataTableExtensionHost({ tableId: 'sales.orders', source: 'components/documents/SalesDocumentsTable.tsx' }),
7
+ quotesTable: dataTableExtensionHost({ tableId: 'sales.quotes', source: 'components/documents/SalesDocumentsTable.tsx' }),
8
+ orderItemColumns: injectionExtensionHost({
9
+ family: 'detail',
10
+ spotId: 'data-table:sales.order.items:columns',
11
+ supported: ['column-widget'],
12
+ source: 'components/documents/ItemsSection.tsx',
13
+ }),
14
+ orderShipping: injectionExtensionHost({
15
+ family: 'detail',
16
+ spotId: 'detail:sales.order:shipping',
17
+ supported: ['render-widget'],
18
+ source: 'backend/sales/documents/[id]/page.tsx',
19
+ }),
20
+ documentDetail: injectionExtensionHost({
21
+ family: 'detail',
22
+ pattern: 'sales.document.detail.{kind}:{surface}',
23
+ parameters: {
24
+ kind: { source: 'SalesDocumentKind', pattern: '^(order|quote)$' },
25
+ surface: { source: 'host declaration', pattern: '^(tabs|details)$' },
26
+ },
27
+ supported: ['render-widget'],
28
+ source: 'backend/sales/documents/[id]/page.tsx',
29
+ }),
30
+ },
31
+ })
32
+
33
+ export default extensionPoints
@@ -927,8 +927,27 @@
927
927
  "sales.documents.form.submit": "Erstellen",
928
928
  "sales.documents.form.success": "Verkaufsdokument erstellt.",
929
929
  "sales.documents.form.title": "Verkaufsdokument erstellen",
930
+ "sales.documents.history.actor.system": "System",
931
+ "sales.documents.history.changedFields": "Geänderte Felder: {fields}",
930
932
  "sales.documents.history.empty": "Noch keine Verlaufseinträge.",
931
933
  "sales.documents.history.error": "Verlauf konnte nicht geladen werden.",
934
+ "sales.documents.history.fields.comment": "Kommentar",
935
+ "sales.documents.history.fields.configuration": "Konfiguration",
936
+ "sales.documents.history.fields.currency": "Währung",
937
+ "sales.documents.history.fields.customFields": "Benutzerdefinierte Felder",
938
+ "sales.documents.history.fields.description": "Beschreibung",
939
+ "sales.documents.history.fields.discountAmount": "Rabattbetrag",
940
+ "sales.documents.history.fields.discountPercent": "Rabattprozentsatz",
941
+ "sales.documents.history.fields.name": "Name",
942
+ "sales.documents.history.fields.product": "Produkt",
943
+ "sales.documents.history.fields.promotionCode": "Aktionscode",
944
+ "sales.documents.history.fields.quantity": "Menge",
945
+ "sales.documents.history.fields.quantityUnit": "Mengeneinheit",
946
+ "sales.documents.history.fields.status": "Status",
947
+ "sales.documents.history.fields.taxRate": "Steuerklasse",
948
+ "sales.documents.history.fields.unitPriceGross": "Bruttostückpreis",
949
+ "sales.documents.history.fields.unitPriceNet": "Nettostückpreis",
950
+ "sales.documents.history.fields.variant": "Variante",
932
951
  "sales.documents.history.filter.actions": "Aktionen",
933
952
  "sales.documents.history.filter.all": "Alle",
934
953
  "sales.documents.history.filter.comments": "Kommentare",
@@ -927,8 +927,27 @@
927
927
  "sales.documents.form.submit": "Create",
928
928
  "sales.documents.form.success": "Sales document created.",
929
929
  "sales.documents.form.title": "Create sales document",
930
+ "sales.documents.history.actor.system": "System",
931
+ "sales.documents.history.changedFields": "Changed fields: {fields}",
930
932
  "sales.documents.history.empty": "No history entries yet.",
931
933
  "sales.documents.history.error": "Failed to load history.",
934
+ "sales.documents.history.fields.comment": "Comment",
935
+ "sales.documents.history.fields.configuration": "Configuration",
936
+ "sales.documents.history.fields.currency": "Currency",
937
+ "sales.documents.history.fields.customFields": "Custom fields",
938
+ "sales.documents.history.fields.description": "Description",
939
+ "sales.documents.history.fields.discountAmount": "Discount amount",
940
+ "sales.documents.history.fields.discountPercent": "Discount percent",
941
+ "sales.documents.history.fields.name": "Name",
942
+ "sales.documents.history.fields.product": "Product",
943
+ "sales.documents.history.fields.promotionCode": "Promotion code",
944
+ "sales.documents.history.fields.quantity": "Quantity",
945
+ "sales.documents.history.fields.quantityUnit": "Quantity unit",
946
+ "sales.documents.history.fields.status": "Status",
947
+ "sales.documents.history.fields.taxRate": "Tax class",
948
+ "sales.documents.history.fields.unitPriceGross": "Gross unit price",
949
+ "sales.documents.history.fields.unitPriceNet": "Net unit price",
950
+ "sales.documents.history.fields.variant": "Variant",
932
951
  "sales.documents.history.filter.actions": "Actions",
933
952
  "sales.documents.history.filter.all": "All",
934
953
  "sales.documents.history.filter.comments": "Comments",
@@ -927,8 +927,27 @@
927
927
  "sales.documents.form.submit": "Crear",
928
928
  "sales.documents.form.success": "Documento de ventas creado.",
929
929
  "sales.documents.form.title": "Crear documento de ventas",
930
+ "sales.documents.history.actor.system": "Sistema",
931
+ "sales.documents.history.changedFields": "Campos modificados: {fields}",
930
932
  "sales.documents.history.empty": "Aún no hay entradas en el historial.",
931
933
  "sales.documents.history.error": "No se pudo cargar el historial.",
934
+ "sales.documents.history.fields.comment": "Comentario",
935
+ "sales.documents.history.fields.configuration": "Configuración",
936
+ "sales.documents.history.fields.currency": "Moneda",
937
+ "sales.documents.history.fields.customFields": "Campos personalizados",
938
+ "sales.documents.history.fields.description": "Descripción",
939
+ "sales.documents.history.fields.discountAmount": "Importe de descuento",
940
+ "sales.documents.history.fields.discountPercent": "Porcentaje de descuento",
941
+ "sales.documents.history.fields.name": "Nombre",
942
+ "sales.documents.history.fields.product": "Producto",
943
+ "sales.documents.history.fields.promotionCode": "Código promocional",
944
+ "sales.documents.history.fields.quantity": "Cantidad",
945
+ "sales.documents.history.fields.quantityUnit": "Unidad de cantidad",
946
+ "sales.documents.history.fields.status": "Estado",
947
+ "sales.documents.history.fields.taxRate": "Clase fiscal",
948
+ "sales.documents.history.fields.unitPriceGross": "Precio unitario bruto",
949
+ "sales.documents.history.fields.unitPriceNet": "Precio unitario neto",
950
+ "sales.documents.history.fields.variant": "Variante",
932
951
  "sales.documents.history.filter.actions": "Acciones",
933
952
  "sales.documents.history.filter.all": "Todos",
934
953
  "sales.documents.history.filter.comments": "Comentarios",
@@ -927,8 +927,27 @@
927
927
  "sales.documents.form.submit": "Utwórz",
928
928
  "sales.documents.form.success": "Dokument sprzedaży utworzony.",
929
929
  "sales.documents.form.title": "Utwórz dokument sprzedaży",
930
+ "sales.documents.history.actor.system": "System",
931
+ "sales.documents.history.changedFields": "Zmienione pola: {fields}",
930
932
  "sales.documents.history.empty": "Brak wpisów w historii.",
931
933
  "sales.documents.history.error": "Nie udało się załadować historii.",
934
+ "sales.documents.history.fields.comment": "Komentarz",
935
+ "sales.documents.history.fields.configuration": "Konfiguracja",
936
+ "sales.documents.history.fields.currency": "Waluta",
937
+ "sales.documents.history.fields.customFields": "Pola niestandardowe",
938
+ "sales.documents.history.fields.description": "Opis",
939
+ "sales.documents.history.fields.discountAmount": "Kwota rabatu",
940
+ "sales.documents.history.fields.discountPercent": "Procent rabatu",
941
+ "sales.documents.history.fields.name": "Nazwa",
942
+ "sales.documents.history.fields.product": "Produkt",
943
+ "sales.documents.history.fields.promotionCode": "Kod promocyjny",
944
+ "sales.documents.history.fields.quantity": "Ilość",
945
+ "sales.documents.history.fields.quantityUnit": "Jednostka ilości",
946
+ "sales.documents.history.fields.status": "Status",
947
+ "sales.documents.history.fields.taxRate": "Klasa podatkowa",
948
+ "sales.documents.history.fields.unitPriceGross": "Cena jednostkowa brutto",
949
+ "sales.documents.history.fields.unitPriceNet": "Cena jednostkowa netto",
950
+ "sales.documents.history.fields.variant": "Wariant",
932
951
  "sales.documents.history.filter.actions": "Akcje",
933
952
  "sales.documents.history.filter.all": "Wszystkie",
934
953
  "sales.documents.history.filter.comments": "Komentarze",
@@ -1,4 +1,5 @@
1
1
  import type { ActionLog } from '@open-mercato/core/modules/audit_logs/data/entities'
2
+ import { isRecord } from '@open-mercato/shared/lib/utils'
2
3
  import type { SalesNote } from '../data/entities'
3
4
 
4
5
  export type HistoryEntry = {
@@ -13,9 +14,90 @@ export type HistoryEntry = {
13
14
  statusTo?: string | null
14
15
  documentKind?: 'order' | 'quote'
15
16
  commandId?: string
17
+ changedFields?: string[]
16
18
  }
17
19
  }
18
20
 
21
+ const DOCUMENT_LINE_UPSERT_COMMANDS = new Set([
22
+ 'sales.orders.lines.upsert',
23
+ 'sales.quotes.lines.upsert',
24
+ ])
25
+
26
+ const USER_EDITABLE_LINE_FIELDS = [
27
+ 'productId',
28
+ 'productVariantId',
29
+ 'name',
30
+ 'description',
31
+ 'comment',
32
+ 'quantity',
33
+ 'quantityUnit',
34
+ 'currencyCode',
35
+ 'unitPriceNet',
36
+ 'unitPriceGross',
37
+ 'discountAmount',
38
+ 'discountPercent',
39
+ 'taxRate',
40
+ 'configuration',
41
+ 'promotionCode',
42
+ 'customFields',
43
+ 'statusEntryId',
44
+ ] as const
45
+
46
+ function readSnapshotLines(snapshot: unknown): Array<Record<string, unknown>> {
47
+ if (!isRecord(snapshot) || !Array.isArray(snapshot.lines)) return []
48
+ return snapshot.lines.filter(isRecord)
49
+ }
50
+
51
+ function historyValuesEqual(left: unknown, right: unknown): boolean {
52
+ if (Object.is(left, right)) return true
53
+ try {
54
+ return JSON.stringify(left) === JSON.stringify(right)
55
+ } catch {
56
+ return false
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Derives a concise, user-editable field list for document line updates.
62
+ * Calculated totals and normalized UoM fields are intentionally excluded so
63
+ * the timeline describes the user's edit rather than downstream recalculation.
64
+ */
65
+ function deriveDocumentLineChangedFields(log: ActionLog): string[] {
66
+ if (!DOCUMENT_LINE_UPSERT_COMMANDS.has(log.commandId)) return []
67
+
68
+ const beforeById = new Map(
69
+ readSnapshotLines(log.snapshotBefore)
70
+ .filter((line) => typeof line.id === 'string')
71
+ .map((line) => [line.id as string, line]),
72
+ )
73
+ const afterLines = readSnapshotLines(log.snapshotAfter)
74
+
75
+ const changedFields = new Set<string>()
76
+ for (const afterLine of afterLines) {
77
+ if (typeof afterLine.id !== 'string') continue
78
+ const beforeLine = beforeById.get(afterLine.id)
79
+ if (!beforeLine) continue
80
+
81
+ for (const field of USER_EDITABLE_LINE_FIELDS) {
82
+ if (!historyValuesEqual(beforeLine[field], afterLine[field])) {
83
+ changedFields.add(field)
84
+ }
85
+ }
86
+ }
87
+
88
+ return USER_EDITABLE_LINE_FIELDS.filter((field) => changedFields.has(field))
89
+ }
90
+
91
+ export function deriveHistoryChangedFields(log: ActionLog): string[] {
92
+ if (DOCUMENT_LINE_UPSERT_COMMANDS.has(log.commandId)) {
93
+ return deriveDocumentLineChangedFields(log)
94
+ }
95
+ const persisted = Array.isArray(log.changedFields)
96
+ ? log.changedFields.filter((field): field is string => typeof field === 'string' && field.trim().length > 0)
97
+ : []
98
+ return Array.from(new Set(persisted))
99
+ }
100
+
19
101
  function extractStatusFromSnapshot(snapshot: unknown): string | null {
20
102
  if (!snapshot || typeof snapshot !== 'object') return null
21
103
  const s = snapshot as Record<string, unknown>
@@ -64,9 +146,14 @@ export function normalizeActionLogToHistoryEntry(
64
146
  displayUsers?: Record<string, string>,
65
147
  ): HistoryEntry {
66
148
  const statusChange = detectStatusChange(log)
149
+ const changedFields = deriveHistoryChangedFields(log)
67
150
  let entryKind: 'status' | 'action' = 'action'
68
151
  let action = log.actionLabel || log.commandId
69
- let metadata: HistoryEntry['metadata'] = { documentKind: kind, commandId: log.commandId }
152
+ let metadata: HistoryEntry['metadata'] = {
153
+ documentKind: kind,
154
+ commandId: log.commandId,
155
+ ...(changedFields.length > 0 ? { changedFields } : {}),
156
+ }
70
157
  if (statusChange) {
71
158
  const hasStatusValues = statusChange.statusFrom != null || statusChange.statusTo != null
72
159
  if (hasStatusValues) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react"
4
4
  import { Spinner } from "@open-mercato/ui/primitives/spinner"
5
- import { useT } from "@open-mercato/shared/lib/i18n/context"
5
+ import { useT, type TranslateFn } from "@open-mercato/shared/lib/i18n/context"
6
6
  import { apiCall } from "@open-mercato/ui/backend/utils/apiCall"
7
7
  import { formatRelativeTime, formatDateTime } from "@open-mercato/shared/lib/time"
8
8
  import { cn } from "@open-mercato/shared/lib/utils"
@@ -21,6 +21,7 @@ export type TimelineEntry = {
21
21
  statusTo?: string | null
22
22
  documentKind?: "order" | "quote"
23
23
  commandId?: string
24
+ changedFields?: string[]
24
25
  }
25
26
  }
26
27
 
@@ -65,6 +66,49 @@ const KIND_BG_COLORS = {
65
66
  comment: 'bg-muted',
66
67
  }
67
68
 
69
+ const CHANGED_FIELD_LABELS: Record<string, { key: string; fallback: string }> = {
70
+ productId: { key: 'sales.documents.history.fields.product', fallback: 'Product' },
71
+ productVariantId: { key: 'sales.documents.history.fields.variant', fallback: 'Variant' },
72
+ name: { key: 'sales.documents.history.fields.name', fallback: 'Name' },
73
+ description: { key: 'sales.documents.history.fields.description', fallback: 'Description' },
74
+ comment: { key: 'sales.documents.history.fields.comment', fallback: 'Comment' },
75
+ quantity: { key: 'sales.documents.history.fields.quantity', fallback: 'Quantity' },
76
+ quantityUnit: { key: 'sales.documents.history.fields.quantityUnit', fallback: 'Quantity unit' },
77
+ currencyCode: { key: 'sales.documents.history.fields.currency', fallback: 'Currency' },
78
+ unitPriceNet: { key: 'sales.documents.history.fields.unitPriceNet', fallback: 'Net unit price' },
79
+ unitPriceGross: { key: 'sales.documents.history.fields.unitPriceGross', fallback: 'Gross unit price' },
80
+ discountAmount: { key: 'sales.documents.history.fields.discountAmount', fallback: 'Discount amount' },
81
+ discountPercent: { key: 'sales.documents.history.fields.discountPercent', fallback: 'Discount percent' },
82
+ taxRate: { key: 'sales.documents.history.fields.taxRate', fallback: 'Tax class' },
83
+ configuration: { key: 'sales.documents.history.fields.configuration', fallback: 'Configuration' },
84
+ promotionCode: { key: 'sales.documents.history.fields.promotionCode', fallback: 'Promotion code' },
85
+ customFields: { key: 'sales.documents.history.fields.customFields', fallback: 'Custom fields' },
86
+ statusEntryId: { key: 'sales.documents.history.fields.status', fallback: 'Status' },
87
+ }
88
+
89
+ function normalizeChangedField(field: string): string {
90
+ const segment = field.split('.').pop() ?? field
91
+ return segment.replace(/_([a-z])/g, (_, letter: string) => letter.toUpperCase())
92
+ }
93
+
94
+ function humanizeChangedField(field: string): string {
95
+ const normalized = normalizeChangedField(field)
96
+ const spaced = normalized.replace(/([a-z0-9])([A-Z])/g, '$1 $2').trim()
97
+ return spaced.length > 0 ? `${spaced[0].toUpperCase()}${spaced.slice(1)}` : field
98
+ }
99
+
100
+ function translateChangedField(t: TranslateFn, field: string): string {
101
+ const normalized = normalizeChangedField(field)
102
+ const translation = CHANGED_FIELD_LABELS[normalized]
103
+ return translation ? t(translation.key, translation.fallback) : humanizeChangedField(field)
104
+ }
105
+
106
+ function translateAction(t: TranslateFn, entry: TimelineEntry): string {
107
+ const commandId = entry.metadata?.commandId
108
+ if (!commandId?.startsWith('sales.')) return entry.action
109
+ return t(`sales.audit.${commandId.slice('sales.'.length)}`, entry.action)
110
+ }
111
+
68
112
  function StatusDot({ color, className }: { color: string | null | undefined; className?: string }) {
69
113
  if (!color) return <span className={cn('h-2.5 w-2.5 rounded-full bg-muted-foreground/40 border border-border inline-flex', className)} />
70
114
  return (
@@ -118,11 +162,19 @@ function TimelineItem({
118
162
  statusMap: Record<string, StatusOption>
119
163
  isLast: boolean
120
164
  }) {
165
+ const t = useT()
121
166
  const KindIcon = KIND_ICONS[entry.kind]
122
167
  const relativeTime = formatRelativeTime(entry.occurredAt)
123
168
  const absoluteTime = formatDateTime(entry.occurredAt)
124
169
 
125
170
  const isStatusChange = entry.kind === 'status' && entry.metadata?.statusTo
171
+ const action = translateAction(t, entry)
172
+ const actorLabel = entry.actor.id
173
+ ? entry.actor.label
174
+ : t('sales.documents.history.actor.system', 'System')
175
+ const changedFieldLabels = Array.from(
176
+ new Set((entry.metadata?.changedFields ?? []).map((field) => translateChangedField(t, field))),
177
+ )
126
178
 
127
179
  return (
128
180
  <div data-testid="timeline-entry" className="relative flex gap-3">
@@ -148,7 +200,7 @@ function TimelineItem({
148
200
  <div className="flex items-center justify-between gap-2 flex-wrap">
149
201
  <span className="inline-flex items-center gap-1.5 text-xs font-medium text-foreground">
150
202
  <User className="h-3 w-3 text-muted-foreground" aria-hidden />
151
- {entry.actor.label}
203
+ {actorLabel}
152
204
  </span>
153
205
  <span
154
206
  className="text-xs text-muted-foreground"
@@ -166,7 +218,16 @@ function TimelineItem({
166
218
  statusMap={statusMap}
167
219
  />
168
220
  ) : (
169
- <div className="text-sm text-foreground">{entry.action}</div>
221
+ <div className="space-y-0.5">
222
+ <div className="text-sm text-foreground">{action}</div>
223
+ {entry.kind === 'action' && changedFieldLabels.length > 0 ? (
224
+ <div className="text-xs text-muted-foreground">
225
+ {t('sales.documents.history.changedFields', 'Changed fields: {fields}', {
226
+ fields: changedFieldLabels.join(', '),
227
+ })}
228
+ </div>
229
+ ) : null}
230
+ </div>
170
231
  )}
171
232
  </div>
172
233
  </div>
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { z } from 'zod'
@@ -515,7 +516,7 @@ export function WarehouseSection({ viewAllHref }: ConfigSectionOptions = {}) {
515
516
  totalPages: query.data?.totalPages ?? 1,
516
517
  onPageChange: setPage,
517
518
  }}
518
- perspective={{ tableId: 'wms.config.warehouses' }}
519
+ perspective={{ tableId: extensionPoints.hosts.warehousesTable.tableId }}
519
520
  emptyState={(
520
521
  <EmptyState
521
522
  title={t('wms.backend.config.warehouses.empty.title', 'No warehouses')}
@@ -775,7 +776,7 @@ export function ZoneSection({ viewAllHref }: ConfigSectionOptions = {}) {
775
776
  totalPages: query.data?.totalPages ?? 1,
776
777
  onPageChange: setPage,
777
778
  }}
778
- perspective={{ tableId: 'wms.config.zones' }}
779
+ perspective={{ tableId: extensionPoints.hosts.zonesTable.tableId }}
779
780
  emptyState={(
780
781
  <EmptyState
781
782
  title={t('wms.backend.config.zones.empty.title', 'No zones')}
@@ -982,7 +983,7 @@ export function LocationSection({ viewAllHref }: ConfigSectionOptions = {}) {
982
983
  totalPages: query.data?.totalPages ?? 1,
983
984
  onPageChange: setPage,
984
985
  }}
985
- perspective={{ tableId: 'wms.config.locations' }}
986
+ perspective={{ tableId: extensionPoints.hosts.locationsTable.tableId }}
986
987
  emptyState={(
987
988
  <EmptyState
988
989
  title={t('wms.backend.config.locations.empty.title', 'No locations')}
@@ -1276,7 +1277,7 @@ export function InventoryProfilesSection() {
1276
1277
  totalPages: query.data?.totalPages ?? 1,
1277
1278
  onPageChange: setPage,
1278
1279
  }}
1279
- perspective={{ tableId: 'wms.config.inventoryProfiles' }}
1280
+ perspective={{ tableId: extensionPoints.hosts.inventoryProfilesTable.tableId }}
1280
1281
  emptyState={(
1281
1282
  <EmptyState
1282
1283
  title={t('wms.backend.config.profiles.empty.title', 'No inventory profiles')}
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
6
7
  import { useQuery } from '@tanstack/react-query'
@@ -665,7 +666,7 @@ export function InventoryBalancesSection({
665
666
  emptyTitleFallback="No balance buckets"
666
667
  emptyDescriptionKey="wms.backend.inventory.balances.empty.description"
667
668
  emptyDescriptionFallback="Balances appear after receipts, adjustments, or moves create inventory buckets."
668
- tableId="wms.inventory.balances"
669
+ tableId={extensionPoints.hosts.balancesTable.tableId}
669
670
  entityId={E.wms.inventory_balance}
670
671
  icon={<Boxes className="size-5" />}
671
672
  columns={columns}
@@ -896,7 +897,7 @@ export function InventoryReservationsSection({
896
897
  emptyTitleFallback="No reservations"
897
898
  emptyDescriptionKey="wms.backend.inventory.reservations.empty.description"
898
899
  emptyDescriptionFallback="Reservations show stock committed to orders, transfers, or manual holds."
899
- tableId="wms.inventory.reservations"
900
+ tableId={extensionPoints.hosts.reservationsTable.tableId}
900
901
  entityId={E.wms.inventory_reservation}
901
902
  icon={<ShieldCheck className="size-5" />}
902
903
  columns={columns}
@@ -1058,7 +1059,7 @@ export function InventoryMovementsSection({
1058
1059
  emptyTitleFallback="No inventory movements"
1059
1060
  emptyDescriptionKey="wms.backend.inventory.movements.empty.description"
1060
1061
  emptyDescriptionFallback="Movement rows are created by receipts, reservations, moves, and reconciliation actions."
1061
- tableId="wms.inventory.movements"
1062
+ tableId={extensionPoints.hosts.movementsTable.tableId}
1062
1063
  entityId={E.wms.inventory_movement}
1063
1064
  icon={<Route className="size-5" />}
1064
1065
  columns={columns}
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { z } from 'zod'
@@ -1158,7 +1159,7 @@ export default function WmsLocationDetailPage({ locationId }: WmsLocationDetailP
1158
1159
  data={pagedBalances}
1159
1160
  disableRowClick
1160
1161
  entityId={E.wms.inventory_balance}
1161
- perspective={{ tableId: 'wms.location.items' }}
1162
+ perspective={{ tableId: extensionPoints.hosts.locationItemsTable.tableId }}
1162
1163
  pagination={{
1163
1164
  page: itemsPage,
1164
1165
  pageSize: itemsPageSize,
@@ -1201,7 +1202,7 @@ export default function WmsLocationDetailPage({ locationId }: WmsLocationDetailP
1201
1202
  data={movementsQuery.data ?? []}
1202
1203
  disableRowClick
1203
1204
  entityId={E.wms.inventory_movement}
1204
- perspective={{ tableId: 'wms.location.activity' }}
1205
+ perspective={{ tableId: extensionPoints.hosts.locationActivityTable.tableId }}
1205
1206
  emptyState={t('wms.backend.location.activity.empty', 'No recent movements for this location.')}
1206
1207
  actions={(
1207
1208
  <Button asChild type="button" variant="ghost" size="sm">
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { z } from 'zod'
@@ -1209,7 +1210,7 @@ export default function WmsLotDetailPage({ lotId }: WmsLotDetailPageProps) {
1209
1210
  data={pagedBalances}
1210
1211
  disableRowClick
1211
1212
  entityId={E.wms.inventory_balance}
1212
- perspective={{ tableId: 'wms.lot.distribution' }}
1213
+ perspective={{ tableId: extensionPoints.hosts.lotDistributionTable.tableId }}
1213
1214
  pagination={{
1214
1215
  page: distributionPage,
1215
1216
  pageSize: distributionPageSize,
@@ -1250,7 +1251,7 @@ export default function WmsLotDetailPage({ lotId }: WmsLotDetailPageProps) {
1250
1251
  data={movementsQuery.data ?? []}
1251
1252
  disableRowClick
1252
1253
  entityId={E.wms.inventory_movement}
1253
- perspective={{ tableId: 'wms.lot.activity' }}
1254
+ perspective={{ tableId: extensionPoints.hosts.lotActivityTable.tableId }}
1254
1255
  emptyState={t('wms.backend.lot.activity.empty', 'No recent movements for this lot.')}
1255
1256
  actions={(
1256
1257
  <Button asChild type="button" variant="ghost" size="sm">
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useSearchParams } from 'next/navigation'
6
7
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
@@ -280,7 +281,7 @@ export default function WmsLotsListPage() {
280
281
  totalPages: lotsQuery.data.totalPages,
281
282
  onPageChange: setPage,
282
283
  }}
283
- perspective={{ tableId: 'wms.lots.list' }}
284
+ perspective={{ tableId: extensionPoints.hosts.lotsTable.tableId }}
284
285
  emptyState={
285
286
  <EmptyState
286
287
  title={t('wms.backend.lots.empty.title', 'No lots found')}
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/wms/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { z } from 'zod'
@@ -1094,7 +1095,7 @@ export default function WmsSkuDetailPage({ variantId }: WmsSkuDetailPageProps) {
1094
1095
  data={pagedBalances}
1095
1096
  disableRowClick
1096
1097
  entityId={E.wms.inventory_balance}
1097
- perspective={{ tableId: 'wms.sku.distribution' }}
1098
+ perspective={{ tableId: extensionPoints.hosts.skuDistributionTable.tableId }}
1098
1099
  pagination={{
1099
1100
  page: distributionPage,
1100
1101
  pageSize: distributionPageSize,
@@ -1137,7 +1138,7 @@ export default function WmsSkuDetailPage({ variantId }: WmsSkuDetailPageProps) {
1137
1138
  data={movementsQuery.data ?? []}
1138
1139
  disableRowClick
1139
1140
  entityId={E.wms.inventory_movement}
1140
- perspective={{ tableId: 'wms.sku.activity' }}
1141
+ perspective={{ tableId: extensionPoints.hosts.skuActivityTable.tableId }}
1141
1142
  emptyState={t('wms.backend.sku.activity.empty', 'No recent movements for this SKU.')}
1142
1143
  actions={(
1143
1144
  <Button asChild type="button" variant="ghost" size="sm">
@@ -0,0 +1,23 @@
1
+ import { dataTableExtensionHost, defineModuleExtensionPoints } from '@open-mercato/shared/modules/widgets/extension-points'
2
+
3
+ export const extensionPoints = defineModuleExtensionPoints({
4
+ moduleId: 'wms',
5
+ hosts: {
6
+ warehousesTable: dataTableExtensionHost({ tableId: 'wms.config.warehouses', source: 'components/backend/WmsConfigurationPage.tsx' }),
7
+ zonesTable: dataTableExtensionHost({ tableId: 'wms.config.zones', source: 'components/backend/WmsConfigurationPage.tsx' }),
8
+ locationsTable: dataTableExtensionHost({ tableId: 'wms.config.locations', source: 'components/backend/WmsConfigurationPage.tsx' }),
9
+ inventoryProfilesTable: dataTableExtensionHost({ tableId: 'wms.config.inventoryProfiles', source: 'components/backend/WmsConfigurationPage.tsx' }),
10
+ balancesTable: dataTableExtensionHost({ tableId: 'wms.inventory.balances', source: 'components/backend/WmsInventoryConsolePage.tsx' }),
11
+ reservationsTable: dataTableExtensionHost({ tableId: 'wms.inventory.reservations', source: 'components/backend/WmsInventoryConsolePage.tsx' }),
12
+ movementsTable: dataTableExtensionHost({ tableId: 'wms.inventory.movements', source: 'components/backend/WmsInventoryConsolePage.tsx' }),
13
+ locationItemsTable: dataTableExtensionHost({ tableId: 'wms.location.items', source: 'components/backend/WmsLocationDetailPage.tsx' }),
14
+ locationActivityTable: dataTableExtensionHost({ tableId: 'wms.location.activity', source: 'components/backend/WmsLocationDetailPage.tsx' }),
15
+ lotDistributionTable: dataTableExtensionHost({ tableId: 'wms.lot.distribution', source: 'components/backend/WmsLotDetailPage.tsx' }),
16
+ lotActivityTable: dataTableExtensionHost({ tableId: 'wms.lot.activity', source: 'components/backend/WmsLotDetailPage.tsx' }),
17
+ lotsTable: dataTableExtensionHost({ tableId: 'wms.lots.list', source: 'components/backend/WmsLotsListPage.tsx' }),
18
+ skuDistributionTable: dataTableExtensionHost({ tableId: 'wms.sku.distribution', source: 'components/backend/WmsSkuDetailPage.tsx' }),
19
+ skuActivityTable: dataTableExtensionHost({ tableId: 'wms.sku.activity', source: 'components/backend/WmsSkuDetailPage.tsx' }),
20
+ },
21
+ })
22
+
23
+ export default extensionPoints
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/workflows/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
@@ -429,7 +430,7 @@ export default function WorkflowDefinitionsListPage() {
429
430
  onFiltersClear={handleFiltersClear}
430
431
  onRowClick={(row) => router.push(`/backend/definitions/visual-editor?id=${row.id}`)}
431
432
  perspective={{
432
- tableId: 'workflows.definitions.list',
433
+ tableId: extensionPoints.hosts.definitionsTable.tableId,
433
434
  }}
434
435
  emptyState={(
435
436
  <ListEmptyState
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/workflows/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
@@ -332,7 +333,7 @@ export default function WorkflowInstancesListPage() {
332
333
  onFiltersApply={handleFiltersApply}
333
334
  onFiltersClear={handleFiltersClear}
334
335
  perspective={{
335
- tableId: 'workflows.instances.list',
336
+ tableId: extensionPoints.hosts.instancesTable.tableId,
336
337
  }}
337
338
  pagination={{ page, pageSize, total, totalPages, onPageChange: setPage }}
338
339
  />
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/core/modules/workflows/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useRouter } from 'next/navigation'
6
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
@@ -341,7 +342,7 @@ export default function UserTasksListPage() {
341
342
  onFiltersApply={handleFiltersApply}
342
343
  onFiltersClear={handleFiltersClear}
343
344
  perspective={{
344
- tableId: 'workflows.tasks.list',
345
+ tableId: extensionPoints.hosts.tasksTable.tableId,
345
346
  }}
346
347
  pagination={{ page, pageSize, total, totalPages, onPageChange: setPage }}
347
348
  />
@@ -30,6 +30,7 @@ const events = [
30
30
  { id: 'workflows.activity.started', label: 'Activity Started', category: 'lifecycle' },
31
31
  { id: 'workflows.activity.completed', label: 'Activity Completed', category: 'lifecycle' },
32
32
  { id: 'workflows.activity.failed', label: 'Activity Failed', category: 'lifecycle' },
33
+ { id: 'workflows.task.assigned', label: 'Task Assigned', entity: 'task', category: 'lifecycle' },
33
34
 
34
35
  // Event Triggers
35
36
  { id: 'workflows.trigger.created', label: 'Trigger Created', entity: 'trigger', category: 'crud' },