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

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 (162) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/dist/generated/entities/gateway_session_initialization/index.js +23 -0
  3. package/dist/generated/entities/gateway_session_initialization/index.js.map +7 -0
  4. package/dist/generated/entities.ids.generated.js +1 -0
  5. package/dist/generated/entities.ids.generated.js.map +2 -2
  6. package/dist/generated/entity-fields-registry.js +12 -0
  7. package/dist/generated/entity-fields-registry.js.map +2 -2
  8. package/dist/modules/api_keys/api/keys/route.js +7 -4
  9. package/dist/modules/api_keys/api/keys/route.js.map +2 -2
  10. package/dist/modules/attachments/components/AttachmentContentPreview.js +6 -35
  11. package/dist/modules/attachments/components/AttachmentContentPreview.js.map +2 -2
  12. package/dist/modules/audit_logs/backend/audit-logs/page.js +14 -24
  13. package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
  14. package/dist/modules/auth/api/autologin.js +85 -0
  15. package/dist/modules/auth/api/autologin.js.map +7 -0
  16. package/dist/modules/auth/lib/autologin.js +19 -0
  17. package/dist/modules/auth/lib/autologin.js.map +7 -0
  18. package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js +1 -0
  19. package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js.map +2 -2
  20. package/dist/modules/customer_accounts/api/admin/roles/[id].js +17 -3
  21. package/dist/modules/customer_accounts/api/admin/roles/[id].js.map +2 -2
  22. package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js +6 -1
  23. package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js.map +2 -2
  24. package/dist/modules/customer_accounts/api/portal/users-invite.js +6 -1
  25. package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
  26. package/dist/modules/customer_accounts/services/customerInvitationService.js +1 -0
  27. package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
  28. package/dist/modules/customer_accounts/services/customerRbacService.js +6 -1
  29. package/dist/modules/customer_accounts/services/customerRbacService.js.map +2 -2
  30. package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js +2 -2
  31. package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js.map +2 -2
  32. package/dist/modules/customers/components/detail/CompanyDetailTabs.js +27 -37
  33. package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
  34. package/dist/modules/customers/components/detail/DealDetailTabs.js +23 -35
  35. package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
  36. package/dist/modules/customers/components/detail/DetailTabsLayout.js +6 -21
  37. package/dist/modules/customers/components/detail/DetailTabsLayout.js.map +2 -2
  38. package/dist/modules/customers/components/detail/MobilePersonDetail.js +26 -32
  39. package/dist/modules/customers/components/detail/MobilePersonDetail.js.map +2 -2
  40. package/dist/modules/customers/components/detail/PersonDetailTabs.js +29 -39
  41. package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
  42. package/dist/modules/dictionaries/commands/entries.js +7 -14
  43. package/dist/modules/dictionaries/commands/entries.js.map +2 -2
  44. package/dist/modules/dictionaries/commands/entry-operations.js +7 -16
  45. package/dist/modules/dictionaries/commands/entry-operations.js.map +2 -2
  46. package/dist/modules/dictionaries/commands/factory.js +9 -3
  47. package/dist/modules/dictionaries/commands/factory.js.map +2 -2
  48. package/dist/modules/feature_toggles/api/check/boolean/route.js +0 -14
  49. package/dist/modules/feature_toggles/api/check/boolean/route.js.map +2 -2
  50. package/dist/modules/feature_toggles/defaults.json +8 -0
  51. package/dist/modules/integrations/backend/integrations/[id]/page.js +9 -80
  52. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  53. package/dist/modules/payment_gateways/data/entities.js +45 -0
  54. package/dist/modules/payment_gateways/data/entities.js.map +2 -2
  55. package/dist/modules/payment_gateways/lib/gateway-service.js +173 -38
  56. package/dist/modules/payment_gateways/lib/gateway-service.js.map +3 -3
  57. package/dist/modules/payment_gateways/lib/session-idempotency.js +104 -0
  58. package/dist/modules/payment_gateways/lib/session-idempotency.js.map +7 -0
  59. package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js +11 -0
  60. package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js.map +7 -0
  61. package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js +16 -14
  62. package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js.map +2 -2
  63. package/dist/modules/planner/components/AvailabilityRulesEditor.js +18 -30
  64. package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
  65. package/dist/modules/resources/backend/resources/resources/[id]/page.js +24 -24
  66. package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
  67. package/dist/modules/sales/backend/sales/channels/create/page.js +6 -0
  68. package/dist/modules/sales/backend/sales/channels/create/page.js.map +2 -2
  69. package/dist/modules/sales/backend/sales/channels/create/page.meta.js +2 -0
  70. package/dist/modules/sales/backend/sales/channels/create/page.meta.js.map +2 -2
  71. package/dist/modules/sales/backend/sales/channels/offers/page.js +6 -0
  72. package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
  73. package/dist/modules/sales/backend/sales/channels/offers/page.meta.js +2 -0
  74. package/dist/modules/sales/backend/sales/channels/offers/page.meta.js.map +2 -2
  75. package/dist/modules/sales/backend/sales/channels/page.js +6 -0
  76. package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
  77. package/dist/modules/sales/backend/sales/channels/page.meta.js +2 -0
  78. package/dist/modules/sales/backend/sales/channels/page.meta.js.map +2 -2
  79. package/dist/modules/sales/backend/sales/documents/[id]/page.js +6 -4
  80. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  81. package/dist/modules/sales/components/SalesChannelsDisabledNotice.js +15 -0
  82. package/dist/modules/sales/components/SalesChannelsDisabledNotice.js.map +7 -0
  83. package/dist/modules/sales/components/documents/SalesDocumentForm.js +7 -3
  84. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  85. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +10 -8
  86. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  87. package/dist/modules/sales/components/useSalesChannelsEnabled.js +44 -0
  88. package/dist/modules/sales/components/useSalesChannelsEnabled.js.map +7 -0
  89. package/dist/modules/sales/lib/salesChannelsToggle.js +18 -0
  90. package/dist/modules/sales/lib/salesChannelsToggle.js.map +7 -0
  91. package/dist/modules/sales/lib/salesChannelsToggleId.js +5 -0
  92. package/dist/modules/sales/lib/salesChannelsToggleId.js.map +7 -0
  93. package/dist/modules/staff/backend/staff/team-members/[id]/page.js +22 -25
  94. package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
  95. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +12 -14
  96. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
  97. package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js +10 -29
  98. package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js.map +2 -2
  99. package/dist/modules/sync_excel/lib/adapters/customers.js +19 -20
  100. package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
  101. package/dist/modules/sync_excel/lib/parser.js +185 -0
  102. package/dist/modules/sync_excel/lib/parser.js.map +2 -2
  103. package/dist/modules/sync_excel/lib/upload-storage.js +20 -1
  104. package/dist/modules/sync_excel/lib/upload-storage.js.map +2 -2
  105. package/generated/entities/gateway_session_initialization/index.ts +10 -0
  106. package/generated/entities.ids.generated.ts +1 -0
  107. package/generated/entity-fields-registry.ts +12 -0
  108. package/package.json +7 -7
  109. package/src/modules/api_keys/api/keys/route.ts +9 -4
  110. package/src/modules/attachments/components/AttachmentContentPreview.tsx +9 -44
  111. package/src/modules/audit_logs/backend/audit-logs/page.tsx +12 -22
  112. package/src/modules/auth/api/autologin.ts +100 -0
  113. package/src/modules/auth/lib/autologin.ts +36 -0
  114. package/src/modules/customer_accounts/api/admin/roles/[id]/acl.ts +1 -0
  115. package/src/modules/customer_accounts/api/admin/roles/[id].ts +17 -3
  116. package/src/modules/customer_accounts/api/portal/users/[id]/roles.ts +6 -1
  117. package/src/modules/customer_accounts/api/portal/users-invite.ts +6 -1
  118. package/src/modules/customer_accounts/services/customerInvitationService.ts +1 -0
  119. package/src/modules/customer_accounts/services/customerRbacService.ts +9 -2
  120. package/src/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.tsx +6 -2
  121. package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +27 -49
  122. package/src/modules/customers/components/detail/DealDetailTabs.tsx +24 -49
  123. package/src/modules/customers/components/detail/DetailTabsLayout.tsx +13 -24
  124. package/src/modules/customers/components/detail/MobilePersonDetail.tsx +25 -31
  125. package/src/modules/customers/components/detail/PersonDetailTabs.tsx +29 -50
  126. package/src/modules/dictionaries/commands/entries.ts +7 -16
  127. package/src/modules/dictionaries/commands/entry-operations.ts +8 -18
  128. package/src/modules/dictionaries/commands/factory.ts +8 -2
  129. package/src/modules/feature_toggles/api/check/boolean/route.ts +0 -15
  130. package/src/modules/feature_toggles/defaults.json +8 -0
  131. package/src/modules/integrations/backend/integrations/[id]/page.tsx +16 -59
  132. package/src/modules/payment_gateways/data/entities.ts +39 -0
  133. package/src/modules/payment_gateways/lib/gateway-service.ts +211 -40
  134. package/src/modules/payment_gateways/lib/session-idempotency.ts +142 -0
  135. package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +236 -0
  136. package/src/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.ts +10 -0
  137. package/src/modules/planner/backend/planner/availability-rulesets/[id]/page.tsx +14 -20
  138. package/src/modules/planner/components/AvailabilityRulesEditor.tsx +16 -34
  139. package/src/modules/resources/backend/resources/resources/[id]/page.tsx +27 -37
  140. package/src/modules/sales/backend/sales/channels/create/page.meta.ts +3 -0
  141. package/src/modules/sales/backend/sales/channels/create/page.tsx +7 -0
  142. package/src/modules/sales/backend/sales/channels/offers/page.meta.ts +3 -0
  143. package/src/modules/sales/backend/sales/channels/offers/page.tsx +7 -0
  144. package/src/modules/sales/backend/sales/channels/page.meta.ts +4 -0
  145. package/src/modules/sales/backend/sales/channels/page.tsx +7 -0
  146. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +7 -5
  147. package/src/modules/sales/components/SalesChannelsDisabledNotice.tsx +21 -0
  148. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +7 -3
  149. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +10 -8
  150. package/src/modules/sales/components/useSalesChannelsEnabled.ts +59 -0
  151. package/src/modules/sales/i18n/de.json +1 -0
  152. package/src/modules/sales/i18n/en.json +1 -0
  153. package/src/modules/sales/i18n/es.json +1 -0
  154. package/src/modules/sales/i18n/pl.json +1 -0
  155. package/src/modules/sales/lib/salesChannelsToggle.ts +26 -0
  156. package/src/modules/sales/lib/salesChannelsToggleId.ts +1 -0
  157. package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +25 -34
  158. package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +11 -17
  159. package/src/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.tsx +11 -28
  160. package/src/modules/sync_excel/lib/adapters/customers.ts +20 -22
  161. package/src/modules/sync_excel/lib/parser.ts +245 -0
  162. package/src/modules/sync_excel/lib/upload-storage.ts +23 -1
