tango-app-ui-manage-stores 3.0.28-dev → 3.0.30-dev
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/esm2022/lib/components/add-stores/add-stores.component.mjs +3 -3
- package/esm2022/lib/components/add-stores-form/add-stores-form.component.mjs +24 -21
- package/esm2022/lib/components/tango-manage-stores/tango-manage-stores.component.mjs +3 -3
- package/esm2022/lib/services/stores.service.mjs +5 -5
- package/fesm2022/tango-app-ui-manage-stores.mjs +31 -28
- package/fesm2022/tango-app-ui-manage-stores.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -61,17 +61,17 @@ class StoresService {
|
|
|
61
61
|
createStore(storeBody) {
|
|
62
62
|
return this.http
|
|
63
63
|
.post(`${this.storeApiUrl}/create-store`, storeBody)
|
|
64
|
-
.pipe(map((response) => response)
|
|
64
|
+
.pipe(map((response) => response));
|
|
65
65
|
}
|
|
66
66
|
updateStore(storeId, storesBodyReq) {
|
|
67
67
|
return this.http
|
|
68
68
|
.put(`${this.storeApiUrl}/update-store/${storeId}`, storesBodyReq)
|
|
69
|
-
.pipe(map((response) => response)
|
|
69
|
+
.pipe(map((response) => response));
|
|
70
70
|
}
|
|
71
71
|
storeBulkUpload(storesBodyReq) {
|
|
72
72
|
return this.http
|
|
73
73
|
.post(`${this.storeApiUrl}/storeBulkUpload`, storesBodyReq)
|
|
74
|
-
.pipe(map((response) => response)
|
|
74
|
+
.pipe(map((response) => response));
|
|
75
75
|
}
|
|
76
76
|
getCountries(params) {
|
|
77
77
|
return this.http
|
|
@@ -115,7 +115,7 @@ class StoresService {
|
|
|
115
115
|
bulkInfraTicket(req) {
|
|
116
116
|
return this.http
|
|
117
117
|
.post(`${this.ticketsApiUrl}/infra/bulkcreateTicket`, req)
|
|
118
|
-
.pipe(map((response) => response)
|
|
118
|
+
.pipe(map((response) => response));
|
|
119
119
|
}
|
|
120
120
|
handleError(error) {
|
|
121
121
|
return throwError(() => new Error("Something bad happened; please try again later"));
|
|
@@ -1819,8 +1819,8 @@ class TangoManageStoresComponent {
|
|
|
1819
1819
|
this.ts.getErrorToast("Unable to update Store Status!");
|
|
1820
1820
|
}
|
|
1821
1821
|
},
|
|
1822
|
-
error: () => {
|
|
1823
|
-
this.ts.getErrorToast(
|
|
1822
|
+
error: (err) => {
|
|
1823
|
+
this.ts.getErrorToast(err.error.error);
|
|
1824
1824
|
},
|
|
1825
1825
|
complete: () => { },
|
|
1826
1826
|
});
|
|
@@ -1994,7 +1994,7 @@ class AddStoresComponent {
|
|
|
1994
1994
|
}
|
|
1995
1995
|
},
|
|
1996
1996
|
error: (err) => {
|
|
1997
|
-
this.ts.getErrorToast(
|
|
1997
|
+
this.ts.getErrorToast(err.error.error);
|
|
1998
1998
|
}
|
|
1999
1999
|
});
|
|
2000
2000
|
}
|
|
@@ -2005,7 +2005,7 @@ class AddStoresComponent {
|
|
|
2005
2005
|
this.ts.getErrorToast(error);
|
|
2006
2006
|
}
|
|
2007
2007
|
else {
|
|
2008
|
-
this.ts.getErrorToast(
|
|
2008
|
+
this.ts.getErrorToast(error.error.error);
|
|
2009
2009
|
}
|
|
2010
2010
|
},
|
|
2011
2011
|
});
|
|
@@ -2242,28 +2242,31 @@ class AddStoresFormComponent {
|
|
|
2242
2242
|
});
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
|
-
this.storesService.createStore(store).subscribe(
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
.
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2245
|
+
this.storesService.createStore(store).subscribe({
|
|
2246
|
+
next: (res) => {
|
|
2247
|
+
if (res && res.code === 200 && res.status === "success") {
|
|
2248
|
+
this.ts.getSuccessToast("Store Created Successfully!");
|
|
2249
|
+
if (res.data.store && res.data.store.storeId) {
|
|
2250
|
+
this.storesService
|
|
2251
|
+
.createInfraTicket({
|
|
2252
|
+
storeId: res.data.store.storeId,
|
|
2253
|
+
Date: new Date().toISOString().split("T")[0],
|
|
2254
|
+
issueType: "installation",
|
|
2255
|
+
})
|
|
2256
|
+
.subscribe({
|
|
2257
|
+
next: (res) => { },
|
|
2258
|
+
error: () => { },
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
this.router.navigate(["/manage/stores"]);
|
|
2259
2262
|
}
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2263
|
+
else {
|
|
2264
|
+
this.ts.getErrorToast("Unable to create store!");
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
error: (error) => {
|
|
2268
|
+
this.ts.getErrorToast(error?.error?.error ? error?.error?.error : "Unable to create Store!");
|
|
2264
2269
|
}
|
|
2265
|
-
}, (error) => {
|
|
2266
|
-
this.ts.getErrorToast("Unable to create store!");
|
|
2267
2270
|
});
|
|
2268
2271
|
}
|
|
2269
2272
|
else {
|