simpo-component-library 1.4.26 → 1.4.29
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/cart/cart.component.mjs +4 -5
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +2 -3
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +10 -9
- package/esm2022/lib/services/cart.service.mjs +9 -14
- package/esm2022/lib/services/rest.service.mjs +4 -4
- package/esm2022/lib/services/storage.service.mjs +10 -5
- package/fesm2022/simpo-component-library.mjs +68 -70
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/background-directive.d.ts +1 -1
- package/lib/directive/button-directive.directive.d.ts +1 -1
- package/lib/directive/color.directive.d.ts +1 -1
- package/lib/sections/navbar-section/navbar-section.component.d.ts +3 -1
- package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
- package/lib/services/storage.service.d.ts +1 -1
- package/package.json +1 -1
- package/simpo-component-library-1.4.27.tgz +0 -0
- package/simpo-component-library-1.4.28.tgz +0 -0
- package/simpo-component-library-1.4.29.tgz +0 -0
|
@@ -19,7 +19,6 @@ import * as i2$4 from '@angular/material/snack-bar';
|
|
|
19
19
|
import * as i2$5 from 'ngx-skeleton-loader';
|
|
20
20
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
21
21
|
import * as mapboxgl from 'mapbox-gl';
|
|
22
|
-
import { v1 } from 'uuid';
|
|
23
22
|
import * as i8 from 'ngx-image-zoom';
|
|
24
23
|
import { NgxImageZoomModule } from 'ngx-image-zoom';
|
|
25
24
|
import * as i8$1 from '@angular/material/slider';
|
|
@@ -3128,15 +3127,15 @@ class RestService {
|
|
|
3128
3127
|
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
|
|
3129
3128
|
}
|
|
3130
3129
|
generateOTP(mobile, countryCode) {
|
|
3131
|
-
const businessId = localStorage.getItem("bId") ?? "";
|
|
3130
|
+
const businessId = localStorage.getItem("bId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3132
3131
|
return this.http.post(this.BASE_URL + `ecommerce/user/otp/trigger?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
3133
3132
|
}
|
|
3134
3133
|
verifyOTP(mobile, otp) {
|
|
3135
|
-
const businessId = localStorage.getItem("bId") ?? "";
|
|
3134
|
+
const businessId = localStorage.getItem("bId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3136
3135
|
return this.http.put(this.BASE_URL + `ecommerce/user/authenticate?mobile=${mobile}&otp=${otp}&businessId=${businessId}`, null);
|
|
3137
3136
|
}
|
|
3138
3137
|
resendOTP(mobile, countryCode) {
|
|
3139
|
-
const businessId = localStorage.getItem("bId") ?? "";
|
|
3138
|
+
const businessId = localStorage.getItem("bId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
3140
3139
|
return this.http.post(this.BASE_URL + `ecommerce/user/resend?mobile=${mobile}&countryCode=${countryCode}&businessId=${businessId}`, null);
|
|
3141
3140
|
}
|
|
3142
3141
|
addItemToDB(userCart) {
|
|
@@ -3232,6 +3231,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
3232
3231
|
], 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}.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"] }]
|
|
3233
3232
|
}], ctorParameters: () => [{ type: RestService }, { type: i2$2.Router }, { type: i3.MatDialogRef }] });
|
|
3234
3233
|
|
|
3234
|
+
var orderedItems = [
|
|
3235
|
+
];
|
|
3236
|
+
var cartType = "WISHLIST";
|
|
3237
|
+
var billdetails = {
|
|
3238
|
+
totalNetValue: 0,
|
|
3239
|
+
totalGrossValue: 0,
|
|
3240
|
+
totalTax: 0,
|
|
3241
|
+
totalOfferedValue: 0,
|
|
3242
|
+
deliveryCharges: 0,
|
|
3243
|
+
couponId: "",
|
|
3244
|
+
discountAmount: 0,
|
|
3245
|
+
afterDiscountAmount: 0,
|
|
3246
|
+
taxBreakup: {
|
|
3247
|
+
cgstValue: 0,
|
|
3248
|
+
sgstValue: 0,
|
|
3249
|
+
igstValue: 0
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
var locationDetails = {
|
|
3253
|
+
countryId: "",
|
|
3254
|
+
cityId: "",
|
|
3255
|
+
stateId: "",
|
|
3256
|
+
localityId: "",
|
|
3257
|
+
countryName: "",
|
|
3258
|
+
cityName: "",
|
|
3259
|
+
stateName: "",
|
|
3260
|
+
localityName: "",
|
|
3261
|
+
pinCode: ""
|
|
3262
|
+
};
|
|
3263
|
+
var platform = "WEB";
|
|
3264
|
+
var totalAmount = 0;
|
|
3265
|
+
var UserFavourite = {
|
|
3266
|
+
orderedItems: orderedItems,
|
|
3267
|
+
cartType: cartType,
|
|
3268
|
+
billdetails: billdetails,
|
|
3269
|
+
locationDetails: locationDetails,
|
|
3270
|
+
platform: platform,
|
|
3271
|
+
totalAmount: totalAmount
|
|
3272
|
+
};
|
|
3273
|
+
|
|
3235
3274
|
class StorageServiceService {
|
|
3236
3275
|
constructor(eventService, cookieService, restService) {
|
|
3237
3276
|
this.eventService = eventService;
|
|
@@ -3270,8 +3309,12 @@ class StorageServiceService {
|
|
|
3270
3309
|
this.eventService.showLoadingScreen.emit(true);
|
|
3271
3310
|
const request = await this.getUserCart();
|
|
3272
3311
|
request.onsuccess = async (response) => {
|
|
3273
|
-
this.eventService.showLoadingScreen.emit(false);
|
|
3274
3312
|
UserCart.orderedItems = await response.target.result;
|
|
3313
|
+
const favRequest = await this.getUserWhishlist();
|
|
3314
|
+
favRequest.onsuccess = async (favResponse) => {
|
|
3315
|
+
UserFavourite.orderedItems = await favResponse.target.result;
|
|
3316
|
+
this.eventService.showLoadingScreen.emit(false);
|
|
3317
|
+
};
|
|
3275
3318
|
};
|
|
3276
3319
|
}
|
|
3277
3320
|
calculateBillingDetails() {
|
|
@@ -3321,8 +3364,8 @@ class StorageServiceService {
|
|
|
3321
3364
|
}
|
|
3322
3365
|
// WISHLIST SERVICE
|
|
3323
3366
|
async getUserWhishlist() {
|
|
3324
|
-
const
|
|
3325
|
-
return
|
|
3367
|
+
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
3368
|
+
return await transaction.objectStore(this.favouriteCollectionName).getAll();
|
|
3326
3369
|
}
|
|
3327
3370
|
addProductToWishlist(product) {
|
|
3328
3371
|
const transaction = this.database.transaction(this.favouriteCollectionName, "readwrite");
|
|
@@ -3338,7 +3381,7 @@ class StorageServiceService {
|
|
|
3338
3381
|
}
|
|
3339
3382
|
// USER SERVICE
|
|
3340
3383
|
addUser(user) {
|
|
3341
|
-
this.cookieService.set("user", JSON.stringify(user ?? "{}"));
|
|
3384
|
+
this.cookieService.set("user", JSON.stringify(user ?? "{}"), 7);
|
|
3342
3385
|
return user;
|
|
3343
3386
|
}
|
|
3344
3387
|
getUser() {
|
|
@@ -3453,11 +3496,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
3453
3496
|
|
|
3454
3497
|
class NavbarSectionComponent {
|
|
3455
3498
|
// matDialog = inject(MatDialog);
|
|
3456
|
-
constructor(_eventService, router, activatedRoute, matDialog) {
|
|
3499
|
+
constructor(_eventService, router, activatedRoute, matDialog, cookieService) {
|
|
3457
3500
|
this._eventService = _eventService;
|
|
3458
3501
|
this.router = router;
|
|
3459
3502
|
this.activatedRoute = activatedRoute;
|
|
3460
3503
|
this.matDialog = matDialog;
|
|
3504
|
+
this.cookieService = cookieService;
|
|
3461
3505
|
this.edit = false;
|
|
3462
3506
|
this.scrollValue = 0;
|
|
3463
3507
|
this.color = '#000000';
|
|
@@ -3473,7 +3517,7 @@ class NavbarSectionComponent {
|
|
|
3473
3517
|
this.router.navigate(['/whislist']);
|
|
3474
3518
|
}
|
|
3475
3519
|
goToAccount() {
|
|
3476
|
-
if (
|
|
3520
|
+
if (this.cookieService.get("user")) {
|
|
3477
3521
|
this.router.navigate(['/profile']);
|
|
3478
3522
|
}
|
|
3479
3523
|
else {
|
|
@@ -3586,7 +3630,7 @@ class NavbarSectionComponent {
|
|
|
3586
3630
|
object.forEach((key) => keys.push(Object.values(key)));
|
|
3587
3631
|
return [...new Set(keys)];
|
|
3588
3632
|
}
|
|
3589
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarSectionComponent, deps: [{ token: EventsService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3633
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarSectionComponent, deps: [{ token: EventsService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3.MatDialog }, { token: i2$3.CookieService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3590
3634
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: NavbarSectionComponent, isStandalone: true, selector: "simpo-navbar-section", inputs: { data: "data", nextComponent: "nextComponent", index: "index", edit: "edit" }, host: { listeners: { "window:scroll": "onScroll($event)", "window:resize": "getScreenSize($event)" } }, viewQueries: [{ propertyName: "childContainer", first: true, predicate: ["childContainer"], descendants: true }], ngImport: i0, template: "<div [id]=\"data?.id\" [style.height.px]=\"getParentHeight\" [simpoBackground]=\"backgroundInfo\" class=\"total-container\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div #mainContainer class=\"w-100\" style=\"z-index: 100;\" [id]=\"data?.id\" [simpoOverlay]=\"style?.background\" [scrollValue]=\"isComponentMerged ? scrollValue : 0\" [simpoBackground]=\"backgroundInfo\" [simpoSticky]=\"isHeaderSticky\" [ngClass]=\"{'ecomStyle': isEcommerceWebsite}\">\r\n <nav #childContainer class=\"navbar navbar-expand-lg d-block mb-0\" [simpoFooterLayout]=\"style?.layout\">\r\n <div class=\"container-fluid position-relative \">\r\n <div class=\"w-50 left-logo-text d-flex\">\r\n <!-- <a class=\"navbar-brand\" href=\"#\">{{content?.siteName?.value}}</a> -->\r\n <div class=\"d-flex gap-3 gap-lg-3 align-items-lg-center\" *ngIf=\"!content?.logo?.isImage || !content?.logo?.image?.url\" (click)=\"goToHome()\">\r\n <div *ngIf=\"content?.logo?.text?.isIcon && content?.logo?.text?.url\">\r\n <img [src]=\"content?.logo?.text?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n <div class=\"heading-small\" *ngIf=\"content?.logo?.text?.isText\" [simpoColor]=\"simpoColor\">\r\n <b [ngStyle]=\"{'font-family': content?.logo?.text?.fontFamily}\">{{content?.siteName?.value}}</b>\r\n </div>\r\n </div>\r\n <div class=\"d-flex gap-3 gap-lg-3 align-items-lg-center\"\r\n *ngIf=\"content?.logo?.isImage && content?.logo?.image?.url\"(click)=\"goToHome()\">\r\n <img [src]=\"content?.logo?.image?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n\r\n <div class=\"navbar-collapse fs-6 position-relative d-flex\" style=\"margin-top: 5px; margin-left: 25px;\" [simpoColor]=\"simpoColor\" *ngIf=\"isEcommerceWebsite && screenWidth > 768\">\r\n <ng-container *ngFor=\"let link of getDropdownLinks; let idx = index\">\r\n <a class=\"nav-link dropdown-toggle mx-2\" href=\"#\" [id]=\"'navbarDropdownMenuLink_' + idx\" role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\">{{ link | uppercase }}</a>\r\n <ul class=\"dropdown-menu fs-6 position-absolute\" [attr.aria-labelledby]=\"'navbarDropdownMenuLink_'+idx\">\r\n <li *ngFor=\"let value of getValues(content?.ecomLinks?.[link])\"><a class=\"dropdown-item\" (click)=\"applyFilter(value, link)\">{{value}}</a></li>\r\n </ul>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n <div class=\"w-50 right-btn d-flex justify-content-end\">\r\n <div *ngIf=\"screenWidth <= 768 && isEcommerceWebsite\" class=\"d-flex align-items-center justify-content-around\">\r\n <i class=\"fa fa-search mx-2\" aria-hidden=\"true\"></i>\r\n <mat-icon class=\"mx-2\">add_shopping_cart</mat-icon>\r\n <mat-icon class=\"mx-2\">person_outline</mat-icon>\r\n </div>\r\n <button class=\"navbar-toggler menu-icon\" [simpoColor]=\"simpoColor\" [id]=\"data?.id\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNavAltMarkup\" *ngIf=\"screenWidth < 769\"\r\n aria-controls=\"navbarNavAltMarkup\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\r\n <hr>\r\n <hr>\r\n <hr>\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"!isEcommerceWebsite\">\r\n <div class=\"collapse navbar-collapse\" *ngIf=\"screenWidth > 768\">\r\n <div class=\"navbar-nav align-items-center\">\r\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-right: 10px;\">\r\n <ng-container *ngFor=\"let item of content?.navbarButtons\">\r\n <ng-container *ngIf=\"item.showHeader\">\r\n <simpo-navbar-button-element [buttonData]=\"item\" [selectedStyle]=\"style?.navigationStyle\" [buttonStyle]=\"style?.navbarButtonStyle\"\r\n [bgColor]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-navbar-button-element>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-start align-items-lg-center flex-column flex-lg-row gap-lg-0 gap-3\"\r\n [ngClass]=\"content?.socialLinks?.display ? 'justify-content-between' : 'justify-content-end'\">\r\n <div class=\"d-flex mt-0\" *ngIf=\"content?.socialLinks?.display\">\r\n <ng-container *ngFor=\"let item of content?.socialLinks?.channels\">\r\n <div style=\"position: relative;margin-right: 10px;\">\r\n <simpo-socia-icons [socialIconData]=\"item\" [color]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-socia-icons>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div *ngIf=\"action?.display\" class=\"button-display mt-0\">\r\n <div *ngFor=\"let button of action?.buttons\">\r\n <button class=\"button\" (click)=\"redirectTo(button?.content)\" simpoButtonDirective [scrollValue]=\"scrollValue\" [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button.styles\" [color]=\"accentColor\">{{button?.content?.label}}</button>\r\n <!-- <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [sectionId]=\"data?.id\"\r\n [color]=\"data?.styles?.background?.accentColor\"></app-button-element> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"collapse navbar-collapse\" id=\"navbarNavAltMarkup\" *ngIf=\"screenWidth <= 768\">\r\n <div class=\"inner-height p-4\">\r\n <div class=\"nab-bar-mobile flex-column d-flex justify-content-between align-items-center\">\r\n <div class=\"d-flex flex-column w-100\">\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"title-row\">\r\n <div class=\"d-flex gap-3 align-items-center\" *ngIf=\"!content?.logo?.isImage || !content?.logo?.image?.url\">\r\n <div *ngIf=\"content?.logo?.text?.isIcon && content?.logo?.text?.url\">\r\n <img [src]=\"content?.logo?.text?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n <div class=\"heading-small\" *ngIf=\"content?.logo?.text?.isText\">\r\n <b [ngStyle]=\"{'font-family': content?.logo?.text?.fontFamily}\">{{content?.siteName?.value}}</b>\r\n </div>\r\n </div>\r\n <div class=\"d-flex gap-3 align-items-center\"\r\n *ngIf=\"content?.logo?.isImage\">\r\n <img [src]=\"content?.logo?.image?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n\r\n </div>\r\n <div class=\"close-box cursor-pointer d-flex\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-between align-items-center mt-5\">\r\n <div class=\"d-flex flex-column gap-4 w-100\">\r\n <ng-container *ngFor=\"let item of content?.navbarButtons\">\r\n <simpo-navbar-button-element [buttonData]=\"item\" [selectedStyle]=\"style?.navigationStyle\" [buttonStyle]=\"style?.navbarButtonStyle\"></simpo-navbar-button-element>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-start align-items-lg-center flex-column flex-lg-row gap-lg-0 gap-3\"\r\n [ngClass]=\"content?.socialLinks?.display ? 'justify-content-between' : 'justify-content-end'\">\r\n <div class=\"d-flex mt-0\" *ngIf=\"content?.socialLinks?.display\">\r\n <ng-container *ngFor=\"let item of content?.socialLinks?.channels\">\r\n <div style=\"position: relative;margin-right: 10px;\">\r\n <simpo-socia-icons [socialIconData]=\"item\" [color]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-socia-icons>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex mt-4\">\r\n <div *ngIf=\"action?.display\" class=\"button-display\">\r\n <div *ngFor=\"let button of action?.buttons\">\r\n <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [sectionId]=\"data?.id\"\r\n [color]=\"data?.styles?.background?.accentColor\"></app-button-element>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isEcommerceWebsite\">\r\n <div class=\"collapse navbar-collapse position-absolute pr-0\" style=\"right: 0px;\" *ngIf=\"screenWidth > 768\">\r\n <div class=\"container-fluid justify-content-between pr-0 d-flex\" style=\"max-width: 50vw;\">\r\n <div class=\"input-group\">\r\n <i class=\"fa fa-search\" aria-hidden=\"true\"></i>\r\n <input type=\"text\" class=\"form-control\" placeholder=\"Search Product..\" aria-label=\"Search Product\" [(ngModel)]=\"searchText\" (ngModelChange)=\"searchProducts()\">\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center\" style=\"width: 60px; margin-left: -10px; cursor: pointer;\" (click)=\"goToFav()\">\r\n <mat-icon>favorite_border</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Favourite</span>\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center mx-3 position-relative\" style=\"width: 60px; cursor: pointer;\" (click)=\"goToCart()\">\r\n <mat-icon>add_shopping_cart</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Bag</span>\r\n <div class=\"position-absolute cartItemCount\" *ngIf=\"getCartItemsCount\">{{getCartItemsCount}}</div>\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center\" style=\"width: 60px; margin-left: -10px; cursor: pointer;\" (click)=\"goToAccount()\">\r\n <mat-icon>person_outline</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Account</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </nav>\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>\r\n", styles: [".navbar-toggler{height:40px}.button-display{display:flex;gap:12px;width:max-content}.ecomStyle{box-shadow:-9px 5px 3px #99999929}@media only screen and (max-width : 475px){.left-logo-text{width:85%!important}.right-btn{width:15%!important}}.nav-link{text-decoration:none}.cartItemCount{background:#0267c1d6;padding:5px;border-radius:50%;color:#fff;top:-10px;right:10px;height:22px;width:22px;display:flex;align-items:center;justify-content:center;font-size:12px}#navbarNavAltMarkup{position:fixed;top:0;width:100%;background-color:#0e3f58;height:calc(100vh + -0px);z-index:101}.dropdown-toggle{border-bottom:2px solid transparent;transition:border .5s ease}.dropdown-toggle:hover{border-bottom:2px solid rgb(14,63,88)}.inner-height,.nab-bar-mobile{height:100%}.total-container{height:auto;position:relative}.menu-icon{display:flex;flex-direction:column;gap:0px;align-items:center;justify-content:space-evenly;max-width:55px}.menu-icon hr{border:1px solid;margin:0;width:100%}.pt-0{padding-top:0!important}.pb-0{padding-bottom:0!important}.button{font-size:16px!important;padding:1rem 2rem;display:inline-flex;align-items:center;justify-content:center;width:fit-content!important}.input-group{position:relative;width:340px;outline:none;border:none;border-radius:5px;height:45px;display:flex;align-items:center;background-color:#fff;border:1.5px solid #8080801c;box-shadow:0 0 0 1px #edececd6;margin-right:25px}.input-group .fa-search{color:gray;background-color:transparent;width:10%;display:flex;align-items:center;justify-content:center;font-size:14px;position:relative;top:1px}.input-group input{height:100%;width:80%;background-color:transparent;border:none;outline:none;font-size:16px;padding-bottom:6px;box-shadow:none}.mat-icon{color:#000}\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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i2.UpperCasePipe, name: "uppercase" }, { kind: "component", type: SimpoButtonComponent, selector: "app-button-element", inputs: ["buttonContent", "buttonStyle", "buttonId", "color", "sectionId"] }, { kind: "component", type: SociaIconsComponent, selector: "simpo-socia-icons", inputs: ["socialIconData", "color", "sectionId"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: NavbarButtonElementComponent, selector: "simpo-navbar-button-element", inputs: ["buttonData", "buttonStyle", "selectedStyle", "bgColor", "sectionId"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: ButtonDirectiveDirective, selector: "[simpoButtonDirective]", inputs: ["buttonStyle", "color", "scrollValue"] }, { kind: "directive", type: SimpoFooterLayoutDirective, selector: "[simpoFooterLayout]", inputs: ["simpoFooterLayout"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }, { kind: "directive", type: SimpoStickyDirective, selector: "[simpoSticky]", inputs: ["simpoSticky"] }, { kind: "directive", type: ColorDirective, selector: "[simpoColor]", inputs: ["simpoColor"] }] }); }
|
|
3591
3635
|
}
|
|
3592
3636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NavbarSectionComponent, decorators: [{
|
|
@@ -3618,7 +3662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
3618
3662
|
TextBackgroundDirectiveDirective,
|
|
3619
3663
|
ColorDirective
|
|
3620
3664
|
], template: "<div [id]=\"data?.id\" [style.height.px]=\"getParentHeight\" [simpoBackground]=\"backgroundInfo\" class=\"total-container\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div #mainContainer class=\"w-100\" style=\"z-index: 100;\" [id]=\"data?.id\" [simpoOverlay]=\"style?.background\" [scrollValue]=\"isComponentMerged ? scrollValue : 0\" [simpoBackground]=\"backgroundInfo\" [simpoSticky]=\"isHeaderSticky\" [ngClass]=\"{'ecomStyle': isEcommerceWebsite}\">\r\n <nav #childContainer class=\"navbar navbar-expand-lg d-block mb-0\" [simpoFooterLayout]=\"style?.layout\">\r\n <div class=\"container-fluid position-relative \">\r\n <div class=\"w-50 left-logo-text d-flex\">\r\n <!-- <a class=\"navbar-brand\" href=\"#\">{{content?.siteName?.value}}</a> -->\r\n <div class=\"d-flex gap-3 gap-lg-3 align-items-lg-center\" *ngIf=\"!content?.logo?.isImage || !content?.logo?.image?.url\" (click)=\"goToHome()\">\r\n <div *ngIf=\"content?.logo?.text?.isIcon && content?.logo?.text?.url\">\r\n <img [src]=\"content?.logo?.text?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n <div class=\"heading-small\" *ngIf=\"content?.logo?.text?.isText\" [simpoColor]=\"simpoColor\">\r\n <b [ngStyle]=\"{'font-family': content?.logo?.text?.fontFamily}\">{{content?.siteName?.value}}</b>\r\n </div>\r\n </div>\r\n <div class=\"d-flex gap-3 gap-lg-3 align-items-lg-center\"\r\n *ngIf=\"content?.logo?.isImage && content?.logo?.image?.url\"(click)=\"goToHome()\">\r\n <img [src]=\"content?.logo?.image?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n\r\n <div class=\"navbar-collapse fs-6 position-relative d-flex\" style=\"margin-top: 5px; margin-left: 25px;\" [simpoColor]=\"simpoColor\" *ngIf=\"isEcommerceWebsite && screenWidth > 768\">\r\n <ng-container *ngFor=\"let link of getDropdownLinks; let idx = index\">\r\n <a class=\"nav-link dropdown-toggle mx-2\" href=\"#\" [id]=\"'navbarDropdownMenuLink_' + idx\" role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\">{{ link | uppercase }}</a>\r\n <ul class=\"dropdown-menu fs-6 position-absolute\" [attr.aria-labelledby]=\"'navbarDropdownMenuLink_'+idx\">\r\n <li *ngFor=\"let value of getValues(content?.ecomLinks?.[link])\"><a class=\"dropdown-item\" (click)=\"applyFilter(value, link)\">{{value}}</a></li>\r\n </ul>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n <div class=\"w-50 right-btn d-flex justify-content-end\">\r\n <div *ngIf=\"screenWidth <= 768 && isEcommerceWebsite\" class=\"d-flex align-items-center justify-content-around\">\r\n <i class=\"fa fa-search mx-2\" aria-hidden=\"true\"></i>\r\n <mat-icon class=\"mx-2\">add_shopping_cart</mat-icon>\r\n <mat-icon class=\"mx-2\">person_outline</mat-icon>\r\n </div>\r\n <button class=\"navbar-toggler menu-icon\" [simpoColor]=\"simpoColor\" [id]=\"data?.id\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNavAltMarkup\" *ngIf=\"screenWidth < 769\"\r\n aria-controls=\"navbarNavAltMarkup\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\r\n <hr>\r\n <hr>\r\n <hr>\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"!isEcommerceWebsite\">\r\n <div class=\"collapse navbar-collapse\" *ngIf=\"screenWidth > 768\">\r\n <div class=\"navbar-nav align-items-center\">\r\n <div class=\"d-flex align-items-center gap-3\" style=\"margin-right: 10px;\">\r\n <ng-container *ngFor=\"let item of content?.navbarButtons\">\r\n <ng-container *ngIf=\"item.showHeader\">\r\n <simpo-navbar-button-element [buttonData]=\"item\" [selectedStyle]=\"style?.navigationStyle\" [buttonStyle]=\"style?.navbarButtonStyle\"\r\n [bgColor]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-navbar-button-element>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-start align-items-lg-center flex-column flex-lg-row gap-lg-0 gap-3\"\r\n [ngClass]=\"content?.socialLinks?.display ? 'justify-content-between' : 'justify-content-end'\">\r\n <div class=\"d-flex mt-0\" *ngIf=\"content?.socialLinks?.display\">\r\n <ng-container *ngFor=\"let item of content?.socialLinks?.channels\">\r\n <div style=\"position: relative;margin-right: 10px;\">\r\n <simpo-socia-icons [socialIconData]=\"item\" [color]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-socia-icons>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div *ngIf=\"action?.display\" class=\"button-display mt-0\">\r\n <div *ngFor=\"let button of action?.buttons\">\r\n <button class=\"button\" (click)=\"redirectTo(button?.content)\" simpoButtonDirective [scrollValue]=\"scrollValue\" [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button.styles\" [color]=\"accentColor\">{{button?.content?.label}}</button>\r\n <!-- <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [sectionId]=\"data?.id\"\r\n [color]=\"data?.styles?.background?.accentColor\"></app-button-element> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"collapse navbar-collapse\" id=\"navbarNavAltMarkup\" *ngIf=\"screenWidth <= 768\">\r\n <div class=\"inner-height p-4\">\r\n <div class=\"nab-bar-mobile flex-column d-flex justify-content-between align-items-center\">\r\n <div class=\"d-flex flex-column w-100\">\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"title-row\">\r\n <div class=\"d-flex gap-3 align-items-center\" *ngIf=\"!content?.logo?.isImage || !content?.logo?.image?.url\">\r\n <div *ngIf=\"content?.logo?.text?.isIcon && content?.logo?.text?.url\">\r\n <img [src]=\"content?.logo?.text?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n <div class=\"heading-small\" *ngIf=\"content?.logo?.text?.isText\">\r\n <b [ngStyle]=\"{'font-family': content?.logo?.text?.fontFamily}\">{{content?.siteName?.value}}</b>\r\n </div>\r\n </div>\r\n <div class=\"d-flex gap-3 align-items-center\"\r\n *ngIf=\"content?.logo?.isImage\">\r\n <img [src]=\"content?.logo?.image?.url\" alt=\"logo\" [width]=\"content?.logo?.size\"\r\n loading=\"lazy\">\r\n </div>\r\n\r\n </div>\r\n <div class=\"close-box cursor-pointer d-flex\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-between align-items-center mt-5\">\r\n <div class=\"d-flex flex-column gap-4 w-100\">\r\n <ng-container *ngFor=\"let item of content?.navbarButtons\">\r\n <simpo-navbar-button-element [buttonData]=\"item\" [selectedStyle]=\"style?.navigationStyle\" [buttonStyle]=\"style?.navbarButtonStyle\"></simpo-navbar-button-element>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-start align-items-lg-center flex-column flex-lg-row gap-lg-0 gap-3\"\r\n [ngClass]=\"content?.socialLinks?.display ? 'justify-content-between' : 'justify-content-end'\">\r\n <div class=\"d-flex mt-0\" *ngIf=\"content?.socialLinks?.display\">\r\n <ng-container *ngFor=\"let item of content?.socialLinks?.channels\">\r\n <div style=\"position: relative;margin-right: 10px;\">\r\n <simpo-socia-icons [socialIconData]=\"item\" [color]=\"simpoColor\" [sectionId]=\"data?.id\"></simpo-socia-icons>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex mt-4\">\r\n <div *ngIf=\"action?.display\" class=\"button-display\">\r\n <div *ngFor=\"let button of action?.buttons\">\r\n <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [sectionId]=\"data?.id\"\r\n [color]=\"data?.styles?.background?.accentColor\"></app-button-element>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"isEcommerceWebsite\">\r\n <div class=\"collapse navbar-collapse position-absolute pr-0\" style=\"right: 0px;\" *ngIf=\"screenWidth > 768\">\r\n <div class=\"container-fluid justify-content-between pr-0 d-flex\" style=\"max-width: 50vw;\">\r\n <div class=\"input-group\">\r\n <i class=\"fa fa-search\" aria-hidden=\"true\"></i>\r\n <input type=\"text\" class=\"form-control\" placeholder=\"Search Product..\" aria-label=\"Search Product\" [(ngModel)]=\"searchText\" (ngModelChange)=\"searchProducts()\">\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center\" style=\"width: 60px; margin-left: -10px; cursor: pointer;\" (click)=\"goToFav()\">\r\n <mat-icon>favorite_border</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Favourite</span>\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center mx-3 position-relative\" style=\"width: 60px; cursor: pointer;\" (click)=\"goToCart()\">\r\n <mat-icon>add_shopping_cart</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Bag</span>\r\n <div class=\"position-absolute cartItemCount\" *ngIf=\"getCartItemsCount\">{{getCartItemsCount}}</div>\r\n </div>\r\n <div class=\"d-flex flex-column align-items-center\" style=\"width: 60px; margin-left: -10px; cursor: pointer;\" (click)=\"goToAccount()\">\r\n <mat-icon>person_outline</mat-icon>\r\n <span class=\"text-dark fw-normal fs-6\">Account</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </nav>\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>\r\n", styles: [".navbar-toggler{height:40px}.button-display{display:flex;gap:12px;width:max-content}.ecomStyle{box-shadow:-9px 5px 3px #99999929}@media only screen and (max-width : 475px){.left-logo-text{width:85%!important}.right-btn{width:15%!important}}.nav-link{text-decoration:none}.cartItemCount{background:#0267c1d6;padding:5px;border-radius:50%;color:#fff;top:-10px;right:10px;height:22px;width:22px;display:flex;align-items:center;justify-content:center;font-size:12px}#navbarNavAltMarkup{position:fixed;top:0;width:100%;background-color:#0e3f58;height:calc(100vh + -0px);z-index:101}.dropdown-toggle{border-bottom:2px solid transparent;transition:border .5s ease}.dropdown-toggle:hover{border-bottom:2px solid rgb(14,63,88)}.inner-height,.nab-bar-mobile{height:100%}.total-container{height:auto;position:relative}.menu-icon{display:flex;flex-direction:column;gap:0px;align-items:center;justify-content:space-evenly;max-width:55px}.menu-icon hr{border:1px solid;margin:0;width:100%}.pt-0{padding-top:0!important}.pb-0{padding-bottom:0!important}.button{font-size:16px!important;padding:1rem 2rem;display:inline-flex;align-items:center;justify-content:center;width:fit-content!important}.input-group{position:relative;width:340px;outline:none;border:none;border-radius:5px;height:45px;display:flex;align-items:center;background-color:#fff;border:1.5px solid #8080801c;box-shadow:0 0 0 1px #edececd6;margin-right:25px}.input-group .fa-search{color:gray;background-color:transparent;width:10%;display:flex;align-items:center;justify-content:center;font-size:14px;position:relative;top:1px}.input-group input{height:100%;width:80%;background-color:transparent;border:none;outline:none;font-size:16px;padding-bottom:6px;box-shadow:none}.mat-icon{color:#000}\n"] }]
|
|
3621
|
-
}], ctorParameters: () => [{ type: EventsService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3.MatDialog }], propDecorators: { data: [{
|
|
3665
|
+
}], ctorParameters: () => [{ type: EventsService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3.MatDialog }, { type: i2$3.CookieService }], propDecorators: { data: [{
|
|
3622
3666
|
type: Input
|
|
3623
3667
|
}], nextComponent: [{
|
|
3624
3668
|
type: Input
|
|
@@ -4765,49 +4809,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
|
4765
4809
|
args: ['mainContainer']
|
|
4766
4810
|
}] } });
|
|
4767
4811
|
|
|
4768
|
-
var orderedItems = [
|
|
4769
|
-
];
|
|
4770
|
-
var cartType = "WISHLIST";
|
|
4771
|
-
var billdetails = {
|
|
4772
|
-
totalNetValue: 0,
|
|
4773
|
-
totalGrossValue: 0,
|
|
4774
|
-
totalTax: 0,
|
|
4775
|
-
totalOfferedValue: 0,
|
|
4776
|
-
deliveryCharges: 0,
|
|
4777
|
-
couponId: "",
|
|
4778
|
-
discountAmount: 0,
|
|
4779
|
-
afterDiscountAmount: 0,
|
|
4780
|
-
taxBreakup: {
|
|
4781
|
-
cgstValue: 0,
|
|
4782
|
-
sgstValue: 0,
|
|
4783
|
-
igstValue: 0
|
|
4784
|
-
}
|
|
4785
|
-
};
|
|
4786
|
-
var locationDetails = {
|
|
4787
|
-
countryId: "",
|
|
4788
|
-
cityId: "",
|
|
4789
|
-
stateId: "",
|
|
4790
|
-
localityId: "",
|
|
4791
|
-
countryName: "",
|
|
4792
|
-
cityName: "",
|
|
4793
|
-
stateName: "",
|
|
4794
|
-
localityName: "",
|
|
4795
|
-
pinCode: ""
|
|
4796
|
-
};
|
|
4797
|
-
var platform = "WEB";
|
|
4798
|
-
var totalAmount = 0;
|
|
4799
|
-
var UserFavourite = {
|
|
4800
|
-
orderedItems: orderedItems,
|
|
4801
|
-
cartType: cartType,
|
|
4802
|
-
billdetails: billdetails,
|
|
4803
|
-
locationDetails: locationDetails,
|
|
4804
|
-
platform: platform,
|
|
4805
|
-
totalAmount: totalAmount
|
|
4806
|
-
};
|
|
4807
|
-
|
|
4808
4812
|
class OrderedItems {
|
|
4809
4813
|
constructor(json) {
|
|
4810
|
-
this.itemId = json?.["itemId"] ??
|
|
4814
|
+
this.itemId = json?.["itemId"] ?? "";
|
|
4811
4815
|
this.businessId = json?.["businessId"];
|
|
4812
4816
|
this.itemName = json?.["name"];
|
|
4813
4817
|
this.brandName = json?.["brandName"];
|
|
@@ -4845,21 +4849,16 @@ class CartService {
|
|
|
4845
4849
|
}
|
|
4846
4850
|
}
|
|
4847
4851
|
addItemToFavourite(product) {
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
UserFavourite.orderedItems[productIdx].quantity = product.quantity;
|
|
4854
|
-
}
|
|
4855
|
-
else {
|
|
4856
|
-
UserFavourite.orderedItems.push(orderedItem);
|
|
4857
|
-
}
|
|
4858
|
-
this.storageService.addProductToWishlist(orderedItem);
|
|
4852
|
+
const orderedItem = this.objectMapper(product);
|
|
4853
|
+
let productIdx = -1;
|
|
4854
|
+
UserFavourite.orderedItems.forEach((item, idx) => productIdx = (item.itemId == product.itemId) ? idx : -1);
|
|
4855
|
+
if (productIdx >= 0) {
|
|
4856
|
+
UserFavourite.orderedItems[productIdx].quantity = product.quantity;
|
|
4859
4857
|
}
|
|
4860
4858
|
else {
|
|
4861
|
-
|
|
4859
|
+
UserFavourite.orderedItems.push(orderedItem);
|
|
4862
4860
|
}
|
|
4861
|
+
this.storageService.addProductToWishlist(orderedItem);
|
|
4863
4862
|
}
|
|
4864
4863
|
removeItemFromFavourite(product) {
|
|
4865
4864
|
const index = this.getItemIdxJSON(product.itemId, 'FAVOURITE');
|
|
@@ -4908,7 +4907,7 @@ class CartService {
|
|
|
4908
4907
|
}
|
|
4909
4908
|
}
|
|
4910
4909
|
getItemIdxJSON(itemId, type) {
|
|
4911
|
-
const json = type == "FAVOURITE" ? UserFavourite : UserCart;
|
|
4910
|
+
const json = (type == "FAVOURITE") ? UserFavourite : UserCart;
|
|
4912
4911
|
let productIndex = -1;
|
|
4913
4912
|
json.orderedItems.forEach((p, idx) => {
|
|
4914
4913
|
if (p.itemId == itemId)
|
|
@@ -5644,7 +5643,7 @@ class CartComponent extends BaseSection {
|
|
|
5644
5643
|
console.log("a: ", UserCart, this.responseData, response);
|
|
5645
5644
|
UserCart.billdetails = response[0].data.billdetails;
|
|
5646
5645
|
UserCart.cartId = response[0].data.cartId;
|
|
5647
|
-
UserCart.orderedItems = response[0].data.
|
|
5646
|
+
UserCart.orderedItems = response[0].data.orderedItems;
|
|
5648
5647
|
this.responseData = this.storageService.calculateBillingDetails();
|
|
5649
5648
|
this.styles = this.data?.styles;
|
|
5650
5649
|
});
|
|
@@ -5665,7 +5664,7 @@ class CartComponent extends BaseSection {
|
|
|
5665
5664
|
// })
|
|
5666
5665
|
// }
|
|
5667
5666
|
proceedToCheckout() {
|
|
5668
|
-
if (
|
|
5667
|
+
if (this.cookieService.get("user")) {
|
|
5669
5668
|
this.currentTab = "ADDRESS";
|
|
5670
5669
|
}
|
|
5671
5670
|
else {
|
|
@@ -5700,12 +5699,11 @@ class CartComponent extends BaseSection {
|
|
|
5700
5699
|
this.responseData = this.storageService.calculateBillingDetails();
|
|
5701
5700
|
}
|
|
5702
5701
|
proceedToPayment() {
|
|
5703
|
-
debugger;
|
|
5704
5702
|
const address = UserInfo.user.addressDetailsList[0];
|
|
5705
5703
|
const payload = {
|
|
5706
5704
|
"userId": UserInfo.user.userId,
|
|
5707
5705
|
"cartId": UserCart.cartId,
|
|
5708
|
-
"orderAmount":
|
|
5706
|
+
"orderAmount": this.responseData.totalAmount,
|
|
5709
5707
|
"contactDetails": {
|
|
5710
5708
|
"name": address.receiverName,
|
|
5711
5709
|
"mobile": address.receiverPhone,
|