@open-mercato/core 0.6.6-develop.6551.1.1511bfa890 → 0.6.6

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 (304) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/dist/generated/entities.ids.generated.js +0 -1
  3. package/dist/generated/entities.ids.generated.js.map +2 -2
  4. package/dist/generated/entity-fields-registry.js +0 -12
  5. package/dist/generated/entity-fields-registry.js.map +2 -2
  6. package/dist/modules/api_keys/api/keys/route.js +13 -30
  7. package/dist/modules/api_keys/api/keys/route.js.map +2 -2
  8. package/dist/modules/api_keys/cli.js +1 -2
  9. package/dist/modules/api_keys/cli.js.map +2 -2
  10. package/dist/modules/attachments/api/file/[id]/route.js +7 -9
  11. package/dist/modules/attachments/api/file/[id]/route.js.map +2 -2
  12. package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js +7 -9
  13. package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js.map +2 -2
  14. package/dist/modules/attachments/api/route.js +17 -21
  15. package/dist/modules/attachments/api/route.js.map +2 -2
  16. package/dist/modules/attachments/components/AttachmentContentPreview.js +35 -6
  17. package/dist/modules/attachments/components/AttachmentContentPreview.js.map +2 -2
  18. package/dist/modules/audit_logs/backend/audit-logs/page.js +24 -14
  19. package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
  20. package/dist/modules/auth/api/users/route.js +2 -6
  21. package/dist/modules/auth/api/users/route.js.map +2 -2
  22. package/dist/modules/auth/cli.js +2 -3
  23. package/dist/modules/auth/cli.js.map +2 -2
  24. package/dist/modules/configs/lib/upgrade-actions.js +0 -22
  25. package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
  26. package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js +0 -1
  27. package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js.map +2 -2
  28. package/dist/modules/customer_accounts/api/admin/roles/[id].js +3 -17
  29. package/dist/modules/customer_accounts/api/admin/roles/[id].js.map +2 -2
  30. package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js +1 -6
  31. package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js.map +2 -2
  32. package/dist/modules/customer_accounts/api/portal/users-invite.js +1 -6
  33. package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
  34. package/dist/modules/customer_accounts/services/customerInvitationService.js +0 -1
  35. package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
  36. package/dist/modules/customer_accounts/services/customerRbacService.js +1 -6
  37. package/dist/modules/customer_accounts/services/customerRbacService.js.map +2 -2
  38. package/dist/modules/customer_accounts/widgets/injection-table.js +2 -0
  39. package/dist/modules/customer_accounts/widgets/injection-table.js.map +2 -2
  40. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +1 -7
  41. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
  42. package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js +2 -2
  43. package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js.map +2 -2
  44. package/dist/modules/customers/components/detail/CompanyDetailTabs.js +43 -37
  45. package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
  46. package/dist/modules/customers/components/detail/DealDetailTabs.js +35 -23
  47. package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
  48. package/dist/modules/customers/components/detail/DetailTabsLayout.js +21 -6
  49. package/dist/modules/customers/components/detail/DetailTabsLayout.js.map +2 -2
  50. package/dist/modules/customers/components/detail/MobilePersonDetail.js +32 -26
  51. package/dist/modules/customers/components/detail/MobilePersonDetail.js.map +2 -2
  52. package/dist/modules/customers/components/detail/PersonDetailTabs.js +39 -29
  53. package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
  54. package/dist/modules/dashboards/api/roles/widgets/route.js +3 -22
  55. package/dist/modules/dashboards/api/roles/widgets/route.js.map +2 -2
  56. package/dist/modules/dashboards/api/users/widgets/route.js +3 -22
  57. package/dist/modules/dashboards/api/users/widgets/route.js.map +2 -2
  58. package/dist/modules/dashboards/cli.js +3 -4
  59. package/dist/modules/dashboards/cli.js.map +2 -2
  60. package/dist/modules/dashboards/lib/widgetAssignmentScope.js +1 -9
  61. package/dist/modules/dashboards/lib/widgetAssignmentScope.js.map +2 -2
  62. package/dist/modules/dictionaries/commands/entries.js +14 -7
  63. package/dist/modules/dictionaries/commands/entries.js.map +2 -2
  64. package/dist/modules/dictionaries/commands/entry-operations.js +16 -7
  65. package/dist/modules/dictionaries/commands/entry-operations.js.map +2 -2
  66. package/dist/modules/dictionaries/commands/factory.js +3 -9
  67. package/dist/modules/dictionaries/commands/factory.js.map +2 -2
  68. package/dist/modules/dictionaries/fields/dictionary.js +41 -56
  69. package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
  70. package/dist/modules/directory/utils/organizationScope.js +3 -10
  71. package/dist/modules/directory/utils/organizationScope.js.map +2 -2
  72. package/dist/modules/entities/api/records.js +4 -5
  73. package/dist/modules/entities/api/records.js.map +2 -2
  74. package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js +0 -1
  75. package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js.map +2 -2
  76. package/dist/modules/entities/backend/entities/user/[entityId]/page.js +49 -49
  77. package/dist/modules/entities/backend/entities/user/[entityId]/page.js.map +2 -2
  78. package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js +0 -1
  79. package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js.map +2 -2
  80. package/dist/modules/entities/cli.js +1 -2
  81. package/dist/modules/entities/cli.js.map +2 -2
  82. package/dist/modules/feature_toggles/api/check/boolean/route.js +14 -0
  83. package/dist/modules/feature_toggles/api/check/boolean/route.js.map +2 -2
  84. package/dist/modules/feature_toggles/defaults.json +0 -8
  85. package/dist/modules/integrations/backend/integrations/[id]/page.js +80 -9
  86. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  87. package/dist/modules/payment_gateways/data/entities.js +0 -45
  88. package/dist/modules/payment_gateways/data/entities.js.map +2 -2
  89. package/dist/modules/payment_gateways/lib/gateway-service.js +38 -173
  90. package/dist/modules/payment_gateways/lib/gateway-service.js.map +3 -3
  91. package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js +14 -16
  92. package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js.map +2 -2
  93. package/dist/modules/planner/components/AvailabilityRulesEditor.js +30 -18
  94. package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
  95. package/dist/modules/query_index/api/status.js +8 -2
  96. package/dist/modules/query_index/api/status.js.map +2 -2
  97. package/dist/modules/resources/backend/resources/resources/[id]/page.js +24 -24
  98. package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
  99. package/dist/modules/sales/backend/sales/channels/create/page.js +0 -6
  100. package/dist/modules/sales/backend/sales/channels/create/page.js.map +2 -2
  101. package/dist/modules/sales/backend/sales/channels/create/page.meta.js +0 -2
  102. package/dist/modules/sales/backend/sales/channels/create/page.meta.js.map +2 -2
  103. package/dist/modules/sales/backend/sales/channels/offers/page.js +0 -6
  104. package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
  105. package/dist/modules/sales/backend/sales/channels/offers/page.meta.js +0 -2
  106. package/dist/modules/sales/backend/sales/channels/offers/page.meta.js.map +2 -2
  107. package/dist/modules/sales/backend/sales/channels/page.js +0 -6
  108. package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
  109. package/dist/modules/sales/backend/sales/channels/page.meta.js +0 -2
  110. package/dist/modules/sales/backend/sales/channels/page.meta.js.map +2 -2
  111. package/dist/modules/sales/backend/sales/documents/[id]/page.js +4 -6
  112. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  113. package/dist/modules/sales/commands/documents.js +0 -44
  114. package/dist/modules/sales/commands/documents.js.map +2 -2
  115. package/dist/modules/sales/commands/returns.js +27 -2
  116. package/dist/modules/sales/commands/returns.js.map +2 -2
  117. package/dist/modules/sales/components/documents/AddressesSection.js +2 -6
  118. package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
  119. package/dist/modules/sales/components/documents/ItemsSection.js +0 -1
  120. package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
  121. package/dist/modules/sales/components/documents/LineItemDialog.js +0 -9
  122. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  123. package/dist/modules/sales/components/documents/SalesDocumentForm.js +3 -51
  124. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  125. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +8 -10
  126. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  127. package/dist/modules/sales/components/documents/ShipmentDialog.js +38 -59
  128. package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
  129. package/dist/modules/sales/lib/shipments/snapshots.js +1 -27
  130. package/dist/modules/sales/lib/shipments/snapshots.js.map +2 -2
  131. package/dist/modules/staff/backend/staff/team-members/[id]/page.js +25 -22
  132. package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
  133. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +14 -12
  134. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
  135. package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js +29 -10
  136. package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js.map +2 -2
  137. package/dist/modules/sync_excel/lib/adapters/customers.js +20 -19
  138. package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
  139. package/dist/modules/sync_excel/lib/parser.js +0 -185
  140. package/dist/modules/sync_excel/lib/parser.js.map +2 -2
  141. package/dist/modules/sync_excel/lib/upload-storage.js +1 -20
  142. package/dist/modules/sync_excel/lib/upload-storage.js.map +2 -2
  143. package/dist/modules/workflows/frontend/checkout-demo/page.js +8 -1
  144. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  145. package/dist/modules/workflows/lib/activity-executor.js +1 -1
  146. package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
  147. package/dist/modules/workflows/lib/find-definition.js +18 -2
  148. package/dist/modules/workflows/lib/find-definition.js.map +2 -2
  149. package/dist/modules/workflows/lib/signal-handler.js +3 -2
  150. package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
  151. package/dist/modules/workflows/lib/step-handler.js +4 -8
  152. package/dist/modules/workflows/lib/step-handler.js.map +2 -2
  153. package/dist/modules/workflows/lib/task-handler.js +3 -5
  154. package/dist/modules/workflows/lib/task-handler.js.map +2 -2
  155. package/dist/modules/workflows/lib/timer-handler.js +2 -1
  156. package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
  157. package/dist/modules/workflows/lib/transition-handler.js +5 -13
  158. package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
  159. package/dist/modules/workflows/lib/workflow-executor.js +11 -9
  160. package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
  161. package/dist/modules/workflows/migrations/Migration20260715120000.js +68 -0
  162. package/dist/modules/workflows/migrations/Migration20260715120000.js.map +7 -0
  163. package/dist/modules/workflows/migrations/Migration20260716120000.js +24 -0
  164. package/dist/modules/workflows/migrations/Migration20260716120000.js.map +7 -0
  165. package/dist/modules/workflows/workflows.js +2 -0
  166. package/dist/modules/workflows/workflows.js.map +2 -2
  167. package/generated/entities.ids.generated.ts +0 -1
  168. package/generated/entity-fields-registry.ts +0 -12
  169. package/package.json +8 -9
  170. package/src/modules/api_keys/api/keys/route.ts +13 -36
  171. package/src/modules/api_keys/cli.ts +3 -2
  172. package/src/modules/attachments/api/file/[id]/route.ts +7 -11
  173. package/src/modules/attachments/api/image/[id]/[[...slug]]/route.ts +7 -11
  174. package/src/modules/attachments/api/route.ts +21 -26
  175. package/src/modules/attachments/components/AttachmentContentPreview.tsx +44 -9
  176. package/src/modules/audit_logs/backend/audit-logs/page.tsx +22 -12
  177. package/src/modules/auth/api/users/route.ts +2 -11
  178. package/src/modules/auth/cli.ts +2 -3
  179. package/src/modules/configs/i18n/de.json +1 -5
  180. package/src/modules/configs/i18n/en.json +1 -5
  181. package/src/modules/configs/i18n/es.json +1 -5
  182. package/src/modules/configs/i18n/pl.json +1 -5
  183. package/src/modules/configs/lib/upgrade-actions.ts +0 -24
  184. package/src/modules/customer_accounts/AGENTS.md +6 -8
  185. package/src/modules/customer_accounts/api/admin/roles/[id]/acl.ts +0 -1
  186. package/src/modules/customer_accounts/api/admin/roles/[id].ts +3 -17
  187. package/src/modules/customer_accounts/api/portal/users/[id]/roles.ts +1 -6
  188. package/src/modules/customer_accounts/api/portal/users-invite.ts +1 -6
  189. package/src/modules/customer_accounts/services/customerInvitationService.ts +0 -1
  190. package/src/modules/customer_accounts/services/customerRbacService.ts +2 -9
  191. package/src/modules/customer_accounts/widgets/injection-table.ts +2 -0
  192. package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +1 -11
  193. package/src/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.tsx +2 -6
  194. package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +55 -39
  195. package/src/modules/customers/components/detail/DealDetailTabs.tsx +49 -24
  196. package/src/modules/customers/components/detail/DetailTabsLayout.tsx +24 -13
  197. package/src/modules/customers/components/detail/MobilePersonDetail.tsx +31 -25
  198. package/src/modules/customers/components/detail/PersonDetailTabs.tsx +50 -29
  199. package/src/modules/dashboards/api/roles/widgets/route.ts +3 -22
  200. package/src/modules/dashboards/api/users/widgets/route.ts +3 -22
  201. package/src/modules/dashboards/cli.ts +9 -4
  202. package/src/modules/dashboards/lib/widgetAssignmentScope.ts +0 -18
  203. package/src/modules/dictionaries/commands/entries.ts +16 -7
  204. package/src/modules/dictionaries/commands/entry-operations.ts +18 -8
  205. package/src/modules/dictionaries/commands/factory.ts +2 -8
  206. package/src/modules/dictionaries/fields/dictionary.tsx +32 -55
  207. package/src/modules/dictionaries/i18n/de.json +0 -2
  208. package/src/modules/dictionaries/i18n/en.json +0 -2
  209. package/src/modules/dictionaries/i18n/es.json +0 -2
  210. package/src/modules/dictionaries/i18n/pl.json +0 -2
  211. package/src/modules/directory/utils/organizationScope.ts +2 -36
  212. package/src/modules/entities/api/records.ts +7 -5
  213. package/src/modules/entities/backend/entities/system/[entityId]/page.meta.ts +0 -1
  214. package/src/modules/entities/backend/entities/user/[entityId]/page.meta.ts +0 -1
  215. package/src/modules/entities/backend/entities/user/[entityId]/page.tsx +49 -51
  216. package/src/modules/entities/cli.ts +1 -2
  217. package/src/modules/entities/i18n/de.json +0 -34
  218. package/src/modules/entities/i18n/en.json +0 -34
  219. package/src/modules/entities/i18n/es.json +0 -34
  220. package/src/modules/entities/i18n/pl.json +0 -34
  221. package/src/modules/feature_toggles/api/check/boolean/route.ts +15 -0
  222. package/src/modules/feature_toggles/defaults.json +0 -8
  223. package/src/modules/integrations/backend/integrations/[id]/page.tsx +59 -16
  224. package/src/modules/payment_gateways/data/entities.ts +0 -39
  225. package/src/modules/payment_gateways/lib/gateway-service.ts +40 -211
  226. package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +0 -236
  227. package/src/modules/planner/backend/planner/availability-rulesets/[id]/page.tsx +20 -14
  228. package/src/modules/planner/components/AvailabilityRulesEditor.tsx +34 -16
  229. package/src/modules/query_index/api/status.ts +8 -2
  230. package/src/modules/resources/backend/resources/resources/[id]/page.tsx +37 -27
  231. package/src/modules/sales/backend/sales/channels/create/page.meta.ts +0 -3
  232. package/src/modules/sales/backend/sales/channels/create/page.tsx +0 -7
  233. package/src/modules/sales/backend/sales/channels/offers/page.meta.ts +0 -3
  234. package/src/modules/sales/backend/sales/channels/offers/page.tsx +0 -7
  235. package/src/modules/sales/backend/sales/channels/page.meta.ts +0 -4
  236. package/src/modules/sales/backend/sales/channels/page.tsx +0 -7
  237. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +5 -7
  238. package/src/modules/sales/commands/documents.ts +0 -65
  239. package/src/modules/sales/commands/returns.ts +32 -2
  240. package/src/modules/sales/components/documents/AddressesSection.tsx +2 -6
  241. package/src/modules/sales/components/documents/ItemsSection.tsx +0 -5
  242. package/src/modules/sales/components/documents/LineItemDialog.tsx +0 -10
  243. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +3 -53
  244. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +8 -10
  245. package/src/modules/sales/components/documents/ShipmentDialog.tsx +40 -65
  246. package/src/modules/sales/i18n/de.json +0 -5
  247. package/src/modules/sales/i18n/en.json +0 -5
  248. package/src/modules/sales/i18n/es.json +0 -5
  249. package/src/modules/sales/i18n/pl.json +0 -5
  250. package/src/modules/sales/lib/shipments/snapshots.ts +0 -30
  251. package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +34 -25
  252. package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +17 -11
  253. package/src/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.tsx +28 -11
  254. package/src/modules/sync_excel/lib/adapters/customers.ts +22 -20
  255. package/src/modules/sync_excel/lib/parser.ts +0 -245
  256. package/src/modules/sync_excel/lib/upload-storage.ts +1 -23
  257. package/src/modules/workflows/frontend/checkout-demo/page.tsx +12 -1
  258. package/src/modules/workflows/lib/activity-executor.ts +22 -2
  259. package/src/modules/workflows/lib/find-definition.ts +53 -1
  260. package/src/modules/workflows/lib/signal-handler.ts +5 -4
  261. package/src/modules/workflows/lib/step-handler.ts +4 -8
  262. package/src/modules/workflows/lib/task-handler.ts +2 -4
  263. package/src/modules/workflows/lib/timer-handler.ts +3 -2
  264. package/src/modules/workflows/lib/transition-handler.ts +5 -13
  265. package/src/modules/workflows/lib/workflow-executor.ts +11 -8
  266. package/src/modules/workflows/migrations/Migration20260715120000.ts +114 -0
  267. package/src/modules/workflows/migrations/Migration20260716120000.ts +57 -0
  268. package/src/modules/workflows/workflows.ts +2 -0
  269. package/dist/generated/entities/gateway_session_initialization/index.js +0 -23
  270. package/dist/generated/entities/gateway_session_initialization/index.js.map +0 -7
  271. package/dist/modules/attachments/lib/reconcileOrganization.js +0 -110
  272. package/dist/modules/attachments/lib/reconcileOrganization.js.map +0 -7
  273. package/dist/modules/attachments/lib/requestScope.js +0 -10
  274. package/dist/modules/attachments/lib/requestScope.js.map +0 -7
  275. package/dist/modules/auth/api/autologin.js +0 -85
  276. package/dist/modules/auth/api/autologin.js.map +0 -7
  277. package/dist/modules/auth/lib/autologin.js +0 -19
  278. package/dist/modules/auth/lib/autologin.js.map +0 -7
  279. package/dist/modules/customers/components/detail/useDealsAccess.js +0 -16
  280. package/dist/modules/customers/components/detail/useDealsAccess.js.map +0 -7
  281. package/dist/modules/payment_gateways/lib/session-idempotency.js +0 -104
  282. package/dist/modules/payment_gateways/lib/session-idempotency.js.map +0 -7
  283. package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js +0 -11
  284. package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js.map +0 -7
  285. package/dist/modules/sales/components/SalesChannelsDisabledNotice.js +0 -15
  286. package/dist/modules/sales/components/SalesChannelsDisabledNotice.js.map +0 -7
  287. package/dist/modules/sales/components/useSalesChannelsEnabled.js +0 -44
  288. package/dist/modules/sales/components/useSalesChannelsEnabled.js.map +0 -7
  289. package/dist/modules/sales/lib/salesChannelsToggle.js +0 -18
  290. package/dist/modules/sales/lib/salesChannelsToggle.js.map +0 -7
  291. package/dist/modules/sales/lib/salesChannelsToggleId.js +0 -5
  292. package/dist/modules/sales/lib/salesChannelsToggleId.js.map +0 -7
  293. package/generated/entities/gateway_session_initialization/index.ts +0 -10
  294. package/src/modules/attachments/lib/reconcileOrganization.ts +0 -188
  295. package/src/modules/attachments/lib/requestScope.ts +0 -27
  296. package/src/modules/auth/api/autologin.ts +0 -100
  297. package/src/modules/auth/lib/autologin.ts +0 -36
  298. package/src/modules/customers/components/detail/useDealsAccess.ts +0 -19
  299. package/src/modules/payment_gateways/lib/session-idempotency.ts +0 -142
  300. package/src/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.ts +0 -10
  301. package/src/modules/sales/components/SalesChannelsDisabledNotice.tsx +0 -21
  302. package/src/modules/sales/components/useSalesChannelsEnabled.ts +0 -59
  303. package/src/modules/sales/lib/salesChannelsToggle.ts +0 -26
  304. package/src/modules/sales/lib/salesChannelsToggleId.ts +0 -1
