@social-mail/social-mail-client 1.2.365 → 1.2.366

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.365",
3
+ "version": "1.2.366",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -89,7 +89,6 @@ export default class EditProductDetailPage extends MasterDetailPage<Partial<ISto
89
89
  @Action({ onEvent: "publish-product"})
90
90
  async publishProduct() {
91
91
  this.model.active = true;
92
- const added = !this.model.storeItemID;
93
92
  if (this.model.storeItemTags) {
94
93
  let sortOrder = 0;
95
94
  for (const iterator of this.model.storeItemTags) {
@@ -97,15 +96,12 @@ export default class EditProductDetailPage extends MasterDetailPage<Partial<ISto
97
96
  }
98
97
  }
99
98
  await this.storeItemService.save(this.model);
100
- if (added) {
101
- location.href = AppCommands.editProduct.displayRoute({ storeItemID: this.model.storeItemID});
102
- return;
103
- }
104
99
  await this.init();
105
100
  }
106
101
 
107
102
  @Action({ onEvent: "save-product"})
108
103
  async saveProduct() {
104
+ const added = !this.model.storeItemID;
109
105
  if (this.model.storeItemTags) {
110
106
  let sortOrder = 0;
111
107
  for (const iterator of this.model.storeItemTags) {
@@ -113,6 +109,10 @@ export default class EditProductDetailPage extends MasterDetailPage<Partial<ISto
113
109
  }
114
110
  }
115
111
  await this.storeItemService.save(this.model);
112
+ if (added) {
113
+ location.href = AppCommands.editProduct.displayRoute({ storeItemID: this.model.storeItemID});
114
+ return;
115
+ }
116
116
  await this.init();
117
117
  }
118
118