@@ -4,6 +4,211 @@
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
+ },
7
212
  {
8
213
  "name": "gateway_transactions",
9
214
  "schema": "public",
@@ -21,6 +226,7 @@
21
226
  "scale": 4,
22
227
  "default": null,
23
228
  "comment": null,
229
+ "collation": null,
24
230
  "enumItems": [],
25
231
  "mappedType": "decimal"
26
232
  },
@@ -37,6 +243,7 @@
37
243
  "scale": null,
38
244
  "default": null,
39
245
  "comment": null,
246
+ "collation": null,
40
247
  "enumItems": [],
41
248
  "mappedType": "text"
42
249
  },
@@ -53,6 +260,7 @@
53
260
  "scale": null,
54
261
  "default": null,
55
262
  "comment": null,
263
+ "collation": null,
56
264
  "enumItems": [],
57
265
  "mappedType": "datetime"
58
266
  },
@@ -69,6 +277,7 @@
69
277
  "scale": null,
70
278
  "default": null,
71
279
  "comment": null,
280
+ "collation": null,
72
281
  "enumItems": [],
73
282
  "mappedType": "text"
74
283
  },
@@ -85,6 +294,7 @@
85
294
  "scale": null,
86
295
  "default": null,
87
296
  "comment": null,
297
+ "collation": null,
88
298
  "enumItems": [],