@@ -4,211 +4,6 @@
4
4
  "public"
5
5
  ],
6
6
  "tables": [
7
- {
8
- "name": "gateway_session_initializations",
9
- "schema": "public",
10
- "columns": {
11
- "claim_token": {
12
- "name": "claim_token",
13
- "type": "uuid",
14
- "unsigned": false,
15
- "autoincrement": false,
16
- "primary": false,
17
- "nullable": true,
18
- "unique": false,
19
- "length": null,
20
- "precision": null,
21
- "scale": null,
22
- "default": null,
23
- "comment": null,
24
- "collation": null,
25
- "enumItems": [],
26
- "mappedType": "uuid"
27
- },
28
- "claimed_at": {
29
- "name": "claimed_at",
30
- "type": "timestamptz(6)",
31
- "unsigned": false,
32
- "autoincrement": false,
33
- "primary": false,
34
- "nullable": true,
35
- "unique": false,
36
- "length": 6,
37
- "precision": null,
38
- "scale": null,
39
- "default": null,
40
- "comment": null,
41
- "collation": null,
42
- "enumItems": [],
43
- "mappedType": "datetime"
44
- },
45
- "created_at": {
46
- "name": "created_at",
47
- "type": "timestamptz(6)",
48
- "unsigned": false,
49
- "autoincrement": false,
50
- "primary": false,
51
- "nullable": false,
52
- "unique": false,
53
- "length": 6,
54
- "precision": null,
55
- "scale": null,
56
- "default": null,
57
- "comment": null,
58
- "collation": null,
59
- "enumItems": [],
60
- "mappedType": "datetime"
61
- },
62
- "gateway_transaction_id": {
63
- "name": "gateway_transaction_id",
64
- "type": "uuid",
65
- "unsigned": false,
66
- "autoincrement": false,
67
- "primary": false,
68
- "nullable": true,
69
- "unique": false,
70
- "length": null,
71
- "precision": null,
72
- "scale": null,
73
- "default": null,
74
- "comment": null,
75
- "collation": null,
76
- "enumItems": [],
77
- "mappedType": "uuid"
78
- },
79
- "id": {
80
- "name": "id",
81
- "type": "uuid",
82
- "unsigned": false,
83
- "autoincrement": false,
84
- "primary": true,
85
- "nullable": false,
86
- "unique": false,
87
- "length": null,
88
- "precision": null,
89
- "scale": null,
90
- "default": "gen_random_uuid()",
91
- "comment": null,
92
- "collation": null,
93
- "enumItems": [],
94
- "mappedType": "uuid"
95
- },
96
- "operation_key": {
97
- "name": "operation_key",
98
- "type": "text",
99
- "unsigned": false,
100
- "autoincrement": false,
101
- "primary": false,
102
- "nullable": false,
103
- "unique": true,
104
- "length": null,
105
- "precision": null,
106
- "scale": null,
107
- "default": null,
108
- "comment": null,
109
- "collation": null,
110
- "enumItems": [],
111
- "mappedType": "text"
112
- },
113
- "organization_id": {
114
- "name": "organization_id",
115
- "type": "uuid",
116
- "unsigned": false,
117
- "autoincrement": false,
118
- "primary": false,
119
- "nullable": false,
120
- "unique": false,
121
- "length": null,
122
- "precision": null,
123
- "scale": null,
124
- "default": null,
125
- "comment": null,
126
- "collation": null,
127
- "enumItems": [],
128
- "mappedType": "uuid"
129
- },
130
- "provider_key": {
131
- "name": "provider_key",
132
- "type": "text",
133
- "unsigned": false,
134
- "autoincrement": false,
135
- "primary": false,
136
- "nullable": false,
137
- "unique": false,
138
- "length": null,
139
- "precision": null,
140
- "scale": null,
141
- "default": null,
142
- "comment": null,
143
- "collation": null,
144
- "enumItems": [],
145
- "mappedType": "text"
146
- },
147
- "tenant_id": {
148
- "name": "tenant_id",
149
- "type": "uuid",
150
- "unsigned": false,
151
- "autoincrement": false,
152
- "primary": false,
153
- "nullable": false,
154
- "unique": false,
155
- "length": null,
156
- "precision": null,
157
- "scale": null,
158
- "default": null,
159
- "comment": null,
160
- "collation": null,
161
- "enumItems": [],
162
- "mappedType": "uuid"
163
- },
164
- "updated_at": {
165
- "name": "updated_at",
166
- "type": "timestamptz(6)",
167
- "unsigned": false,
168
- "autoincrement": false,
169
- "primary": false,
170
- "nullable": false,
171
- "unique": false,
172
- "length": 6,
173
- "precision": null,
174
- "scale": null,
175
- "default": null,
176
- "comment": null,
177
- "collation": null,
178
- "enumItems": [],
179
- "mappedType": "datetime"
180
- }
181
- },
182
- "indexes": [
183
- {
184
- "columnNames": [
185
- "id"
186
- ],
187
- "composite": false,
188
- "constraint": true,
189
- "keyName": "gateway_session_initializations_pkey",
190
- "primary": true,
191
- "unique": true
192
- },
193
- {
194
- "columnNames": [
195
- "operation_key",
196
- "provider_key",
197
- "organization_id",
198
- "tenant_id"
199
- ],
200
- "composite": true,
201
- "constraint": true,
202
- "keyName": "gateway_session_initializations_scope_operation_unique",
203
- "primary": false,
204
- "unique": true
205
- }
206
- ],
207
- "checks": [],
208
- "triggers": [],
209
- "foreignKeys": {},
210
- "comment": null
211
- },
212
7
  {
213
8
  "name": "gateway_transactions",
214
9
  "schema": "public",
@@ -226,7 +21,6 @@
226
21
  "scale": 4,
227
22
  "default": null,
228
23
  "comment": null,
229
- "collation": null,
230
24
  "enumItems": [],
231
25
  "mappedType": "decimal"
232
26
  },
@@ -243,7 +37,6 @@
243
37
  "scale": null,
244
38
  "default": null,
245
39
  "comment": null,
246
- "collation": null,
247
40
  "enumItems": [],
248
41
  "mappedType": "text"
249
42
  },
