simpo-component-library 1.4.69 → 1.4.71
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/ecommerce/sections/address/address.component.mjs +33 -21
- package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +2 -4
- package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +5 -4
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +3 -3
- package/esm2022/lib/ecommerce/sections/user-basic-info/user-basic-info.component.mjs +18 -15
- package/esm2022/lib/ecommerce/sections/user-profile/user-profile.component.mjs +32 -10
- package/esm2022/lib/ecommerce/sections/user-profile/user-profile.modal.mjs +1 -1
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +1 -1
- package/esm2022/lib/services/cart.service.mjs +6 -1
- package/esm2022/lib/services/events.service.mjs +6 -8
- package/esm2022/lib/services/storage.service.mjs +2 -2
- package/fesm2022/simpo-component-library.mjs +587 -565
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/address/address.component.d.ts +7 -6
- package/lib/ecommerce/sections/user-basic-info/user-basic-info.component.d.ts +5 -1
- package/lib/ecommerce/sections/user-profile/user-profile.component.d.ts +12 -4
- package/lib/ecommerce/sections/user-profile/user-profile.modal.d.ts +0 -7
- package/lib/sections/banner-carousel/banner-carousel.component.d.ts +2 -2
- package/lib/services/cart.service.d.ts +2 -0
- package/lib/services/events.service.d.ts +1 -3
- package/lib/services/storage.service.d.ts +2 -2
- package/package.json +1 -1
- package/simpo-component-library-1.4.70.tgz +0 -0
- package/simpo-component-library-1.4.71.tgz +0 -0
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input,
|
|
4
|
+
import { Component, Input, EventEmitter, Injectable, Directive, HostListener, NgModule, Output, ViewChild, Optional, Inject, PLATFORM_ID } from '@angular/core';
|
|
5
5
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
6
6
|
import * as i2$1 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
-
import { map, forkJoin } from 'rxjs';
|
|
9
|
-
import * as i2$2 from 'ngx-cookie-service';
|
|
10
|
-
import * as i1 from '@angular/common/http';
|
|
11
8
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
12
9
|
import * as i3 from '@angular/material/dialog';
|
|
13
10
|
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
@@ -15,8 +12,11 @@ import * as i6 from '@angular/forms';
|
|
|
15
12
|
import { FormsModule } from '@angular/forms';
|
|
16
13
|
import * as i9 from 'ngx-skeleton-loader';
|
|
17
14
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
18
|
-
import * as i1
|
|
15
|
+
import * as i1 from '@angular/platform-browser';
|
|
16
|
+
import { map, forkJoin } from 'rxjs';
|
|
17
|
+
import * as i1$1 from '@angular/common/http';
|
|
19
18
|
import * as i2$3 from '@angular/router';
|
|
19
|
+
import * as i2$2 from 'ngx-cookie-service';
|
|
20
20
|
import * as i2$4 from '@angular/material/snack-bar';
|
|
21
21
|
import * as mapboxgl from 'mapbox-gl';
|
|
22
22
|
import * as i10 from 'ngx-image-zoom';
|
|
@@ -56,406 +56,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
56
56
|
type: Input
|
|
57
57
|
}] } });
|
|
58
58
|
|
|
59
|
-
class
|
|
60
|
-
constructor(
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
pageNo: 0,
|
|
103
|
-
pageSize: 10,
|
|
104
|
-
businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId")
|
|
105
|
-
};
|
|
106
|
-
return this.http.put(this.BASE_URL + 'ecommerce/inventory/get/collection', payload).pipe(map((response) => response.data.data?.map((collection) => new Collection(collection))));
|
|
107
|
-
}
|
|
108
|
-
getFilteredProduct(collectionIds, categoryIds, searchText, minPrice, maxPrice, sortBy, pageNo, size) {
|
|
109
|
-
const payload = {
|
|
110
|
-
"businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
|
111
|
-
"collectionId": collectionIds,
|
|
112
|
-
"categoryId": categoryIds,
|
|
113
|
-
"searchText": searchText,
|
|
114
|
-
"minPrice": minPrice ?? 0,
|
|
115
|
-
"maxPrice": maxPrice ?? 0,
|
|
116
|
-
"sortBy": sortBy,
|
|
117
|
-
"pageNo": pageNo,
|
|
118
|
-
"pageSize": size
|
|
119
|
-
};
|
|
120
|
-
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
|
|
121
|
-
}
|
|
122
|
-
getProductByCategoryId(categoryId) {
|
|
123
|
-
const payload = {
|
|
124
|
-
"businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
|
125
|
-
"categoryId": [categoryId],
|
|
126
|
-
"pageNo": 0,
|
|
127
|
-
"pageSize": 10
|
|
128
|
-
};
|
|
129
|
-
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
|
|
130
|
-
}
|
|
131
|
-
generateOTP(mobile, countryCode) {
|
|
132
|
-
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
133
|
-
return this.http.post(this.BASE_URL + `ecommerce/user/otp/trigger?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
134
|
-
}
|
|
135
|
-
verifyOTP(mobile, otp) {
|
|
136
|
-
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
137
|
-
return this.http.put(this.BASE_URL + `ecommerce/user/authenticate?mobile=${mobile}&otp=${otp}&businessId=${businessId}`, null);
|
|
138
|
-
}
|
|
139
|
-
resendOTP(mobile, countryCode) {
|
|
140
|
-
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
141
|
-
return this.http.post(this.BASE_URL + `ecommerce/user/resend?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
142
|
-
}
|
|
143
|
-
addItemToDB(userCart) {
|
|
144
|
-
return this.http.post(this.BASE_URL + `ecommerce/order/cart`, userCart);
|
|
145
|
-
}
|
|
146
|
-
getUserItems(userId, cartType) {
|
|
147
|
-
return this.http.get(this.BASE_URL + `ecommerce/order/cart?userId=${userId}&cartType=${cartType}`);
|
|
148
|
-
}
|
|
149
|
-
placeOrder(cartId) {
|
|
150
|
-
return this.http.post(this.BASE_URL + `ecommerce/order/order?cartId=${cartId}`, null);
|
|
151
|
-
}
|
|
152
|
-
getUserInfo(userId) {
|
|
153
|
-
return this.http.put(this.BASE_URL + `ecommerce/user/get/user?userId=${userId}`, null);
|
|
154
|
-
}
|
|
155
|
-
addUserAddress(user) {
|
|
156
|
-
return this.http.put(this.BASE_URL + `ecommerce/user/update/user`, user);
|
|
157
|
-
}
|
|
158
|
-
updateProfile(payload) {
|
|
159
|
-
return this.http.put(this.BASE_URL + `ecommerce/user/update/user`, payload);
|
|
160
|
-
}
|
|
161
|
-
toggleItemCartToFav() {
|
|
162
|
-
}
|
|
163
|
-
// Payment
|
|
164
|
-
createPaymentToken(payload) {
|
|
165
|
-
return this.http.post(this.BASE_URL + `ecommerce/payment/order`, payload);
|
|
166
|
-
}
|
|
167
|
-
refundPayment(orderId, payload) {
|
|
168
|
-
return this.http.post(this.BASE_URL + `ecommerce/payment/refund/bank?orderId=${orderId}`, payload);
|
|
59
|
+
class EventsService {
|
|
60
|
+
constructor() {
|
|
61
|
+
this.editSection = new EventEmitter();
|
|
62
|
+
this.duplicate = new EventEmitter();
|
|
63
|
+
this.delete = new EventEmitter();
|
|
64
|
+
this.changePosition = new EventEmitter();
|
|
65
|
+
this.addNewSectionClick = new EventEmitter();
|
|
66
|
+
this.changeContent = new EventEmitter();
|
|
67
|
+
this.restyleSection = new EventEmitter();
|
|
68
|
+
this.pageRedirectionButton = new EventEmitter();
|
|
69
|
+
this.buttonRedirection = new EventEmitter();
|
|
70
|
+
this.contactFormData = new EventEmitter();
|
|
71
|
+
//reference services
|
|
72
|
+
this.backgroundImageChangeCheck = new EventEmitter();
|
|
73
|
+
this.colorOverlayChangeChecks = new EventEmitter();
|
|
74
|
+
this.alignmentChangeChecks = new EventEmitter();
|
|
75
|
+
this.animationChangeChecks = new EventEmitter();
|
|
76
|
+
this.spacingChangeChecks = new EventEmitter();
|
|
77
|
+
this.borderChangeChecks = new EventEmitter();
|
|
78
|
+
this.cardSizeChangeChecks = new EventEmitter();
|
|
79
|
+
this.imageStyleChangeChecks = new EventEmitter();
|
|
80
|
+
this.cornerChangeChecks = new EventEmitter();
|
|
81
|
+
this.textBackgroundChangeChecks = new EventEmitter();
|
|
82
|
+
this.buttonStyleChangeChecks = new EventEmitter();
|
|
83
|
+
this.postionLayoutChangeChecks = new EventEmitter();
|
|
84
|
+
this.contentAlignmentChangeCheck = new EventEmitter();
|
|
85
|
+
this.objectPositionChangeCheck = new EventEmitter();
|
|
86
|
+
this.locationChangeCheck = new EventEmitter();
|
|
87
|
+
this.mapStyleChangeCheck = new EventEmitter();
|
|
88
|
+
this.textSizeChangeCheck = new EventEmitter();
|
|
89
|
+
this.blogByIdEvent = new EventEmitter();
|
|
90
|
+
this.openBlogListEvent = new EventEmitter();
|
|
91
|
+
this.toggleEditorEvent = new EventEmitter();
|
|
92
|
+
this.closeEditorEvent = new EventEmitter();
|
|
93
|
+
// Ecommerce event emitter
|
|
94
|
+
this.redirectToPage = new EventEmitter();
|
|
95
|
+
this.addToCart = new EventEmitter();
|
|
96
|
+
this.placeOrder = new EventEmitter();
|
|
97
|
+
this.featureCollectionList = new EventEmitter();
|
|
98
|
+
this.environmentType = new EventEmitter();
|
|
99
|
+
this.showLoadingScreen = new EventEmitter();
|
|
100
|
+
this.cashFreeEvent = new EventEmitter();
|
|
101
|
+
this.paymentStatusEvent = new EventEmitter();
|
|
169
102
|
}
|
|
170
|
-
|
|
171
|
-
|
|
103
|
+
ngOnInit() {
|
|
104
|
+
this.paymentStatusEvent.subscribe((response) => {
|
|
105
|
+
if (response) { }
|
|
106
|
+
// this.storageService.clearUserCart();
|
|
107
|
+
});
|
|
172
108
|
}
|
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type:
|
|
174
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type:
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, providedIn: 'root' }); }
|
|
175
111
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type:
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, decorators: [{
|
|
177
113
|
type: Injectable,
|
|
178
114
|
args: [{
|
|
179
115
|
providedIn: 'root',
|
|
180
116
|
}]
|
|
181
|
-
}], ctorParameters: () => [
|
|
117
|
+
}], ctorParameters: () => [] });
|
|
182
118
|
|
|
183
|
-
class
|
|
184
|
-
constructor(
|
|
119
|
+
class CornerDirective {
|
|
120
|
+
constructor(el, eventService) {
|
|
121
|
+
this.el = el;
|
|
185
122
|
this.eventService = eventService;
|
|
186
|
-
this.
|
|
187
|
-
this.restService = restService;
|
|
188
|
-
this.totalCartItems = 0;
|
|
189
|
-
this.databaseName = "USER";
|
|
190
|
-
this.databaseVersion = 1;
|
|
191
|
-
this.cartCollectionName = "USER_CART";
|
|
192
|
-
this.favouriteCollectionName = "USER_FAVOURITE";
|
|
193
|
-
this.userCollectionName = "USER";
|
|
194
|
-
this.cartCollectionRef = null;
|
|
195
|
-
this.favouriteCollectionRef = null;
|
|
196
|
-
this.userCollectionRef = null;
|
|
197
|
-
this.createDataBase();
|
|
123
|
+
this.checkSizeChanges();
|
|
198
124
|
}
|
|
199
|
-
|
|
200
|
-
return this.totalCartItems;
|
|
125
|
+
ngOnInit() {
|
|
201
126
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
request.onsuccess = async (event) => {
|
|
207
|
-
this.database = await event.target.result;
|
|
208
|
-
const request = await this.getUserCart();
|
|
209
|
-
request.onsuccess = async (response) => {
|
|
210
|
-
(await this.getUserCart()).onsuccess = (userCartResponse) => {
|
|
211
|
-
this.totalCartItems = userCartResponse.target.result.length;
|
|
212
|
-
try {
|
|
213
|
-
const response = this.addAllProductsToCart(userCartResponse.target.result);
|
|
214
|
-
response.oncomplete = () => {
|
|
215
|
-
this.eventService.showLoadingScreen.emit(false);
|
|
216
|
-
};
|
|
217
|
-
response.onerror = () => {
|
|
218
|
-
this.eventService.showLoadingScreen.emit(false);
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
catch (exception) {
|
|
222
|
-
this.eventService.showLoadingScreen.emit(false);
|
|
223
|
-
}
|
|
224
|
-
;
|
|
225
|
-
console.log("Database created");
|
|
226
|
-
};
|
|
227
|
-
// UserCart.orderedItems = await response.target.result;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
request.onupgradeneeded = (event) => {
|
|
231
|
-
this.database = event.target.result;
|
|
232
|
-
this.cartCollectionRef = this.database.createObjectStore(this.cartCollectionName, { keyPath: "itemId" });
|
|
233
|
-
this.favouriteCollectionRef = this.database.createObjectStore(this.favouriteCollectionName, { keyPath: "itemId" });
|
|
234
|
-
this.userCollectionRef = this.database.createObjectStore(this.userCollectionName, { keyPath: "userId" });
|
|
235
|
-
};
|
|
127
|
+
ngOnDestroy() {
|
|
128
|
+
if (this.cornerSubSubscription) {
|
|
129
|
+
this.cornerSubSubscription.unsubscribe();
|
|
130
|
+
}
|
|
236
131
|
}
|
|
237
|
-
|
|
238
|
-
this.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
// UserCart.billdetails.totalGrossValue = 0;
|
|
251
|
-
// UserCart.billdetails.totalNetValue = 0;
|
|
252
|
-
// UserCart.billdetails.deliveryCharges = 0;
|
|
253
|
-
// UserCart.billdetails.discountAmount = 0;
|
|
254
|
-
// UserCart.billdetails.totalOfferedValue = 0;
|
|
255
|
-
// UserCart.billdetails.totalTax = 0;
|
|
256
|
-
// UserCart.orderedItems.forEach((item: OrderedItems)=> {
|
|
257
|
-
// UserCart.billdetails.totalGrossValue += (item.price * item.quantity);
|
|
258
|
-
// UserCart.billdetails.totalTax += (item.itemTax * item.quantity);
|
|
259
|
-
// })
|
|
260
|
-
// UserCart.billdetails.totalNetValue = (UserCart.billdetails.totalGrossValue + UserCart.billdetails.totalTax + UserCart.billdetails.deliveryCharges) - UserCart.billdetails.discountAmount;
|
|
261
|
-
// return UserCart;
|
|
262
|
-
}
|
|
263
|
-
updateAllData() {
|
|
264
|
-
const userDetails = this.getUser();
|
|
265
|
-
if (userDetails) {
|
|
266
|
-
this.eventService.showLoadingScreen.emit(true);
|
|
267
|
-
const request = forkJoin([
|
|
268
|
-
this.restService.getUserItems(userDetails.userId, "CART"),
|
|
269
|
-
this.restService.getUserItems(userDetails.userId, "WISHLIST")
|
|
270
|
-
]);
|
|
271
|
-
request.subscribe((cartResponse) => {
|
|
272
|
-
console.log("Cart Response : ", cartResponse);
|
|
273
|
-
cartResponse?.[0].data?.orderedItems?.forEach((item) => {
|
|
274
|
-
this.addProductToCart(item);
|
|
275
|
-
});
|
|
276
|
-
// cartResponse?.[1].data?.orderedItems?.forEach((item: OrderedItems)=> {
|
|
277
|
-
// this.addProductToWishlist(item);
|
|
278
|
-
// UserFavourite.orderedItems.push(item as never);
|
|
279
|
-
// })
|
|
280
|
-
this.eventService.showLoadingScreen.emit(false);
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
// this.storeDataToJSON();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
// CART SERVICE
|
|
288
|
-
async getUserCart() {
|
|
289
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
290
|
-
return await transaction.objectStore(this.cartCollectionName).getAll();
|
|
291
|
-
}
|
|
292
|
-
addProductToCart(product) {
|
|
293
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
294
|
-
const response = transaction.objectStore(this.cartCollectionName).get(product.itemId);
|
|
295
|
-
response.onsuccess = (cartResponse) => {
|
|
296
|
-
console.log("Cart Resppnse : ", cartResponse);
|
|
297
|
-
if (cartResponse.target.result) { }
|
|
298
|
-
else {
|
|
299
|
-
this.totalCartItems += 1;
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
return transaction.objectStore(this.cartCollectionName).put(product);
|
|
303
|
-
}
|
|
304
|
-
addAllProductsToCart(products) {
|
|
305
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
306
|
-
products.forEach((product) => {
|
|
307
|
-
console.log(product + "info");
|
|
308
|
-
const response = transaction.objectStore(this.cartCollectionName).put(product);
|
|
309
|
-
});
|
|
310
|
-
return transaction;
|
|
311
|
-
}
|
|
312
|
-
removeProductFromCart(productId) {
|
|
313
|
-
this.totalCartItems -= 1;
|
|
314
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
315
|
-
return transaction.objectStore(this.cartCollectionName).delete(productId);
|
|
316
|
-
}
|
|
317
|
-
async getProductFromCart(productId) {
|
|
318
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
319
|
-
return await transaction.objectStore(this.cartCollectionName).get(productId);
|
|
320
|
-
}
|
|
321
|
-
// WISHLIST SERVICE
|
|
322
|
-
async getUserWhishlist() {
|
|
323
|
-
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
324
|
-
return await transaction.objectStore(this.favouriteCollectionName).getAll();
|
|
325
|
-
}
|
|
326
|
-
addProductToWishlist(product) {
|
|
327
|
-
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
328
|
-
return transaction.objectStore(this.favouriteCollectionName).put(product);
|
|
329
|
-
}
|
|
330
|
-
removeProductFromWishlist(productId) {
|
|
331
|
-
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
332
|
-
return transaction.objectStore(this.favouriteCollectionName).delete(productId);
|
|
333
|
-
}
|
|
334
|
-
async getProductFromWishlist(productId) {
|
|
335
|
-
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
336
|
-
return await transaction.objectStore(this.favouriteCollectionName).get(productId);
|
|
337
|
-
}
|
|
338
|
-
clearUserCart() {
|
|
339
|
-
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
340
|
-
return transaction.objectStore(this.cartCollectionName).clear();
|
|
341
|
-
}
|
|
342
|
-
clearUserWishlist() {
|
|
343
|
-
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
344
|
-
return transaction.objectStore(this.favouriteCollectionName).clear();
|
|
345
|
-
}
|
|
346
|
-
// USER SERVICE
|
|
347
|
-
addUser(user) {
|
|
348
|
-
this.cookieService.set("user", JSON.stringify(user ?? "{}"), 7);
|
|
349
|
-
return user;
|
|
350
|
-
}
|
|
351
|
-
getUser() {
|
|
352
|
-
try {
|
|
353
|
-
return JSON.parse(this.cookieService.get("user"));
|
|
354
|
-
}
|
|
355
|
-
catch (exception) { }
|
|
356
|
-
return null;
|
|
357
|
-
}
|
|
358
|
-
// payment issue
|
|
359
|
-
storePaymentFor(paymentFor) {
|
|
360
|
-
this.cookieService.set("paymentFor", paymentFor, 7);
|
|
361
|
-
}
|
|
362
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: EventsService }, { token: i2$2.CookieService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
363
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, providedIn: 'root' }); }
|
|
364
|
-
}
|
|
365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, decorators: [{
|
|
366
|
-
type: Injectable,
|
|
367
|
-
args: [{
|
|
368
|
-
providedIn: 'root'
|
|
369
|
-
}]
|
|
370
|
-
}], ctorParameters: () => [{ type: EventsService }, { type: i2$2.CookieService }, { type: RestService }] });
|
|
371
|
-
|
|
372
|
-
class EventsService {
|
|
373
|
-
constructor(storageService) {
|
|
374
|
-
this.storageService = storageService;
|
|
375
|
-
this.editSection = new EventEmitter();
|
|
376
|
-
this.duplicate = new EventEmitter();
|
|
377
|
-
this.delete = new EventEmitter();
|
|
378
|
-
this.changePosition = new EventEmitter();
|
|
379
|
-
this.addNewSectionClick = new EventEmitter();
|
|
380
|
-
this.changeContent = new EventEmitter();
|
|
381
|
-
this.restyleSection = new EventEmitter();
|
|
382
|
-
this.pageRedirectionButton = new EventEmitter();
|
|
383
|
-
this.buttonRedirection = new EventEmitter();
|
|
384
|
-
this.contactFormData = new EventEmitter();
|
|
385
|
-
//reference services
|
|
386
|
-
this.backgroundImageChangeCheck = new EventEmitter();
|
|
387
|
-
this.colorOverlayChangeChecks = new EventEmitter();
|
|
388
|
-
this.alignmentChangeChecks = new EventEmitter();
|
|
389
|
-
this.animationChangeChecks = new EventEmitter();
|
|
390
|
-
this.spacingChangeChecks = new EventEmitter();
|
|
391
|
-
this.borderChangeChecks = new EventEmitter();
|
|
392
|
-
this.cardSizeChangeChecks = new EventEmitter();
|
|
393
|
-
this.imageStyleChangeChecks = new EventEmitter();
|
|
394
|
-
this.cornerChangeChecks = new EventEmitter();
|
|
395
|
-
this.textBackgroundChangeChecks = new EventEmitter();
|
|
396
|
-
this.buttonStyleChangeChecks = new EventEmitter();
|
|
397
|
-
this.postionLayoutChangeChecks = new EventEmitter();
|
|
398
|
-
this.contentAlignmentChangeCheck = new EventEmitter();
|
|
399
|
-
this.objectPositionChangeCheck = new EventEmitter();
|
|
400
|
-
this.locationChangeCheck = new EventEmitter();
|
|
401
|
-
this.mapStyleChangeCheck = new EventEmitter();
|
|
402
|
-
this.textSizeChangeCheck = new EventEmitter();
|
|
403
|
-
this.blogByIdEvent = new EventEmitter();
|
|
404
|
-
this.openBlogListEvent = new EventEmitter();
|
|
405
|
-
this.toggleEditorEvent = new EventEmitter();
|
|
406
|
-
this.closeEditorEvent = new EventEmitter();
|
|
407
|
-
// Ecommerce event emitter
|
|
408
|
-
this.redirectToPage = new EventEmitter();
|
|
409
|
-
this.addToCart = new EventEmitter();
|
|
410
|
-
this.placeOrder = new EventEmitter();
|
|
411
|
-
this.featureCollectionList = new EventEmitter();
|
|
412
|
-
this.environmentType = new EventEmitter();
|
|
413
|
-
this.showLoadingScreen = new EventEmitter();
|
|
414
|
-
this.cashFreeEvent = new EventEmitter();
|
|
415
|
-
this.paymentStatusEvent = new EventEmitter();
|
|
416
|
-
}
|
|
417
|
-
ngOnInit() {
|
|
418
|
-
this.paymentStatusEvent.subscribe((response) => {
|
|
419
|
-
if (response)
|
|
420
|
-
this.storageService.clearUserCart();
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, deps: [{ token: StorageServiceService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
424
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, providedIn: 'root' }); }
|
|
425
|
-
}
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, decorators: [{
|
|
427
|
-
type: Injectable,
|
|
428
|
-
args: [{
|
|
429
|
-
providedIn: 'root',
|
|
430
|
-
}]
|
|
431
|
-
}], ctorParameters: () => [{ type: StorageServiceService }] });
|
|
432
|
-
|
|
433
|
-
class CornerDirective {
|
|
434
|
-
constructor(el, eventService) {
|
|
435
|
-
this.el = el;
|
|
436
|
-
this.eventService = eventService;
|
|
437
|
-
this.checkSizeChanges();
|
|
438
|
-
}
|
|
439
|
-
ngOnInit() {
|
|
440
|
-
}
|
|
441
|
-
ngOnDestroy() {
|
|
442
|
-
if (this.cornerSubSubscription) {
|
|
443
|
-
this.cornerSubSubscription.unsubscribe();
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
ngOnChanges() {
|
|
447
|
-
if (this.cornerData === 'Small') {
|
|
448
|
-
this.el.nativeElement.style.setProperty('border-radius', '.5rem');
|
|
449
|
-
}
|
|
450
|
-
if (this.cornerData === 'Medium') {
|
|
451
|
-
this.el.nativeElement.style.setProperty('border-radius', '1rem');
|
|
452
|
-
}
|
|
453
|
-
if (this.cornerData === 'Large') {
|
|
454
|
-
this.el.nativeElement.style.setProperty('border-radius', '2rem');
|
|
455
|
-
}
|
|
456
|
-
if (this.cornerData === 'None') {
|
|
457
|
-
this.el.nativeElement.style.setProperty('border-radius', '0px');
|
|
458
|
-
}
|
|
132
|
+
ngOnChanges() {
|
|
133
|
+
if (this.cornerData === 'Small') {
|
|
134
|
+
this.el.nativeElement.style.setProperty('border-radius', '.5rem');
|
|
135
|
+
}
|
|
136
|
+
if (this.cornerData === 'Medium') {
|
|
137
|
+
this.el.nativeElement.style.setProperty('border-radius', '1rem');
|
|
138
|
+
}
|
|
139
|
+
if (this.cornerData === 'Large') {
|
|
140
|
+
this.el.nativeElement.style.setProperty('border-radius', '2rem');
|
|
141
|
+
}
|
|
142
|
+
if (this.cornerData === 'None') {
|
|
143
|
+
this.el.nativeElement.style.setProperty('border-radius', '0px');
|
|
144
|
+
}
|
|
459
145
|
}
|
|
460
146
|
checkSizeChanges() {
|
|
461
147
|
this.cornerSubSubscription = this.eventService.cornerChangeChecks.subscribe((res) => {
|
|
@@ -3177,181 +2863,479 @@ class VideoSectionComponent extends BaseSection {
|
|
|
3177
2863
|
this._mainContainer = null;
|
|
3178
2864
|
this.videoLink = '';
|
|
3179
2865
|
}
|
|
3180
|
-
ngOnInit() {
|
|
3181
|
-
this.content = this.data?.content;
|
|
3182
|
-
this.style = this.data?.styles;
|
|
3183
|
-
if (this.content?.videoLink.url) {
|
|
3184
|
-
this.videoLink = this.content?.videoLink?.url;
|
|
2866
|
+
ngOnInit() {
|
|
2867
|
+
this.content = this.data?.content;
|
|
2868
|
+
this.style = this.data?.styles;
|
|
2869
|
+
if (this.content?.videoLink.url) {
|
|
2870
|
+
this.videoLink = this.content?.videoLink?.url;
|
|
2871
|
+
}
|
|
2872
|
+
const videoId = this.youTubeIdFromLink(this.videoLink);
|
|
2873
|
+
this.videoLink = "https://www.youtube.com/embed/" + videoId;
|
|
2874
|
+
this.deleteSelected = this.delete;
|
|
2875
|
+
}
|
|
2876
|
+
youTubeIdFromLink(url) {
|
|
2877
|
+
return url.match(/(?:https?:\/\/)?(?:www\.|m\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\/?\?v=|\/embed\/|\/)([^\s&\?\/\#]+)/)?.[1];
|
|
2878
|
+
}
|
|
2879
|
+
get getVideoLink() {
|
|
2880
|
+
let videoId = this.youTubeIdFromLink(this.content?.videoLink?.url || '') || '';
|
|
2881
|
+
return "https://www.youtube.com/embed/" + videoId;
|
|
2882
|
+
}
|
|
2883
|
+
get headingSpace() {
|
|
2884
|
+
return this.style?.layout.headingSpacing;
|
|
2885
|
+
}
|
|
2886
|
+
editSection() {
|
|
2887
|
+
this._eventService.toggleEditorEvent.emit(false);
|
|
2888
|
+
setTimeout(() => {
|
|
2889
|
+
this._eventService.editSection.emit({ data: this.data });
|
|
2890
|
+
}, 100);
|
|
2891
|
+
}
|
|
2892
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: VideoSectionComponent, deps: [{ token: i1.DomSanitizer }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: VideoSectionComponent, isStandalone: true, selector: "simpo-video-section", inputs: { data: "data", index: "index", edit: "edit", delete: "delete" }, viewQueries: [{ propertyName: "_mainContainer", first: true, predicate: ["mainContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<section [id]=\"data?.id\" [simpoBackground]=\"style?.background\" simpoHover (hovering)=\"showEditTabs($event)\"\r\n class=\"total-container\" (click)=\"editSection()\">\r\n <div #mainContainer [id]=\"data?.id\" [simpoOverlay]=\"style?.background\">\r\n <div class=\"container-fluid main-section\" [id]=\"data?.id\" [simpoBorder]=\"style?.border\"\r\n [simpoLayout]=\"style?.layout\">\r\n <div class=\"row\" [id]=\"data?.id\" [simpoAnimation]=\"style?.animation\">\r\n\r\n <div *ngFor=\"let text of data?.content?.inputText\" class=\"heading-large\" [innerHTML]=\"text.value\" [simpoContentTitleSpace]=\"headingSpace\">\r\n </div>\r\n\r\n\r\n <div class=\"video-section\" [ngStyle]=\"style?.fullScreen ? {'padding': '0px', 'margin': '0px'} : {}\">\r\n <iframe class=\"video\"\r\n [ngClass]=\"{'h-80': style?.layout?.fit === 'content', 'video': style?.layout?.fit === 'screen'}\"\r\n [src]=\"dom.bypassSecurityTrustResourceUrl(getVideoLink)\" frameborder=\"0\" allowfullscreen></iframe>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n</section>\r\n", styles: [".total-container{height:auto;position:relative}.video{width:100%;height:100vh}.main-section{width:100%;height:100%!important;display:block!important}.h-80{width:100%;height:80vh}.mb-1{margin-bottom:1.5rem!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}@media screen and (min-width: 760px){.cards{padding-bottom:24px}}\n"], dependencies: [{ kind: "ngmodule", type: SimpoElementsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "component", type: DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "directive", type:
|
|
2894
|
+
//directive
|
|
2895
|
+
ContentTitleDirective, selector: "[simpoContentTitleSpace]", inputs: ["simpoContentTitleSpace"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: BorderDirective, selector: "[simpoBorder]", inputs: ["simpoBorder"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }] }); }
|
|
2896
|
+
}
|
|
2897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: VideoSectionComponent, decorators: [{
|
|
2898
|
+
type: Component,
|
|
2899
|
+
args: [{ selector: 'simpo-video-section', standalone: true, imports: [
|
|
2900
|
+
SimpoElementsModule,
|
|
2901
|
+
CommonModule,
|
|
2902
|
+
ColumnDirectiveDirective,
|
|
2903
|
+
ContentFitDirective,
|
|
2904
|
+
SimpoComponentModule,
|
|
2905
|
+
//directive
|
|
2906
|
+
ContentTitleDirective,
|
|
2907
|
+
AnimationDirective,
|
|
2908
|
+
BackgroundDirective,
|
|
2909
|
+
BannerContentFitDirective,
|
|
2910
|
+
BorderDirective,
|
|
2911
|
+
ButtonDirectiveDirective,
|
|
2912
|
+
ColumnDirectiveDirective,
|
|
2913
|
+
ContainerFitDirective,
|
|
2914
|
+
simpoConetenAlignmentDirective,
|
|
2915
|
+
ContentFitDirective,
|
|
2916
|
+
CornerDirective,
|
|
2917
|
+
SimpoFooterLayoutDirective,
|
|
2918
|
+
HoverDirective,
|
|
2919
|
+
ImageDirectiveDirective,
|
|
2920
|
+
OverlayDirective,
|
|
2921
|
+
PositionLayoutDirectiveDirective,
|
|
2922
|
+
TextBackgroundDirectiveDirective
|
|
2923
|
+
], template: "<section [id]=\"data?.id\" [simpoBackground]=\"style?.background\" simpoHover (hovering)=\"showEditTabs($event)\"\r\n class=\"total-container\" (click)=\"editSection()\">\r\n <div #mainContainer [id]=\"data?.id\" [simpoOverlay]=\"style?.background\">\r\n <div class=\"container-fluid main-section\" [id]=\"data?.id\" [simpoBorder]=\"style?.border\"\r\n [simpoLayout]=\"style?.layout\">\r\n <div class=\"row\" [id]=\"data?.id\" [simpoAnimation]=\"style?.animation\">\r\n\r\n <div *ngFor=\"let text of data?.content?.inputText\" class=\"heading-large\" [innerHTML]=\"text.value\" [simpoContentTitleSpace]=\"headingSpace\">\r\n </div>\r\n\r\n\r\n <div class=\"video-section\" [ngStyle]=\"style?.fullScreen ? {'padding': '0px', 'margin': '0px'} : {}\">\r\n <iframe class=\"video\"\r\n [ngClass]=\"{'h-80': style?.layout?.fit === 'content', 'video': style?.layout?.fit === 'screen'}\"\r\n [src]=\"dom.bypassSecurityTrustResourceUrl(getVideoLink)\" frameborder=\"0\" allowfullscreen></iframe>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n</section>\r\n", styles: [".total-container{height:auto;position:relative}.video{width:100%;height:100vh}.main-section{width:100%;height:100%!important;display:block!important}.h-80{width:100%;height:80vh}.mb-1{margin-bottom:1.5rem!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}@media screen and (min-width: 760px){.cards{padding-bottom:24px}}\n"] }]
|
|
2924
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: EventsService }], propDecorators: { data: [{
|
|
2925
|
+
type: Input
|
|
2926
|
+
}], index: [{
|
|
2927
|
+
type: Input
|
|
2928
|
+
}], edit: [{
|
|
2929
|
+
type: Input
|
|
2930
|
+
}], delete: [{
|
|
2931
|
+
type: Input
|
|
2932
|
+
}], _mainContainer: [{
|
|
2933
|
+
type: ViewChild,
|
|
2934
|
+
args: ['mainContainer']
|
|
2935
|
+
}] } });
|
|
2936
|
+
|
|
2937
|
+
class NavbarButtonElementComponent {
|
|
2938
|
+
constructor(_eventService) {
|
|
2939
|
+
this._eventService = _eventService;
|
|
2940
|
+
this.HeaderButtonStyle = HeaderButtonStyle;
|
|
2941
|
+
}
|
|
2942
|
+
ngOnInit() {
|
|
2943
|
+
// console.log(this.buttonData)
|
|
2944
|
+
}
|
|
2945
|
+
changePage(pageData) {
|
|
2946
|
+
this._eventService.pageRedirectionButton.emit({ data: pageData ? pageData : this.buttonData });
|
|
2947
|
+
}
|
|
2948
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarButtonElementComponent, deps: [{ token: EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2949
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: NavbarButtonElementComponent, isStandalone: true, selector: "simpo-navbar-button-element", inputs: { buttonData: "buttonData", buttonStyle: "buttonStyle", selectedStyle: "selectedStyle", bgColor: "bgColor", sectionId: "sectionId" }, ngImport: i0, template: "<div *ngIf=\"buttonData?.status\">\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.TAB\">\r\n <div *ngIf=\"!buttonData?.folder\">\r\n <button mat-stroked-button style=\"border: none; white-space: nowrap;\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" class=\"navbar-button\">{{buttonData?.label}}</button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" (click)=\"changePage()\" [id]=\"sectionId\"></div>\r\n </div>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"navbar-button dropdown-toggle\" [simpoColor]=\"bgColor\" style=\"border: none; white-space: nowrap;\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" [id]=\"sectionId\"></div>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <button mat-stroked-button color=\"primary btn-lg px-4 me-md-2\">{{buttonData?.content?.label}}</button> -->\r\n\r\n</div>\r\n<div *ngIf=\"!buttonData?.status\">\r\n <button mat-stroked-button style=\"border: none;width: max-content!important;\" *ngIf=\"!buttonData?.folder\"\r\n (click)=\"changePage()\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n class=\"status-navbar-button\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button class=\"status-navbar-button not-selected-dropdown dropdown-toggle\"\r\n style=\"border: none;width: max-content!important;\" [simpoColor]=\"bgColor\" type=\"button\" id=\"headerDropdownButton\"\r\n data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".navbar-button,.status-navbar-button{font-size:18px!important}@media only screen and (max-width : 475px){.navbar-button{width:100%!important;display:flex;justify-content:flex-start}.status-navbar-button{color:#fff!important;display:flex;justify-content:flex-start}}.not-selected-dropdown{background:transparent}.dropdown-item{font-size:18px;padding:10px;font-family:Roboto,sans-serif;border-bottom:1px solid #dee2e6}.dropdown-menu{top:40px;border:none;border-radius:10px}.show{padding:5px 15px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: ColorDirective, selector: "[simpoColor]", inputs: ["simpoColor"] }] }); }
|
|
2950
|
+
}
|
|
2951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarButtonElementComponent, decorators: [{
|
|
2952
|
+
type: Component,
|
|
2953
|
+
args: [{ selector: 'simpo-navbar-button-element', standalone: true, imports: [CommonModule, MatButtonModule, ColorDirective], template: "<div *ngIf=\"buttonData?.status\">\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.TAB\">\r\n <div *ngIf=\"!buttonData?.folder\">\r\n <button mat-stroked-button style=\"border: none; white-space: nowrap;\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" class=\"navbar-button\">{{buttonData?.label}}</button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" (click)=\"changePage()\" [id]=\"sectionId\"></div>\r\n </div>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"navbar-button dropdown-toggle\" [simpoColor]=\"bgColor\" style=\"border: none; white-space: nowrap;\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" [id]=\"sectionId\"></div>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <button mat-stroked-button color=\"primary btn-lg px-4 me-md-2\">{{buttonData?.content?.label}}</button> -->\r\n\r\n</div>\r\n<div *ngIf=\"!buttonData?.status\">\r\n <button mat-stroked-button style=\"border: none;width: max-content!important;\" *ngIf=\"!buttonData?.folder\"\r\n (click)=\"changePage()\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n class=\"status-navbar-button\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button class=\"status-navbar-button not-selected-dropdown dropdown-toggle\"\r\n style=\"border: none;width: max-content!important;\" [simpoColor]=\"bgColor\" type=\"button\" id=\"headerDropdownButton\"\r\n data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".navbar-button,.status-navbar-button{font-size:18px!important}@media only screen and (max-width : 475px){.navbar-button{width:100%!important;display:flex;justify-content:flex-start}.status-navbar-button{color:#fff!important;display:flex;justify-content:flex-start}}.not-selected-dropdown{background:transparent}.dropdown-item{font-size:18px;padding:10px;font-family:Roboto,sans-serif;border-bottom:1px solid #dee2e6}.dropdown-menu{top:40px;border:none;border-radius:10px}.show{padding:5px 15px!important}\n"] }]
|
|
2954
|
+
}], ctorParameters: () => [{ type: EventsService }], propDecorators: { buttonData: [{
|
|
2955
|
+
type: Input
|
|
2956
|
+
}], buttonStyle: [{
|
|
2957
|
+
type: Input
|
|
2958
|
+
}], selectedStyle: [{
|
|
2959
|
+
type: Input
|
|
2960
|
+
}], bgColor: [{
|
|
2961
|
+
type: Input
|
|
2962
|
+
}], sectionId: [{
|
|
2963
|
+
type: Input
|
|
2964
|
+
}] } });
|
|
2965
|
+
|
|
2966
|
+
class SimpoStickyDirective {
|
|
2967
|
+
constructor(el) {
|
|
2968
|
+
this.el = el;
|
|
2969
|
+
}
|
|
2970
|
+
ngOnChanges() {
|
|
2971
|
+
if (this.simpoSticky) {
|
|
2972
|
+
this.el.nativeElement.style.setProperty("position", "fixed");
|
|
2973
|
+
// this.el.nativeElement.style.setProperty("top", "0px");
|
|
2974
|
+
this.el.nativeElement.style.setProperty("z-index", "1002");
|
|
2975
|
+
}
|
|
2976
|
+
else {
|
|
2977
|
+
this.el.nativeElement.style.setProperty("position", "relative");
|
|
2978
|
+
// this.el.nativeElement.style.setProperty("top", "0px");
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
ngOnDestroy() {
|
|
2982
|
+
}
|
|
2983
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: SimpoStickyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2984
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.4", type: SimpoStickyDirective, isStandalone: true, selector: "[simpoSticky]", inputs: { simpoSticky: "simpoSticky" }, usesOnChanges: true, ngImport: i0 }); }
|
|
2985
|
+
}
|
|
2986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: SimpoStickyDirective, decorators: [{
|
|
2987
|
+
type: Directive,
|
|
2988
|
+
args: [{
|
|
2989
|
+
selector: '[simpoSticky]',
|
|
2990
|
+
standalone: true
|
|
2991
|
+
}]
|
|
2992
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { simpoSticky: [{
|
|
2993
|
+
type: Input,
|
|
2994
|
+
args: ['simpoSticky']
|
|
2995
|
+
}] } });
|
|
2996
|
+
|
|
2997
|
+
class RestService {
|
|
2998
|
+
constructor(http, eventService) {
|
|
2999
|
+
this.http = http;
|
|
3000
|
+
this.eventService = eventService;
|
|
3001
|
+
this.BASE_URL = "https://dev-api.simpo.ai/";
|
|
3002
|
+
this.environmentTypeSubscriber = null;
|
|
3003
|
+
this.environmentTypeSubscriber = this.eventService.environmentType.subscribe((response) => {
|
|
3004
|
+
if (response == "DEV")
|
|
3005
|
+
this.BASE_URL = "https://dev-api.simpo.ai/";
|
|
3006
|
+
else if (response == "STAGE")
|
|
3007
|
+
this.BASE_URL = "https://state-api.simpo.ai/";
|
|
3008
|
+
else
|
|
3009
|
+
this.BASE_URL = "https://api.simpo.ai/";
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
ngOnDestroy() {
|
|
3013
|
+
if (this.environmentTypeSubscriber)
|
|
3014
|
+
this.environmentTypeSubscriber?.unsubscribe();
|
|
3015
|
+
}
|
|
3016
|
+
getFeaturedProduct(collectionId) {
|
|
3017
|
+
let subIndustryId = localStorage.getItem("subindustryId");
|
|
3018
|
+
if (!subIndustryId)
|
|
3019
|
+
subIndustryId = "1eecee8d-efba-62f8-b7b5-b9742fceb17f";
|
|
3020
|
+
return this.http.get(this.BASE_URL + `ecommerce/product/collection/id?collectionId=${collectionId || ''}&subIndustryId=${subIndustryId || ''}`).pipe(map((response) => response.data?.map((product) => new Product(product))));
|
|
3021
|
+
}
|
|
3022
|
+
getProductDetails(productId = null) {
|
|
3023
|
+
const payload = {
|
|
3024
|
+
pageNo: 0,
|
|
3025
|
+
pageSize: 1,
|
|
3026
|
+
itemId: productId
|
|
3027
|
+
};
|
|
3028
|
+
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
|
|
3029
|
+
}
|
|
3030
|
+
getAllCategories() {
|
|
3031
|
+
const payload = {
|
|
3032
|
+
pageNo: 0,
|
|
3033
|
+
pageSize: 10,
|
|
3034
|
+
businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId")
|
|
3035
|
+
};
|
|
3036
|
+
return this.http.put(this.BASE_URL + 'ecommerce/inventory/get/category', payload).pipe(map((response) => response.data.data?.map((category) => new Category(category))));
|
|
3037
|
+
}
|
|
3038
|
+
getAllCollections() {
|
|
3039
|
+
const payload = {
|
|
3040
|
+
pageNo: 0,
|
|
3041
|
+
pageSize: 10,
|
|
3042
|
+
businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId")
|
|
3043
|
+
};
|
|
3044
|
+
return this.http.put(this.BASE_URL + 'ecommerce/inventory/get/collection', payload).pipe(map((response) => response.data.data?.map((collection) => new Collection(collection))));
|
|
3045
|
+
}
|
|
3046
|
+
getFilteredProduct(collectionIds, categoryIds, searchText, minPrice, maxPrice, sortBy, pageNo, size) {
|
|
3047
|
+
const payload = {
|
|
3048
|
+
"businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
|
3049
|
+
"collectionId": collectionIds,
|
|
3050
|
+
"categoryId": categoryIds,
|
|
3051
|
+
"searchText": searchText,
|
|
3052
|
+
"minPrice": minPrice ?? 0,
|
|
3053
|
+
"maxPrice": maxPrice ?? 0,
|
|
3054
|
+
"sortBy": sortBy,
|
|
3055
|
+
"pageNo": pageNo,
|
|
3056
|
+
"pageSize": size
|
|
3057
|
+
};
|
|
3058
|
+
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
|
|
3059
|
+
}
|
|
3060
|
+
getProductByCategoryId(categoryId) {
|
|
3061
|
+
const payload = {
|
|
3062
|
+
"businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
|
3063
|
+
"categoryId": [categoryId],
|
|
3064
|
+
"pageNo": 0,
|
|
3065
|
+
"pageSize": 10
|
|
3066
|
+
};
|
|
3067
|
+
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
|
|
3068
|
+
}
|
|
3069
|
+
generateOTP(mobile, countryCode) {
|
|
3070
|
+
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3071
|
+
return this.http.post(this.BASE_URL + `ecommerce/user/otp/trigger?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
3072
|
+
}
|
|
3073
|
+
verifyOTP(mobile, otp) {
|
|
3074
|
+
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3075
|
+
return this.http.put(this.BASE_URL + `ecommerce/user/authenticate?mobile=${mobile}&otp=${otp}&businessId=${businessId}`, null);
|
|
3076
|
+
}
|
|
3077
|
+
resendOTP(mobile, countryCode) {
|
|
3078
|
+
const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3079
|
+
return this.http.post(this.BASE_URL + `ecommerce/user/resend?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
3080
|
+
}
|
|
3081
|
+
addItemToDB(userCart) {
|
|
3082
|
+
return this.http.post(this.BASE_URL + `ecommerce/order/cart`, userCart);
|
|
3083
|
+
}
|
|
3084
|
+
getUserItems(userId, cartType) {
|
|
3085
|
+
return this.http.get(this.BASE_URL + `ecommerce/order/cart?userId=${userId}&cartType=${cartType}`);
|
|
3086
|
+
}
|
|
3087
|
+
placeOrder(cartId) {
|
|
3088
|
+
return this.http.post(this.BASE_URL + `ecommerce/order/order?cartId=${cartId}`, null);
|
|
3089
|
+
}
|
|
3090
|
+
getUserInfo(userId) {
|
|
3091
|
+
return this.http.put(this.BASE_URL + `ecommerce/user/get/user?userId=${userId}`, null);
|
|
3092
|
+
}
|
|
3093
|
+
addUserAddress(user) {
|
|
3094
|
+
return this.http.put(this.BASE_URL + `ecommerce/user/update/user`, user);
|
|
3095
|
+
}
|
|
3096
|
+
updateProfile(payload) {
|
|
3097
|
+
return this.http.put(this.BASE_URL + `ecommerce/user/update/user`, payload);
|
|
3098
|
+
}
|
|
3099
|
+
toggleItemCartToFav() {
|
|
3100
|
+
}
|
|
3101
|
+
// Payment
|
|
3102
|
+
createPaymentToken(payload) {
|
|
3103
|
+
return this.http.post(this.BASE_URL + `ecommerce/payment/order`, payload);
|
|
3104
|
+
}
|
|
3105
|
+
refundPayment(orderId, payload) {
|
|
3106
|
+
return this.http.post(this.BASE_URL + `ecommerce/payment/refund/bank?orderId=${orderId}`, payload);
|
|
3107
|
+
}
|
|
3108
|
+
checkPaymentStatus(payload) {
|
|
3109
|
+
return this.http.post(this.BASE_URL + `ecommerce/payment/status`, payload);
|
|
3110
|
+
}
|
|
3111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: RestService, deps: [{ token: i1$1.HttpClient }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: RestService, providedIn: 'root' }); }
|
|
3113
|
+
}
|
|
3114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: RestService, decorators: [{
|
|
3115
|
+
type: Injectable,
|
|
3116
|
+
args: [{
|
|
3117
|
+
providedIn: 'root',
|
|
3118
|
+
}]
|
|
3119
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: EventsService }] });
|
|
3120
|
+
|
|
3121
|
+
class StorageServiceService {
|
|
3122
|
+
constructor(eventService, cookieService, restService) {
|
|
3123
|
+
this.eventService = eventService;
|
|
3124
|
+
this.cookieService = cookieService;
|
|
3125
|
+
this.restService = restService;
|
|
3126
|
+
this.totalCartItems = 0;
|
|
3127
|
+
this.databaseName = "USER";
|
|
3128
|
+
this.databaseVersion = 1;
|
|
3129
|
+
this.cartCollectionName = "USER_CART";
|
|
3130
|
+
this.favouriteCollectionName = "USER_FAVOURITE";
|
|
3131
|
+
this.userCollectionName = "USER";
|
|
3132
|
+
this.cartCollectionRef = null;
|
|
3133
|
+
this.favouriteCollectionRef = null;
|
|
3134
|
+
this.userCollectionRef = null;
|
|
3135
|
+
this.createDataBase();
|
|
3136
|
+
}
|
|
3137
|
+
get getTotalCartItems() {
|
|
3138
|
+
return this.totalCartItems;
|
|
3139
|
+
}
|
|
3140
|
+
async createDataBase() {
|
|
3141
|
+
const request = await window.indexedDB.open(this.databaseName, 1);
|
|
3142
|
+
this.eventService.showLoadingScreen.emit(true);
|
|
3143
|
+
request.onerror = () => { };
|
|
3144
|
+
request.onsuccess = async (event) => {
|
|
3145
|
+
this.database = await event.target.result;
|
|
3146
|
+
const request = await this.getUserCart();
|
|
3147
|
+
request.onsuccess = async (response) => {
|
|
3148
|
+
(await this.getUserCart()).onsuccess = (userCartResponse) => {
|
|
3149
|
+
this.totalCartItems = userCartResponse.target.result.length;
|
|
3150
|
+
try {
|
|
3151
|
+
const response = this.addAllProductsToCart(userCartResponse.target.result);
|
|
3152
|
+
response.oncomplete = () => {
|
|
3153
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3154
|
+
};
|
|
3155
|
+
response.onerror = () => {
|
|
3156
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3157
|
+
};
|
|
3158
|
+
}
|
|
3159
|
+
catch (exception) {
|
|
3160
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3161
|
+
}
|
|
3162
|
+
;
|
|
3163
|
+
console.log("Database created");
|
|
3164
|
+
};
|
|
3165
|
+
// UserCart.orderedItems = await response.target.result;
|
|
3166
|
+
};
|
|
3167
|
+
};
|
|
3168
|
+
request.onupgradeneeded = (event) => {
|
|
3169
|
+
this.database = event.target.result;
|
|
3170
|
+
this.cartCollectionRef = this.database.createObjectStore(this.cartCollectionName, { keyPath: "itemId" });
|
|
3171
|
+
this.favouriteCollectionRef = this.database.createObjectStore(this.favouriteCollectionName, { keyPath: "itemId" });
|
|
3172
|
+
this.userCollectionRef = this.database.createObjectStore(this.userCollectionName, { keyPath: "userId" });
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
async storeDataToJSON() {
|
|
3176
|
+
this.eventService.showLoadingScreen.emit(true);
|
|
3177
|
+
const request = await this.getUserCart();
|
|
3178
|
+
request.onsuccess = async (response) => {
|
|
3179
|
+
// UserCart.orderedItems = await response.target.result;
|
|
3180
|
+
// console.log("Car", UserCart);
|
|
3181
|
+
const favRequest = await this.getUserWhishlist();
|
|
3182
|
+
favRequest.onsuccess = async (favResponse) => {
|
|
3183
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3184
|
+
};
|
|
3185
|
+
};
|
|
3186
|
+
}
|
|
3187
|
+
calculateBillingDetails() {
|
|
3188
|
+
// UserCart.billdetails.totalGrossValue = 0;
|
|
3189
|
+
// UserCart.billdetails.totalNetValue = 0;
|
|
3190
|
+
// UserCart.billdetails.deliveryCharges = 0;
|
|
3191
|
+
// UserCart.billdetails.discountAmount = 0;
|
|
3192
|
+
// UserCart.billdetails.totalOfferedValue = 0;
|
|
3193
|
+
// UserCart.billdetails.totalTax = 0;
|
|
3194
|
+
// UserCart.orderedItems.forEach((item: OrderedItems)=> {
|
|
3195
|
+
// UserCart.billdetails.totalGrossValue += (item.price * item.quantity);
|
|
3196
|
+
// UserCart.billdetails.totalTax += (item.itemTax * item.quantity);
|
|
3197
|
+
// })
|
|
3198
|
+
// UserCart.billdetails.totalNetValue = (UserCart.billdetails.totalGrossValue + UserCart.billdetails.totalTax + UserCart.billdetails.deliveryCharges) - UserCart.billdetails.discountAmount;
|
|
3199
|
+
// return UserCart;
|
|
3200
|
+
}
|
|
3201
|
+
updateAllData() {
|
|
3202
|
+
const userDetails = this.getUser();
|
|
3203
|
+
if (userDetails) {
|
|
3204
|
+
this.eventService.showLoadingScreen.emit(true);
|
|
3205
|
+
const request = forkJoin([
|
|
3206
|
+
this.restService.getUserItems(userDetails.userId, "CART"),
|
|
3207
|
+
this.restService.getUserItems(userDetails.userId, "WISHLIST")
|
|
3208
|
+
]);
|
|
3209
|
+
request.subscribe((cartResponse) => {
|
|
3210
|
+
console.log("Cart Response : ", cartResponse);
|
|
3211
|
+
cartResponse?.[0].data?.orderedItems?.forEach((item) => {
|
|
3212
|
+
this.addProductToCart(item);
|
|
3213
|
+
});
|
|
3214
|
+
// cartResponse?.[1].data?.orderedItems?.forEach((item: OrderedItems)=> {
|
|
3215
|
+
// this.addProductToWishlist(item);
|
|
3216
|
+
// UserFavourite.orderedItems.push(item as never);
|
|
3217
|
+
// })
|
|
3218
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3219
|
+
});
|
|
3220
|
+
}
|
|
3221
|
+
else {
|
|
3222
|
+
// this.storeDataToJSON();
|
|
3185
3223
|
}
|
|
3186
|
-
const videoId = this.youTubeIdFromLink(this.videoLink);
|
|
3187
|
-
this.videoLink = "https://www.youtube.com/embed/" + videoId;
|
|
3188
|
-
this.deleteSelected = this.delete;
|
|
3189
3224
|
}
|
|
3190
|
-
|
|
3191
|
-
|
|
3225
|
+
// CART SERVICE
|
|
3226
|
+
async getUserCart() {
|
|
3227
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3228
|
+
return await transaction.objectStore(this.cartCollectionName).getAll();
|
|
3192
3229
|
}
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3230
|
+
addProductToCart(product) {
|
|
3231
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3232
|
+
const response = transaction.objectStore(this.cartCollectionName).get(product.itemId);
|
|
3233
|
+
response.onsuccess = (cartResponse) => {
|
|
3234
|
+
console.log("Cart Resppnse : ", cartResponse);
|
|
3235
|
+
if (cartResponse.target.result) { }
|
|
3236
|
+
else {
|
|
3237
|
+
this.totalCartItems += 1;
|
|
3238
|
+
}
|
|
3239
|
+
};
|
|
3240
|
+
return transaction.objectStore(this.cartCollectionName).put(product);
|
|
3196
3241
|
}
|
|
3197
|
-
|
|
3198
|
-
|
|
3242
|
+
addAllProductsToCart(products) {
|
|
3243
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3244
|
+
products.forEach((product) => {
|
|
3245
|
+
console.log(product + "info");
|
|
3246
|
+
const response = transaction.objectStore(this.cartCollectionName).put(product);
|
|
3247
|
+
});
|
|
3248
|
+
return transaction;
|
|
3199
3249
|
}
|
|
3200
|
-
|
|
3201
|
-
this.
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
}, 100);
|
|
3250
|
+
removeProductFromCart(productId) {
|
|
3251
|
+
this.totalCartItems -= 1;
|
|
3252
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3253
|
+
return transaction.objectStore(this.cartCollectionName).delete(productId);
|
|
3205
3254
|
}
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
ContentTitleDirective, selector: "[simpoContentTitleSpace]", inputs: ["simpoContentTitleSpace"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: BorderDirective, selector: "[simpoBorder]", inputs: ["simpoBorder"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }] }); }
|
|
3210
|
-
}
|
|
3211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: VideoSectionComponent, decorators: [{
|
|
3212
|
-
type: Component,
|
|
3213
|
-
args: [{ selector: 'simpo-video-section', standalone: true, imports: [
|
|
3214
|
-
SimpoElementsModule,
|
|
3215
|
-
CommonModule,
|
|
3216
|
-
ColumnDirectiveDirective,
|
|
3217
|
-
ContentFitDirective,
|
|
3218
|
-
SimpoComponentModule,
|
|
3219
|
-
//directive
|
|
3220
|
-
ContentTitleDirective,
|
|
3221
|
-
AnimationDirective,
|
|
3222
|
-
BackgroundDirective,
|
|
3223
|
-
BannerContentFitDirective,
|
|
3224
|
-
BorderDirective,
|
|
3225
|
-
ButtonDirectiveDirective,
|
|
3226
|
-
ColumnDirectiveDirective,
|
|
3227
|
-
ContainerFitDirective,
|
|
3228
|
-
simpoConetenAlignmentDirective,
|
|
3229
|
-
ContentFitDirective,
|
|
3230
|
-
CornerDirective,
|
|
3231
|
-
SimpoFooterLayoutDirective,
|
|
3232
|
-
HoverDirective,
|
|
3233
|
-
ImageDirectiveDirective,
|
|
3234
|
-
OverlayDirective,
|
|
3235
|
-
PositionLayoutDirectiveDirective,
|
|
3236
|
-
TextBackgroundDirectiveDirective
|
|
3237
|
-
], template: "<section [id]=\"data?.id\" [simpoBackground]=\"style?.background\" simpoHover (hovering)=\"showEditTabs($event)\"\r\n class=\"total-container\" (click)=\"editSection()\">\r\n <div #mainContainer [id]=\"data?.id\" [simpoOverlay]=\"style?.background\">\r\n <div class=\"container-fluid main-section\" [id]=\"data?.id\" [simpoBorder]=\"style?.border\"\r\n [simpoLayout]=\"style?.layout\">\r\n <div class=\"row\" [id]=\"data?.id\" [simpoAnimation]=\"style?.animation\">\r\n\r\n <div *ngFor=\"let text of data?.content?.inputText\" class=\"heading-large\" [innerHTML]=\"text.value\" [simpoContentTitleSpace]=\"headingSpace\">\r\n </div>\r\n\r\n\r\n <div class=\"video-section\" [ngStyle]=\"style?.fullScreen ? {'padding': '0px', 'margin': '0px'} : {}\">\r\n <iframe class=\"video\"\r\n [ngClass]=\"{'h-80': style?.layout?.fit === 'content', 'video': style?.layout?.fit === 'screen'}\"\r\n [src]=\"dom.bypassSecurityTrustResourceUrl(getVideoLink)\" frameborder=\"0\" allowfullscreen></iframe>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n</section>\r\n", styles: [".total-container{height:auto;position:relative}.video{width:100%;height:100vh}.main-section{width:100%;height:100%!important;display:block!important}.h-80{width:100%;height:80vh}.mb-1{margin-bottom:1.5rem!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}@media screen and (min-width: 760px){.cards{padding-bottom:24px}}\n"] }]
|
|
3238
|
-
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }, { type: EventsService }], propDecorators: { data: [{
|
|
3239
|
-
type: Input
|
|
3240
|
-
}], index: [{
|
|
3241
|
-
type: Input
|
|
3242
|
-
}], edit: [{
|
|
3243
|
-
type: Input
|
|
3244
|
-
}], delete: [{
|
|
3245
|
-
type: Input
|
|
3246
|
-
}], _mainContainer: [{
|
|
3247
|
-
type: ViewChild,
|
|
3248
|
-
args: ['mainContainer']
|
|
3249
|
-
}] } });
|
|
3250
|
-
|
|
3251
|
-
class NavbarButtonElementComponent {
|
|
3252
|
-
constructor(_eventService) {
|
|
3253
|
-
this._eventService = _eventService;
|
|
3254
|
-
this.HeaderButtonStyle = HeaderButtonStyle;
|
|
3255
|
+
async getProductFromCart(productId) {
|
|
3256
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3257
|
+
return await transaction.objectStore(this.cartCollectionName).get(productId);
|
|
3255
3258
|
}
|
|
3256
|
-
|
|
3257
|
-
|
|
3259
|
+
// WISHLIST SERVICE
|
|
3260
|
+
async getUserWhishlist() {
|
|
3261
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3262
|
+
return await transaction.objectStore(this.favouriteCollectionName).getAll();
|
|
3258
3263
|
}
|
|
3259
|
-
|
|
3260
|
-
this.
|
|
3264
|
+
addProductToWishlist(product) {
|
|
3265
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3266
|
+
return transaction.objectStore(this.favouriteCollectionName).put(product);
|
|
3261
3267
|
}
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarButtonElementComponent, decorators: [{
|
|
3266
|
-
type: Component,
|
|
3267
|
-
args: [{ selector: 'simpo-navbar-button-element', standalone: true, imports: [CommonModule, MatButtonModule, ColorDirective], template: "<div *ngIf=\"buttonData?.status\">\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.TAB\">\r\n <div *ngIf=\"!buttonData?.folder\">\r\n <button mat-stroked-button style=\"border: none; white-space: nowrap;\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" class=\"navbar-button\">{{buttonData?.label}}</button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" (click)=\"changePage()\" [id]=\"sectionId\"></div>\r\n </div>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"navbar-button dropdown-toggle\" [simpoColor]=\"bgColor\" style=\"border: none; white-space: nowrap;\"\r\n [ngStyle]=\"{color:buttonStyle?.color}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div [ngStyle]=\"{'border-bottom':'1px solid'+buttonStyle?.color}\" [id]=\"sectionId\"></div>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.ROUND_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 8px;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_SUBTLE\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;border-radius: 0px !important;width: max-content!important;\"\r\n [ngStyle]=\"{color:buttonStyle?.color,'background-color':buttonStyle?.subtleColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"selectedStyle === HeaderButtonStyle.SQUARE_BOLD\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button\" *ngIf=\"!buttonData?.folder\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" (click)=\"changePage()\"\r\n [id]=\"sectionId\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button mat-stroked-button class=\"primary btn-lg px-4 me-md-2 navbar-button dropdown-toggle\"\r\n style=\"border: none;padding: 20px 5px;width: max-content!important; border-radius: 0px !important;\"\r\n [ngStyle]=\"{color:buttonStyle?.boldColor,'background-color':buttonStyle?.backgroundColor}\" type=\"button\"\r\n id=\"headerDropdownButton\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <button mat-stroked-button color=\"primary btn-lg px-4 me-md-2\">{{buttonData?.content?.label}}</button> -->\r\n\r\n</div>\r\n<div *ngIf=\"!buttonData?.status\">\r\n <button mat-stroked-button style=\"border: none;width: max-content!important;\" *ngIf=\"!buttonData?.folder\"\r\n (click)=\"changePage()\" [id]=\"sectionId\" [simpoColor]=\"bgColor\"\r\n class=\"status-navbar-button\">{{buttonData?.label}}</button>\r\n <div class=\"dropdown\" *ngIf=\"buttonData?.folder && (buttonData?.folder?.pages?.length || 0) > 0\">\r\n <button class=\"status-navbar-button not-selected-dropdown dropdown-toggle\"\r\n style=\"border: none;width: max-content!important;\" [simpoColor]=\"bgColor\" type=\"button\" id=\"headerDropdownButton\"\r\n data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\r\n {{buttonData?.label}}\r\n </button>\r\n <div class=\"dropdown-menu\" aria-labelledby=\"headerDropdownButton\">\r\n <a class=\"dropdown-item\" *ngFor=\"let page of buttonData?.folder?.pages\" (click)=\"changePage(page)\">{{page.label}}</a>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".navbar-button,.status-navbar-button{font-size:18px!important}@media only screen and (max-width : 475px){.navbar-button{width:100%!important;display:flex;justify-content:flex-start}.status-navbar-button{color:#fff!important;display:flex;justify-content:flex-start}}.not-selected-dropdown{background:transparent}.dropdown-item{font-size:18px;padding:10px;font-family:Roboto,sans-serif;border-bottom:1px solid #dee2e6}.dropdown-menu{top:40px;border:none;border-radius:10px}.show{padding:5px 15px!important}\n"] }]
|
|
3268
|
-
}], ctorParameters: () => [{ type: EventsService }], propDecorators: { buttonData: [{
|
|
3269
|
-
type: Input
|
|
3270
|
-
}], buttonStyle: [{
|
|
3271
|
-
type: Input
|
|
3272
|
-
}], selectedStyle: [{
|
|
3273
|
-
type: Input
|
|
3274
|
-
}], bgColor: [{
|
|
3275
|
-
type: Input
|
|
3276
|
-
}], sectionId: [{
|
|
3277
|
-
type: Input
|
|
3278
|
-
}] } });
|
|
3279
|
-
|
|
3280
|
-
class SimpoStickyDirective {
|
|
3281
|
-
constructor(el) {
|
|
3282
|
-
this.el = el;
|
|
3268
|
+
removeProductFromWishlist(productId) {
|
|
3269
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3270
|
+
return transaction.objectStore(this.favouriteCollectionName).delete(productId);
|
|
3283
3271
|
}
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3272
|
+
async getProductFromWishlist(productId) {
|
|
3273
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3274
|
+
return await transaction.objectStore(this.favouriteCollectionName).get(productId);
|
|
3275
|
+
}
|
|
3276
|
+
clearUserCart() {
|
|
3277
|
+
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
|
3278
|
+
return transaction.objectStore(this.cartCollectionName).clear();
|
|
3279
|
+
}
|
|
3280
|
+
clearUserWishlist() {
|
|
3281
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3282
|
+
return transaction.objectStore(this.favouriteCollectionName).clear();
|
|
3283
|
+
}
|
|
3284
|
+
// USER SERVICE
|
|
3285
|
+
setUser(user) {
|
|
3286
|
+
this.cookieService.set("user", JSON.stringify(user ?? "{}"), 7);
|
|
3287
|
+
return user;
|
|
3288
|
+
}
|
|
3289
|
+
getUser() {
|
|
3290
|
+
try {
|
|
3291
|
+
return JSON.parse(this.cookieService.get("user"));
|
|
3293
3292
|
}
|
|
3293
|
+
catch (exception) { }
|
|
3294
|
+
return null;
|
|
3294
3295
|
}
|
|
3295
|
-
|
|
3296
|
+
// payment issue
|
|
3297
|
+
storePaymentFor(paymentFor) {
|
|
3298
|
+
this.cookieService.set("paymentFor", paymentFor, 7);
|
|
3296
3299
|
}
|
|
3297
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type:
|
|
3298
|
-
static { this.ɵ
|
|
3300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: EventsService }, { token: i2$2.CookieService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3301
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, providedIn: 'root' }); }
|
|
3299
3302
|
}
|
|
3300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type:
|
|
3301
|
-
type:
|
|
3303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, decorators: [{
|
|
3304
|
+
type: Injectable,
|
|
3302
3305
|
args: [{
|
|
3303
|
-
|
|
3304
|
-
standalone: true
|
|
3306
|
+
providedIn: 'root'
|
|
3305
3307
|
}]
|
|
3306
|
-
}], ctorParameters: () => [{ type:
|
|
3307
|
-
type: Input,
|
|
3308
|
-
args: ['simpoSticky']
|
|
3309
|
-
}] } });
|
|
3310
|
-
|
|
3311
|
-
var user = {
|
|
3312
|
-
addressDetailsList: [
|
|
3313
|
-
],
|
|
3314
|
-
businessId: "",
|
|
3315
|
-
gender: "",
|
|
3316
|
-
userId: "",
|
|
3317
|
-
profilePic: "",
|
|
3318
|
-
contact: {
|
|
3319
|
-
countryCode: "",
|
|
3320
|
-
email: "",
|
|
3321
|
-
mobile: "",
|
|
3322
|
-
name: ""
|
|
3323
|
-
}
|
|
3324
|
-
};
|
|
3325
|
-
var UserInfo = {
|
|
3326
|
-
user: user
|
|
3327
|
-
};
|
|
3308
|
+
}], ctorParameters: () => [{ type: EventsService }, { type: i2$2.CookieService }, { type: RestService }] });
|
|
3328
3309
|
|
|
3329
3310
|
class UserBasicInfoComponent {
|
|
3330
|
-
constructor(restService, router, dialogRef) {
|
|
3311
|
+
constructor(restService, router, dialogRef, storageService) {
|
|
3331
3312
|
this.restService = restService;
|
|
3332
3313
|
this.router = router;
|
|
3333
3314
|
this.dialogRef = dialogRef;
|
|
3315
|
+
this.storageService = storageService;
|
|
3334
3316
|
this.gender = null;
|
|
3335
3317
|
this.firstName = "";
|
|
3336
3318
|
this.middleName = "";
|
|
3337
3319
|
this.lastName = "";
|
|
3338
3320
|
this.email = "";
|
|
3339
3321
|
this.profilePic = "";
|
|
3322
|
+
this.userDetails = null;
|
|
3340
3323
|
}
|
|
3341
3324
|
ngOnInit() {
|
|
3342
|
-
this.
|
|
3343
|
-
this.
|
|
3344
|
-
this.
|
|
3345
|
-
this.
|
|
3346
|
-
this.
|
|
3347
|
-
this.
|
|
3325
|
+
this.userDetails = this.storageService.getUser();
|
|
3326
|
+
this.firstName = this.userDetails?.contact?.name?.split(" ")?.[0] ?? "";
|
|
3327
|
+
this.middleName = this.userDetails?.contact?.name?.split(" ")?.[1] ?? "";
|
|
3328
|
+
this.lastName = this.userDetails?.contact?.name?.split(" ")?.[2] ?? "";
|
|
3329
|
+
this.email = this.userDetails?.contact?.email ?? "";
|
|
3330
|
+
this.gender = this.userDetails?.gender;
|
|
3331
|
+
this.profilePic = this.userDetails?.profilePic ?? "";
|
|
3348
3332
|
}
|
|
3349
3333
|
close() {
|
|
3350
3334
|
this.dialogRef.close();
|
|
3351
3335
|
}
|
|
3352
3336
|
saveProfile() {
|
|
3353
3337
|
const payload = {
|
|
3354
|
-
userId:
|
|
3338
|
+
userId: this.userDetails?.userId,
|
|
3355
3339
|
gender: this.gender,
|
|
3356
3340
|
profilePic: this.profilePic,
|
|
3357
3341
|
contact: {
|
|
@@ -3367,7 +3351,7 @@ class UserBasicInfoComponent {
|
|
|
3367
3351
|
this.router.navigate(['/']);
|
|
3368
3352
|
});
|
|
3369
3353
|
}
|
|
3370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, deps: [{ token: RestService }, { token: i2$3.Router }, { token: i3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3354
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, deps: [{ token: RestService }, { token: i2$3.Router }, { token: i3.MatDialogRef }, { token: StorageServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3371
3355
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: UserBasicInfoComponent, isStandalone: true, selector: "simpo-user-basic-info", ngImport: i0, template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\">\r\n </div>\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div>\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\">\r\n </div>\r\n <div class=\"form-control-group-full\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n </div>\r\n </div> \r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\" (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\" (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">Skip</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:48%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}.form-control-group{margin:15px 0}.form-control-group img{height:50px;width:50px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.form-control-group .active{border:2px solid #0267C1}.action-btn{position:absolute;bottom:-35px;right:10px;display:flex;align-items:center;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
3372
3356
|
}
|
|
3373
3357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, decorators: [{
|
|
@@ -3377,7 +3361,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
3377
3361
|
MatDialogModule,
|
|
3378
3362
|
FormsModule
|
|
3379
3363
|
], template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\">\r\n </div>\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div>\r\n <div class=\"form-control-group-3\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\">\r\n </div>\r\n <div class=\"form-control-group-full\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n </div>\r\n </div> \r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\" (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\" (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">Skip</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:48%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}.form-control-group{margin:15px 0}.form-control-group img{height:50px;width:50px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.form-control-group .active{border:2px solid #0267C1}.action-btn{position:absolute;bottom:-35px;right:10px;display:flex;align-items:center;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}\n"] }]
|
|
3380
|
-
}], ctorParameters: () => [{ type: RestService }, { type: i2$3.Router }, { type: i3.MatDialogRef }] });
|
|
3364
|
+
}], ctorParameters: () => [{ type: RestService }, { type: i2$3.Router }, { type: i3.MatDialogRef }, { type: StorageServiceService }] });
|
|
3381
3365
|
|
|
3382
3366
|
class AuthenticateUserComponent {
|
|
3383
3367
|
constructor(matData, restService, router, matDialog, storageService, dialogRef, _eventService) {
|
|
@@ -3426,8 +3410,7 @@ class AuthenticateUserComponent {
|
|
|
3426
3410
|
verifyOTP() {
|
|
3427
3411
|
this.restService.verifyOTP(this.mobile ?? "", this.otpString).subscribe((response) => {
|
|
3428
3412
|
// localStorage.setItem("userId", response.userId);
|
|
3429
|
-
const userDetails = this.storageService.
|
|
3430
|
-
UserInfo.user = userDetails;
|
|
3413
|
+
const userDetails = this.storageService.setUser(response.data);
|
|
3431
3414
|
this.storageService.updateAllData();
|
|
3432
3415
|
if (userDetails.contact?.name?.length > 0) {
|
|
3433
3416
|
if (this.dialogRef)
|
|
@@ -4816,6 +4799,8 @@ class CartService {
|
|
|
4816
4799
|
this.storageService = storageService;
|
|
4817
4800
|
this.restService = restService;
|
|
4818
4801
|
}
|
|
4802
|
+
ngOnInit() {
|
|
4803
|
+
}
|
|
4819
4804
|
addItemFromCartPage(product, userCart) {
|
|
4820
4805
|
if (product.quantity) {
|
|
4821
4806
|
// let productIdx: number = -1;
|
|
@@ -4881,6 +4866,9 @@ class CartService {
|
|
|
4881
4866
|
}
|
|
4882
4867
|
storeCartDataToServer(cart) {
|
|
4883
4868
|
}
|
|
4869
|
+
clearCartItems() {
|
|
4870
|
+
this.storageService.clearUserCart();
|
|
4871
|
+
}
|
|
4884
4872
|
storeDataToServer() {
|
|
4885
4873
|
// const userCart = UserCart as never as Cart;
|
|
4886
4874
|
// const userWishlist = UserFavourites as never as Cart;
|
|
@@ -5008,7 +4996,7 @@ class FeaturedProductsComponent extends BaseSection {
|
|
|
5008
4996
|
}, 50);
|
|
5009
4997
|
}
|
|
5010
4998
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: FeaturedProductsComponent, deps: [{ token: PLATFORM_ID }, { token: EventsService }, { token: RestService }, { token: i2$3.Router }, { token: CartService }, { token: StorageServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5011
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: FeaturedProductsComponent, isStandalone: true, selector: "simpo-featured-products", inputs: { data: "data", responseData: "responseData", index: "index", isRelatedProduct: "isRelatedProduct", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div [id]=\"data?.id\" class=\"display-block\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"product-parent\" *ngIf=\"responseData && responseData
|
|
4999
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: FeaturedProductsComponent, isStandalone: true, selector: "simpo-featured-products", inputs: { data: "data", responseData: "responseData", index: "index", isRelatedProduct: "isRelatedProduct", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div [id]=\"data?.id\" class=\"display-block\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"product-parent\" *ngIf=\"responseData && responseData?.length\">\r\n <div *ngFor=\"let product of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]; let idx = index\" class=\"product\"\r\n [style.width]=\"getProductWidth()\">\r\n <div *ngIf=\"!(product.itemImages?.length && product.itemImages[0].imgUrl)\" class=\"default-image\"(click)=\"proceedToProductDesc(product.itemId)\">\r\n <img src=\"https://www.svgrepo.com/show/149861/t-shirt-black-silhouette.svg\" alt=\"\">\r\n </div>\r\n <div *ngIf=\"product.itemImages?.length && product.itemImages[0].imgUrl\"(click)=\"proceedToProductDesc(product.itemId)\">\r\n <img [id]=\"'preview_'+idx\" [src]=\"product.itemImages[product.prviewIdx]?.imgUrl\" alt=\"\" class=\"product-img preivew\" (mouseenter)=\"togglePreviewImage(product, idx)\" (mouseleave)=\"product.prviewIdx = 0\">\r\n </div>\r\n <div class=\"mt-15\">\r\n <div class=\"product-name heading-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n {{product.name}}</div>\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"price body-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n ₹\r\n {{product.price.sellingPrice}}\r\n </div>\r\n <div *ngIf=\"content?.display?.showButton\" class=\"add-to-cart-btn\">\r\n <mat-icon [style.color]=\"data?.styles?.background?.accentColor\" (click)=\"toggleItemToFav(product, 'ADD')\" *ngIf=\"!product.whislist\">favorite_border</mat-icon>\r\n <mat-icon [style.color]=\"data?.styles?.background?.accentColor\" (click)=\"toggleItemToFav(product, 'REMOVE')\" *ngIf=\"product.whislist\">favorite</mat-icon>\r\n <button simpoButtonDirective [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\" *ngIf=\"!product.quantity\" (click)=\"addItemToCart(product, 'ADD')\">{{content?.button}}</button>\r\n <div class=\"quantity\" *ngIf=\"product.quantity\">\r\n <span (click)=\"addItemToCart(product, 'SUBSTRACT')\">-</span>\r\n <span>{{product.quantity}}</span>\r\n <span (click)=\"addItemToCart(product, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>", styles: [".product-parent{display:flex;flex-wrap:wrap;margin-top:15px}.product{padding:10px;cursor:pointer}.product-img{height:310px;width:100%}.price{color:#222;font-size:16px;font-weight:600;line-height:normal}.product-name{color:#222;font-size:16px;line-height:26px;margin-bottom:5px}.add-product-button{width:20%}.mt-15{margin-top:15px}.default-image{background-color:#f2f3f5;text-align:center}.default-image img{width:70%;height:310px}.total-container{height:auto;position:relative}.display-block{display:block!important}.quantity{display:flex;justify-content:space-between;align-items:center;border:1.5px solid lightgray;border-radius:3px;padding:5px;font-weight:600;width:95px}.preivew{transition:opacity .5s ease-in-out;opacity:1}.transition-preview{opacity:0}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}@media screen and (max-width: 475px){.product-img{height:250px}.default-image img{height:250px}}.add-to-cart-btn{display:flex;gap:10px}.add-to-cart-btn .mat-icon{height:30px;width:35px;font-size:27px;margin-top:5px}.add-to-cart-btn button{height:35px;font-size:16px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "component", type: DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "component", type: i9.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "component", type:
|
|
5012
5000
|
//directive
|
|
5013
5001
|
MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: BorderDirective, selector: "[simpoBorder]", inputs: ["simpoBorder"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }, { kind: "directive", type: ColorDirective, selector: "[simpoColor]", inputs: ["simpoColor"] }, { kind: "directive", type: ButtonDirectiveDirective, selector: "[simpoButtonDirective]", inputs: ["buttonStyle", "color", "scrollValue"] }] }); }
|
|
5014
5002
|
}
|
|
@@ -5030,7 +5018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
5030
5018
|
TextBackgroundDirectiveDirective,
|
|
5031
5019
|
ColorDirective,
|
|
5032
5020
|
ButtonDirectiveDirective
|
|
5033
|
-
], template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div [id]=\"data?.id\" class=\"display-block\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"product-parent\" *ngIf=\"responseData && responseData
|
|
5021
|
+
], template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div [id]=\"data?.id\" class=\"display-block\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"product-parent\" *ngIf=\"responseData && responseData?.length\">\r\n <div *ngFor=\"let product of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]; let idx = index\" class=\"product\"\r\n [style.width]=\"getProductWidth()\">\r\n <div *ngIf=\"!(product.itemImages?.length && product.itemImages[0].imgUrl)\" class=\"default-image\"(click)=\"proceedToProductDesc(product.itemId)\">\r\n <img src=\"https://www.svgrepo.com/show/149861/t-shirt-black-silhouette.svg\" alt=\"\">\r\n </div>\r\n <div *ngIf=\"product.itemImages?.length && product.itemImages[0].imgUrl\"(click)=\"proceedToProductDesc(product.itemId)\">\r\n <img [id]=\"'preview_'+idx\" [src]=\"product.itemImages[product.prviewIdx]?.imgUrl\" alt=\"\" class=\"product-img preivew\" (mouseenter)=\"togglePreviewImage(product, idx)\" (mouseleave)=\"product.prviewIdx = 0\">\r\n </div>\r\n <div class=\"mt-15\">\r\n <div class=\"product-name heading-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n {{product.name}}</div>\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"price body-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n ₹\r\n {{product.price.sellingPrice}}\r\n </div>\r\n <div *ngIf=\"content?.display?.showButton\" class=\"add-to-cart-btn\">\r\n <mat-icon [style.color]=\"data?.styles?.background?.accentColor\" (click)=\"toggleItemToFav(product, 'ADD')\" *ngIf=\"!product.whislist\">favorite_border</mat-icon>\r\n <mat-icon [style.color]=\"data?.styles?.background?.accentColor\" (click)=\"toggleItemToFav(product, 'REMOVE')\" *ngIf=\"product.whislist\">favorite</mat-icon>\r\n <button simpoButtonDirective [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\" *ngIf=\"!product.quantity\" (click)=\"addItemToCart(product, 'ADD')\">{{content?.button}}</button>\r\n <div class=\"quantity\" *ngIf=\"product.quantity\">\r\n <span (click)=\"addItemToCart(product, 'SUBSTRACT')\">-</span>\r\n <span>{{product.quantity}}</span>\r\n <span (click)=\"addItemToCart(product, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>", styles: [".product-parent{display:flex;flex-wrap:wrap;margin-top:15px}.product{padding:10px;cursor:pointer}.product-img{height:310px;width:100%}.price{color:#222;font-size:16px;font-weight:600;line-height:normal}.product-name{color:#222;font-size:16px;line-height:26px;margin-bottom:5px}.add-product-button{width:20%}.mt-15{margin-top:15px}.default-image{background-color:#f2f3f5;text-align:center}.default-image img{width:70%;height:310px}.total-container{height:auto;position:relative}.display-block{display:block!important}.quantity{display:flex;justify-content:space-between;align-items:center;border:1.5px solid lightgray;border-radius:3px;padding:5px;font-weight:600;width:95px}.preivew{transition:opacity .5s ease-in-out;opacity:1}.transition-preview{opacity:0}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}@media screen and (max-width: 475px){.product-img{height:250px}.default-image img{height:250px}}.add-to-cart-btn{display:flex;gap:10px}.add-to-cart-btn .mat-icon{height:30px;width:35px;font-size:27px;margin-top:5px}.add-to-cart-btn button{height:35px;font-size:16px!important}\n"] }]
|
|
5034
5022
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
5035
5023
|
type: Inject,
|
|
5036
5024
|
args: [PLATFORM_ID]
|
|
@@ -5489,14 +5477,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
5489
5477
|
}] } });
|
|
5490
5478
|
|
|
5491
5479
|
class AddressComponent {
|
|
5492
|
-
constructor(ngZone, restService, matDialog, router, storageService
|
|
5493
|
-
// private readonly matDialogRef: MatDialogRef<AddressComponent>
|
|
5494
|
-
) {
|
|
5480
|
+
constructor(ngZone, restService, matDialog, router, storageService, matData, matDialogRef) {
|
|
5495
5481
|
this.ngZone = ngZone;
|
|
5496
5482
|
this.restService = restService;
|
|
5497
5483
|
this.matDialog = matDialog;
|
|
5498
5484
|
this.router = router;
|
|
5499
5485
|
this.storageService = storageService;
|
|
5486
|
+
this.matData = matData;
|
|
5487
|
+
this.matDialogRef = matDialogRef;
|
|
5488
|
+
this.selectedAddressIdx = 0;
|
|
5500
5489
|
this.addressList = [];
|
|
5501
5490
|
this.address = {
|
|
5502
5491
|
"receiverName": "",
|
|
@@ -5538,6 +5527,10 @@ class AddressComponent {
|
|
|
5538
5527
|
}
|
|
5539
5528
|
ngOnInit() {
|
|
5540
5529
|
this.getCurrentLocation();
|
|
5530
|
+
if (this.matData) {
|
|
5531
|
+
this.addressList = this.matData.addressList;
|
|
5532
|
+
this.addNewAddress = true;
|
|
5533
|
+
}
|
|
5541
5534
|
}
|
|
5542
5535
|
ngOnChanges(changes) {
|
|
5543
5536
|
this.addressList = this.responseData;
|
|
@@ -5547,6 +5540,7 @@ class AddressComponent {
|
|
|
5547
5540
|
this.address.addressType = address.key;
|
|
5548
5541
|
}
|
|
5549
5542
|
close() {
|
|
5543
|
+
this.matDialogRef.close();
|
|
5550
5544
|
}
|
|
5551
5545
|
getCurrentLocation() {
|
|
5552
5546
|
if (navigator.geolocation) {
|
|
@@ -5615,9 +5609,16 @@ class AddressComponent {
|
|
|
5615
5609
|
"gender": userDetails?.gender?.length > 0 ? userDetails?.gender : null
|
|
5616
5610
|
};
|
|
5617
5611
|
this.restService.addUserAddress(payload).subscribe((response) => {
|
|
5618
|
-
this.
|
|
5619
|
-
|
|
5620
|
-
|
|
5612
|
+
if (this.matData) {
|
|
5613
|
+
this.matDialogRef.close(this.address);
|
|
5614
|
+
}
|
|
5615
|
+
else {
|
|
5616
|
+
this.addNewAddress = false;
|
|
5617
|
+
if (userDetails) {
|
|
5618
|
+
userDetails.addressDetailsList.push(this.address);
|
|
5619
|
+
this.storageService.setUser(userDetails);
|
|
5620
|
+
}
|
|
5621
|
+
}
|
|
5621
5622
|
});
|
|
5622
5623
|
}
|
|
5623
5624
|
else {
|
|
@@ -5632,13 +5633,8 @@ class AddressComponent {
|
|
|
5632
5633
|
}
|
|
5633
5634
|
}
|
|
5634
5635
|
}
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
selectedAddressIdx: idx
|
|
5638
|
-
};
|
|
5639
|
-
}
|
|
5640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: AddressComponent, deps: [{ token: i0.NgZone }, { token: RestService }, { token: i3.MatDialog }, { token: i2$3.Router }, { token: StorageServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5641
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: AddressComponent, isStandalone: true, selector: "simpo-address", inputs: { responseData: "responseData", data: "data", selectedAddress: "selectedAddress", isCart: "isCart" }, usesOnChanges: true, ngImport: i0, template: "<section class=\"address-sec\">\r\n <div class=\"header\">\r\n <h3>{{isCart ? 'Shipping To' : 'New Address'}}</h3>\r\n <mat-icon (click)=\"close()\" *ngIf=\"!isCart\">close</mat-icon>\r\n <span class=\"add-address\" *ngIf=\"addressList.length && !addNewAddress\" (click)=\"addNewAddress = true\">+ add address</span>\r\n </div>\r\n <ng-container *ngIf=\"!addressList?.length || addNewAddress\">\r\n <p (click)=\"getCurrentLocation()\" class=\"d-flex align-items-center\" style=\"cursor: pointer;\">\r\n <mat-icon>my_location</mat-icon>\r\n <span>take my current location</span>\r\n </p>\r\n <div class=\"forms d-flex flex-wrap\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Name</div>\r\n <input type=\"text\" placeholder=\"Enter name\" [(ngModel)]=\"address.receiverName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Mobile</div>\r\n <input type=\"text\" placeholder=\"Enter mobile\" [(ngModel)]=\"address.receiverPhone\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"address.receiverEmail\">\r\n </div>\r\n <div class=\"form-control-full-group\">\r\n <div class=\"label\">Address</div>\r\n <input type=\"text\" placeholder=\"Enter address\" matGoogleMapsAutocomplete\r\n (onAutocompleteSelected)=\"onAutocompleteSelected($event)\"\r\n (onLocationSelected)=\"onLocationSelected($event)\" [(ngModel)]=\"address.addressLine1\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Locality</div>\r\n <input type=\"text\" placeholder=\"Enter locality\" [(ngModel)]=\"address.localityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Landmark</div>\r\n <input type=\"text\" placeholder=\"Enter landmark\" [(ngModel)]=\"address.landmark\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Pincode</div>\r\n <input type=\"text\" placeholder=\"Enter pincode\" [(ngModel)]=\"address.zipCode\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">City</div>\r\n <input type=\"text\" placeholder=\"Enter city\" [(ngModel)]=\"address.cityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">State</div>\r\n <input type=\"text\" placeholder=\"Enter state\" [(ngModel)]=\"address.stateName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Address Type</div>\r\n <div class=\"d-flex\">\r\n <ng-container *ngFor=\"let address of addessType\">\r\n <span class=\"address-type\" (click)=\"checkAddressType(address)\" [ngClass]=\"{'active-address': address.status}\">{{address.key}}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"address-list\" *ngIf=\"addressList.length && !addNewAddress\">\r\n <ng-container *ngFor=\"let address of addressList; let idx = index\">\r\n <div class=\"address\" (click)=\"selectAddress(idx)\" [ngClass]=\"{'selected-address': selectedAddress.selectedAddressIdx == idx}\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address?.receiverName}}</span>\r\n <span class=\"address-type\">{{address?.addressType}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.addressLine1}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.receiverPhone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"action-btn\" *ngIf=\"!addressList.length || addNewAddress\">\r\n <button (click)=\"updateAddress()\">Update</button>\r\n </div>\r\n</section>", styles: [".address-sec{padding:20px;position:relative}.address-sec .header{display:flex;justify-content:space-between;margin-bottom:20px}.mat-icon{cursor:pointer;margin-right:5px}.action-btn{position:absolute;bottom:-50px;right:10px}.action-btn button{background-color:#0267c1;color:#fff;padding:10px;width:200px!important;border:none}.label:after{content:\"*\"}.active-address{background-color:#0267c1!important;color:#fff!important}.forms{gap:10px;justify-content:space-between}.form-control-group,.form-control-full-group{width:48%}:is(.form-control-group,.form-control-full-group) input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.form-control-full-group{width:100%!important}.address-type{width:150px;padding:10px;background-color:#d3d3d35c;color:#000;text-align:center;border-radius:5px;margin:0 5px;cursor:pointer}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.add-address{color:#0267c1;cursor:pointer;font-weight:600}.address-active{background-color:#0267c1;color:#fff}.selected-address{border:2px solid #0267C1!important}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatDialogModule }] }); }
|
|
5636
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: AddressComponent, deps: [{ token: i0.NgZone }, { token: RestService }, { token: i3.MatDialog }, { token: i2$3.Router }, { token: StorageServiceService }, { token: MAT_DIALOG_DATA, optional: true }, { token: i3.MatDialogRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5637
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: AddressComponent, isStandalone: true, selector: "simpo-address", inputs: { responseData: "responseData", data: "data", isCart: "isCart" }, usesOnChanges: true, ngImport: i0, template: "<section class=\"address-sec\">\r\n <div class=\"header\">\r\n <h3>{{isCart ? 'Shipping To' : 'New Address'}}</h3>\r\n <mat-icon (click)=\"close()\" *ngIf=\"!isCart\">close</mat-icon>\r\n <span class=\"add-address\" *ngIf=\"addressList.length && !addNewAddress\" (click)=\"addNewAddress = true\">+ add address</span>\r\n </div>\r\n <ng-container *ngIf=\"!addressList?.length || addNewAddress\">\r\n <p (click)=\"getCurrentLocation()\" class=\"d-flex align-items-center\" style=\"cursor: pointer;\">\r\n <mat-icon>my_location</mat-icon>\r\n <span>take my current location</span>\r\n </p>\r\n <div class=\"forms d-flex flex-wrap\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Name</div>\r\n <input type=\"text\" placeholder=\"Enter name\" [(ngModel)]=\"address.receiverName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Mobile</div>\r\n <input type=\"text\" placeholder=\"Enter mobile\" [(ngModel)]=\"address.receiverPhone\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"address.receiverEmail\">\r\n </div>\r\n <div class=\"form-control-full-group\">\r\n <div class=\"label\">Address</div>\r\n <input type=\"text\" placeholder=\"Enter address\" matGoogleMapsAutocomplete\r\n (onAutocompleteSelected)=\"onAutocompleteSelected($event)\"\r\n (onLocationSelected)=\"onLocationSelected($event)\" [(ngModel)]=\"address.addressLine1\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Locality</div>\r\n <input type=\"text\" placeholder=\"Enter locality\" [(ngModel)]=\"address.localityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Landmark</div>\r\n <input type=\"text\" placeholder=\"Enter landmark\" [(ngModel)]=\"address.landmark\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Pincode</div>\r\n <input type=\"text\" placeholder=\"Enter pincode\" [(ngModel)]=\"address.zipCode\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">City</div>\r\n <input type=\"text\" placeholder=\"Enter city\" [(ngModel)]=\"address.cityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">State</div>\r\n <input type=\"text\" placeholder=\"Enter state\" [(ngModel)]=\"address.stateName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Address Type</div>\r\n <div class=\"d-flex\">\r\n <ng-container *ngFor=\"let address of addessType\">\r\n <span class=\"address-type\" (click)=\"checkAddressType(address)\" [ngClass]=\"{'active-address': address.status}\">{{address.key}}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"address-list\" *ngIf=\"addressList.length && !addNewAddress\">\r\n <ng-container *ngFor=\"let address of addressList; let idx = index\">\r\n <div class=\"address\" (click)=\"selectedAddressIdx = idx\" [ngClass]=\"{'selected-address': selectedAddressIdx == idx}\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address?.receiverName}}</span>\r\n <span class=\"address-type\">{{address?.addressType}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.addressLine1}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.receiverPhone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"action-btn\" *ngIf=\"!addressList.length || addNewAddress\">\r\n <button (click)=\"updateAddress()\">Update</button>\r\n </div>\r\n</section>", styles: [".address-sec{padding:20px;position:relative}.address-sec .header{display:flex;justify-content:space-between;margin-bottom:20px}.mat-icon{cursor:pointer;margin-right:5px}.action-btn{position:absolute;bottom:-50px;right:10px}.action-btn button{background-color:#0267c1;color:#fff;padding:10px;width:200px!important;border:none}.label:after{content:\"*\"}.active-address{background-color:#0267c1!important;color:#fff!important}.forms{gap:10px;justify-content:space-between}.form-control-group,.form-control-full-group{width:48%}:is(.form-control-group,.form-control-full-group) input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.form-control-full-group{width:100%!important}.address-type{width:150px;padding:10px;background-color:#d3d3d35c;color:#000;text-align:center;border-radius:5px;margin:0 5px;cursor:pointer}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.add-address{color:#0267c1;cursor:pointer;font-weight:600}.address-active{background-color:#0267c1;color:#fff}.selected-address{border:2px solid #0267C1!important}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatDialogModule }] }); }
|
|
5642
5638
|
}
|
|
5643
5639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: AddressComponent, decorators: [{
|
|
5644
5640
|
type: Component,
|
|
@@ -5647,13 +5643,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
5647
5643
|
CommonModule,
|
|
5648
5644
|
FormsModule,
|
|
5649
5645
|
MatDialogModule
|
|
5650
|
-
], template: "<section class=\"address-sec\">\r\n <div class=\"header\">\r\n <h3>{{isCart ? 'Shipping To' : 'New Address'}}</h3>\r\n <mat-icon (click)=\"close()\" *ngIf=\"!isCart\">close</mat-icon>\r\n <span class=\"add-address\" *ngIf=\"addressList.length && !addNewAddress\" (click)=\"addNewAddress = true\">+ add address</span>\r\n </div>\r\n <ng-container *ngIf=\"!addressList?.length || addNewAddress\">\r\n <p (click)=\"getCurrentLocation()\" class=\"d-flex align-items-center\" style=\"cursor: pointer;\">\r\n <mat-icon>my_location</mat-icon>\r\n <span>take my current location</span>\r\n </p>\r\n <div class=\"forms d-flex flex-wrap\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Name</div>\r\n <input type=\"text\" placeholder=\"Enter name\" [(ngModel)]=\"address.receiverName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Mobile</div>\r\n <input type=\"text\" placeholder=\"Enter mobile\" [(ngModel)]=\"address.receiverPhone\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"address.receiverEmail\">\r\n </div>\r\n <div class=\"form-control-full-group\">\r\n <div class=\"label\">Address</div>\r\n <input type=\"text\" placeholder=\"Enter address\" matGoogleMapsAutocomplete\r\n (onAutocompleteSelected)=\"onAutocompleteSelected($event)\"\r\n (onLocationSelected)=\"onLocationSelected($event)\" [(ngModel)]=\"address.addressLine1\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Locality</div>\r\n <input type=\"text\" placeholder=\"Enter locality\" [(ngModel)]=\"address.localityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Landmark</div>\r\n <input type=\"text\" placeholder=\"Enter landmark\" [(ngModel)]=\"address.landmark\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Pincode</div>\r\n <input type=\"text\" placeholder=\"Enter pincode\" [(ngModel)]=\"address.zipCode\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">City</div>\r\n <input type=\"text\" placeholder=\"Enter city\" [(ngModel)]=\"address.cityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">State</div>\r\n <input type=\"text\" placeholder=\"Enter state\" [(ngModel)]=\"address.stateName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Address Type</div>\r\n <div class=\"d-flex\">\r\n <ng-container *ngFor=\"let address of addessType\">\r\n <span class=\"address-type\" (click)=\"checkAddressType(address)\" [ngClass]=\"{'active-address': address.status}\">{{address.key}}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"address-list\" *ngIf=\"addressList.length && !addNewAddress\">\r\n <ng-container *ngFor=\"let address of addressList; let idx = index\">\r\n <div class=\"address\" (click)=\"
|
|
5651
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: RestService }, { type: i3.MatDialog }, { type: i2$3.Router }, { type: StorageServiceService }
|
|
5646
|
+
], template: "<section class=\"address-sec\">\r\n <div class=\"header\">\r\n <h3>{{isCart ? 'Shipping To' : 'New Address'}}</h3>\r\n <mat-icon (click)=\"close()\" *ngIf=\"!isCart\">close</mat-icon>\r\n <span class=\"add-address\" *ngIf=\"addressList.length && !addNewAddress\" (click)=\"addNewAddress = true\">+ add address</span>\r\n </div>\r\n <ng-container *ngIf=\"!addressList?.length || addNewAddress\">\r\n <p (click)=\"getCurrentLocation()\" class=\"d-flex align-items-center\" style=\"cursor: pointer;\">\r\n <mat-icon>my_location</mat-icon>\r\n <span>take my current location</span>\r\n </p>\r\n <div class=\"forms d-flex flex-wrap\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Name</div>\r\n <input type=\"text\" placeholder=\"Enter name\" [(ngModel)]=\"address.receiverName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Mobile</div>\r\n <input type=\"text\" placeholder=\"Enter mobile\" [(ngModel)]=\"address.receiverPhone\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"address.receiverEmail\">\r\n </div>\r\n <div class=\"form-control-full-group\">\r\n <div class=\"label\">Address</div>\r\n <input type=\"text\" placeholder=\"Enter address\" matGoogleMapsAutocomplete\r\n (onAutocompleteSelected)=\"onAutocompleteSelected($event)\"\r\n (onLocationSelected)=\"onLocationSelected($event)\" [(ngModel)]=\"address.addressLine1\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Locality</div>\r\n <input type=\"text\" placeholder=\"Enter locality\" [(ngModel)]=\"address.localityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Landmark</div>\r\n <input type=\"text\" placeholder=\"Enter landmark\" [(ngModel)]=\"address.landmark\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Pincode</div>\r\n <input type=\"text\" placeholder=\"Enter pincode\" [(ngModel)]=\"address.zipCode\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">City</div>\r\n <input type=\"text\" placeholder=\"Enter city\" [(ngModel)]=\"address.cityName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">State</div>\r\n <input type=\"text\" placeholder=\"Enter state\" [(ngModel)]=\"address.stateName\">\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Address Type</div>\r\n <div class=\"d-flex\">\r\n <ng-container *ngFor=\"let address of addessType\">\r\n <span class=\"address-type\" (click)=\"checkAddressType(address)\" [ngClass]=\"{'active-address': address.status}\">{{address.key}}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"address-list\" *ngIf=\"addressList.length && !addNewAddress\">\r\n <ng-container *ngFor=\"let address of addressList; let idx = index\">\r\n <div class=\"address\" (click)=\"selectedAddressIdx = idx\" [ngClass]=\"{'selected-address': selectedAddressIdx == idx}\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address?.receiverName}}</span>\r\n <span class=\"address-type\">{{address?.addressType}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.addressLine1}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.receiverPhone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"action-btn\" *ngIf=\"!addressList.length || addNewAddress\">\r\n <button (click)=\"updateAddress()\">Update</button>\r\n </div>\r\n</section>", styles: [".address-sec{padding:20px;position:relative}.address-sec .header{display:flex;justify-content:space-between;margin-bottom:20px}.mat-icon{cursor:pointer;margin-right:5px}.action-btn{position:absolute;bottom:-50px;right:10px}.action-btn button{background-color:#0267c1;color:#fff;padding:10px;width:200px!important;border:none}.label:after{content:\"*\"}.active-address{background-color:#0267c1!important;color:#fff!important}.forms{gap:10px;justify-content:space-between}.form-control-group,.form-control-full-group{width:48%}:is(.form-control-group,.form-control-full-group) input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.form-control-full-group{width:100%!important}.address-type{width:150px;padding:10px;background-color:#d3d3d35c;color:#000;text-align:center;border-radius:5px;margin:0 5px;cursor:pointer}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.add-address{color:#0267c1;cursor:pointer;font-weight:600}.address-active{background-color:#0267c1;color:#fff}.selected-address{border:2px solid #0267C1!important}\n"] }]
|
|
5647
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: RestService }, { type: i3.MatDialog }, { type: i2$3.Router }, { type: StorageServiceService }, { type: undefined, decorators: [{
|
|
5648
|
+
type: Optional
|
|
5649
|
+
}, {
|
|
5650
|
+
type: Inject,
|
|
5651
|
+
args: [MAT_DIALOG_DATA]
|
|
5652
|
+
}] }, { type: i3.MatDialogRef, decorators: [{
|
|
5653
|
+
type: Optional
|
|
5654
|
+
}] }], propDecorators: { responseData: [{
|
|
5652
5655
|
type: Input
|
|
5653
5656
|
}], data: [{
|
|
5654
5657
|
type: Input
|
|
5655
|
-
}], selectedAddress: [{
|
|
5656
|
-
type: Input
|
|
5657
5658
|
}], isCart: [{
|
|
5658
5659
|
type: Input
|
|
5659
5660
|
}] } });
|
|
@@ -5865,7 +5866,8 @@ class CartComponent extends BaseSection {
|
|
|
5865
5866
|
}
|
|
5866
5867
|
const userDetail = this.storageService.getUser();
|
|
5867
5868
|
console.log("User Details", userDetail);
|
|
5868
|
-
|
|
5869
|
+
console.log("Index : ", this.selectedAddress?.selectedAddressIdx);
|
|
5870
|
+
const address = userDetail?.addressDetailsList[this.selectedAddress?.selectedAddressIdx >= 0 ? this.selectedAddress?.selectedAddressIdx : 0];
|
|
5869
5871
|
const payload = {
|
|
5870
5872
|
"userId": userDetail.userId,
|
|
5871
5873
|
"cartId": localStorage.getItem('cartId'),
|
|
@@ -5888,7 +5890,7 @@ class CartComponent extends BaseSection {
|
|
|
5888
5890
|
return this.userDetails ? [...this.userDetails?.addressDetailsList] : [];
|
|
5889
5891
|
}
|
|
5890
5892
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartComponent, deps: [{ token: EventsService }, { token: CartService }, { token: i2$3.Router }, { token: RestService }, { token: i3.MatDialog }, { token: StorageServiceService }, { token: i2$2.CookieService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5891
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: CartComponent, isStandalone: true, selector: "simpo-cart", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" >\r\n <div class=\"d-flex align-items-center justify-content-center mb-4\" style=\"margin-top: 50px;\" *ngIf=\"responseData?.orderedItems?.length\">\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'BAG'}\" (click)=\"currentTab = 'BAG'\">Bag</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'ADDRESS'}\" (click)=\"currentTab = 'ADDRESS'\">Address</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'PAYMENT'}\" style=\"cursor: auto;\">Payment</span>\r\n </div>\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <ng-container [ngSwitch]=\"currentTab\">\r\n <div class=\"left-panel\" *ngSwitchCase=\"'BAG'\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <ng-container *ngIf=\"!isItemLoading(item.itemId)\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"isItemLoading(item.itemId)\">\r\n <div class=\"d-flex\"> <i class=\"fa fa-spinner fa-spin\" style=\"font-size:24px; margin-right: 10px;\"></i> <span>Loading...</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'ADDRESS'\">\r\n <simpo-address [isCart]=\"true\" [responseData]=\"getAddressList\" [selectedAddress]=\"selectedAddress\"></simpo-address>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'PAYMENT'\"></div>\r\n </ng-container>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalNetValue ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalTax ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{(responseData?.totalAmount ?? 0)}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <ng-container *ngIf=\"currentTab == 'BAG'\">\r\n <div class=\"btn\" (click)=\"proceedToCheckout()\">Checkout Cart</div>\r\n <div class=\"btn\" (click)=\"proceedToListPage()\">Continue Shopping</div>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"currentTab == 'ADDRESS'\">\r\n <div class=\"btn\" (click)=\"proceedToPayment()\">Place Order</div>\r\n </ng-container>\r\n <!-- <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.timeline{cursor:pointer}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.isActive{color:#0267c1;font-weight:600}.bar{width:150px;border-top:2px solid lightgray;margin:0 5px}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;min-width:90px;max-width:fit-content;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important;border:1px solid lightgray}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.label{color:#000}.total-container{min-height:80vh;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "component", type: DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "component", type: i9.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "component", type: AddressComponent, selector: "simpo-address", inputs: ["responseData", "data", "selectedAddress", "isCart"] }] }); }
|
|
5893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: CartComponent, isStandalone: true, selector: "simpo-cart", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" >\r\n <div class=\"d-flex align-items-center justify-content-center mb-4\" style=\"margin-top: 50px;\" *ngIf=\"responseData?.orderedItems?.length\">\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'BAG'}\" (click)=\"currentTab = 'BAG'\">Bag</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'ADDRESS'}\" (click)=\"currentTab = 'ADDRESS'\">Address</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'PAYMENT'}\" style=\"cursor: auto;\">Payment</span>\r\n </div>\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <ng-container [ngSwitch]=\"currentTab\">\r\n <div class=\"left-panel\" *ngSwitchCase=\"'BAG'\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <ng-container *ngIf=\"!isItemLoading(item.itemId)\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"isItemLoading(item.itemId)\">\r\n <div class=\"d-flex\"> <i class=\"fa fa-spinner fa-spin\" style=\"font-size:24px; margin-right: 10px;\"></i> <span>Loading...</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'ADDRESS'\">\r\n <simpo-address [isCart]=\"true\" [responseData]=\"getAddressList\"></simpo-address>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'PAYMENT'\"></div>\r\n </ng-container>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalNetValue ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalTax ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{(responseData?.totalAmount ?? 0)}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <ng-container *ngIf=\"currentTab == 'BAG'\">\r\n <div class=\"btn\" (click)=\"proceedToCheckout()\">Checkout Cart</div>\r\n <div class=\"btn\" (click)=\"proceedToListPage()\">Continue Shopping</div>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"currentTab == 'ADDRESS'\">\r\n <div class=\"btn\" (click)=\"proceedToPayment()\">Place Order</div>\r\n </ng-container>\r\n <!-- <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.timeline{cursor:pointer}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.isActive{color:#0267c1;font-weight:600}.bar{width:150px;border-top:2px solid lightgray;margin:0 5px}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;min-width:90px;max-width:fit-content;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important;border:1px solid lightgray}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.label{color:#000}.total-container{min-height:80vh;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "component", type: DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "component", type: i9.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "component", type: AddressComponent, selector: "simpo-address", inputs: ["responseData", "data", "isCart"] }] }); }
|
|
5892
5894
|
}
|
|
5893
5895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartComponent, decorators: [{
|
|
5894
5896
|
type: Component,
|
|
@@ -5904,7 +5906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
5904
5906
|
ContentFitDirective,
|
|
5905
5907
|
HoverDirective,
|
|
5906
5908
|
AddressComponent,
|
|
5907
|
-
], template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" >\r\n <div class=\"d-flex align-items-center justify-content-center mb-4\" style=\"margin-top: 50px;\" *ngIf=\"responseData?.orderedItems?.length\">\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'BAG'}\" (click)=\"currentTab = 'BAG'\">Bag</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'ADDRESS'}\" (click)=\"currentTab = 'ADDRESS'\">Address</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'PAYMENT'}\" style=\"cursor: auto;\">Payment</span>\r\n </div>\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <ng-container [ngSwitch]=\"currentTab\">\r\n <div class=\"left-panel\" *ngSwitchCase=\"'BAG'\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <ng-container *ngIf=\"!isItemLoading(item.itemId)\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"isItemLoading(item.itemId)\">\r\n <div class=\"d-flex\"> <i class=\"fa fa-spinner fa-spin\" style=\"font-size:24px; margin-right: 10px;\"></i> <span>Loading...</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'ADDRESS'\">\r\n <simpo-address [isCart]=\"true\" [responseData]=\"getAddressList\" [selectedAddress]=\"selectedAddress\"></simpo-address>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'PAYMENT'\"></div>\r\n </ng-container>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalNetValue ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalTax ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{(responseData?.totalAmount ?? 0)}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <ng-container *ngIf=\"currentTab == 'BAG'\">\r\n <div class=\"btn\" (click)=\"proceedToCheckout()\">Checkout Cart</div>\r\n <div class=\"btn\" (click)=\"proceedToListPage()\">Continue Shopping</div>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"currentTab == 'ADDRESS'\">\r\n <div class=\"btn\" (click)=\"proceedToPayment()\">Place Order</div>\r\n </ng-container>\r\n <!-- <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.timeline{cursor:pointer}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.isActive{color:#0267c1;font-weight:600}.bar{width:150px;border-top:2px solid lightgray;margin:0 5px}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;min-width:90px;max-width:fit-content;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important;border:1px solid lightgray}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.label{color:#000}.total-container{min-height:80vh;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"] }]
|
|
5909
|
+
], template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" >\r\n <div class=\"d-flex align-items-center justify-content-center mb-4\" style=\"margin-top: 50px;\" *ngIf=\"responseData?.orderedItems?.length\">\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'BAG'}\" (click)=\"currentTab = 'BAG'\">Bag</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'ADDRESS'}\" (click)=\"currentTab = 'ADDRESS'\">Address</span>\r\n <div class=\"bar\"></div>\r\n <span class=\"timeline\" [ngClass]=\"{'isActive': currentTab == 'PAYMENT'}\" style=\"cursor: auto;\">Payment</span>\r\n </div>\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <ng-container [ngSwitch]=\"currentTab\">\r\n <div class=\"left-panel\" *ngSwitchCase=\"'BAG'\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <ng-container *ngIf=\"!isItemLoading(item.itemId)\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"isItemLoading(item.itemId)\">\r\n <div class=\"d-flex\"> <i class=\"fa fa-spinner fa-spin\" style=\"font-size:24px; margin-right: 10px;\"></i> <span>Loading...</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'ADDRESS'\">\r\n <simpo-address [isCart]=\"true\" [responseData]=\"getAddressList\"></simpo-address>\r\n </div>\r\n <div class=\"left-panel\" *ngSwitchCase=\"'PAYMENT'\"></div>\r\n </ng-container>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalNetValue ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{(responseData?.billdetails?.totalTax ?? 0)}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{(responseData?.totalAmount ?? 0)}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <ng-container *ngIf=\"currentTab == 'BAG'\">\r\n <div class=\"btn\" (click)=\"proceedToCheckout()\">Checkout Cart</div>\r\n <div class=\"btn\" (click)=\"proceedToListPage()\">Continue Shopping</div>\r\n </ng-container>\r\n \r\n <ng-container *ngIf=\"currentTab == 'ADDRESS'\">\r\n <div class=\"btn\" (click)=\"proceedToPayment()\">Place Order</div>\r\n </ng-container>\r\n <!-- <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.timeline{cursor:pointer}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.isActive{color:#0267c1;font-weight:600}.bar{width:150px;border-top:2px solid lightgray;margin:0 5px}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;min-width:90px;max-width:fit-content;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important;border:1px solid lightgray}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.label{color:#000}.total-container{min-height:80vh;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"] }]
|
|
5908
5910
|
}], ctorParameters: () => [{ type: EventsService }, { type: CartService }, { type: i2$3.Router }, { type: RestService }, { type: i3.MatDialog }, { type: StorageServiceService }, { type: i2$2.CookieService }], propDecorators: { data: [{
|
|
5909
5911
|
type: Input
|
|
5910
5912
|
}], responseData: [{
|
|
@@ -6093,10 +6095,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
6093
6095
|
}] } });
|
|
6094
6096
|
|
|
6095
6097
|
class UserProfileComponent {
|
|
6096
|
-
constructor(router, _eventService, restService) {
|
|
6098
|
+
constructor(router, _eventService, restService, storageService, matDialog) {
|
|
6097
6099
|
this.router = router;
|
|
6098
6100
|
this._eventService = _eventService;
|
|
6099
6101
|
this.restService = restService;
|
|
6102
|
+
this.storageService = storageService;
|
|
6103
|
+
this.matDialog = matDialog;
|
|
6100
6104
|
this.isLoading = true;
|
|
6101
6105
|
this.selectedSidePanelTab = "Orders";
|
|
6102
6106
|
this.userDetails = null;
|
|
@@ -6112,7 +6116,7 @@ class UserProfileComponent {
|
|
|
6112
6116
|
}
|
|
6113
6117
|
ngOnInit() {
|
|
6114
6118
|
// if (this.responseData?.userDetails) {
|
|
6115
|
-
this.userDetails =
|
|
6119
|
+
this.userDetails = this.storageService.getUser();
|
|
6116
6120
|
// this.tabs = this.responseData.tabs;
|
|
6117
6121
|
// this.orderList = this.responseData.orders;
|
|
6118
6122
|
// }
|
|
@@ -6122,6 +6126,11 @@ class UserProfileComponent {
|
|
|
6122
6126
|
});
|
|
6123
6127
|
// this.getUserInfo();
|
|
6124
6128
|
}
|
|
6129
|
+
getUserInfo() {
|
|
6130
|
+
this.restService.getUserInfo("ada107e9-a38b-46b4-b065-b7f060c3fa15").subscribe((response) => {
|
|
6131
|
+
this.userDetails = response.data;
|
|
6132
|
+
});
|
|
6133
|
+
}
|
|
6125
6134
|
goToPanel(panel) {
|
|
6126
6135
|
this.selectedSidePanelTab = panel.value;
|
|
6127
6136
|
}
|
|
@@ -6135,6 +6144,16 @@ class UserProfileComponent {
|
|
|
6135
6144
|
}
|
|
6136
6145
|
goToDetails(order) {
|
|
6137
6146
|
}
|
|
6147
|
+
addNewAddress() {
|
|
6148
|
+
this.matDialog.open(AddressComponent, {
|
|
6149
|
+
height: 'fit-content',
|
|
6150
|
+
width: '35vw',
|
|
6151
|
+
data: { addressList: this.userDetails?.addressDetailsList }
|
|
6152
|
+
}).afterClosed().subscribe((response) => {
|
|
6153
|
+
if (response)
|
|
6154
|
+
this.userDetails?.addressDetailsList.push(response);
|
|
6155
|
+
});
|
|
6156
|
+
}
|
|
6138
6157
|
goToHome() {
|
|
6139
6158
|
this.router.navigate(['/']);
|
|
6140
6159
|
}
|
|
@@ -6151,8 +6170,11 @@ class UserProfileComponent {
|
|
|
6151
6170
|
get isMobile() {
|
|
6152
6171
|
return window.innerWidth <= 475;
|
|
6153
6172
|
}
|
|
6154
|
-
|
|
6155
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: UserProfileComponent, isStandalone: true, selector: "simpo-user-profile", inputs: { responseData: "responseData", data: "data", index: "index", edit: "edit", delete: "delete" }, ngImport: i0, template: "<section *ngIf=\"!isLoading\" class=\"d-flex\" style=\"width: 85%; margin: auto; margin-top: 1rem\" [style.width.%]=\"isMobile ? '90' : ''\">\r\n <ng-container *ngIf=\"!isMobile\">\r\n <div class=\"p-3\" style=\"background-color: #F8F8F8; width: 25%; border-radius: 10px; height: fit-content;\">\r\n <div class=\"d-flex align-items-center\" style=\"gap: 5px; height: 70px;\">\r\n <img [src]=\"getUserDetails ?? ''\" alt=\"\" class=\"rounded-circle h-100\" style=\"width: 70px;\">\r\n <div>\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </div>\r\n <div class=\"tabs\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"toggleSidepanelTab(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"orders-sec\">\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isMobile\">\r\n <div class=\"w-100 position-relative\" style=\"height: 80vh;\">\r\n <div class=\"d-flex align-items-center mobileAccountHeader\" style=\"gap: 10px; height: 50px;\">\r\n <mat-icon style=\"cursor: pointer; display: flex; align-items: center;\" (click)=\"goBack()\">keyboard_backspace</mat-icon>\r\n <h4>My {{!selectedSidePanelTab?.length ? 'Account' : selectedSidePanelTab?.replaceAll('_', ' ')}}</h4>\r\n </div>\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"''\">\r\n <section class=\"top-sec\">\r\n <img [src]=\"getUserDetails\" alt=\"\" class=\"rounded-circle\" style=\"width: 50px; height: 50px;\">\r\n <div class=\"d-flex flex-column align-items-center\">\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </section>\r\n <section class=\"list-sec\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"goToPanel(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </section>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Orders_Details'\">\r\n <ng-container *ngTemplateOutlet=\"OrderDetails\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</section>\r\n\r\n<ng-template #OrderSection>\r\n <h1 class=\"onlyDesktop\">My Orders</h1>\r\n <div class=\"d-flex my-3 orderlist\">\r\n <ng-container *ngFor=\"let tab of tabs\">\r\n <div class=\"filter-tab\" [ngClass]=\"{'filter-tab-selected': tab.status}\" (click)=\"selectTab(tab)\">{{tab.value}}</div>\r\n </ng-container>\r\n </div>\r\n <div class=\"order-list\">\r\n <div class=\"order\" *ngFor=\"let order of orderList\">\r\n <ng-container *ngTemplateOutlet=\"OrderCard; context: {data: order}\"></ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<ng-template #OrderDetails>\r\n <simpo-order-details></simpo-order-details>\r\n</ng-template>\r\n<ng-template #AddressSection>\r\n <div class=\"d-flex justify-content-between mb-2 onlyDesktop\">\r\n <h1>My Address</h1>\r\n <button class=\"address-btn\">{{button?.content?.label}}</button>\r\n </div>\r\n <div class=\"address-list\">\r\n <ng-container *ngFor=\"let address of addressList\">\r\n <div class=\"address\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address.name}}</span>\r\n <span class=\"address-type\">{{address.type}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.address}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.phone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #AccountsSection>\r\n <h1 class=\"onlyDesktop\">My Accounts</h1>\r\n</ng-template>\r\n<ng-template #LogoutSection>\r\n <h1 class=\"onlyDesktop\">Logout</h1>\r\n</ng-template>\r\n<ng-template #OrderCard let-order=\"data\">\r\n <div (click)=\"selectedSidePanelTab = 'Orders_Details'\">\r\n <div class=\"top\">\r\n <span class=\"text-muted font-weight-normal\">{{order.displayId}}</span>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </div>\r\n <div class=\"middle my-2\">\r\n <span>{{order.date | date}}</span>\r\n <span class=\"text-dark font-weight-bold\">{{order.store | titlecase}}</span>\r\n </div>\r\n <hr />\r\n <div class=\"bottom\">\r\n <span class=\"text-muted font-weight-normal\">Amount: <span class=\"text-dark\">{{ order.amount }}</span></span>\r\n <span class=\"text-muted font-weight-normal\">{{ order.status }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n }\">\r\n </ngx-skeleton-loader>", styles: [".mat-icon{font-size:18px;height:100%}div{font-size:16px}h6{font-size:14px}.tab-selected div{color:#000!important;font-weight:600!important}.filter-tab{background-color:#d3d3d3;color:#000;margin:0 5px 0 0;padding:5px;border-radius:5px;width:130px;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer}.filter-tab-selected{background-color:#000;color:#fff}.orders-sec{width:70%;margin-left:auto}.order{width:95%;border:1px solid lightgray;padding:15px;border-radius:5px;margin:10px 0;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.order :is(.top,.middle,.bottom){display:flex;align-items:center;justify-content:space-between}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.address-btn{width:200px!important;background-color:#0267c1;color:#fff;border-radius:3px;border:none}.profileDet{display:flex;flex-direction:column}@media screen and (max-width: 475px){.onlyDesktop{display:none}.top-sec{display:flex;flex-direction:column;align-items:center;margin:auto;background-color:#d3d3d3;width:100%;border-radius:5px}.top-sec img{position:relative;top:-20px}.top-sec>div{position:relative;top:-10px}.list-sec{border:1.5px solid lightgray;padding:10px;border-radius:10px;margin-top:10px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.filter-tab{min-width:150px!important}.orderlist{overflow-x:auto!important}}.mobileAccountHeader{box-shadow:0 1px 1px #0000,0 1px 1px #00000030;padding:10px;width:100vw;margin-bottom:40px;margin-left:-5%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: i9.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "component", type: OrderDetailsComponent, selector: "simpo-order-details", inputs: ["responseData", "data", "index", "edit", "delete"] }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }] }); }
|
|
6173
|
+
get getUserProfile() {
|
|
6174
|
+
return this.userDetails?.profilePic ? this.userDetails.profilePic : (this.userDetails?.gender == "MALE" ? 'https://img.icons8.com/?size=100&id=108296&format=png&color=000000' : 'https://img.icons8.com/?size=100&id=108295&format=png&color=000000assets/female-icon.svg');
|
|
6175
|
+
}
|
|
6176
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserProfileComponent, deps: [{ token: i2$3.Router }, { token: EventsService }, { token: RestService }, { token: StorageServiceService }, { token: i3.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6177
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: UserProfileComponent, isStandalone: true, selector: "simpo-user-profile", inputs: { responseData: "responseData", data: "data", index: "index", edit: "edit", delete: "delete" }, ngImport: i0, template: "<section *ngIf=\"!isLoading\" class=\"d-flex\" style=\"margin: auto; margin-top: 1rem\" [style.width.%]=\"isMobile ? '90' : '85'\">\r\n <ng-container *ngIf=\"!isMobile\">\r\n <div class=\"p-3\" style=\"background-color: #F8F8F8; width: 25%; border-radius: 10px; height: fit-content;\">\r\n <div class=\"d-flex align-items-center\" style=\"gap: 5px; height: 70px;\">\r\n <img [src]=\"getUserProfile\" alt=\"\" class=\"rounded-circle h-100\" style=\"width: 70px;\">\r\n <div>\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </div>\r\n <div class=\"tabs\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"toggleSidepanelTab(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"orders-sec\">\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isMobile\">\r\n <div class=\"w-100 position-relative\" style=\"height: 80vh;\">\r\n <div class=\"d-flex align-items-center mobileAccountHeader\" style=\"gap: 10px; height: 50px;\">\r\n <mat-icon style=\"cursor: pointer; display: flex; align-items: center;\" (click)=\"goBack()\">keyboard_backspace</mat-icon>\r\n <h4>My {{!selectedSidePanelTab?.length ? 'Account' : selectedSidePanelTab?.replaceAll('_', ' ')}}</h4>\r\n </div>\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"''\">\r\n <section class=\"top-sec\">\r\n <img [src]=\"getUserDetails\" alt=\"\" class=\"rounded-circle\" style=\"width: 50px; height: 50px;\">\r\n <div class=\"d-flex flex-column align-items-center\">\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </section>\r\n <section class=\"list-sec\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"goToPanel(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </section>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Orders_Details'\">\r\n <ng-container *ngTemplateOutlet=\"OrderDetails\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</section>\r\n\r\n<ng-template #OrderSection>\r\n <h1 class=\"onlyDesktop\">My Orders</h1>\r\n <div class=\"d-flex my-3 orderlist\">\r\n <ng-container *ngFor=\"let tab of tabs\">\r\n <div class=\"filter-tab\" [ngClass]=\"{'filter-tab-selected': tab.status}\" (click)=\"selectTab(tab)\">{{tab.value}}</div>\r\n </ng-container>\r\n </div>\r\n <div class=\"order-list\">\r\n <ng-container *ngIf=\"orderList?.length; else showEmptyScreen\">\r\n <div class=\"order\" *ngFor=\"let order of orderList\">\r\n <ng-container *ngTemplateOutlet=\"OrderCard; context: {data: order}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-template #showEmptyScreen>\r\n <section class=\"empty-cart\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your Order list is empty\r\n </div>\r\n <div class=\"description d-flex justify-content-center\">\r\n Looks like you have not ordered anything to from us. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </ng-template>\r\n </div>\r\n</ng-template>\r\n<ng-template #OrderDetails>\r\n <simpo-order-details></simpo-order-details>\r\n</ng-template>\r\n<ng-template #AddressSection>\r\n <div class=\"d-flex justify-content-between mb-2 onlyDesktop\">\r\n <h1>My Address</h1>\r\n <button class=\"address-btn\" (click)=\"addNewAddress()\">{{button?.content?.label}}</button>\r\n </div>\r\n <div class=\"address-list\">\r\n <ng-container *ngFor=\"let address of userDetails?.addressDetailsList\">\r\n <div class=\"address\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address.receiverName}}</span>\r\n <span class=\"address-type\">{{address.addressType}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.addressLine1}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.receiverPhone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #AccountsSection>\r\n <h1 class=\"onlyDesktop\">My Accounts</h1>\r\n</ng-template>\r\n<ng-template #LogoutSection>\r\n <h1 class=\"onlyDesktop\">Logout</h1>\r\n</ng-template>\r\n<ng-template #OrderCard let-order=\"data\">\r\n <div (click)=\"selectedSidePanelTab = 'Orders_Details'\">\r\n <div class=\"top\">\r\n <span class=\"text-muted font-weight-normal\">{{order.displayId}}</span>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </div>\r\n <div class=\"middle my-2\">\r\n <span>{{order.date | date}}</span>\r\n <span class=\"text-dark font-weight-bold\">{{order.store | titlecase}}</span>\r\n </div>\r\n <hr />\r\n <div class=\"bottom\">\r\n <span class=\"text-muted font-weight-normal\">Amount: <span class=\"text-dark\">{{ order.amount }}</span></span>\r\n <span class=\"text-muted font-weight-normal\">{{ order.status }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n }\">\r\n </ngx-skeleton-loader>", styles: [".mat-icon{font-size:18px;height:100%}div{font-size:16px}h6{font-size:14px}.tab-selected div{color:#000!important;font-weight:600!important}.filter-tab{background-color:#d3d3d3;color:#000;margin:0 5px 0 0;padding:5px;border-radius:5px;width:130px;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer}.filter-tab-selected{background-color:#000;color:#fff}.orders-sec{width:70%;margin-left:auto}.order{width:95%;border:1px solid lightgray;padding:15px;border-radius:5px;margin:10px 0;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.order :is(.top,.middle,.bottom){display:flex;align-items:center;justify-content:space-between}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.address-btn{width:160px!important;background-color:#0267c1;color:#fff;border-radius:3px;border:none;font-size:14px!important;height:fit-content;padding:10px}.profileDet{display:flex;flex-direction:column}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}@media screen and (max-width: 475px){.onlyDesktop{display:none}.top-sec{display:flex;flex-direction:column;align-items:center;margin:auto;background-color:#d3d3d3;width:100%;border-radius:5px}.top-sec img{position:relative;top:-20px}.top-sec>div{position:relative;top:-10px}.list-sec{border:1.5px solid lightgray;padding:10px;border-radius:10px;margin-top:10px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.filter-tab{min-width:150px!important}.orderlist{overflow-x:auto!important}}.mobileAccountHeader{box-shadow:0 1px 1px #0000,0 1px 1px #00000030;padding:10px;width:100vw;margin-bottom:40px;margin-left:-5%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: i9.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "component", type: OrderDetailsComponent, selector: "simpo-order-details", inputs: ["responseData", "data", "index", "edit", "delete"] }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }] }); }
|
|
6156
6178
|
}
|
|
6157
6179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserProfileComponent, decorators: [{
|
|
6158
6180
|
type: Component,
|
|
@@ -6166,8 +6188,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
6166
6188
|
HoverDirective,
|
|
6167
6189
|
OrderDetailsComponent,
|
|
6168
6190
|
NgxSkeletonLoaderModule
|
|
6169
|
-
], template: "<section *ngIf=\"!isLoading\" class=\"d-flex\" style=\"width: 85%; margin: auto; margin-top: 1rem\" [style.width.%]=\"isMobile ? '90' : ''\">\r\n <ng-container *ngIf=\"!isMobile\">\r\n <div class=\"p-3\" style=\"background-color: #F8F8F8; width: 25%; border-radius: 10px; height: fit-content;\">\r\n <div class=\"d-flex align-items-center\" style=\"gap: 5px; height: 70px;\">\r\n <img [src]=\"getUserDetails ?? ''\" alt=\"\" class=\"rounded-circle h-100\" style=\"width: 70px;\">\r\n <div>\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </div>\r\n <div class=\"tabs\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"toggleSidepanelTab(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"orders-sec\">\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isMobile\">\r\n <div class=\"w-100 position-relative\" style=\"height: 80vh;\">\r\n <div class=\"d-flex align-items-center mobileAccountHeader\" style=\"gap: 10px; height: 50px;\">\r\n <mat-icon style=\"cursor: pointer; display: flex; align-items: center;\" (click)=\"goBack()\">keyboard_backspace</mat-icon>\r\n <h4>My {{!selectedSidePanelTab?.length ? 'Account' : selectedSidePanelTab?.replaceAll('_', ' ')}}</h4>\r\n </div>\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"''\">\r\n <section class=\"top-sec\">\r\n <img [src]=\"getUserDetails\" alt=\"\" class=\"rounded-circle\" style=\"width: 50px; height: 50px;\">\r\n <div class=\"d-flex flex-column align-items-center\">\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </section>\r\n <section class=\"list-sec\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"goToPanel(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </section>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Orders_Details'\">\r\n <ng-container *ngTemplateOutlet=\"OrderDetails\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</section>\r\n\r\n<ng-template #OrderSection>\r\n <h1 class=\"onlyDesktop\">My Orders</h1>\r\n <div class=\"d-flex my-3 orderlist\">\r\n <ng-container *ngFor=\"let tab of tabs\">\r\n <div class=\"filter-tab\" [ngClass]=\"{'filter-tab-selected': tab.status}\" (click)=\"selectTab(tab)\">{{tab.value}}</div>\r\n </ng-container>\r\n </div>\r\n <div class=\"order-list\">\r\n <div class=\"order\" *ngFor=\"let order of orderList\">\r\n <ng-container *ngTemplateOutlet=\"OrderCard; context: {data: order}\"></ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<ng-template #OrderDetails>\r\n <simpo-order-details></simpo-order-details>\r\n</ng-template>\r\n<ng-template #AddressSection>\r\n <div class=\"d-flex justify-content-between mb-2 onlyDesktop\">\r\n <h1>My Address</h1>\r\n <button class=\"address-btn\">{{button?.content?.label}}</button>\r\n </div>\r\n <div class=\"address-list\">\r\n <ng-container *ngFor=\"let address of addressList\">\r\n <div class=\"address\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address.name}}</span>\r\n <span class=\"address-type\">{{address.type}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.address}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.phone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #AccountsSection>\r\n <h1 class=\"onlyDesktop\">My Accounts</h1>\r\n</ng-template>\r\n<ng-template #LogoutSection>\r\n <h1 class=\"onlyDesktop\">Logout</h1>\r\n</ng-template>\r\n<ng-template #OrderCard let-order=\"data\">\r\n <div (click)=\"selectedSidePanelTab = 'Orders_Details'\">\r\n <div class=\"top\">\r\n <span class=\"text-muted font-weight-normal\">{{order.displayId}}</span>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </div>\r\n <div class=\"middle my-2\">\r\n <span>{{order.date | date}}</span>\r\n <span class=\"text-dark font-weight-bold\">{{order.store | titlecase}}</span>\r\n </div>\r\n <hr />\r\n <div class=\"bottom\">\r\n <span class=\"text-muted font-weight-normal\">Amount: <span class=\"text-dark\">{{ order.amount }}</span></span>\r\n <span class=\"text-muted font-weight-normal\">{{ order.status }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n }\">\r\n </ngx-skeleton-loader>", styles: [".mat-icon{font-size:18px;height:100%}div{font-size:16px}h6{font-size:14px}.tab-selected div{color:#000!important;font-weight:600!important}.filter-tab{background-color:#d3d3d3;color:#000;margin:0 5px 0 0;padding:5px;border-radius:5px;width:130px;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer}.filter-tab-selected{background-color:#000;color:#fff}.orders-sec{width:70%;margin-left:auto}.order{width:95%;border:1px solid lightgray;padding:15px;border-radius:5px;margin:10px 0;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.order :is(.top,.middle,.bottom){display:flex;align-items:center;justify-content:space-between}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.address-btn{width:200px!important;background-color:#0267c1;color:#fff;border-radius:3px;border:none}.profileDet{display:flex;flex-direction:column}@media screen and (max-width: 475px){.onlyDesktop{display:none}.top-sec{display:flex;flex-direction:column;align-items:center;margin:auto;background-color:#d3d3d3;width:100%;border-radius:5px}.top-sec img{position:relative;top:-20px}.top-sec>div{position:relative;top:-10px}.list-sec{border:1.5px solid lightgray;padding:10px;border-radius:10px;margin-top:10px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.filter-tab{min-width:150px!important}.orderlist{overflow-x:auto!important}}.mobileAccountHeader{box-shadow:0 1px 1px #0000,0 1px 1px #00000030;padding:10px;width:100vw;margin-bottom:40px;margin-left:-5%}\n"] }]
|
|
6170
|
-
}], ctorParameters: () => [{ type: i2$3.Router }, { type: EventsService }, { type: RestService }], propDecorators: { responseData: [{
|
|
6191
|
+
], template: "<section *ngIf=\"!isLoading\" class=\"d-flex\" style=\"margin: auto; margin-top: 1rem\" [style.width.%]=\"isMobile ? '90' : '85'\">\r\n <ng-container *ngIf=\"!isMobile\">\r\n <div class=\"p-3\" style=\"background-color: #F8F8F8; width: 25%; border-radius: 10px; height: fit-content;\">\r\n <div class=\"d-flex align-items-center\" style=\"gap: 5px; height: 70px;\">\r\n <img [src]=\"getUserProfile\" alt=\"\" class=\"rounded-circle h-100\" style=\"width: 70px;\">\r\n <div>\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </div>\r\n <div class=\"tabs\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"toggleSidepanelTab(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"orders-sec\">\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isMobile\">\r\n <div class=\"w-100 position-relative\" style=\"height: 80vh;\">\r\n <div class=\"d-flex align-items-center mobileAccountHeader\" style=\"gap: 10px; height: 50px;\">\r\n <mat-icon style=\"cursor: pointer; display: flex; align-items: center;\" (click)=\"goBack()\">keyboard_backspace</mat-icon>\r\n <h4>My {{!selectedSidePanelTab?.length ? 'Account' : selectedSidePanelTab?.replaceAll('_', ' ')}}</h4>\r\n </div>\r\n <ng-container [ngSwitch]=\"selectedSidePanelTab\">\r\n <ng-container *ngSwitchCase=\"''\">\r\n <section class=\"top-sec\">\r\n <img [src]=\"getUserDetails\" alt=\"\" class=\"rounded-circle\" style=\"width: 50px; height: 50px;\">\r\n <div class=\"d-flex flex-column align-items-center\">\r\n <h4 class=\"text-dark font-weight-bold\">{{getUserDetails?.contact?.name}}</h4>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>stay_primary_portrait</mat-icon> <span>{{getUserDetails?.contact?.mobile}}</span></h6>\r\n <h6 class=\"text-muted d-flex align-items-center font-weight-normal\"><mat-icon>mail_outline</mat-icon> <span>{{getUserDetails?.contact?.email}}</span></h6>\r\n </div>\r\n </section>\r\n <section class=\"list-sec\">\r\n <ng-container *ngFor=\"let tab of sidePanelList; let idx = index\">\r\n <div class=\"d-flex align-items-center py-3\" style=\"gap: 5px; cursor: pointer;\" [style.borderBottom]=\"idx != (sidePanelList.length -1) ? '2px solid #cccccc4d' : ''\" [ngClass]=\"{'tab-selected': tab.status}\" (click)=\"goToPanel(tab)\">\r\n <mat-icon>{{tab.icon}}</mat-icon>\r\n <div class=\"tab text-muted font-weight-normal\">{{tab.value}}</div>\r\n </div>\r\n </ng-container>\r\n </section>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'Orders'\">\r\n <ng-container *ngTemplateOutlet=\"OrderSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Address'\">\r\n <ng-container *ngTemplateOutlet=\"AddressSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Account Details'\">\r\n <ng-container *ngTemplateOutlet=\"AccountsSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Logout'\">\r\n <ng-container *ngTemplateOutlet=\"LogoutSection\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'Orders_Details'\">\r\n <ng-container *ngTemplateOutlet=\"OrderDetails\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</section>\r\n\r\n<ng-template #OrderSection>\r\n <h1 class=\"onlyDesktop\">My Orders</h1>\r\n <div class=\"d-flex my-3 orderlist\">\r\n <ng-container *ngFor=\"let tab of tabs\">\r\n <div class=\"filter-tab\" [ngClass]=\"{'filter-tab-selected': tab.status}\" (click)=\"selectTab(tab)\">{{tab.value}}</div>\r\n </ng-container>\r\n </div>\r\n <div class=\"order-list\">\r\n <ng-container *ngIf=\"orderList?.length; else showEmptyScreen\">\r\n <div class=\"order\" *ngFor=\"let order of orderList\">\r\n <ng-container *ngTemplateOutlet=\"OrderCard; context: {data: order}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-template #showEmptyScreen>\r\n <section class=\"empty-cart\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your Order list is empty\r\n </div>\r\n <div class=\"description d-flex justify-content-center\">\r\n Looks like you have not ordered anything to from us. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </ng-template>\r\n </div>\r\n</ng-template>\r\n<ng-template #OrderDetails>\r\n <simpo-order-details></simpo-order-details>\r\n</ng-template>\r\n<ng-template #AddressSection>\r\n <div class=\"d-flex justify-content-between mb-2 onlyDesktop\">\r\n <h1>My Address</h1>\r\n <button class=\"address-btn\" (click)=\"addNewAddress()\">{{button?.content?.label}}</button>\r\n </div>\r\n <div class=\"address-list\">\r\n <ng-container *ngFor=\"let address of userDetails?.addressDetailsList\">\r\n <div class=\"address\">\r\n <div class=\"address-left\">\r\n <div class=\"top\">\r\n <span class=\"fw-bold mr-2\">{{address.receiverName}}</span>\r\n <span class=\"address-type\">{{address.addressType}}</span>\r\n </div>\r\n <div class=\"address-det\">{{address.addressLine1}}</div>\r\n <div class=\"phone\">\r\n <span>Phone:</span>\r\n <span class=\"address-phone\">{{address.receiverPhone}}</span>\r\n </div>\r\n </div>\r\n <div class=\"address-right\"></div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #AccountsSection>\r\n <h1 class=\"onlyDesktop\">My Accounts</h1>\r\n</ng-template>\r\n<ng-template #LogoutSection>\r\n <h1 class=\"onlyDesktop\">Logout</h1>\r\n</ng-template>\r\n<ng-template #OrderCard let-order=\"data\">\r\n <div (click)=\"selectedSidePanelTab = 'Orders_Details'\">\r\n <div class=\"top\">\r\n <span class=\"text-muted font-weight-normal\">{{order.displayId}}</span>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </div>\r\n <div class=\"middle my-2\">\r\n <span>{{order.date | date}}</span>\r\n <span class=\"text-dark font-weight-bold\">{{order.store | titlecase}}</span>\r\n </div>\r\n <hr />\r\n <div class=\"bottom\">\r\n <span class=\"text-muted font-weight-normal\">Amount: <span class=\"text-dark\">{{ order.amount }}</span></span>\r\n <span class=\"text-muted font-weight-normal\">{{ order.status }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n }\">\r\n </ngx-skeleton-loader>", styles: [".mat-icon{font-size:18px;height:100%}div{font-size:16px}h6{font-size:14px}.tab-selected div{color:#000!important;font-weight:600!important}.filter-tab{background-color:#d3d3d3;color:#000;margin:0 5px 0 0;padding:5px;border-radius:5px;width:130px;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer}.filter-tab-selected{background-color:#000;color:#fff}.orders-sec{width:70%;margin-left:auto}.order{width:95%;border:1px solid lightgray;padding:15px;border-radius:5px;margin:10px 0;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.order :is(.top,.middle,.bottom){display:flex;align-items:center;justify-content:space-between}.address-list{display:flex;flex-direction:column;gap:10px}.address-list .address{display:flex;padding:15px;border-radius:5px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030;border:1px solid #d3d3d3b1}.address-list .address-left{width:80%}.address-list .address-right{width:20%}.address-list .address-phone{margin-left:10px}.address-list .address-type{background-color:#d3d3d34a;padding:5px 10px;text-align:center;border-radius:5px;margin-left:15px}.address-list .address-det{margin:10px 0}.address-btn{width:160px!important;background-color:#0267c1;color:#fff;border-radius:3px;border:none;font-size:14px!important;height:fit-content;padding:10px}.profileDet{display:flex;flex-direction:column}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}@media screen and (max-width: 475px){.onlyDesktop{display:none}.top-sec{display:flex;flex-direction:column;align-items:center;margin:auto;background-color:#d3d3d3;width:100%;border-radius:5px}.top-sec img{position:relative;top:-20px}.top-sec>div{position:relative;top:-10px}.list-sec{border:1.5px solid lightgray;padding:10px;border-radius:10px;margin-top:10px;box-shadow:0 1px 1px #0000,0 1px 1px #00000030}.filter-tab{min-width:150px!important}.orderlist{overflow-x:auto!important}}.mobileAccountHeader{box-shadow:0 1px 1px #0000,0 1px 1px #00000030;padding:10px;width:100vw;margin-bottom:40px;margin-left:-5%}\n"] }]
|
|
6192
|
+
}], ctorParameters: () => [{ type: i2$3.Router }, { type: EventsService }, { type: RestService }, { type: StorageServiceService }, { type: i3.MatDialog }], propDecorators: { responseData: [{
|
|
6171
6193
|
type: Input
|
|
6172
6194
|
}], data: [{
|
|
6173
6195
|
type: Input
|