simpo-component-library 1.2.6 → 1.2.7
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/json/user-cart.json +32 -0
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +11 -11
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.modal.mjs +1 -1
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +38 -12
- package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +2 -2
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +20 -0
- package/esm2022/lib/ecommerce/styles/product.modal.mjs +2 -1
- package/esm2022/lib/services/cart.service.mjs +35 -0
- package/esm2022/lib/services/rest.service.mjs +14 -3
- package/fesm2022/simpo-component-library.mjs +128 -21
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +3 -1
- package/lib/ecommerce/sections/featured-products/featured-products.modal.d.ts +1 -0
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +11 -5
- package/lib/ecommerce/styles/OrderedItems.modal.d.ts +18 -0
- package/lib/ecommerce/styles/product.modal.d.ts +1 -0
- package/lib/services/cart.service.d.ts +9 -0
- package/lib/services/rest.service.d.ts +2 -1
- package/package.json +1 -1
- package/simpo-component-library-1.2.7.tgz +0 -0
- package/simpo-component-library-1.2.6.tgz +0 -0
|
@@ -21,6 +21,7 @@ export class Product {
|
|
|
21
21
|
this.recommended = json?.["recommended"];
|
|
22
22
|
this.returnable = json?.["returnable"];
|
|
23
23
|
this.availableOnCod = json?.["availableOnCod"];
|
|
24
|
+
this.quantity = json?.["quantity"];
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC5tb2RhbC5qcy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aW50ZXJmYWNlIEl0ZW1JbWFnZTIge1xyXG4gIGltZ1VybDogc3RyaW5nXHJcbiAgaW1nRGVzYzogc3RyaW5nXHJcbn1cclxuIl19
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import UserCart from "../ecommerce/json/user-cart.json";
|
|
3
|
+
import { OrderedItems } from '@simpo-ui/ecommerce/styles/OrderedItems.modal';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class CartService {
|
|
6
|
+
constructor() { }
|
|
7
|
+
addItemToCart(product) {
|
|
8
|
+
const orderProduct = this.objectMapper(product);
|
|
9
|
+
let productIndex = -1;
|
|
10
|
+
UserCart.orderedItems.forEach((p, idx) => {
|
|
11
|
+
if (p.getItemId == product.itemId)
|
|
12
|
+
productIndex = idx;
|
|
13
|
+
});
|
|
14
|
+
if (productIndex == -1)
|
|
15
|
+
UserCart.orderedItems.push(product);
|
|
16
|
+
else {
|
|
17
|
+
if (product.quantity > 0)
|
|
18
|
+
UserCart.orderedItems[productIndex].setQuantity(orderProduct.getQuantity + 1);
|
|
19
|
+
else
|
|
20
|
+
UserCart.orderedItems.splice(productIndex, 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
objectMapper(product) {
|
|
24
|
+
return new OrderedItems(product);
|
|
25
|
+
}
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, providedIn: 'root' }); }
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, decorators: [{
|
|
30
|
+
type: Injectable,
|
|
31
|
+
args: [{
|
|
32
|
+
providedIn: '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gPSB0aGlzLm9iamVjdE1hcHBlcihwcm9kdWN0KTtcclxuXHJcbiAgICBsZXQgcHJvZHVjdEluZGV4OiBudW1iZXIgPSAtMTtcclxuICAgIFVzZXJDYXJ0Lm9yZGVyZWRJdGVtcy5mb3JFYWNoKChwOiBPcmRlcmVkSXRlbXMsIGlkeDogbnVtYmVyKT0+IHtcclxuICAgICAgICBpZiAocC5nZXRJdGVtSWQgPT0gcHJvZHVjdC5pdGVtSWQpXHJcbiAgICAgICAgICAgIHByb2R1Y3RJbmRleCA9IGlkeDtcclxuICAgIH0pO1xyXG4gICAgaWYgKHByb2R1Y3RJbmRleCA9PSAtMSlcclxuICAgICAgICBVc2VyQ2FydC5vcmRlcmVkSXRlbXMucHVzaChwcm9kdWN0IGFzIG5ldmVyKTtcclxuICAgIGVsc2Uge1xyXG4gICAgICAgIGlmIChwcm9kdWN0LnF1YW50aXR5ID4gMClcclxuICAgICAgICAgICAgKFVzZXJDYXJ0Lm9yZGVyZWRJdGVtc1twcm9kdWN0SW5kZXhdIGFzIE9yZGVyZWRJdGVtcykuc2V0UXVhbnRpdHkob3JkZXJQcm9kdWN0LmdldFF1YW50aXR5ICsxKTtcclxuICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgIFVzZXJDYXJ0Lm9yZGVyZWRJdGVtcy5zcGxpY2UocHJvZHVjdEluZGV4LCAxKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIHByaXZhdGUgb2JqZWN0TWFwcGVyKHByb2R1Y3Q6IFByb2R1Y3QpOiBPcmRlcmVkSXRlbXMge1xyXG4gICAgcmV0dXJuIG5ldyBPcmRlcmVkSXRlbXMocHJvZHVjdCk7XHJcbiAgfVxyXG59Il19
|
|
@@ -8,13 +8,24 @@ export class RestService {
|
|
|
8
8
|
this.http = http;
|
|
9
9
|
this.BASE_URL = "https://dev-api.simpo.ai/";
|
|
10
10
|
}
|
|
11
|
-
getProductByBusiness(searchTxt = "") {
|
|
11
|
+
getProductByBusiness(searchTxt = "", productId = null) {
|
|
12
12
|
const businessId = "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
13
13
|
const payload = {
|
|
14
14
|
businessId: businessId,
|
|
15
15
|
pageNo: 0,
|
|
16
16
|
pageSize: 100,
|
|
17
|
-
searchText: searchTxt
|
|
17
|
+
searchText: searchTxt,
|
|
18
|
+
itemId: productId
|
|
19
|
+
};
|
|
20
|
+
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
|
|
21
|
+
}
|
|
22
|
+
getFeaturedProduct(collectionId) {
|
|
23
|
+
const businessId = "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
24
|
+
const payload = {
|
|
25
|
+
businessId: businessId,
|
|
26
|
+
collectionId: [collectionId],
|
|
27
|
+
pageNo: 0,
|
|
28
|
+
pageSize: 100
|
|
18
29
|
};
|
|
19
30
|
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
|
|
20
31
|
}
|
|
@@ -27,4 +38,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
27
38
|
providedIn: 'root',
|
|
28
39
|
}]
|
|
29
40
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9yZXN0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsR0F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YnVzaW5lc3NJZCxcclxuICAgICAgICAgICAgY29sbGVjdGlvbklkOiBbY29sbGVjdGlvbklkXSxcclxuICAgICAgICAgICAgcGFnZU5vOiAwLFxyXG4gICAgICAgICAgICBwYWdlU2l6ZTogMTAwXHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB0aGlzLmh0dHAucHV0KHRoaXMuQkFTRV9VUkwgKyBgZWNvbW1lcmNlL3Byb2R1Y3QvaXRlbS9zZWFyY2hgLCBwYXlsb2FkKS5waXBlKG1hcCgocmVzcG9uc2U6IGFueSk9PiByZXNwb25zZS5kYXRhLmRhdGEubWFwKChwcm9kdWN0OiBhbnkpPT4gbmV3IFByb2R1Y3QocHJvZHVjdCkpKSk7XHJcbiAgICBcclxuICAgIH1cclxuXHJcbn0iXX0=
|
|
@@ -16,9 +16,10 @@ import * as i2$5 from '@angular/material/snack-bar';
|
|
|
16
16
|
import * as i2$6 from 'ngx-skeleton-loader';
|
|
17
17
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
18
18
|
import * as mapboxgl from 'mapbox-gl';
|
|
19
|
-
import { map } from 'rxjs';
|
|
20
19
|
import * as i1$1 from '@angular/common/http';
|
|
21
20
|
import { HttpClientModule } from '@angular/common/http';
|
|
21
|
+
import { map } from 'rxjs';
|
|
22
|
+
import { OrderedItems } from '@simpo-ui/ecommerce/styles/OrderedItems.modal';
|
|
22
23
|
import * as i7 from '@angular/material/slider';
|
|
23
24
|
import { MatSliderModule } from '@angular/material/slider';
|
|
24
25
|
import { MatSelectModule } from '@angular/material/select';
|
|
@@ -4255,13 +4256,24 @@ class RestService {
|
|
|
4255
4256
|
this.http = http;
|
|
4256
4257
|
this.BASE_URL = "https://dev-api.simpo.ai/";
|
|
4257
4258
|
}
|
|
4258
|
-
getProductByBusiness(searchTxt = "") {
|
|
4259
|
+
getProductByBusiness(searchTxt = "", productId = null) {
|
|
4259
4260
|
const businessId = "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
4260
4261
|
const payload = {
|
|
4261
4262
|
businessId: businessId,
|
|
4262
4263
|
pageNo: 0,
|
|
4263
4264
|
pageSize: 100,
|
|
4264
|
-
searchText: searchTxt
|
|
4265
|
+
searchText: searchTxt,
|
|
4266
|
+
itemId: productId
|
|
4267
|
+
};
|
|
4268
|
+
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
|
|
4269
|
+
}
|
|
4270
|
+
getFeaturedProduct(collectionId) {
|
|
4271
|
+
const businessId = "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
|
|
4272
|
+
const payload = {
|
|
4273
|
+
businessId: businessId,
|
|
4274
|
+
collectionId: [collectionId],
|
|
4275
|
+
pageNo: 0,
|
|
4276
|
+
pageSize: 100
|
|
4265
4277
|
};
|
|
4266
4278
|
return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
|
|
4267
4279
|
}
|
|
@@ -4291,13 +4303,17 @@ class FeaturedProductsComponent extends BaseSection {
|
|
|
4291
4303
|
getScreenSize() {
|
|
4292
4304
|
this.screenWidth = window.innerWidth;
|
|
4293
4305
|
}
|
|
4306
|
+
ngOnChanges(changes) {
|
|
4307
|
+
if (this.content?.collectionId) {
|
|
4308
|
+
this.restService.getFeaturedProduct(this.content?.collectionId).subscribe((response) => {
|
|
4309
|
+
this.responseData = response;
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4294
4313
|
ngOnInit() {
|
|
4295
4314
|
this.content = this.data?.content;
|
|
4296
4315
|
this.styles = this.data?.styles;
|
|
4297
4316
|
this.button = this.data?.action.buttons[0];
|
|
4298
|
-
this.restService.getProductByBusiness().subscribe((response) => {
|
|
4299
|
-
this.responseData = response;
|
|
4300
|
-
});
|
|
4301
4317
|
}
|
|
4302
4318
|
getProductWidth() {
|
|
4303
4319
|
return this.screenWidth > 475 ? (this.screenWidth < 1025 ? '25%' : 'calc(' + ((100 / (this.styles?.elementInRow || 4))) + '%)') : (this.styles?.mobileColumn === 1 ? '100%' : '50%');
|
|
@@ -4306,13 +4322,11 @@ class FeaturedProductsComponent extends BaseSection {
|
|
|
4306
4322
|
return [0, (this.styles?.maximumProduct || 0)];
|
|
4307
4323
|
}
|
|
4308
4324
|
proceedToProductDesc(productId) {
|
|
4309
|
-
this.router.navigate([`details
|
|
4325
|
+
this.router.navigate([`details`], { queryParams: { id: productId } });
|
|
4310
4326
|
// this._eventService.redirectToPage.emit({redirectTo: '/details', data: {productId: productId}})
|
|
4311
4327
|
}
|
|
4312
4328
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: FeaturedProductsComponent, deps: [{ token: PLATFORM_ID }, { token: EventsService }, { token: RestService }, { token: i2$4.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4313
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: FeaturedProductsComponent, isStandalone: true, selector: "simpo-featured-products", inputs: { data: "data", responseData: "responseData", index: "index", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } },
|
|
4314
|
-
// SharedModule,
|
|
4315
|
-
HttpClientModule }, { kind: "directive", type:
|
|
4329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: FeaturedProductsComponent, isStandalone: true, selector: "simpo-featured-products", inputs: { data: "data", responseData: "responseData", index: "index", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"container-fluid total-container\" [id]=\"data?.id\" [simpoBackground]=\"styles?.background\"\r\n 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 > 0\">\r\n <div *ngFor=\"let product of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]\" class=\"product\"\r\n [style.width]=\"getProductWidth()\" (click)=\"proceedToProductDesc(product.itemId)\">\r\n <div *ngIf=\"!(product.itemImages.length > 0 && product.itemImages[0].imgUrl)\" class=\"default-image\">\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 > 0 && product.itemImages[0].imgUrl\">\r\n <img [src]=\"product.itemImages[0].imgUrl\" alt=\"\" class=\"product-img\">\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=\"price body-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n \u20B9\r\n {{product.price.sellingPrice}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"content?.display?.showButton\" class=\"add-to-cart-btn\">\r\n <button simpoButtonDirective [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{content?.button}}</button>\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", styles: [".product-parent{display:flex;flex-wrap:wrap;margin-top:15px}.product{padding:10px}.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}.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{margin-top:15px}.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: "ngmodule", type: HttpClientModule }, { kind: "directive", type:
|
|
4316
4330
|
//directive
|
|
4317
4331
|
AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { 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"] }, { kind: "directive", type: ColorDirective, selector: "[simpoColor]", inputs: ["simpoColor"] }, { kind: "directive", type: ButtonDirectiveDirective, selector: "[simpoButtonDirective]", inputs: ["buttonStyle", "color", "scrollValue"] }] }); }
|
|
4318
4332
|
}
|
|
@@ -4320,7 +4334,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4320
4334
|
type: Component,
|
|
4321
4335
|
args: [{ selector: 'simpo-featured-products', standalone: true, imports: [CommonModule, FormsModule,
|
|
4322
4336
|
SimpoComponentModule,
|
|
4323
|
-
// SharedModule,
|
|
4324
4337
|
HttpClientModule,
|
|
4325
4338
|
//directive
|
|
4326
4339
|
AnimationDirective,
|
|
@@ -4333,7 +4346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4333
4346
|
TextBackgroundDirectiveDirective,
|
|
4334
4347
|
ColorDirective,
|
|
4335
4348
|
ButtonDirectiveDirective
|
|
4336
|
-
],
|
|
4349
|
+
], template: "<section class=\"container-fluid total-container\" [id]=\"data?.id\" [simpoBackground]=\"styles?.background\"\r\n 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 > 0\">\r\n <div *ngFor=\"let product of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]\" class=\"product\"\r\n [style.width]=\"getProductWidth()\" (click)=\"proceedToProductDesc(product.itemId)\">\r\n <div *ngIf=\"!(product.itemImages.length > 0 && product.itemImages[0].imgUrl)\" class=\"default-image\">\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 > 0 && product.itemImages[0].imgUrl\">\r\n <img [src]=\"product.itemImages[0].imgUrl\" alt=\"\" class=\"product-img\">\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=\"price body-large\" [id]=\"data?.id\" [simpoColor]=\"styles?.background?.color\">\r\n \u20B9\r\n {{product.price.sellingPrice}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"content?.display?.showButton\" class=\"add-to-cart-btn\">\r\n <button simpoButtonDirective [id]=\"data?.id+(button?.id || '')\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{content?.button}}</button>\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", styles: [".product-parent{display:flex;flex-wrap:wrap;margin-top:15px}.product{padding:10px}.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}.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{margin-top:15px}.add-to-cart-btn button{height:35px;font-size:16px!important}\n"] }]
|
|
4337
4350
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
4338
4351
|
type: Inject,
|
|
4339
4352
|
args: [PLATFORM_ID]
|
|
@@ -4401,12 +4414,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4401
4414
|
type: Input
|
|
4402
4415
|
}] } });
|
|
4403
4416
|
|
|
4417
|
+
var cartId = "";
|
|
4418
|
+
var orderedItems = [
|
|
4419
|
+
];
|
|
4420
|
+
var billdetails = {
|
|
4421
|
+
totalNetValue: 0,
|
|
4422
|
+
totalGrossValue: 0,
|
|
4423
|
+
totalTax: 0,
|
|
4424
|
+
totalOfferedValue: 0,
|
|
4425
|
+
deliveryCharges: 0,
|
|
4426
|
+
couponId: "",
|
|
4427
|
+
discountAmount: 0,
|
|
4428
|
+
afterDiscountAmount: 0,
|
|
4429
|
+
taxBreakup: {
|
|
4430
|
+
cgstValue: 0,
|
|
4431
|
+
sgstValue: 0,
|
|
4432
|
+
igstValue: 0
|
|
4433
|
+
}
|
|
4434
|
+
};
|
|
4435
|
+
var locationDetails = {
|
|
4436
|
+
countryId: "",
|
|
4437
|
+
cityId: "",
|
|
4438
|
+
stateId: "",
|
|
4439
|
+
localityId: "",
|
|
4440
|
+
countryName: "",
|
|
4441
|
+
cityName: "",
|
|
4442
|
+
stateName: "",
|
|
4443
|
+
localityName: "",
|
|
4444
|
+
pinCode: ""
|
|
4445
|
+
};
|
|
4446
|
+
var platform = "WEB";
|
|
4447
|
+
var totalAmount = 0;
|
|
4448
|
+
var UserCart = {
|
|
4449
|
+
cartId: cartId,
|
|
4450
|
+
orderedItems: orderedItems,
|
|
4451
|
+
billdetails: billdetails,
|
|
4452
|
+
locationDetails: locationDetails,
|
|
4453
|
+
platform: platform,
|
|
4454
|
+
totalAmount: totalAmount
|
|
4455
|
+
};
|
|
4456
|
+
|
|
4457
|
+
class CartService {
|
|
4458
|
+
constructor() { }
|
|
4459
|
+
addItemToCart(product) {
|
|
4460
|
+
const orderProduct = this.objectMapper(product);
|
|
4461
|
+
let productIndex = -1;
|
|
4462
|
+
UserCart.orderedItems.forEach((p, idx) => {
|
|
4463
|
+
if (p.getItemId == product.itemId)
|
|
4464
|
+
productIndex = idx;
|
|
4465
|
+
});
|
|
4466
|
+
if (productIndex == -1)
|
|
4467
|
+
UserCart.orderedItems.push(product);
|
|
4468
|
+
else {
|
|
4469
|
+
if (product.quantity > 0)
|
|
4470
|
+
UserCart.orderedItems[productIndex].setQuantity(orderProduct.getQuantity + 1);
|
|
4471
|
+
else
|
|
4472
|
+
UserCart.orderedItems.splice(productIndex, 1);
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4475
|
+
objectMapper(product) {
|
|
4476
|
+
return new OrderedItems(product);
|
|
4477
|
+
}
|
|
4478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4479
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, providedIn: 'root' }); }
|
|
4480
|
+
}
|
|
4481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, decorators: [{
|
|
4482
|
+
type: Injectable,
|
|
4483
|
+
args: [{
|
|
4484
|
+
providedIn: 'root',
|
|
4485
|
+
}]
|
|
4486
|
+
}], ctorParameters: () => [] });
|
|
4487
|
+
|
|
4488
|
+
// import { rmSync } from 'fs';
|
|
4489
|
+
// import { RestService } from '../../../services/rest.service';
|
|
4490
|
+
// import { HttpClientModule } from '@angular/common/http';
|
|
4404
4491
|
class ProductDescComponent extends BaseSection {
|
|
4405
|
-
constructor(platformId, _eventService, snackBar) {
|
|
4492
|
+
constructor(platformId, _eventService, snackBar, activatedRoute, restService, cartService) {
|
|
4406
4493
|
super();
|
|
4407
4494
|
this.platformId = platformId;
|
|
4408
4495
|
this._eventService = _eventService;
|
|
4409
4496
|
this.snackBar = snackBar;
|
|
4497
|
+
this.activatedRoute = activatedRoute;
|
|
4498
|
+
this.restService = restService;
|
|
4499
|
+
this.cartService = cartService;
|
|
4410
4500
|
this.addedQuantity = 0;
|
|
4411
4501
|
if (isPlatformBrowser(this.platformId)) {
|
|
4412
4502
|
this.getScreenSize();
|
|
@@ -4417,6 +4507,15 @@ class ProductDescComponent extends BaseSection {
|
|
|
4417
4507
|
this.currentImg = this.responseData?.itemImages[0]?.imgUrl;
|
|
4418
4508
|
this.button = this.data?.action?.buttons[0];
|
|
4419
4509
|
this.buttonId = (this.data ? this.data.id : '') + (this.button ? this.button.id : '');
|
|
4510
|
+
this.activatedRoute.queryParams.subscribe((qParam) => {
|
|
4511
|
+
const productId = qParam["id"];
|
|
4512
|
+
if (productId) {
|
|
4513
|
+
this.restService.getProductByBusiness("", productId).subscribe((response) => {
|
|
4514
|
+
this.responseData = response[0];
|
|
4515
|
+
this.currentImg = this.responseData?.itemImages[0].imgUrl;
|
|
4516
|
+
});
|
|
4517
|
+
}
|
|
4518
|
+
});
|
|
4420
4519
|
}
|
|
4421
4520
|
getScreenSize() {
|
|
4422
4521
|
this.screenWidth = window.innerWidth;
|
|
@@ -4439,33 +4538,40 @@ class ProductDescComponent extends BaseSection {
|
|
|
4439
4538
|
else
|
|
4440
4539
|
this.addedQuantity = 0;
|
|
4441
4540
|
}
|
|
4541
|
+
this.addToCart(type);
|
|
4442
4542
|
}
|
|
4443
|
-
addToCart() {
|
|
4543
|
+
addToCart(type = 'ADD') {
|
|
4444
4544
|
if (this.addedQuantity < 0) {
|
|
4445
4545
|
this.snackBar.open('Please add quantity', 'close', { duration: 1500 });
|
|
4446
4546
|
return;
|
|
4447
4547
|
}
|
|
4448
|
-
|
|
4548
|
+
if (type == 'ADD')
|
|
4549
|
+
this.responseData.quantity += 1;
|
|
4550
|
+
else
|
|
4551
|
+
this.responseData.quantity -= 1;
|
|
4552
|
+
this.cartService.addItemToCart(this.responseData);
|
|
4449
4553
|
}
|
|
4450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ProductDescComponent, deps: [{ token: PLATFORM_ID }, { token: EventsService }, { token: i2$5.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4451
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: ProductDescComponent, isStandalone: true, selector: "simpo-product-desc", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } }, usesInheritance: true, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover\r\n (hovering)=\"showEditTabs($event)\">\r\n <section class=\"container\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-6 col-12\">\r\n <div class=\"prod-img-block\">\r\n <div class=\"img-list\" *ngIf=\"screenWidth > 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n <div class=\"item-img\">\r\n <img [src]=\"currentImg\" alt=\"\">\r\n </div>\r\n <div class=\"img-list\" *ngIf=\"screenWidth <= 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-12 product-detail\">\r\n <div class=\"heading-large\">{{responseData?.name}}</div>\r\n <div class=\"price\">\u20B9 {{responseData?.price?.sellingPrice}}</div>\r\n <div class=\"product-desc body-large\" *ngIf=\"responseData?.
|
|
4554
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ProductDescComponent, deps: [{ token: PLATFORM_ID }, { token: EventsService }, { token: i2$5.MatSnackBar }, { token: i2$4.ActivatedRoute }, { token: RestService }, { token: CartService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4555
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: ProductDescComponent, isStandalone: true, selector: "simpo-product-desc", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, host: { listeners: { "window: resize": "getScreenSize($event)" } }, usesInheritance: true, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover\r\n (hovering)=\"showEditTabs($event)\">\r\n <section class=\"container\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-6 col-12\">\r\n <div class=\"prod-img-block\">\r\n <div class=\"img-list\" *ngIf=\"screenWidth > 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n <div class=\"item-img\">\r\n <img [src]=\"currentImg\" alt=\"\">\r\n </div>\r\n <div class=\"img-list\" *ngIf=\"screenWidth <= 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-12 product-detail\">\r\n <div class=\"heading-large\">{{responseData?.name}}</div>\r\n <div class=\"price\">\u20B9 {{responseData?.price?.sellingPrice}}</div>\r\n <div class=\"product-desc body-large\" *ngIf=\"responseData?.descriptor?.name\">{{responseData?.descriptor?.name}}</div>\r\n\r\n <div class=\"button-parent\">\r\n <div class=\"quantity\" *ngIf=\"addedQuantity\">\r\n <div class=\"plus\" (click)=\"addOrSubtractQuantity('SUBSTRACT')\">-</div>\r\n <div style=\"width: 50px;\" class=\"d-flex justify-content-center\">{{addedQuantity}}</div>\r\n <!-- <input type=\"number\" (keyup)=\"changeQuantity(quantity.value)\" [value]=\"addedQuantity\" #quantity> -->\r\n <div class=\"minus\" (click)=\"addOrSubtractQuantity('ADD')\">+</div>\r\n </div>\r\n <div *ngIf=\"!addedQuantity\">\r\n <button class=\"send-btn\" simpoButtonDirective [id]=\"buttonId\" [buttonStyle]=\"button?.styles\" [color]=\"data?.styles?.background?.accentColor\" (click)=\"addToCart()\">{{data?.content?.button}}</button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"product-sku\">\r\n <div *ngIf=\"responseData?.itemInventory\">SKU :\r\n {{responseData?.itemInventory?.openingStock}}</div>\r\n <div *ngIf=\"responseData?.itemCategorisation?.itemCategories\">Category : <span\r\n *ngFor=\"let cat of responseData?.itemCategorisation?.itemCategories;let idx = index\">{{cat.refName}} <ng-container *ngIf=\"(idx+1) != responseData?.itemCategorisation?.itemCategories?.length\">,</ng-container>\r\n </span></div>\r\n <div *ngIf=\"(responseData?.itemCategorisation?.productTags?.length || 0) > 0\">Tags : <span\r\n *ngFor=\"let tag of responseData?.itemCategorisation?.productTags\">{{tag.tagName}},\r\n </span></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row prod-desc\" *ngIf=\"false\">\r\n <div class=\"tab-group\">\r\n <div class=\"tab\">Description</div>\r\n </div>\r\n <div style=\"margin-top: 10px;\" class=\"body-large\" *ngIf=\"responseData?.properties?.description\">{{responseData?.properties?.description}}</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</section>\r\n", styles: [".product-desc{display:flex}.row{margin-top:25px}.prod-img-block{display:flex;gap:5px}.img-list{display:flex;flex-direction:column;gap:5px}.img-list img{height:100px;width:100%;cursor:pointer}.item-img img{height:500px;width:460px}.price{font-weight:600;font-family:Poppins;font-size:20px;margin-top:15px}.product-desc{margin-top:15px}.button-parent{margin-top:15px;display:flex;gap:10px;align-items:center}.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}.product-sku{margin-top:20px}.product-sku div{font-weight:400;font-size:15px;color:#848484;font-family:Poppins;margin-top:.5rem}.tab-group{display:flex;gap:10px;overflow-y:scroll}.tab{font-family:Poppins;font-weight:500;font-size:18px;color:#222;padding-bottom:2px;border-bottom:1px solid black}@media screen and (max-width: 500px){.item-img img{width:100%;height:448px}.prod-img-block{flex-direction:column}.img-list{flex-direction:row;overflow-y:scroll}.product-detail,.prod-desc{margin-top:20px}.product-img{height:220px}}.send-btn{font-size:16px!important;padding:1rem 2rem;display:inline-flex;align-items:center;justify-content:center;width:fit-content!important;margin-top:1rem}.body-large{color:#848484}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}\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: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: HttpClientModule }, { 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:
|
|
4452
4556
|
//DIRECTIVE
|
|
4453
4557
|
ButtonDirectiveDirective, selector: "[simpoButtonDirective]", inputs: ["buttonStyle", "color", "scrollValue"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }] }); }
|
|
4454
4558
|
}
|
|
4455
4559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ProductDescComponent, decorators: [{
|
|
4456
4560
|
type: Component,
|
|
4457
|
-
args: [{ selector: 'simpo-product-desc', standalone: true, imports: [CommonModule,
|
|
4561
|
+
args: [{ selector: 'simpo-product-desc', standalone: true, imports: [CommonModule,
|
|
4562
|
+
FormsModule,
|
|
4563
|
+
HttpClientModule,
|
|
4458
4564
|
SimpoComponentModule,
|
|
4459
4565
|
//DIRECTIVE
|
|
4460
4566
|
ButtonDirectiveDirective,
|
|
4461
4567
|
AnimationDirective,
|
|
4462
4568
|
ContentFitDirective,
|
|
4463
4569
|
HoverDirective
|
|
4464
|
-
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover\r\n (hovering)=\"showEditTabs($event)\">\r\n <section class=\"container\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-6 col-12\">\r\n <div class=\"prod-img-block\">\r\n <div class=\"img-list\" *ngIf=\"screenWidth > 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n <div class=\"item-img\">\r\n <img [src]=\"currentImg\" alt=\"\">\r\n </div>\r\n <div class=\"img-list\" *ngIf=\"screenWidth <= 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-12 product-detail\">\r\n <div class=\"heading-large\">{{responseData?.name}}</div>\r\n <div class=\"price\">\u20B9 {{responseData?.price?.sellingPrice}}</div>\r\n <div class=\"product-desc body-large\" *ngIf=\"responseData?.
|
|
4570
|
+
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover\r\n (hovering)=\"showEditTabs($event)\">\r\n <section class=\"container\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-6 col-12\">\r\n <div class=\"prod-img-block\">\r\n <div class=\"img-list\" *ngIf=\"screenWidth > 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n <div class=\"item-img\">\r\n <img [src]=\"currentImg\" alt=\"\">\r\n </div>\r\n <div class=\"img-list\" *ngIf=\"screenWidth <= 500\">\r\n <ng-container *ngFor=\"let img of responseData?.itemImages\">\r\n <img [src]=\"img.imgUrl\" alt=\"\" class=\"img\" (click)=\"changeImg(img.imgUrl)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-12 product-detail\">\r\n <div class=\"heading-large\">{{responseData?.name}}</div>\r\n <div class=\"price\">\u20B9 {{responseData?.price?.sellingPrice}}</div>\r\n <div class=\"product-desc body-large\" *ngIf=\"responseData?.descriptor?.name\">{{responseData?.descriptor?.name}}</div>\r\n\r\n <div class=\"button-parent\">\r\n <div class=\"quantity\" *ngIf=\"addedQuantity\">\r\n <div class=\"plus\" (click)=\"addOrSubtractQuantity('SUBSTRACT')\">-</div>\r\n <div style=\"width: 50px;\" class=\"d-flex justify-content-center\">{{addedQuantity}}</div>\r\n <!-- <input type=\"number\" (keyup)=\"changeQuantity(quantity.value)\" [value]=\"addedQuantity\" #quantity> -->\r\n <div class=\"minus\" (click)=\"addOrSubtractQuantity('ADD')\">+</div>\r\n </div>\r\n <div *ngIf=\"!addedQuantity\">\r\n <button class=\"send-btn\" simpoButtonDirective [id]=\"buttonId\" [buttonStyle]=\"button?.styles\" [color]=\"data?.styles?.background?.accentColor\" (click)=\"addToCart()\">{{data?.content?.button}}</button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"product-sku\">\r\n <div *ngIf=\"responseData?.itemInventory\">SKU :\r\n {{responseData?.itemInventory?.openingStock}}</div>\r\n <div *ngIf=\"responseData?.itemCategorisation?.itemCategories\">Category : <span\r\n *ngFor=\"let cat of responseData?.itemCategorisation?.itemCategories;let idx = index\">{{cat.refName}} <ng-container *ngIf=\"(idx+1) != responseData?.itemCategorisation?.itemCategories?.length\">,</ng-container>\r\n </span></div>\r\n <div *ngIf=\"(responseData?.itemCategorisation?.productTags?.length || 0) > 0\">Tags : <span\r\n *ngFor=\"let tag of responseData?.itemCategorisation?.productTags\">{{tag.tagName}},\r\n </span></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row prod-desc\" *ngIf=\"false\">\r\n <div class=\"tab-group\">\r\n <div class=\"tab\">Description</div>\r\n </div>\r\n <div style=\"margin-top: 10px;\" class=\"body-large\" *ngIf=\"responseData?.properties?.description\">{{responseData?.properties?.description}}</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</section>\r\n", styles: [".product-desc{display:flex}.row{margin-top:25px}.prod-img-block{display:flex;gap:5px}.img-list{display:flex;flex-direction:column;gap:5px}.img-list img{height:100px;width:100%;cursor:pointer}.item-img img{height:500px;width:460px}.price{font-weight:600;font-family:Poppins;font-size:20px;margin-top:15px}.product-desc{margin-top:15px}.button-parent{margin-top:15px;display:flex;gap:10px;align-items:center}.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}.product-sku{margin-top:20px}.product-sku div{font-weight:400;font-size:15px;color:#848484;font-family:Poppins;margin-top:.5rem}.tab-group{display:flex;gap:10px;overflow-y:scroll}.tab{font-family:Poppins;font-weight:500;font-size:18px;color:#222;padding-bottom:2px;border-bottom:1px solid black}@media screen and (max-width: 500px){.item-img img{width:100%;height:448px}.prod-img-block{flex-direction:column}.img-list{flex-direction:row;overflow-y:scroll}.product-detail,.prod-desc{margin-top:20px}.product-img{height:220px}}.send-btn{font-size:16px!important;padding:1rem 2rem;display:inline-flex;align-items:center;justify-content:center;width:fit-content!important;margin-top:1rem}.body-large{color:#848484}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}\n"] }]
|
|
4465
4571
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
4466
4572
|
type: Inject,
|
|
4467
4573
|
args: [PLATFORM_ID]
|
|
4468
|
-
}] }, { type: EventsService }, { type: i2$5.MatSnackBar }], propDecorators: { data: [{
|
|
4574
|
+
}] }, { type: EventsService }, { type: i2$5.MatSnackBar }, { type: i2$4.ActivatedRoute }, { type: RestService }, { type: CartService }], propDecorators: { data: [{
|
|
4469
4575
|
type: Input
|
|
4470
4576
|
}], responseData: [{
|
|
4471
4577
|
type: Input
|
|
@@ -4563,7 +4669,7 @@ class ProductListComponent extends BaseSection {
|
|
|
4563
4669
|
return this.screenWidth > 475 ? (this.screenWidth < 1025 ? '25%' : 'calc(' + ((100 / (this.styles?.elementInRow || 4))) + '%)') : (this.styles?.mobileColumn === 1 ? '100%' : '50%');
|
|
4564
4670
|
}
|
|
4565
4671
|
proceedToProductDesc(productId) {
|
|
4566
|
-
this.router.navigate(['
|
|
4672
|
+
this.router.navigate(['details'], { queryParams: { id: productId } });
|
|
4567
4673
|
// this._eventService.redirectToPage.emit({redirectTo: '/details', data: {productId: productId}})
|
|
4568
4674
|
}
|
|
4569
4675
|
clearFilter() {
|
|
@@ -4747,6 +4853,7 @@ class Product {
|
|
|
4747
4853
|
this.recommended = json?.["recommended"];
|
|
4748
4854
|
this.returnable = json?.["returnable"];
|
|
4749
4855
|
this.availableOnCod = json?.["availableOnCod"];
|
|
4856
|
+
this.quantity = json?.["quantity"];
|
|
4750
4857
|
}
|
|
4751
4858
|
}
|
|
4752
4859
|
|