@@ -260,7 +53,6 @@
260
53
  "scale": null,
261
54
  "default": null,
262
55
  "comment": null,
263
- "collation": null,
264
56
  "enumItems": [],
265
57
  "mappedType": "datetime"
266
58
  },
@@ -277,7 +69,6 @@
277
69
  "scale": null,
278
70
  "default": null,
279
71
  "comment": null,
280
- "collation": null,
281
72
  "enumItems": [],
282
73
  "mappedType": "text"
283
74
  },
@@ -294,7 +85,6 @@
294
85
  "scale": null,
295
86
  "default": null,
296
87
  "comment": null,
297
- "collation": null,
298
88
  "enumItems": [],
299
89
  "mappedType": "datetime"
300
90
  },
@@ -311,7 +101,6 @@
311
101
  "scale": null,
312
102
  "default": null,
313
103
  "comment": null,
314
- "collation": null,
315
104
  "enumItems": [],
316
105
  "mappedType": "datetime"
317
106
  },
@@ -328,7 +117,6 @@
328
117
  "scale": null,
329
118
  "default": null,
330
119
  "comment": null,
331
- "collation": null,
332
120
  "enumItems": [],
333
121
  "mappedType": "json"
334
122
  },
@@ -345,7 +133,6 @@
345
133
  "scale": null,
