@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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/modules/auth/commands/users.js +27 -23
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/customers/commands/companies.js +10 -1
- package/dist/modules/customers/commands/companies.js.map +2 -2
- package/dist/modules/customers/docs/issue-8675-ownership-assessment.md +30 -0
- package/dist/modules/promotions/backend/promotions/[id]/page.js +3 -2
- package/dist/modules/promotions/backend/promotions/[id]/page.js.map +2 -2
- package/dist/modules/promotions/backend/promotions/page.js +3 -7
- package/dist/modules/promotions/backend/promotions/page.js.map +2 -2
- package/dist/modules/promotions/components/promotionDates.js +19 -0
- package/dist/modules/promotions/components/promotionDates.js.map +7 -0
- package/dist/modules/promotions/data/validators.js +8 -1
- package/dist/modules/promotions/data/validators.js.map +2 -2
- package/dist/modules/wms/components/backend/CompletePutawayTaskDialog.js +2 -2
- package/dist/modules/wms/components/backend/CompletePutawayTaskDialog.js.map +2 -2
- package/dist/modules/wms/components/backend/CreateAsnDialog.js +5 -5
- package/dist/modules/wms/components/backend/CreateAsnDialog.js.map +2 -2
- package/dist/modules/wms/components/backend/ReceiveAsnLineDialog.js +1 -1
- package/dist/modules/wms/components/backend/ReceiveAsnLineDialog.js.map +2 -2
- package/package.json +7 -7
- package/src/modules/auth/commands/users.ts +28 -25
- package/src/modules/customers/commands/companies.ts +11 -1
- package/src/modules/customers/docs/issue-8675-ownership-assessment.md +30 -0
- package/src/modules/promotions/backend/promotions/[id]/page.tsx +3 -2
- package/src/modules/promotions/backend/promotions/page.tsx +3 -8
- package/src/modules/promotions/components/promotionDates.ts +19 -0
- package/src/modules/promotions/data/validators.ts +9 -1
- package/src/modules/promotions/i18n/de.json +6 -6
- package/src/modules/promotions/i18n/es.json +6 -6
- package/src/modules/promotions/i18n/ko.json +6 -6
- package/src/modules/promotions/i18n/pl.json +6 -6
- package/src/modules/wms/components/backend/CompletePutawayTaskDialog.tsx +2 -2
- package/src/modules/wms/components/backend/CreateAsnDialog.tsx +5 -5
- package/src/modules/wms/components/backend/ReceiveAsnLineDialog.tsx +1 -1
- package/src/modules/wms/i18n/de.json +173 -165
- package/src/modules/wms/i18n/en.json +8 -0
- package/src/modules/wms/i18n/es.json +175 -167
- package/src/modules/wms/i18n/ko.json +175 -167
- package/src/modules/wms/i18n/pl.json +172 -164
package/.turbo/turbo-build.log
CHANGED
|
@@ -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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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,
|