@open-mercato/core 0.10.1-develop.7983.1.fd91207efe → 0.10.1-develop.7990.1.82d0a183c5

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 (40) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/auth/commands/users.js +27 -23
  3. package/dist/modules/auth/commands/users.js.map +2 -2
  4. package/dist/modules/customers/commands/companies.js +10 -1
  5. package/dist/modules/customers/commands/companies.js.map +2 -2
  6. package/dist/modules/customers/docs/issue-8675-ownership-assessment.md +30 -0
  7. package/dist/modules/promotions/backend/promotions/[id]/page.js +3 -2
  8. package/dist/modules/promotions/backend/promotions/[id]/page.js.map +2 -2
  9. package/dist/modules/promotions/backend/promotions/page.js +3 -7
  10. package/dist/modules/promotions/backend/promotions/page.js.map +2 -2
  11. package/dist/modules/promotions/components/promotionDates.js +19 -0
  12. package/dist/modules/promotions/components/promotionDates.js.map +7 -0
  13. package/dist/modules/promotions/data/validators.js +8 -1
  14. package/dist/modules/promotions/data/validators.js.map +2 -2
  15. package/dist/modules/wms/components/backend/CompletePutawayTaskDialog.js +2 -2
  16. package/dist/modules/wms/components/backend/CompletePutawayTaskDialog.js.map +2 -2
  17. package/dist/modules/wms/components/backend/CreateAsnDialog.js +5 -5
  18. package/dist/modules/wms/components/backend/CreateAsnDialog.js.map +2 -2
  19. package/dist/modules/wms/components/backend/ReceiveAsnLineDialog.js +1 -1
  20. package/dist/modules/wms/components/backend/ReceiveAsnLineDialog.js.map +2 -2
  21. package/package.json +7 -7
  22. package/src/modules/auth/commands/users.ts +28 -25
  23. package/src/modules/customers/commands/companies.ts +11 -1
  24. package/src/modules/customers/docs/issue-8675-ownership-assessment.md +30 -0
  25. package/src/modules/promotions/backend/promotions/[id]/page.tsx +3 -2
  26. package/src/modules/promotions/backend/promotions/page.tsx +3 -8
  27. package/src/modules/promotions/components/promotionDates.ts +19 -0
  28. package/src/modules/promotions/data/validators.ts +9 -1
  29. package/src/modules/promotions/i18n/de.json +6 -6
  30. package/src/modules/promotions/i18n/es.json +6 -6
  31. package/src/modules/promotions/i18n/ko.json +6 -6
  32. package/src/modules/promotions/i18n/pl.json +6 -6
  33. package/src/modules/wms/components/backend/CompletePutawayTaskDialog.tsx +2 -2
  34. package/src/modules/wms/components/backend/CreateAsnDialog.tsx +5 -5
  35. package/src/modules/wms/components/backend/ReceiveAsnLineDialog.tsx +1 -1
  36. package/src/modules/wms/i18n/de.json +173 -165
  37. package/src/modules/wms/i18n/en.json +8 -0
  38. package/src/modules/wms/i18n/es.json +175 -167
  39. package/src/modules/wms/i18n/ko.json +175 -167
  40. package/src/modules/wms/i18n/pl.json +172 -164
@@ -1,4 +1,4 @@
1
- [build:core] found 6292 entry points
1
+ [build:core] found 6295 entry points
2
2
  [build:core] built successfully
3
3
  [build:core:generated] found 271 entry points
4
4
  [build:core:generated] built successfully
@@ -251,30 +251,34 @@ const createUserCommand = {
251
251
  }
252
252
  const de = ctx.container.resolve("dataEngine");
253
253
  let user;
254
- try {
255
- user = await de.createOrmEntity({
256
- entity: User,
257
- data: {
258
- email: parsed.email,
259
- name: parsed.name,
260
- emailHash,
261
- passwordHash,
262
- isConfirmed: true,
263
- organizationId: parsed.organizationId,
264
- tenantId
265
- }
266
- });
267
- } catch (error) {
268
- if (isUniqueViolation(error)) await throwDuplicateEmailError();
269
- throw error;
270
- }
271
254
  let assignedRoles = [];
272
- if (Array.isArray(parsed.roles) && parsed.roles.length) {
273
- await withAtomicFlush(em, [
274
- async () => syncUserRoles(em, user, parsed.roles ?? [], tenantId)
275
- ], { transaction: true, label: "auth.users.create.roles" });
276
- assignedRoles = await loadUserRoleNames(em, String(user.id));
277
- }
255
+ await withAtomicFlush(em, [
256
+ async () => {
257
+ try {
258
+ user = await de.createOrmEntity({
259
+ entity: User,
260
+ data: {
261
+ email: parsed.email,
262
+ name: parsed.name,
263
+ emailHash,
264
+ passwordHash,
265
+ isConfirmed: true,
266
+ organizationId: parsed.organizationId,
267
+ tenantId
268
+ }
269
+ });
270
+ } catch (error) {
271
+ if (isUniqueViolation(error)) await throwDuplicateEmailError();
272
+ throw error;
273
+ }
274
+ },
275
+ async () => {
276
+ if (Array.isArray(parsed.roles) && parsed.roles.length) {
277
+ await syncUserRoles(em, user, parsed.roles, tenantId);
278
+ assignedRoles = await loadUserRoleNames(em, String(user.id));
279
+ }
280
+ }
281
+ ], { transaction: true, label: "auth.users.create" });
278
282
  await setCustomFieldsIfAny({
279
283
  dataEngine: de,
280
284
  entityId: E.auth.user,