346
134
  "default": null,
347
135
  "comment": null,
348
- "collation": null,
349
136
  "enumItems": [],
350
137
  "mappedType": "text"
351
138
  },
@@ -362,7 +149,6 @@
362
149
  "scale": null,
363
150
  "default": null,
364
151
  "comment": null,
365
- "collation": null,
366
152
  "enumItems": [],
367
153
  "mappedType": "text"
368
154
  },
@@ -379,7 +165,6 @@
379
165
  "scale": null,
380
166
  "default": null,
381
167
  "comment": null,
382
- "collation": null,
383
168
  "enumItems": [],
384
169
  "mappedType": "text"
385
170
  },
@@ -396,7 +181,6 @@
396
181
  "scale": null,
397
182
  "default": "gen_random_uuid()",
398
183
  "comment": null,
399
- "collation": null,
400
184
  "enumItems": [],
401
185
  "mappedType": "uuid"
402
186
  },
@@ -413,7 +197,6 @@
413
197
  "scale": null,
414
198
  "default": null,
415
199
  "comment": null,
416
- "collation": null,
417
200
  "enumItems": [],
418
201
  "mappedType": "datetime"
419
202
  },
@@ -430,7 +213,6 @@
430
213
  "scale": null,
431
214
  "default": null,
432
215
  "comment": null,