89
299
  "mappedType": "datetime"
90
300
  },
@@ -101,6 +311,7 @@
101
311
  "scale": null,
102
312
  "default": null,
103
313
  "comment": null,
314
+ "collation": null,
104
315
  "enumItems": [],
105
316
  "mappedType": "datetime"
106
317
  },
@@ -117,6 +328,7 @@
117
328
  "scale": null,
118
329
  "default": null,
119
330
  "comment": null,
331
+ "collation": null,
120
332
  "enumItems": [],
121
333
  "mappedType": "json"
122
334
  },
@@ -133,6 +345,7 @@
133
345
  "scale": null,
134
346
  "default": null,
135
347
  "comment": null,
348
+ "collation": null,
136
349
  "enumItems": [],
137
350
  "mappedType": "text"
138
351
  },
@@ -149,6 +362,7 @@
149
362
  "scale": null,
150
363
  "default": null,
151
364
  "comment": null,
365
+ "collation": null,
152
366
  "enumItems": [],
153
367
  "mappedType": "text"
154
368
  },
@@ -165,6 +379,7 @@
165
379
  "scale": null,
166
380
  "default": null,
167
381
  "comment": null,
382
+ "collation": null,
168
383
  "enumItems": [],
169
384
  "mappedType": "text"
170
385
  },
