@social-mail/social-mail-web-server 1.4.693 → 1.4.694
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/package.json
CHANGED
|
@@ -79,21 +79,21 @@ export default class StoreItemPriceEvents extends AuthenticatedEvents<StoreItemP
|
|
|
79
79
|
|
|
80
80
|
beforeUpdate(entity: StoreItemPrice, entry: ChangeEntry<StoreItemPrice>) {
|
|
81
81
|
this.sessionUser.ensureLoggedIn();
|
|
82
|
-
if (entry.modified.size === 0) {
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if (entry.modified.size === 1 && entry.isModified("startDate")) {
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
if (!entry.isModified("active")) {
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
if (entry.modified.size > 1) {
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
if (entry.isModified("active") && entity.active) {
|
|
95
|
-
|
|
96
|
-
}
|
|
82
|
+
// if (entry.modified.size === 0) {
|
|
83
|
+
// return;
|
|
84
|
+
// }
|
|
85
|
+
// if (entry.modified.size === 1 && entry.isModified("startDate")) {
|
|
86
|
+
// return;
|
|
87
|
+
// }
|
|
88
|
+
// if (!entry.isModified("active")) {
|
|
89
|
+
// throw new EntityAccessError(`Price can only be deactivated, ${Array.from(entry.modified.keys()).map((c) => c.name).join(",")} cannot be modified.`);
|
|
90
|
+
// }
|
|
91
|
+
// if (entry.modified.size > 1) {
|
|
92
|
+
// throw new EntityAccessError(`Price can only be deactivated, ${Array.from(entry.modified.keys()).map((c) => c.name).join(",")} cannot be modified.`);
|
|
93
|
+
// }
|
|
94
|
+
// if (entry.isModified("active") && entity.active) {
|
|
95
|
+
// throw new EntityAccessError(`Item Price can only be reactivated, add new price again.`);
|
|
96
|
+
// }
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
|