433
- "collation": null,
434
216
  "enumItems": [],
435
217
  "mappedType": "datetime"
436
218
  },
@@ -447,7 +229,6 @@
447
229
  "scale": null,
448
230
  "default": null,
449
231
  "comment": null,
450
- "collation": null,
451
232
  "enumItems": [],
452
233
  "mappedType": "uuid"
453
234
  },
@@ -464,7 +245,6 @@
464
245
  "scale": null,
465
246
  "default": null,
466
247
  "comment": null,
467
- "collation": null,
468
248
  "enumItems": [],
469
249
  "mappedType": "uuid"
470
250
  },
@@ -481,7 +261,6 @@
481
261
  "scale": null,
482
262
  "default": null,
483
263
  "comment": null,
484
- "collation": null,
485
264
  "enumItems": [],
486
265
  "mappedType": "text"
487
266
  },
@@ -498,7 +277,6 @@
498
277
  "scale": null,
499
278
  "default": null,
500
279
  "comment": null,
501
- "collation": null,
502
280
  "enumItems": [],
503
281
  "mappedType": "text"
504
282
  },
@@ -515,7 +293,6 @@
515
293
  "scale": null,
516
294
  "default": null,
517
295
  "comment": null,
518
- "collation": null,
519
296
  "enumItems": [],