@@ -181,6 +396,7 @@
181
396
  "scale": null,
182
397
  "default": "gen_random_uuid()",
183
398
  "comment": null,
399
+ "collation": null,
184
400
  "enumItems": [],
185
401
  "mappedType": "uuid"
186
402
  },
@@ -197,6 +413,7 @@
197
413
  "scale": null,
198
414
  "default": null,
199
415
  "comment": null,
416
+ "collation": null,
200
417
  "enumItems": [],
201
418
  "mappedType": "datetime"
202
419
  },
@@ -213,6 +430,7 @@
213
430
  "scale": null,
214
431
  "default": null,
215
432
  "comment": null,
433
+ "collation": null,
216
434
  "enumItems": [],
217
435
  "mappedType": "datetime"
218
436
  },
@@ -229,6 +447,7 @@
229
447
  "scale": null,
230
448
  "default": null,
231
449
  "comment": null,
450
+ "collation": null,
232
451
  "enumItems": [],
233
452
  "mappedType": "uuid"
234
453
  },
@@ -245,6 +464,7 @@
245
464
  "scale": null,
246
465
  "default": null,
247
466
  "comment": null,
467
+ "collation": null,
248
468
  "enumItems": [],
249
469
  "mappedType": "uuid"
250
470
  },
@@ -261,6 +481,7 @@
261
481
  "scale": null,
262
482
  "default": null,
263
483
  "comment": null,
484
+ "collation": null,
264
485
  "enumItems": [],
265
486
  "mappedType": "text"
266
487
  },
@@ -277,6 +498,7 @@
277
498
  "scale": null,
278
499
  "default": null,
279
500
  "comment": null,
501
+ "collation": null,
280
502
  "enumItems": [],
281
503
  "mappedType": "text"
282
504
  },
@@ -293,6 +515,7 @@
293
515
  "scale": null,
294
516
  "default": null,
295
517
  "comment": null,
518
+ "collation": null,
296
519
  "enumItems": [],
297
520
  "mappedType": "text"
298
521
  },
@@ -309,6 +532,7 @@
309
532
  "scale": null,
310
533
  "default": null,
311
534
  "comment": null,
535
+ "collation": null,
312
536
  "enumItems": [],
313
537
  "mappedType": "uuid"
314
538
  },