520
297
  "mappedType": "text"
521
298
  },
@@ -532,7 +309,6 @@
532
309
  "scale": null,
533
310
  "default": null,
534
311
  "comment": null,
535
- "collation": null,
536
312
  "enumItems": [],
537
313
  "mappedType": "uuid"
538
314
  },
@@ -549,7 +325,6 @@
549
325
  "scale": null,
550
326
  "default": "'pending'",
551
327
  "comment": null,
552
- "collation": null,
553
328
  "enumItems": [],
554
329
  "mappedType": "text"
555
330
  },
@@ -566,7 +341,6 @@
566
341
  "scale": null,
567
342
  "default": null,
568
343
  "comment": null,
569
- "collation": null,
570
344
  "enumItems": [],
571
345
  "mappedType": "datetime"
572
346
  },
@@ -583,7 +357,6 @@
583
357
  "scale": null,
584
358
  "default": null,
585
359
  "comment": null,
586
- "collation": null,
587
360
  "enumItems": [],
588
361
  "mappedType": "json"
589
362
  }
@@ -637,7 +410,6 @@
637
410
  }
638
411
  ],
639
412
  "checks": [],
640
- "triggers": [],
641
413
  "foreignKeys": {},
642
414
  "comment": null
643
415
  },
@@ -658,7 +430,6 @@
658
430
  "scale": null,
659
431
  "default": null,
660
432
  "comment": null,
661
- "collation": null,
662
433
  "enumItems": [],
663
434
  "mappedType": "text"
664
435
  },
@@ -675,7 +446,6 @@
675
446
  "scale": null,
676
447
  "default": "gen_random_uuid()",
677
448
  "comment": null,
678
- "collation": null,
679
449
  "enumItems": [],
680
450
  "mappedType": "uuid"
681
451
  },
@@ -692,7 +462,6 @@
692
462
  "scale": null,
693
463
  "default": null,
694
464
  "comment": null,
695
- "collation": null,
696
465
  "enumItems": [],
697
466
  "mappedType": "text"
698
467
  },
@@ -709,7 +478,6 @@
709
478
  "scale": null,
710
479
  "default": null,
711
480
  "comment": null,
712
- "collation": null,
713
481
  "enumItems": [],
714
482
  "mappedType": "uuid"
715
483
  },
@@ -726,7 +494,6 @@
726
494
  "scale": null,
727
495
  "default": null,
728
496
  "comment": null,
729
- "collation": null,
730
497
  "enumItems": [],
731
498
  "mappedType": "datetime"
732
499
  },
@@ -743,7 +510,6 @@
743
510
  "scale": null,
744
511
  "default": null,
745
512
  "comment": null,
746
- "collation": null,
747
513
  "enumItems": [],
748
514
  "mappedType": "text"
749
515
  },
@@ -760,7 +526,6 @@
760
526
  "scale": null,