@@ -325,6 +549,7 @@
325
549
  "scale": null,
326
550
  "default": "'pending'",
327
551
  "comment": null,
552
+ "collation": null,
328
553
  "enumItems": [],
329
554
  "mappedType": "text"
330
555
  },
@@ -341,6 +566,7 @@
341
566
  "scale": null,
342
567
  "default": null,
343
568
  "comment": null,
569
+ "collation": null,
344
570
  "enumItems": [],
345
571
  "mappedType": "datetime"
346
572
  },
@@ -357,6 +583,7 @@
357
583
  "scale": null,
358
584
  "default": null,
359
585
  "comment": null,
586
+ "collation": null,
360
587
  "enumItems": [],
361
588
  "mappedType": "json"
362
589
  }
@@ -410,6 +637,7 @@
410
637
  }
411
638
  ],
412
639
  "checks": [],
640
+ "triggers": [],
413
641
  "foreignKeys": {},
414
642
  "comment": null
415
643
  },
@@ -430,6 +658,7 @@
430
658
  "scale": null,
431
659
  "default": null,
432
660
  "comment": null,
661
+ "collation": null,
433
662
  "enumItems": [],
434
663
  "mappedType": "text"
435
664
  },
@@ -446,6 +675,7 @@
446
675
  "scale": null,
447
676
  "default": "gen_random_uuid()",
448
677
  "comment": null,
678
+ "collation": null,
449
679
  "enumItems": [],
450
680
  "mappedType": "uuid"
451
681
  },
@@ -462,6 +692,7 @@
462
692
  "scale": null,
463
693
  "default": null,
464
694
  "comment": null,
695
+ "collation": null,
465
696
  "enumItems": [],
466
697
  "mappedType": "text"
467
698
  },
@@ -478,6 +709,7 @@
478
709
  "scale": null,
479
710
  "default": null,
480
711
  "comment": null,
712
+ "collation": null,
481
713
  "enumItems": [],
482
714
  "mappedType": "uuid"
483
715
  },
@@ -494,6 +726,7 @@
494
726
  "scale": null,
495
727
  "default": null,
496
728
  "comment": null,
729
+ "collation": null,
497
730
  "enumItems": [],
498
731
  "mappedType": "datetime"
499
732
  },
@@ -510,6 +743,7 @@
510
743
  "scale": null,
511
744
  "default": null,
512
745
  "comment": null,
746
+ "collation": null,
513
747
  "enumItems": [],
514
748
  "mappedType": "text"
515
749
  },
@@ -526,6 +760,7 @@
526
760
  "scale": null,
527
761
  "default": null,
528
762
  "comment": null,
763
+ "collation": null,
529
764
  "enumItems": [],
530
765
  "mappedType": "uuid"
531
766
  }
@@ -556,6 +791,7 @@
556
791
  }
557
792
  ],
558
793
  "checks": [],
794
+ "triggers": [],
559
795
  "foreignKeys": {},
560
796
  "comment": null
561
797
  }
@@ -0,0 +1,10 @@
1
+ import { Migration } from '@mikro-orm/migrations';
2
+
3
+ export class Migration20260709220938_payment_gateways extends Migration {
4
+
5
+ override up(): void | Promise<void> {
6
+ this.addSql(`create table "gateway_session_initializations" ("id" uuid not null default gen_random_uuid(), "operation_key" text not null, "provider_key" text not null, "claim_token" uuid null, "claimed_at" timestamptz null, "gateway_transaction_id" uuid null, "organization_id" uuid not null, "tenant_id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, primary key ("id"));`);
7
+ this.addSql(`alter table "gateway_session_initializations" add constraint "gateway_session_initializations_scope_operation_unique" unique ("operation_key", "provider_key", "organization_id", "tenant_id");`);
8
+ }
9
+
10
+ }
@@ -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 { Button } from '@open-mercato/ui/primitives/button'
6
+ import { Tabs, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
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,28 +196,22 @@ export default function PlannerAvailabilityRuleSetDetailPage({ params }: { param
196
196
  <Page>
197
197
  <PageBody>
198
198
  <div className="space-y-6">
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')}>
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
+ >
201
208
  {tabs.map((tab) => (
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
- >
209
+ <TabsTrigger key={tab.id} value={tab.id}>
216
210
  {tab.label}
217
- </Button>
211
+ </TabsTrigger>
218
212
  ))}
219
- </nav>
220
- </div>
213
+ </TabsList>
214
+ </Tabs>
221
215
 
222
216
  {activeTab === 'details' ? (
223
217
  <AvailabilityRuleSetForm
@@ -21,6 +21,7 @@ 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'
24
25
  import { ComboboxInput, TimePicker } from '@open-mercato/ui/backend/inputs'
25
26
  import { DictionaryEntrySelect, type DictionarySelectLabels } from '@open-mercato/core/modules/dictionaries/components/DictionaryEntrySelect'
26
27
  import {
@@ -1856,44 +1857,25 @@ export function AvailabilityRulesEditor({
1856
1857
  <div className="rounded-lg border bg-muted/30 p-4">
1857
1858
  <div className="space-y-4">
1858
1859
  <div className="space-y-2">
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')
1860
+ <Tabs
1861
+ value={editorScope}
1862
+ onValueChange={(value) => {
1863
+ const nextScope = value as 'date' | 'weekday'
1864
+ setEditorScope(nextScope)
1865
+ if (nextScope === 'weekday') {
1888
1866
  setEditorUnavailable(false)
1889
1867
  setEditorNote('')
1890
1868
  setEditorReasonEntryId(null)
1891
1869
  setEditorReasonValue('')
1892
- }}
1893
- >
1894
- {listLabels.editAllLabel}
1895
- </Button>
1896
- </div>
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>
1897
1879
  </div>
1898
1880
 
1899
1881
  {editorScope === 'date' ? (
@@ -5,6 +5,7 @@ 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'
8
9
  import { apiCallOrThrow, readApiResultOrThrow, withScopedApiRequestHeaders } from '@open-mercato/ui/backend/utils/apiCall'
9
10
  import { buildOptimisticLockHeader } from '@open-mercato/ui/backend/utils/optimisticLock'
10
11
  import { collectCustomFieldValues } from '@open-mercato/ui/backend/utils/customFieldValues'
@@ -663,51 +664,40 @@ export default function ResourcesResourceDetailPage({ params }: { params?: { id?
663
664
  subtitle={t('resources.resources.detail.subtitle', 'Resource profile and activity')}
664
665
  />
665
666
 
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')}>
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
+ >
668
676
  {tabs.map((tab) => (
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
- >
677
+ <TabsTrigger key={tab.id} value={tab.id}>
683
678
  {tab.label}
684
- </Button>
679
+ </TabsTrigger>
685
680
  ))}
686
- </nav>
687
- </div>
681
+ </TabsList>
682
+ </Tabs>
688
683
 
689
684
  {activeTab === 'details' ? (
690
685
  <>
691
686
  <div className="rounded-lg border bg-card p-4">
692
687
  <div className="flex flex-wrap items-center justify-between gap-3">
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>
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>
711
701
  {sectionAction ? (
712
702
  <Button
713
703
  type="button"
@@ -1,4 +1,6 @@
1
1
  import React from 'react'
2
+ import type { RouteVisibilityContext } from '@open-mercato/shared/modules/registry'
3
+ import { isSalesChannelsEnabledForTenant } from '../../../../lib/salesChannelsToggle'
2
4
 
3
5
  const createIcon = React.createElement(
4
6
  'svg',
@@ -11,6 +13,7 @@ const createIcon = React.createElement(
11
13
  export const metadata = {
12
14
  requireAuth: true,
13
15
  requireFeatures: ['sales.channels.manage'],
16
+ visible: (ctx: RouteVisibilityContext) => isSalesChannelsEnabledForTenant(ctx.auth?.tenantId ?? null),
14
17
  pageTitle: 'Create channel',
15
18
  pageTitleKey: 'sales.channels.form.createTitle',
16
19
  pageGroup: 'Sales',