761
527
  "default": null,
762
528
  "comment": null,
763
- "collation": null,
764
529
  "enumItems": [],
765
530
  "mappedType": "uuid"
766
531
  }
@@ -791,7 +556,6 @@
791
556
  }
792
557
  ],
793
558
  "checks": [],
794
- "triggers": [],
795
559
  "foreignKeys": {},
796
560
  "comment": null
797
561
  }
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react'
4
4
  import { useRouter } from 'next/navigation'
5
5
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
6
- import { Tabs, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
6
+ import { Button } from '@open-mercato/ui/primitives/button'
7
7
  import { ErrorMessage, RecordNotFoundState } from '@open-mercato/ui/backend/detail'
8
8
  import { readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
9
9
  import { updateCrud, deleteCrud } from '@open-mercato/ui/backend/utils/crud'
@@ -196,22 +196,28 @@ export default function PlannerAvailabilityRuleSetDetailPage({ params }: { param
196
196
  <Page>
197
197
  <PageBody>
198
198
  <div className="space-y-6">
199
- <Tabs
200
- value={activeTab}
201
- onValueChange={(value) => setActiveTab(value as 'details' | 'availability')}
202
- variant="underline"
203
- >
204
- <TabsList
205
- className="w-full flex-wrap"
206
- aria-label={translate('planner.availabilityRuleSets.tabs.label', 'Schedule sections')}
207
- >
199
+ <div className="border-b">
200
+ <nav className="flex flex-wrap items-center gap-5 text-sm" aria-label={translate('planner.availabilityRuleSets.tabs.label', 'Schedule sections')}>
208
201
  {tabs.map((tab) => (
209
- <TabsTrigger key={tab.id} value={tab.id}>
202
+ <Button
203
+ key={tab.id}
204
+ type="button"
205
+ role="tab"
206
+ aria-selected={activeTab === tab.id}
207
+ variant="ghost"
208
+ size="sm"
209
+ className={`relative -mb-px h-auto rounded-none border-b-2 px-0 py-2 font-medium ${
210
+ activeTab === tab.id
211
+ ? 'border-accent-indigo text-foreground'
212
+ : 'border-transparent text-muted-foreground hover:text-foreground'
213
+ }`}
214
+ onClick={() => setActiveTab(tab.id as 'details' | 'availability')}
215
+ >
210
216
  {tab.label}
211
- </TabsTrigger>
217
+ </Button>
212
218
  ))}
213
- </TabsList>
214
- </Tabs>
219
+ </nav>
220
+ </div>
215
221
 
216
222
  {activeTab === 'details' ? (
217
223
  <AvailabilityRuleSetForm
@@ -21,7 +21,6 @@ import { buildOptimisticLockHeader } from '@open-mercato/ui/backend/utils/optimi
21
21
  import { flash } from '@open-mercato/ui/backend/FlashMessages'
22
22
  import { surfaceRecordConflict } from '@open-mercato/ui/backend/conflicts'
23
23
  import { Spinner } from '@open-mercato/ui/primitives/spinner'
24
- import { Tabs, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
25
24
  import { ComboboxInput, TimePicker } from '@open-mercato/ui/backend/inputs'
26
25
  import { DictionaryEntrySelect, type DictionarySelectLabels } from '@open-mercato/core/modules/dictionaries/components/DictionaryEntrySelect'
27
26
  import {
@@ -1857,25 +1856,44 @@ export function AvailabilityRulesEditor({
1857
1856
  <div className="rounded-lg border bg-muted/30 p-4">
1858
1857
  <div className="space-y-4">
1859
1858
  <div className="space-y-2">
1860
- <Tabs
1861
- value={editorScope}
1862
- onValueChange={(value) => {
1863
- const nextScope = value as 'date' | 'weekday'
1864
- setEditorScope(nextScope)
1865
- if (nextScope === 'weekday') {
1859
+ <div role="tablist" aria-label={listLabels.applyScopeLabel} className="inline-flex rounded-lg border bg-muted p-1 text-xs">
1860
+ <Button
1861
+ type="button"
1862
+ role="tab"
1863
+ aria-selected={editorScope === 'date'}
1864
+ variant="ghost"
1865
+ size="sm"
1866
+ className={`h-auto rounded-md px-3 py-1.5 font-medium ${
1867
+ editorScope === 'date'
1868
+ ? 'bg-background text-foreground shadow-sm'
1869
+ : 'text-muted-foreground hover:text-foreground'
1870
+ }`}
1871
+ onClick={() => setEditorScope('date')}
1872
+ >
1873
+ {listLabels.applyScopeDate}
1874
+ </Button>
1875
+ <Button
1876
+ type="button"
1877
+ role="tab"
1878
+ aria-selected={editorScope === 'weekday'}
1879
+ variant="ghost"
1880
+ size="sm"
1881
+ className={`h-auto rounded-md px-3 py-1.5 font-medium ${
1882
+ editorScope === 'weekday'
1883
+ ? 'bg-background text-foreground shadow-sm'
1884
+ : 'text-muted-foreground hover:text-foreground'
1885
+ }`}
1886
+ onClick={() => {
1887
+ setEditorScope('weekday')
1866
1888
  setEditorUnavailable(false)
1867
1889
  setEditorNote('')
1868
1890
  setEditorReasonEntryId(null)
1869
1891
  setEditorReasonValue('')
1870
- }
1871
- }}
1872
- variant="underline"
1873
- >
1874
- <TabsList aria-label={listLabels.applyScopeLabel}>
1875
- <TabsTrigger value="date">{listLabels.applyScopeDate}</TabsTrigger>
1876
- <TabsTrigger value="weekday">{listLabels.editAllLabel}</TabsTrigger>
1877
- </TabsList>
1878
- </Tabs>
1892
+ }}
1893
+ >
1894
+ {listLabels.editAllLabel}
1895
+ </Button>
1896
+ </div>
1879
1897
  </div>
1880
1898
 
1881
1899
  {editorScope === 'date' ? (
@@ -415,7 +415,10 @@ export async function GET(req: Request) {
415
415
  errorQuery = errorQuery.where('tenant_id' as any, 'is', null as any)
416
416
  }
417
417
  if (Array.isArray(organizationScopeIds) && organizationScopeIds.length) {
418
- errorQuery = errorQuery.where('organization_id' as any, 'in', organizationScopeIds)
418
+ errorQuery = errorQuery.where((eb: any) => eb.or([
419
+ eb('organization_id' as any, 'is', null),
420
+ eb('organization_id' as any, 'in', organizationScopeIds),
421
+ ]))
419
422
  } else {
420
423
  errorQuery = errorQuery.where('organization_id' as any, 'is', null as any)
421
424
  }
@@ -453,7 +456,10 @@ export async function GET(req: Request) {
453
456
  logsQuery = logsQuery.where('tenant_id' as any, 'is', null as any)
454
457
  }
455
458
  if (Array.isArray(organizationScopeIds) && organizationScopeIds.length) {
456
- logsQuery = logsQuery.where('organization_id' as any, 'in', organizationScopeIds)
459
+ logsQuery = logsQuery.where((eb: any) => eb.or([
460
+ eb('organization_id' as any, 'is', null),
461
+ eb('organization_id' as any, 'in', organizationScopeIds),
462
+ ]))
457
463
  } else {
458
464
  logsQuery = logsQuery.where('organization_id' as any, 'is', null as any)
459
465
  }
@@ -5,7 +5,6 @@ import { usePathname, useRouter, useSearchParams } from 'next/navigation'
5
5
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
6
6
  import { FormHeader } from '@open-mercato/ui/backend/forms'
7
7
  import { Button } from '@open-mercato/ui/primitives/button'
8
- import { Tabs, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
9
8
  import { apiCallOrThrow, readApiResultOrThrow, withScopedApiRequestHeaders } from '@open-mercato/ui/backend/utils/apiCall'
10
9
  import { buildOptimisticLockHeader } from '@open-mercato/ui/backend/utils/optimisticLock'
11
10
  import { collectCustomFieldValues } from '@open-mercato/ui/backend/utils/customFieldValues'
@@ -664,40 +663,51 @@ export default function ResourcesResourceDetailPage({ params }: { params?: { id?
664
663
  subtitle={t('resources.resources.detail.subtitle', 'Resource profile and activity')}
665
664
  />
666
665
 
667
- <Tabs
668
- value={activeTab}
669
- onValueChange={(value) => setActiveTab(value as 'details' | 'availability')}
670
- variant="underline"
671
- >
672
- <TabsList
673
- className="w-full flex-wrap"
674
- aria-label={t('resources.resources.tabs.label', 'Resource sections')}
675
- >
666
+ <div className="border-b">
667
+ <nav className="flex flex-wrap items-center gap-5 text-sm" aria-label={t('resources.resources.tabs.label', 'Resource sections')}>
676
668
  {tabs.map((tab) => (
677
- <TabsTrigger key={tab.id} value={tab.id}>
669
+ <Button
670
+ key={tab.id}
671
+ type="button"
672
+ role="tab"
673
+ aria-selected={activeTab === tab.id}
674
+ variant="ghost"
675
+ size="sm"
676
+ className={`relative -mb-px h-auto rounded-none border-b-2 px-0 py-2 font-medium ${
677
+ activeTab === tab.id
678
+ ? 'border-accent-indigo text-foreground'
679
+ : 'border-transparent text-muted-foreground hover:text-foreground'
680
+ }`}
681
+ onClick={() => setActiveTab(tab.id as 'details' | 'availability')}
682
+ >
678
683
  {tab.label}
679
- </TabsTrigger>
684
+ </Button>
680
685
  ))}
681
- </TabsList>
682
- </Tabs>
686
+ </nav>
687
+ </div>
683
688
 
684
689
  {activeTab === 'details' ? (
685
690
  <>
686
691
  <div className="rounded-lg border bg-card p-4">
687
692
  <div className="flex flex-wrap items-center justify-between gap-3">
688
- <Tabs
689
- value={activeDetailTab}
690
- onValueChange={(value) => setActiveDetailTab(value as 'notes' | 'activities')}
691
- variant="underline"
692
- >
693
- <TabsList className="h-auto flex-wrap border-b-0">
694
- {detailTabs.map((tab) => (
695
- <TabsTrigger key={tab.id} value={tab.id}>
696
- {tab.label}
697
- </TabsTrigger>
698
- ))}
699
- </TabsList>
700
- </Tabs>
693
+ <div className="flex gap-2">
694
+ {detailTabs.map((tab) => (
695
+ <Button
696
+ key={tab.id}
697
+ type="button"
698
+ variant="ghost"
699
+ size="sm"
700
+ className={`relative -mb-px h-auto rounded-none border-b-2 px-0 py-1 font-medium ${
701
+ activeDetailTab === tab.id
702
+ ? 'border-accent-indigo text-foreground'
703
+ : 'border-transparent text-muted-foreground hover:text-foreground'
704
+ }`}
705
+ onClick={() => setActiveDetailTab(tab.id)}
706
+ >
707
+ {tab.label}
708
+ </Button>
709
+ ))}
710
+ </div>
701
711
  {sectionAction ? (
702
712
  <Button
703
713
  type="button"