tango-app-ui-analyse-zone 3.3.0-alpha.9 → 3.3.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/services/zonev2.service.mjs +105 -0
- package/esm2022/lib/components/tango-analyse-zone/tango-analyse-zone.component.mjs +2 -1
- package/esm2022/lib/components/zone-concentration/concentrationheatmap/concentrationheatmap.component.mjs +6 -6
- package/esm2022/lib/components/zone-concentration/zone-concentration.component.mjs +3 -3
- package/esm2022/lib/components/zone-v2/customer-journey/customer-journey.component.mjs +93 -0
- package/esm2022/lib/components/zone-v2/image-directory/image-directory.component.mjs +210 -0
- package/esm2022/lib/components/zone-v2/image-directory-view/image-directory-view.component.mjs +93 -0
- package/esm2022/lib/components/zone-v2/reactive-select/reactive-select.component.mjs +87 -0
- package/esm2022/lib/components/zone-v2/store-heatmap/store-heatmap.component.mjs +615 -0
- package/esm2022/lib/components/zone-v2/store-heatmap/store-zoom-heatmap/store-zoom-heatmap.component.mjs +23 -0
- package/esm2022/lib/components/zone-v2/summary-table/summary-table.component.mjs +168 -0
- package/esm2022/lib/components/zone-v2/top-performing/top-performing.component.mjs +157 -0
- package/esm2022/lib/components/zone-v2/zone-v2.component.mjs +47 -5
- package/esm2022/lib/components/zone-v2/zones-cards/zones-cards.component.mjs +57 -0
- package/esm2022/lib/tango-analyse-zone-routing.module.mjs +2 -2
- package/esm2022/lib/tango-analyse-zone.module.mjs +74 -10
- package/fesm2022/tango-app-ui-analyse-zone.mjs +1710 -91
- package/fesm2022/tango-app-ui-analyse-zone.mjs.map +1 -1
- package/lib/components/services/zonev2.service.d.ts +35 -0
- package/lib/components/zone-concentration/concentrationheatmap/concentrationheatmap.component.d.ts +2 -2
- package/lib/components/zone-concentration/zone-concentration.component.d.ts +1 -1
- package/lib/components/zone-v2/customer-journey/customer-journey.component.d.ts +23 -0
- package/lib/components/zone-v2/image-directory/image-directory.component.d.ts +50 -0
- package/lib/components/zone-v2/image-directory-view/image-directory-view.component.d.ts +34 -0
- package/lib/components/zone-v2/reactive-select/reactive-select.component.d.ts +26 -0
- package/lib/components/zone-v2/store-heatmap/store-heatmap.component.d.ts +74 -0
- package/lib/components/zone-v2/store-heatmap/store-zoom-heatmap/store-zoom-heatmap.component.d.ts +14 -0
- package/lib/components/zone-v2/summary-table/summary-table.component.d.ts +44 -0
- package/lib/components/zone-v2/top-performing/top-performing.component.d.ts +42 -0
- package/lib/components/zone-v2/zone-v2.component.d.ts +11 -0
- package/lib/components/zone-v2/zones-cards/zones-cards.component.d.ts +18 -0
- package/lib/tango-analyse-zone.module.d.ts +15 -6
- package/package.json +1 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Input, ElementRef, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, ElementRef, ViewChild, forwardRef, EventEmitter, HostListener, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, takeUntil, Subject, throwError, debounceTime } from 'rxjs';
|
|
4
4
|
import * as i2 from 'tango-app-ui-global';
|
|
5
5
|
import * as i6 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as am5 from '@amcharts/amcharts5';
|
|
8
8
|
import * as am5percent from '@amcharts/amcharts5/percent';
|
|
9
|
-
import { takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
9
|
+
import { takeUntil as takeUntil$1, debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
10
10
|
import * as FileSaver from 'file-saver';
|
|
11
11
|
import * as XLSX from 'xlsx';
|
|
12
12
|
import * as i1 from '@angular/common/http';
|
|
13
13
|
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
|
|
14
|
-
import { NgbCarouselConfig, NgbProgressbarModule,
|
|
14
|
+
import { NgbCarouselConfig, NgbProgressbarModule, NgbTooltipModule, NgbModule, NgbAccordionModule, NgbCarouselModule } from '@ng-bootstrap/ng-bootstrap';
|
|
15
15
|
import * as am5xy from '@amcharts/amcharts5/xy';
|
|
16
16
|
import * as i2$1 from '@angular/forms';
|
|
17
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
17
|
+
import { NG_VALUE_ACCESSOR, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
18
18
|
import * as i4 from 'tango-app-ui-shared';
|
|
19
19
|
import { CommonSharedModule } from 'tango-app-ui-shared';
|
|
20
20
|
import * as i4$1 from '@angular/router';
|
|
21
21
|
import { RouterModule } from '@angular/router';
|
|
22
22
|
import dayjs from 'dayjs';
|
|
23
|
+
import * as am5flow from '@amcharts/amcharts5/flow';
|
|
24
|
+
import am5themes_Animated from '@amcharts/amcharts5/themes/Animated';
|
|
23
25
|
|
|
24
|
-
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
25
|
-
const EXCEL_EXTENSION = '.xlsx';
|
|
26
|
+
const EXCEL_TYPE$1 = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
27
|
+
const EXCEL_EXTENSION$1 = '.xlsx';
|
|
26
28
|
class ZoneService {
|
|
27
29
|
http;
|
|
28
30
|
gs;
|
|
@@ -49,15 +51,15 @@ class ZoneService {
|
|
|
49
51
|
}
|
|
50
52
|
saveAsExcelFile(buffer, fileName) {
|
|
51
53
|
const data = new Blob([buffer], {
|
|
52
|
-
type: EXCEL_TYPE
|
|
54
|
+
type: EXCEL_TYPE$1
|
|
53
55
|
});
|
|
54
|
-
FileSaver.saveAs(data, fileName + 'list' + EXCEL_EXTENSION);
|
|
56
|
+
FileSaver.saveAs(data, fileName + 'list' + EXCEL_EXTENSION$1);
|
|
55
57
|
}
|
|
56
58
|
saveAsTemplate(buffer, fileName) {
|
|
57
59
|
const data = new Blob([buffer], {
|
|
58
|
-
type: EXCEL_TYPE
|
|
60
|
+
type: EXCEL_TYPE$1
|
|
59
61
|
});
|
|
60
|
-
FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);
|
|
62
|
+
FileSaver.saveAs(data, fileName + EXCEL_EXTENSION$1);
|
|
61
63
|
}
|
|
62
64
|
destroy$ = new Subject();
|
|
63
65
|
ngOnDestroy() {
|
|
@@ -713,21 +715,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
713
715
|
}], ctorParameters: () => [{ type: ZoneService }, { type: i0.ChangeDetectorRef }, { type: i2.GlobalStateService }, { type: i1$1.NgbModal }, { type: i4$1.Router }, { type: i4$1.ActivatedRoute }, { type: i4.ToastService }] });
|
|
714
716
|
|
|
715
717
|
class ConcentrationheatmapComponent {
|
|
716
|
-
|
|
718
|
+
imageURLV1;
|
|
717
719
|
overallStoreData = { ImageURLs: [] };
|
|
718
720
|
constructor() { }
|
|
719
721
|
ngOnInit() {
|
|
720
|
-
if (this.
|
|
721
|
-
this.overallStoreData.ImageURLs = this.
|
|
722
|
+
if (this.imageURLV1) {
|
|
723
|
+
this.overallStoreData.ImageURLs = this.imageURLV1;
|
|
722
724
|
}
|
|
723
725
|
}
|
|
724
726
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ConcentrationheatmapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
725
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ConcentrationheatmapComponent, selector: "lib-concentrationheatmap", inputs: {
|
|
727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ConcentrationheatmapComponent, selector: "lib-concentrationheatmap", inputs: { imageURLV1: "imageURLV1" }, ngImport: i0, template: "<div class=\"modal-body\">\r\n<ngb-carousel *ngIf=\"overallStoreData?.ImageURLs?.length\">\r\n <ng-container *ngFor=\"let image of overallStoreData.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container\">\r\n <img [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n ", styles: [".modal-body{text-align:center}.img-fluid{max-width:100%;height:auto}.cardimg{width:100%}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.NgbCarousel, selector: "ngb-carousel", inputs: ["animation", "activeId", "interval", "wrap", "keyboard", "pauseOnHover", "pauseOnFocus", "showNavigationArrows", "showNavigationIndicators"], outputs: ["slide", "slid"], exportAs: ["ngbCarousel"] }, { kind: "directive", type: i1$1.NgbSlide, selector: "ng-template[ngbSlide]", inputs: ["id"], outputs: ["slid"] }] });
|
|
726
728
|
}
|
|
727
729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ConcentrationheatmapComponent, decorators: [{
|
|
728
730
|
type: Component,
|
|
729
731
|
args: [{ selector: 'lib-concentrationheatmap', template: "<div class=\"modal-body\">\r\n<ngb-carousel *ngIf=\"overallStoreData?.ImageURLs?.length\">\r\n <ng-container *ngFor=\"let image of overallStoreData.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container\">\r\n <img [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n ", styles: [".modal-body{text-align:center}.img-fluid{max-width:100%;height:auto}.cardimg{width:100%}\n"] }]
|
|
730
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
732
|
+
}], ctorParameters: () => [], propDecorators: { imageURLV1: [{
|
|
731
733
|
type: Input
|
|
732
734
|
}] } });
|
|
733
735
|
|
|
@@ -976,11 +978,11 @@ class ZoneConcentrationComponent {
|
|
|
976
978
|
this.zoneName = zoneName;
|
|
977
979
|
this.getOverallStoreHeatmapDates();
|
|
978
980
|
}
|
|
979
|
-
concentrationHeatmap(
|
|
981
|
+
concentrationHeatmap(imageURLV1) {
|
|
980
982
|
const modalRef = this.modalService.open(ConcentrationheatmapComponent, {
|
|
981
983
|
centered: true, size: 'xl'
|
|
982
984
|
});
|
|
983
|
-
modalRef.componentInstance.
|
|
985
|
+
modalRef.componentInstance.imageURLV1 = imageURLV1;
|
|
984
986
|
modalRef.result.then((result) => {
|
|
985
987
|
});
|
|
986
988
|
}
|
|
@@ -1035,6 +1037,7 @@ class TangoAnalyseZoneComponent {
|
|
|
1035
1037
|
]);
|
|
1036
1038
|
}
|
|
1037
1039
|
updateStoreId() {
|
|
1040
|
+
console.log("this.storeId", this.storeId);
|
|
1038
1041
|
this.storeId = this.headerData.stores.filter((store) => store.checked).length;
|
|
1039
1042
|
}
|
|
1040
1043
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneComponent, deps: [{ token: i2.PageInfoService }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -1045,87 +1048,1703 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
1045
1048
|
args: [{ selector: 'lib-tango-analyse-zone', template: "<div *ngIf=\"storeId === 1\">\r\n<lib-zone-concentration></lib-zone-concentration>\r\n</div>\r\n<div class=\"mt-4\">\r\n <lib-overallcards></lib-overallcards>\r\n</div>\r\n<div class=\"mt-2\" *ngIf=\"storeId > 1\">\r\n <lib-top-performing-zones></lib-top-performing-zones>\r\n</div>\r\n<div class=\"mt-4\" *ngIf=\"storeId > 1\">\r\n <lib-zone-summary-table></lib-zone-summary-table>\r\n</div>\r\n" }]
|
|
1046
1049
|
}], ctorParameters: () => [{ type: i2.PageInfoService }, { type: i2.GlobalStateService }] });
|
|
1047
1050
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
+
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
1052
|
+
const EXCEL_EXTENSION = '.xlsx';
|
|
1053
|
+
class Zonev2Service {
|
|
1054
|
+
http;
|
|
1055
|
+
gs;
|
|
1056
|
+
zoneAnalysisUrl;
|
|
1057
|
+
trafficApiUrl;
|
|
1058
|
+
reloadDataSubject = new BehaviorSubject(false);
|
|
1059
|
+
reloadData$ = this.reloadDataSubject.asObservable();
|
|
1060
|
+
constructor(http, gs) {
|
|
1061
|
+
this.http = http;
|
|
1062
|
+
this.gs = gs;
|
|
1063
|
+
this.gs.environment.pipe(takeUntil(this.destroy$)).subscribe((env) => {
|
|
1064
|
+
if (env) {
|
|
1065
|
+
this.zoneAnalysisUrl = env.zoneAnalysisUrl;
|
|
1066
|
+
this.trafficApiUrl = env.trafficApiUrl;
|
|
1067
|
+
}
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
triggerReload() {
|
|
1071
|
+
this.reloadDataSubject.next(true);
|
|
1072
|
+
}
|
|
1073
|
+
exportAsExcelFile(json, excelFileName) {
|
|
1074
|
+
const worksheet = XLSX.utils.json_to_sheet(json);
|
|
1075
|
+
const workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
|
|
1076
|
+
const excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
|
|
1077
|
+
this.saveAsExcelFile(excelBuffer, excelFileName);
|
|
1078
|
+
}
|
|
1079
|
+
saveAsExcelFile(buffer, fileName) {
|
|
1080
|
+
const data = new Blob([buffer], {
|
|
1081
|
+
type: EXCEL_TYPE
|
|
1082
|
+
});
|
|
1083
|
+
FileSaver.saveAs(data, fileName + 'list' + EXCEL_EXTENSION);
|
|
1084
|
+
}
|
|
1085
|
+
saveAsTemplate(buffer, fileName) {
|
|
1086
|
+
const data = new Blob([buffer], {
|
|
1087
|
+
type: EXCEL_TYPE
|
|
1088
|
+
});
|
|
1089
|
+
FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);
|
|
1090
|
+
}
|
|
1091
|
+
destroy$ = new Subject();
|
|
1092
|
+
ngOnDestroy() {
|
|
1093
|
+
this.destroy$.next(true);
|
|
1094
|
+
this.destroy$.complete();
|
|
1095
|
+
}
|
|
1096
|
+
// V2 API
|
|
1097
|
+
getZoneCardsData(data) {
|
|
1098
|
+
return this.http.post(`${this.zoneAnalysisUrl}/zonecards`, data);
|
|
1099
|
+
}
|
|
1100
|
+
getTopPerformingZones(data) {
|
|
1101
|
+
return this.http.post(`${this.zoneAnalysisUrl}/topPerformingZones`, data);
|
|
1102
|
+
}
|
|
1103
|
+
getTopPerformingStores(data) {
|
|
1104
|
+
return this.http.post(`${this.zoneAnalysisUrl}/topPerformingStores`, data);
|
|
1105
|
+
}
|
|
1106
|
+
getSummaryTableData(data) {
|
|
1107
|
+
return this.http.post(`${this.zoneAnalysisUrl}/zoneSummaryTable`, data);
|
|
1108
|
+
}
|
|
1109
|
+
getSummaryTableExport(data) {
|
|
1110
|
+
return this.http.post(`${this.zoneAnalysisUrl}/zoneSummaryTable`, data, { responseType: 'arraybuffer' });
|
|
1111
|
+
}
|
|
1112
|
+
getAvailableZoneNames(data) {
|
|
1113
|
+
return this.http.post(`${this.zoneAnalysisUrl}/availableZoneNames`, data);
|
|
1114
|
+
}
|
|
1115
|
+
getOverallStoreHeatmapDates(data) {
|
|
1116
|
+
return this.http.post(`${this.zoneAnalysisUrl}/overallStoreConcentrationDates`, data);
|
|
1117
|
+
}
|
|
1118
|
+
getOverallStoreConcentrationData(data) {
|
|
1119
|
+
return this.http.post(`${this.zoneAnalysisUrl}/overallStoreConcentrationHeatmap`, data);
|
|
1120
|
+
}
|
|
1121
|
+
getAnalaysisSummary(data) {
|
|
1122
|
+
return this.http.post(`${this.zoneAnalysisUrl}/zoneConcentrationSummary`, data);
|
|
1123
|
+
}
|
|
1124
|
+
getTrajectoryAnalysis(data) {
|
|
1125
|
+
return this.http.post(`${this.zoneAnalysisUrl}/trajectoryAnalysis`, data);
|
|
1126
|
+
}
|
|
1127
|
+
getFootfallDirectoryFolders(params) {
|
|
1128
|
+
return this.http.post(`${this.trafficApiUrl}/footfallDirectoryFolders`, params);
|
|
1129
|
+
}
|
|
1130
|
+
getFootfallDirectory(params) {
|
|
1131
|
+
return this.http.post(`${this.trafficApiUrl}/footfallDirectory`, params);
|
|
1132
|
+
}
|
|
1133
|
+
getStoresActive(params) {
|
|
1134
|
+
return this.http.post(`${this.zoneAnalysisUrl}/getMySubscription`, params);
|
|
1135
|
+
}
|
|
1136
|
+
handleError(error) {
|
|
1137
|
+
return throwError(() => new Error("Something bad happened; please try again later"));
|
|
1138
|
+
}
|
|
1139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: Zonev2Service, deps: [{ token: i1.HttpClient }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1140
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: Zonev2Service, providedIn: 'root' });
|
|
1051
1141
|
}
|
|
1052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type:
|
|
1142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: Zonev2Service, decorators: [{
|
|
1143
|
+
type: Injectable,
|
|
1144
|
+
args: [{
|
|
1145
|
+
providedIn: 'root'
|
|
1146
|
+
}]
|
|
1147
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.GlobalStateService }] });
|
|
1148
|
+
|
|
1149
|
+
class ZonesCardsComponent {
|
|
1150
|
+
Zonev2Service;
|
|
1151
|
+
changeDetector;
|
|
1152
|
+
gs;
|
|
1153
|
+
zoneCardsData;
|
|
1154
|
+
headerData;
|
|
1155
|
+
destroy$ = new Subject();
|
|
1156
|
+
constructor(Zonev2Service, changeDetector, gs) {
|
|
1157
|
+
this.Zonev2Service = Zonev2Service;
|
|
1158
|
+
this.changeDetector = changeDetector;
|
|
1159
|
+
this.gs = gs;
|
|
1160
|
+
}
|
|
1161
|
+
ngOnInit() {
|
|
1162
|
+
this.gs.dataRangeValue
|
|
1163
|
+
.pipe(takeUntil$1(this.destroy$), debounceTime(300))
|
|
1164
|
+
.subscribe((data) => {
|
|
1165
|
+
this.headerData = data;
|
|
1166
|
+
this.getZoneCards();
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
ngOnDestroy() {
|
|
1170
|
+
this.destroy$.next();
|
|
1171
|
+
this.destroy$.complete();
|
|
1172
|
+
}
|
|
1173
|
+
getZoneCards() {
|
|
1174
|
+
const requestData = {
|
|
1175
|
+
fromDate: '2024-07-01',
|
|
1176
|
+
toDate: '2024-07-22',
|
|
1177
|
+
storeId: ['11'],
|
|
1178
|
+
// clientId:this.headerData.client,
|
|
1179
|
+
};
|
|
1180
|
+
this.Zonev2Service.getZoneCardsData(requestData).pipe(takeUntil$1(this.destroy$)).subscribe((response) => {
|
|
1181
|
+
if (response?.status === 'success') {
|
|
1182
|
+
this.zoneCardsData = response.data.card;
|
|
1183
|
+
}
|
|
1184
|
+
else {
|
|
1185
|
+
this.zoneCardsData = [];
|
|
1186
|
+
}
|
|
1187
|
+
}, (error) => {
|
|
1188
|
+
this.zoneCardsData = [];
|
|
1189
|
+
console.error('Error fetching zone card data', error);
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ZonesCardsComponent, deps: [{ token: Zonev2Service }, { token: i0.ChangeDetectorRef }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ZonesCardsComponent, selector: "lib-zones-cards", ngImport: i0, template: "<div class=\"col-md-12\">\r\n <div class=\"row d-flex justify-content-between align-items-stretch\">\r\n\r\n <!-- Total Store Footfall Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.footfall?.count ? zoneCardsData?.footfall?.count : '--'}}</span>\r\n <span class=\"cardtext\">Total Store Footfall</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.footfall?.zoneName ? zoneCardsData?.footfall?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Footfall <span class=\"subcount\">- {{zoneCardsData?.footfall?.zoneFootfallCount ? zoneCardsData?.footfall?.zoneFootfallCount : '--'}}</span></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Highest Impression Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.impression?.rate ? zoneCardsData?.impression?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Highest impression</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.impression?.zoneName ? zoneCardsData?.impression?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with <span class=\"subcount\">{{zoneCardsData?.impression?.zoneImpressionRate ? zoneCardsData?.impression?.zoneImpressionRate + '%' : '--'}}</span> <br> impression</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Total Bounced Rate Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.bounced?.rate ? zoneCardsData?.bounced?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Total Bounced Rate</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.bounced?.zoneName ? zoneCardsData?.bounced?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Bounced rate</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Engagers Rate Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.engagers?.rate ? zoneCardsData?.engagers?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Engagers Rate</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.engagers?.zoneName ? zoneCardsData?.engagers?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Engager Rate</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Average Dwell Time Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.avgDwellTime?.rate ? zoneCardsData?.avgDwellTime?.rate + ' Mins' : '--'}}</span>\r\n <span class=\"cardtext\">Average Dwell Time</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.avgDwellTime?.zoneName ? zoneCardsData?.avgDwellTime?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Dwell Time</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: [".ellipse1{border-radius:6px;border-bottom:2px solid var(--Gray-200, #EAECF0);background:radial-gradient(206.89% 107.47% at 16.16% 32.77%,#fff6,#45bbfe33),#f2f4f7;box-shadow:0 4px 10px #0000000d}.cardcount{color:var(--Gray-900, #101828);font-size:20px;font-style:normal;font-weight:700;line-height:30px}.cardtext{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:21px}.subcount{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:700;line-height:20px}.card-border{padding:8px;border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.zonecard{width:130%;background:var(--White, #FFF)}\n"] });
|
|
1194
|
+
}
|
|
1195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ZonesCardsComponent, decorators: [{
|
|
1053
1196
|
type: Component,
|
|
1054
|
-
args: [{ selector: 'lib-
|
|
1055
|
-
}] });
|
|
1197
|
+
args: [{ selector: 'lib-zones-cards', template: "<div class=\"col-md-12\">\r\n <div class=\"row d-flex justify-content-between align-items-stretch\">\r\n\r\n <!-- Total Store Footfall Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.footfall?.count ? zoneCardsData?.footfall?.count : '--'}}</span>\r\n <span class=\"cardtext\">Total Store Footfall</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.footfall?.zoneName ? zoneCardsData?.footfall?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Footfall <span class=\"subcount\">- {{zoneCardsData?.footfall?.zoneFootfallCount ? zoneCardsData?.footfall?.zoneFootfallCount : '--'}}</span></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Highest Impression Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.impression?.rate ? zoneCardsData?.impression?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Highest impression</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.impression?.zoneName ? zoneCardsData?.impression?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with <span class=\"subcount\">{{zoneCardsData?.impression?.zoneImpressionRate ? zoneCardsData?.impression?.zoneImpressionRate + '%' : '--'}}</span> <br> impression</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Total Bounced Rate Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.bounced?.rate ? zoneCardsData?.bounced?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Total Bounced Rate</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.bounced?.zoneName ? zoneCardsData?.bounced?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Bounced rate</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Engagers Rate Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.engagers?.rate ? zoneCardsData?.engagers?.rate + '%' : '--'}}</span>\r\n <span class=\"cardtext\">Engagers Rate</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.engagers?.zoneName ? zoneCardsData?.engagers?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Engager Rate</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Average Dwell Time Card -->\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border pt-2 h-100\">\r\n <div class=\"card-header ellipse1 border-0 px-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"cardcount\">{{zoneCardsData?.avgDwellTime?.rate ? zoneCardsData?.avgDwellTime?.rate + ' Mins' : '--'}}</span>\r\n <span class=\"cardtext\">Average Dwell Time</span>\r\n </h3>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"h-100px py-3 px-3\">\r\n <div class=\"cardcount my-2\"><u>{{zoneCardsData?.avgDwellTime?.zoneName ? zoneCardsData?.avgDwellTime?.zoneName : '--'}}</u></div>\r\n <div class=\"cardtext\">Zone with the <br> Highest Dwell Time</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: [".ellipse1{border-radius:6px;border-bottom:2px solid var(--Gray-200, #EAECF0);background:radial-gradient(206.89% 107.47% at 16.16% 32.77%,#fff6,#45bbfe33),#f2f4f7;box-shadow:0 4px 10px #0000000d}.cardcount{color:var(--Gray-900, #101828);font-size:20px;font-style:normal;font-weight:700;line-height:30px}.cardtext{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:21px}.subcount{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:700;line-height:20px}.card-border{padding:8px;border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.zonecard{width:130%;background:var(--White, #FFF)}\n"] }]
|
|
1198
|
+
}], ctorParameters: () => [{ type: Zonev2Service }, { type: i0.ChangeDetectorRef }, { type: i2.GlobalStateService }] });
|
|
1056
1199
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1200
|
+
class StoreZoomHeatmapComponent {
|
|
1201
|
+
imageURL;
|
|
1202
|
+
overallStoreData = { ImageURLs: [] };
|
|
1203
|
+
constructor() { }
|
|
1204
|
+
ngOnInit() {
|
|
1205
|
+
if (this.imageURL) {
|
|
1206
|
+
this.overallStoreData.ImageURLs = this.imageURL;
|
|
1207
|
+
}
|
|
1065
1208
|
}
|
|
1066
|
-
];
|
|
1067
|
-
class
|
|
1068
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1069
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
|
|
1070
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
1209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StoreZoomHeatmapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1210
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: StoreZoomHeatmapComponent, selector: "lib-store-zoom-heatmap", inputs: { imageURL: "imageURL" }, ngImport: i0, template: "<div class=\"modal-body\">\r\n <ngb-carousel *ngIf=\"overallStoreData?.ImageURLs?.length\">\r\n <ng-container *ngFor=\"let image of overallStoreData.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container\">\r\n <img [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n ", styles: [".modal-body{text-align:center}.img-fluid{max-width:100%;height:auto}.cardimg{width:100%}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.NgbCarousel, selector: "ngb-carousel", inputs: ["animation", "activeId", "interval", "wrap", "keyboard", "pauseOnHover", "pauseOnFocus", "showNavigationArrows", "showNavigationIndicators"], outputs: ["slide", "slid"], exportAs: ["ngbCarousel"] }, { kind: "directive", type: i1$1.NgbSlide, selector: "ng-template[ngbSlide]", inputs: ["id"], outputs: ["slid"] }] });
|
|
1071
1211
|
}
|
|
1072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type:
|
|
1073
|
-
type:
|
|
1074
|
-
args: [{
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}] });
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StoreZoomHeatmapComponent, decorators: [{
|
|
1213
|
+
type: Component,
|
|
1214
|
+
args: [{ selector: 'lib-store-zoom-heatmap', template: "<div class=\"modal-body\">\r\n <ngb-carousel *ngIf=\"overallStoreData?.ImageURLs?.length\">\r\n <ng-container *ngFor=\"let image of overallStoreData.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container\">\r\n <img [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n ", styles: [".modal-body{text-align:center}.img-fluid{max-width:100%;height:auto}.cardimg{width:100%}\n"] }]
|
|
1215
|
+
}], ctorParameters: () => [], propDecorators: { imageURL: [{
|
|
1216
|
+
type: Input
|
|
1217
|
+
}] } });
|
|
1079
1218
|
|
|
1080
|
-
class
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1219
|
+
class ImageDirectoryViewComponent {
|
|
1220
|
+
Zonev2Service;
|
|
1221
|
+
cd;
|
|
1222
|
+
Imagedata;
|
|
1223
|
+
processType;
|
|
1224
|
+
footfallDate;
|
|
1225
|
+
storeName;
|
|
1226
|
+
storeId;
|
|
1227
|
+
headerData;
|
|
1228
|
+
imageArray;
|
|
1229
|
+
folderName;
|
|
1230
|
+
Images;
|
|
1231
|
+
itemsPerPage = 10;
|
|
1232
|
+
currentPage = 1;
|
|
1233
|
+
totalItems = 1;
|
|
1234
|
+
paginationSizes = [1];
|
|
1235
|
+
pageSize = 1;
|
|
1236
|
+
dataSubscrptionValue = [];
|
|
1237
|
+
statusValues;
|
|
1238
|
+
filteredData;
|
|
1239
|
+
objData;
|
|
1240
|
+
storeArrayValue;
|
|
1241
|
+
constructor(Zonev2Service, cd) {
|
|
1242
|
+
this.Zonev2Service = Zonev2Service;
|
|
1243
|
+
this.cd = cd;
|
|
1244
|
+
}
|
|
1245
|
+
ngOnInit() {
|
|
1246
|
+
this.Images = this.Imagedata?.images?.entryTimeImage;
|
|
1247
|
+
this.filteredData = this.imageArray.filter((item) => item.folderName === this.folderName);
|
|
1248
|
+
this.totalItems = this.filteredData[0].count;
|
|
1249
|
+
this.getStoreActive();
|
|
1250
|
+
}
|
|
1251
|
+
destroy$ = new Subject();
|
|
1252
|
+
ngOnDestroy() {
|
|
1253
|
+
this.destroy$.next(true);
|
|
1254
|
+
this.destroy$.complete();
|
|
1255
|
+
}
|
|
1256
|
+
getStoreActive() {
|
|
1257
|
+
let obj = {
|
|
1258
|
+
"clientId": this.headerData.client,
|
|
1259
|
+
"storeId": this.storeId
|
|
1260
|
+
};
|
|
1261
|
+
this.Zonev2Service
|
|
1262
|
+
.getStoresActive(obj)
|
|
1263
|
+
.pipe(takeUntil(this.destroy$))
|
|
1264
|
+
?.subscribe({
|
|
1265
|
+
next: (res) => {
|
|
1266
|
+
if (res && res.code === 200) {
|
|
1267
|
+
this.dataSubscrptionValue = res.data.storeSubscription.product;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
imageData(type) {
|
|
1273
|
+
if (type === 'entry') {
|
|
1274
|
+
this.Images = this.Imagedata?.images?.entryTimeImage;
|
|
1275
|
+
}
|
|
1276
|
+
else if (type === 'exit') {
|
|
1277
|
+
this.Images = this.Imagedata?.images?.exitTimeImage;
|
|
1278
|
+
}
|
|
1279
|
+
else if (type === 'staff') {
|
|
1280
|
+
this.Images = this.Imagedata?.images?.staffEngagementImage;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ImageDirectoryViewComponent, deps: [{ token: Zonev2Service }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1284
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ImageDirectoryViewComponent, selector: "lib-image-directory-view", inputs: { Imagedata: "Imagedata", processType: "processType", footfallDate: "footfallDate", storeName: "storeName", storeId: "storeId", headerData: "headerData", imageArray: "imageArray", folderName: "folderName" }, ngImport: i0, template: "<div class=\"row h-550px scroll w-100\"></div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8 col-xxl-8\">\r\n <div class=\"row mb-3\">\r\n <div class=\"col-md-7\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <!-- Display footfall count or '--' if not available -->\r\n <span class=\"card-label header\">{{storeName | titlecase}} - {{footfallDate | date:'dd MMM, yyyy'}}</span>\r\n </h3>\r\n </div>\r\n <!-- Switch toggle -->\r\n <div class=\"col-md-5 text-end\">\r\n <span class=\"custId\">Customer ID</span>\r\n <span class=\"badge badge-light-primary mx-2\">{{Imagedata?.tempId}}</span>\r\n <span class=\"badge badge-light-danger\">{{processType | titlecase}} </span>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row contain\">\r\n <div class=\"col-12 mb-5\">\r\n <img class=\"cursor-pointer\" class=\"img-src\" [src]=\"Images\"\r\n (error)=\"Images = null\" alt=\"\">\r\n <div *ngIf=\"!Images\" class=\"no-preview\">\r\n <span class=\"mb-5\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\" d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-5 text-center\">Preview not available</span>\r\n <span class=\"description mb-5 text-center\">The selected camera is not available at the\r\n moment.</span>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"row slider\">\r\n\r\n <ng-container>\r\n <div class=\"col-4\" *ngIf=\"Imagedata?.images?.entryTimeImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.entryTimeImage,\r\n 'border-gray': Images !== Imagedata?.images?.entryTimeImage\r\n }\">\r\n <div>Entry Time</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.entryTimeImage\"\r\n (error)=\"Imagedata?.images.entryTimeImage = null\" alt=\"\" (click)=\"imageData('entry')\">\r\n <div *ngIf=\"!Imagedata?.images?.entryTimeImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-4\" *ngIf=\"Imagedata?.images?.staffEngagementImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.staffEngagementImage,\r\n 'border-gray': Images !== Imagedata?.images?.staffEngagementImage\r\n }\">\r\n <div>Staff Engagement</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.staffEngagementImage\"\r\n (error)=\"Imagedata?.images.staffEngagementImage = null\" alt=\"\" (click)=\"imageData('staff')\">\r\n <div *ngIf=\"!Imagedata?.images?.staffEngagementImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-4 \" *ngIf=\"Imagedata?.images?.exitTimeImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.exitTimeImage,\r\n 'border-gray': Images !== Imagedata?.images?.exitTimeImage\r\n }\">\r\n <div>Exit Time</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.exitTimeImage\"\r\n (error)=\"Imagedata?.images.exitTimeImage = null\" alt=\"\" (click)=\"imageData('exit')\">\r\n <div *ngIf=\"!Imagedata?.images?.exitTimeImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- <span (click)=\"next()\" class=\"next\">\r\n <span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7\" height=\"12\" viewBox=\"0 0 7 12\"\r\n fill=\"none\">\r\n <path d=\"M1 11L6 6L1 1\" stroke=\"#009BF3\" stroke-width=\"1.67\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n\r\n </span> -->\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <!-- <lib-pagination [itemsPerPage]=\"pageSize\" [currentPage]=\"currentPage\" [totalItems]=\"totalItems\"\r\n [paginationSizes]=\"paginationSizes\" [pageSize]=\"pageSize\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination> -->\r\n </div>\r\n <div class=\"col-md-12 col-lg-4 col-xl-4 col-xxl-4\">\r\n <div *ngIf=\"dataSubscrptionValue.tangoTraffic\" class=\"row\">\r\n <div class=\"col-12 mb-5 cam-details-header px-0\">Time Spent</div>\r\n <div class=\"row px-2 mb-2\">\r\n <div class=\"col-md-8\">\r\n\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Entry Time <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Exit Time <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n <div class=\"py-2 img-doc-time\">Total Time Spent</div>\r\n <!-- <div class=\"py-2 img-doc-time\">Avg Dwell Time</div> -->\r\n </div>\r\n <div class=\"col-md-4 text-end\">\r\n\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.entryTime ?? '--'}} </div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.exitTime ?? '--'}}</div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.totalTimeSpent ?? '--'}}</div>\r\n <!-- <div class=\"py-2 img-doc-value\">20 Mins</div> -->\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n <hr />\r\n\r\n <div *ngIf=\"!dataSubscrptionValue.tangoZone\" class=\"row my-2 px-2\">\r\n <div class=\"card productCard\">\r\n <div class=\"row \">\r\n <div class=\"col-md-7 py-5\">\r\n<div class=\"product-title\">\r\n Tango Zone\r\n</div>\r\n<div class=\"left-card-count-title mt-3\">\r\n Identify hotspots and optimize your merchandise with Tango Zone's store heatmap analytics\r\n</div>\r\n<div class=\"explore-btn mt-4\">Explore <span class=\"mx-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15 10.8333V15.8333C15 16.2754 14.8244 16.6993 14.5118 17.0118C14.1993 17.3244 13.7754 17.5 13.3333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V6.66667C2.5 6.22464 2.67559 5.80072 2.98816 5.48816C3.30072 5.17559 3.72464 5 4.16667 5H9.16667M12.5 2.5H17.5M17.5 2.5V7.5M17.5 2.5L8.33333 11.6667\" stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span></div>\r\n </div>\r\n <div class=\"col-md-5 px-0\">\r\n <img class=\"h-100 w-100\" src=\"assets/tango/Images/zone-tango.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"dataSubscrptionValue.tangoZone\" class=\"row\">\r\n <span class=\"zone-header\">Zones Visited</span>\r\n <ng-container class=\"h-200px scroll\">\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n </ng-container>\r\n <div class=\"col-md-6 mt-5\">\r\n <span class=\"last-visit\">Last Visited Zone</span>\r\n </div>\r\n <div class=\"col-md-6 mt-5\">\r\n <span class=\"badge badge-light-primary mx-2\"> John Jacobs</span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"dataSubscrptionValue.tangoZone\" class=\"mt-5 col-lg-12\">\r\n <button class=\"btn btn-light-primary1 w-100 px-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_4713_25)\">\r\n <path d=\"M19.6673 5.83341L13.834 10.0001L19.6673 14.1667V5.83341Z\" stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M12.1673 4.16675H3.00065C2.08018 4.16675 1.33398 4.91294 1.33398 5.83341V14.1667C1.33398 15.0872 2.08018 15.8334 3.00065 15.8334H12.1673C13.0878 15.8334 13.834 15.0872 13.834 14.1667V5.83341C13.834 4.91294 13.0878 4.16675 12.1673 4.16675Z\" stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4713_25\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" transform=\"translate(0.5)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg><span class=\"ms-2\">View Trajectory</span></button>\r\n </div>\r\n <hr />\r\n <div *ngIf=\"!dataSubscrptionValue.tangoTrax\" class=\"row my-2 px-2\">\r\n <div class=\"card productCard\">\r\n <div class=\"row \">\r\n <div class=\"col-md-7 py-5\">\r\n<div class=\"product-title\">\r\n Tango Trax\r\n</div>\r\n<div class=\"left-card-count-title mt-3\">\r\n Create AI-driven checklists to streamline your processes and boost compliance with Tango Trax.\r\n</div>\r\n<div class=\"explore-btn mt-4\">Explore <span class=\"mx-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15 10.8333V15.8333C15 16.2754 14.8244 16.6993 14.5118 17.0118C14.1993 17.3244 13.7754 17.5 13.3333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V6.66667C2.5 6.22464 2.67559 5.80072 2.98816 5.48816C3.30072 5.17559 3.72464 5 4.16667 5H9.16667M12.5 2.5H17.5M17.5 2.5V7.5M17.5 2.5L8.33333 11.6667\" stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span></div>\r\n </div>\r\n <div class=\"col-md-5 px-0\">\r\n <img class=\"h-100 w-100\" src=\"assets/tango/Images/trax-tango.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n \r\n <div *ngIf=\"dataSubscrptionValue.tangoTrax\" class=\"row\">\r\n <div class=\"zone-header my-3 ps-3\">Staff Engagement</div>\r\n\r\n <div class=\"row ps-3 mb-2\">\r\n <div class=\"col-md-8\">\r\n\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Time taken to assist <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n\r\n <div class=\"py-2 img-doc-time\">Time spent with staff</div>\r\n\r\n </div>\r\n <div class=\"col-md-4 text-end\">\r\n\r\n <div class=\"py-2 img-doc-value\">{{Imagedata?.staffEngagement?.timeTakenToAssist ?? '--'}} </div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata?.staffEngagement?.timeSpentWithStaff ?? '--'}} </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <hr /> -->\r\n", styles: [":host{padding:24px}.tabset{display:flex;border-bottom:1px solid #EAECF0;width:100%}.tabset .tab{padding:12px;color:#667085;font-size:14px;font-weight:500;line-height:20px;cursor:pointer}.tabset .selected{background:#eaf8ff;border-bottom:2px solid #009BF3}.active-dot{display:inline-block;width:12px;height:12px;border-radius:6px;border:1.5px solid #FFF;background:#12b76a}.inactive-dot{display:inline-block;width:12px;height:12px;border-radius:6px;border:1.5px solid #FFF;background:#f04438}.camera-number{color:#344054;font-size:14px;font-weight:600;line-height:20px}.camera-name-chip{padding:2px 8px;border-radius:16px;background:#eaf8ff;color:#009bf3;font-size:12px;font-weight:500;line-height:18px}.form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select{font-size:1.1rem;font-weight:400;border-radius:8px!important;color:var(--Gray-500, #667085);border:1px solid var(--Gray-300, #D0D5DD)!important;height:45px}.form-label{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:20px}.cam-details-header{color:#101828;font-size:18px;font-weight:600;line-height:28px}img{width:100%;border-radius:8px}.no-preview{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:120px 16px}.no-preview .header{color:#f04438;font-size:20px;font-weight:700;line-height:20px}.no-preview .description{color:#f04438;font-size:12px;font-weight:500;line-height:18px}.no-preview-sm{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:7px}.no-preview-sm .header{color:#f04438;font-size:14px;font-weight:500;line-height:20px}.no-preview-sm .description{color:#f04438;font-size:10px;font-weight:400;line-height:18px}.no-preview-md{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:90px 7px}.no-preview-md .header{color:#f04438;font-size:14px;font-weight:500;line-height:20px}.no-preview-md .description{color:#f04438;font-size:10px;font-weight:400;line-height:18px}.slider{position:relative}.slider .previous{position:absolute;top:30%;left:2%;width:32px;height:32px;background-color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.slider .next{position:absolute;top:30%;right:2%;width:32px;height:32px;background-color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.angle-change-header{color:#000;font-size:16px;font-weight:500;line-height:24px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f9fafb!important}.img-src{border-radius:12px;border:1px solid var(--Gray-400, #98A2B3);background:var(--Gray-50, #F9FAFB);width:100%;height:311px}.border-gray{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);padding:0 4px}.border-gray-active{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--Primary-50, #EAF8FF);padding:0 4px}.zone-header{color:var(--Gray-900, #101828);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.last-visit{color:var(--Gray-500, #667085);font-size:14px;font-style:normal;font-weight:400;line-height:20px}.btn-light-primary1{color:var(--White, #FFF)!important;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize;border-radius:4px!important;border:1px solid var(--Primary-600, #00A3FF)!important;background:var(--Primary-600, #00A3FF)!important;box-shadow:0 1px 2px #1018280d!important}.card-label{font-size:18px!important}.productCard{border-radius:12px;background:var(--Gray-50, #F9FAFB)}.product-title{color:var(--Gray-800, #1D2939);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.left-card-count-title{color:var(--Gray-700, #344054)!important;font-size:12px!important;font-style:normal;font-weight:400;line-height:18px}.explore-btn{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.custId{color:var(--Gray-900, #101828);font-size:12px;font-style:normal;font-weight:600;line-height:18px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
|
|
1106
1285
|
}
|
|
1107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type:
|
|
1108
|
-
type:
|
|
1109
|
-
args: [{
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ImageDirectoryViewComponent, decorators: [{
|
|
1287
|
+
type: Component,
|
|
1288
|
+
args: [{ selector: 'lib-image-directory-view', template: "<div class=\"row h-550px scroll w-100\"></div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8 col-xxl-8\">\r\n <div class=\"row mb-3\">\r\n <div class=\"col-md-7\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <!-- Display footfall count or '--' if not available -->\r\n <span class=\"card-label header\">{{storeName | titlecase}} - {{footfallDate | date:'dd MMM, yyyy'}}</span>\r\n </h3>\r\n </div>\r\n <!-- Switch toggle -->\r\n <div class=\"col-md-5 text-end\">\r\n <span class=\"custId\">Customer ID</span>\r\n <span class=\"badge badge-light-primary mx-2\">{{Imagedata?.tempId}}</span>\r\n <span class=\"badge badge-light-danger\">{{processType | titlecase}} </span>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row contain\">\r\n <div class=\"col-12 mb-5\">\r\n <img class=\"cursor-pointer\" class=\"img-src\" [src]=\"Images\"\r\n (error)=\"Images = null\" alt=\"\">\r\n <div *ngIf=\"!Images\" class=\"no-preview\">\r\n <span class=\"mb-5\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\" d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-5 text-center\">Preview not available</span>\r\n <span class=\"description mb-5 text-center\">The selected camera is not available at the\r\n moment.</span>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"row slider\">\r\n\r\n <ng-container>\r\n <div class=\"col-4\" *ngIf=\"Imagedata?.images?.entryTimeImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.entryTimeImage,\r\n 'border-gray': Images !== Imagedata?.images?.entryTimeImage\r\n }\">\r\n <div>Entry Time</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.entryTimeImage\"\r\n (error)=\"Imagedata?.images.entryTimeImage = null\" alt=\"\" (click)=\"imageData('entry')\">\r\n <div *ngIf=\"!Imagedata?.images?.entryTimeImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-4\" *ngIf=\"Imagedata?.images?.staffEngagementImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.staffEngagementImage,\r\n 'border-gray': Images !== Imagedata?.images?.staffEngagementImage\r\n }\">\r\n <div>Staff Engagement</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.staffEngagementImage\"\r\n (error)=\"Imagedata?.images.staffEngagementImage = null\" alt=\"\" (click)=\"imageData('staff')\">\r\n <div *ngIf=\"!Imagedata?.images?.staffEngagementImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-4 \" *ngIf=\"Imagedata?.images?.exitTimeImage\">\r\n <div class=\"mb-5 border-2\" [ngClass]=\"{\r\n 'border-gray-active': Images === Imagedata?.images?.exitTimeImage,\r\n 'border-gray': Images !== Imagedata?.images?.exitTimeImage\r\n }\">\r\n <div>Exit Time</div>\r\n <img class=\"cursor-pointer w-100 rounded-2 mh-100px pb-1\"\r\n [src]=\"Imagedata?.images?.exitTimeImage\"\r\n (error)=\"Imagedata?.images.exitTimeImage = null\" alt=\"\" (click)=\"imageData('exit')\">\r\n <div *ngIf=\"!Imagedata?.images?.exitTimeImage\" class=\"no-preview-sm cursor-pointer\">\r\n <span class=\"mb-2\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-2 text-center\">Preview not available</span>\r\n <span class=\"description mb-2 text-center\">The selected camera is not available\r\n at\r\n the\r\n moment.</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- <span (click)=\"next()\" class=\"next\">\r\n <span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7\" height=\"12\" viewBox=\"0 0 7 12\"\r\n fill=\"none\">\r\n <path d=\"M1 11L6 6L1 1\" stroke=\"#009BF3\" stroke-width=\"1.67\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n\r\n </span> -->\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <!-- <lib-pagination [itemsPerPage]=\"pageSize\" [currentPage]=\"currentPage\" [totalItems]=\"totalItems\"\r\n [paginationSizes]=\"paginationSizes\" [pageSize]=\"pageSize\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination> -->\r\n </div>\r\n <div class=\"col-md-12 col-lg-4 col-xl-4 col-xxl-4\">\r\n <div *ngIf=\"dataSubscrptionValue.tangoTraffic\" class=\"row\">\r\n <div class=\"col-12 mb-5 cam-details-header px-0\">Time Spent</div>\r\n <div class=\"row px-2 mb-2\">\r\n <div class=\"col-md-8\">\r\n\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Entry Time <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Exit Time <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n <div class=\"py-2 img-doc-time\">Total Time Spent</div>\r\n <!-- <div class=\"py-2 img-doc-time\">Avg Dwell Time</div> -->\r\n </div>\r\n <div class=\"col-md-4 text-end\">\r\n\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.entryTime ?? '--'}} </div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.exitTime ?? '--'}}</div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata.timeSpent.totalTimeSpent ?? '--'}}</div>\r\n <!-- <div class=\"py-2 img-doc-value\">20 Mins</div> -->\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n <hr />\r\n\r\n <div *ngIf=\"!dataSubscrptionValue.tangoZone\" class=\"row my-2 px-2\">\r\n <div class=\"card productCard\">\r\n <div class=\"row \">\r\n <div class=\"col-md-7 py-5\">\r\n<div class=\"product-title\">\r\n Tango Zone\r\n</div>\r\n<div class=\"left-card-count-title mt-3\">\r\n Identify hotspots and optimize your merchandise with Tango Zone's store heatmap analytics\r\n</div>\r\n<div class=\"explore-btn mt-4\">Explore <span class=\"mx-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15 10.8333V15.8333C15 16.2754 14.8244 16.6993 14.5118 17.0118C14.1993 17.3244 13.7754 17.5 13.3333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V6.66667C2.5 6.22464 2.67559 5.80072 2.98816 5.48816C3.30072 5.17559 3.72464 5 4.16667 5H9.16667M12.5 2.5H17.5M17.5 2.5V7.5M17.5 2.5L8.33333 11.6667\" stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span></div>\r\n </div>\r\n <div class=\"col-md-5 px-0\">\r\n <img class=\"h-100 w-100\" src=\"assets/tango/Images/zone-tango.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"dataSubscrptionValue.tangoZone\" class=\"row\">\r\n <span class=\"zone-header\">Zones Visited</span>\r\n <ng-container class=\"h-200px scroll\">\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n <div class=\"col-md-4 mt-2\">\r\n <span class=\"badge badge-light-primary \">Billing Area</span>\r\n </div>\r\n </ng-container>\r\n <div class=\"col-md-6 mt-5\">\r\n <span class=\"last-visit\">Last Visited Zone</span>\r\n </div>\r\n <div class=\"col-md-6 mt-5\">\r\n <span class=\"badge badge-light-primary mx-2\"> John Jacobs</span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"dataSubscrptionValue.tangoZone\" class=\"mt-5 col-lg-12\">\r\n <button class=\"btn btn-light-primary1 w-100 px-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_4713_25)\">\r\n <path d=\"M19.6673 5.83341L13.834 10.0001L19.6673 14.1667V5.83341Z\" stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M12.1673 4.16675H3.00065C2.08018 4.16675 1.33398 4.91294 1.33398 5.83341V14.1667C1.33398 15.0872 2.08018 15.8334 3.00065 15.8334H12.1673C13.0878 15.8334 13.834 15.0872 13.834 14.1667V5.83341C13.834 4.91294 13.0878 4.16675 12.1673 4.16675Z\" stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4713_25\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" transform=\"translate(0.5)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg><span class=\"ms-2\">View Trajectory</span></button>\r\n </div>\r\n <hr />\r\n <div *ngIf=\"!dataSubscrptionValue.tangoTrax\" class=\"row my-2 px-2\">\r\n <div class=\"card productCard\">\r\n <div class=\"row \">\r\n <div class=\"col-md-7 py-5\">\r\n<div class=\"product-title\">\r\n Tango Trax\r\n</div>\r\n<div class=\"left-card-count-title mt-3\">\r\n Create AI-driven checklists to streamline your processes and boost compliance with Tango Trax.\r\n</div>\r\n<div class=\"explore-btn mt-4\">Explore <span class=\"mx-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15 10.8333V15.8333C15 16.2754 14.8244 16.6993 14.5118 17.0118C14.1993 17.3244 13.7754 17.5 13.3333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V6.66667C2.5 6.22464 2.67559 5.80072 2.98816 5.48816C3.30072 5.17559 3.72464 5 4.16667 5H9.16667M12.5 2.5H17.5M17.5 2.5V7.5M17.5 2.5L8.33333 11.6667\" stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span></div>\r\n </div>\r\n <div class=\"col-md-5 px-0\">\r\n <img class=\"h-100 w-100\" src=\"assets/tango/Images/trax-tango.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n \r\n <div *ngIf=\"dataSubscrptionValue.tangoTrax\" class=\"row\">\r\n <div class=\"zone-header my-3 ps-3\">Staff Engagement</div>\r\n\r\n <div class=\"row ps-3 mb-2\">\r\n <div class=\"col-md-8\">\r\n\r\n <div class=\"py-2 img-doc-time text-primary text-decoration-underline fw-bold\">Time taken to assist <span\r\n class=\"ms-2\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"\r\n viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14ZM3.33333 14L10.6667 6.66667L14 10M6.66667 5.66667C6.66667 6.21895 6.21895 6.66667 5.66667 6.66667C5.11438 6.66667 4.66667 6.21895 4.66667 5.66667C4.66667 5.11438 5.11438 4.66667 5.66667 4.66667C6.21895 4.66667 6.66667 5.11438 6.66667 5.66667Z\"\r\n stroke=\"#667085\" stroke-width=\"1.2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span></div>\r\n\r\n <div class=\"py-2 img-doc-time\">Time spent with staff</div>\r\n\r\n </div>\r\n <div class=\"col-md-4 text-end\">\r\n\r\n <div class=\"py-2 img-doc-value\">{{Imagedata?.staffEngagement?.timeTakenToAssist ?? '--'}} </div>\r\n <div class=\"py-2 img-doc-value\">{{Imagedata?.staffEngagement?.timeSpentWithStaff ?? '--'}} </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <hr /> -->\r\n", styles: [":host{padding:24px}.tabset{display:flex;border-bottom:1px solid #EAECF0;width:100%}.tabset .tab{padding:12px;color:#667085;font-size:14px;font-weight:500;line-height:20px;cursor:pointer}.tabset .selected{background:#eaf8ff;border-bottom:2px solid #009BF3}.active-dot{display:inline-block;width:12px;height:12px;border-radius:6px;border:1.5px solid #FFF;background:#12b76a}.inactive-dot{display:inline-block;width:12px;height:12px;border-radius:6px;border:1.5px solid #FFF;background:#f04438}.camera-number{color:#344054;font-size:14px;font-weight:600;line-height:20px}.camera-name-chip{padding:2px 8px;border-radius:16px;background:#eaf8ff;color:#009bf3;font-size:12px;font-weight:500;line-height:18px}.form-control{display:block;height:45px;padding:.5rem 1rem;font-size:1.1rem;font-weight:400;color:var(--Gray-500, #667085);-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select{font-size:1.1rem;font-weight:400;border-radius:8px!important;color:var(--Gray-500, #667085);border:1px solid var(--Gray-300, #D0D5DD)!important;height:45px}.form-label{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:20px}.cam-details-header{color:#101828;font-size:18px;font-weight:600;line-height:28px}img{width:100%;border-radius:8px}.no-preview{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:120px 16px}.no-preview .header{color:#f04438;font-size:20px;font-weight:700;line-height:20px}.no-preview .description{color:#f04438;font-size:12px;font-weight:500;line-height:18px}.no-preview-sm{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:7px}.no-preview-sm .header{color:#f04438;font-size:14px;font-weight:500;line-height:20px}.no-preview-sm .description{color:#f04438;font-size:10px;font-weight:400;line-height:18px}.no-preview-md{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:90px 7px}.no-preview-md .header{color:#f04438;font-size:14px;font-weight:500;line-height:20px}.no-preview-md .description{color:#f04438;font-size:10px;font-weight:400;line-height:18px}.slider{position:relative}.slider .previous{position:absolute;top:30%;left:2%;width:32px;height:32px;background-color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.slider .next{position:absolute;top:30%;right:2%;width:32px;height:32px;background-color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.angle-change-header{color:#000;font-size:16px;font-weight:500;line-height:24px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f9fafb!important}.img-src{border-radius:12px;border:1px solid var(--Gray-400, #98A2B3);background:var(--Gray-50, #F9FAFB);width:100%;height:311px}.border-gray{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);padding:0 4px}.border-gray-active{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--Primary-50, #EAF8FF);padding:0 4px}.zone-header{color:var(--Gray-900, #101828);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.last-visit{color:var(--Gray-500, #667085);font-size:14px;font-style:normal;font-weight:400;line-height:20px}.btn-light-primary1{color:var(--White, #FFF)!important;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize;border-radius:4px!important;border:1px solid var(--Primary-600, #00A3FF)!important;background:var(--Primary-600, #00A3FF)!important;box-shadow:0 1px 2px #1018280d!important}.card-label{font-size:18px!important}.productCard{border-radius:12px;background:var(--Gray-50, #F9FAFB)}.product-title{color:var(--Gray-800, #1D2939);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.left-card-count-title{color:var(--Gray-700, #344054)!important;font-size:12px!important;font-style:normal;font-weight:400;line-height:18px}.explore-btn{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.custId{color:var(--Gray-900, #101828);font-size:12px;font-style:normal;font-weight:600;line-height:18px}\n"] }]
|
|
1289
|
+
}], ctorParameters: () => [{ type: Zonev2Service }, { type: i0.ChangeDetectorRef }], propDecorators: { Imagedata: [{
|
|
1290
|
+
type: Input
|
|
1291
|
+
}], processType: [{
|
|
1292
|
+
type: Input
|
|
1293
|
+
}], footfallDate: [{
|
|
1294
|
+
type: Input
|
|
1295
|
+
}], storeName: [{
|
|
1296
|
+
type: Input
|
|
1297
|
+
}], storeId: [{
|
|
1298
|
+
type: Input
|
|
1299
|
+
}], headerData: [{
|
|
1300
|
+
type: Input
|
|
1301
|
+
}], imageArray: [{
|
|
1302
|
+
type: Input
|
|
1303
|
+
}], folderName: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}] } });
|
|
1306
|
+
|
|
1307
|
+
const SELECT_CONTROL_VALUE_ACCESSOR = {
|
|
1308
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1309
|
+
useExisting: forwardRef(() => ReactiveSelectComponent),
|
|
1310
|
+
multi: true,
|
|
1311
|
+
};
|
|
1312
|
+
class ReactiveSelectComponent {
|
|
1313
|
+
onTouched;
|
|
1314
|
+
onChanged;
|
|
1315
|
+
isDisabled;
|
|
1316
|
+
idField;
|
|
1317
|
+
nameField;
|
|
1318
|
+
label;
|
|
1319
|
+
data;
|
|
1320
|
+
isOpened = false;
|
|
1321
|
+
selected = null;
|
|
1322
|
+
selectedId;
|
|
1323
|
+
writeValue(val) {
|
|
1324
|
+
this.selectedId = val;
|
|
1325
|
+
this.selected = this.data.filter((item) => item?.[this.idField] === val)[0];
|
|
1326
|
+
}
|
|
1327
|
+
registerOnChange(fn) {
|
|
1328
|
+
this.onChanged = fn;
|
|
1329
|
+
}
|
|
1330
|
+
registerOnTouched(fn) {
|
|
1331
|
+
this.onTouched = fn;
|
|
1332
|
+
}
|
|
1333
|
+
setDisabledState(isDisabled) {
|
|
1334
|
+
this.isDisabled = isDisabled;
|
|
1335
|
+
}
|
|
1336
|
+
onSelect(item) {
|
|
1337
|
+
this.onTouched();
|
|
1338
|
+
this.selected = item;
|
|
1339
|
+
this.selectedId = item?.[this.idField];
|
|
1340
|
+
this.isOpened = false;
|
|
1341
|
+
this.onChanged(this.selectedId);
|
|
1342
|
+
this.onSelectionChange(item);
|
|
1343
|
+
}
|
|
1344
|
+
onSelectionChange(item) {
|
|
1345
|
+
this.valueChange.emit(item?.[this.idField]);
|
|
1346
|
+
}
|
|
1347
|
+
onClick(event) {
|
|
1348
|
+
if (!this.isDisabled) {
|
|
1349
|
+
const targetElement = event.target;
|
|
1350
|
+
if (!this.isComponentClicked(targetElement)) {
|
|
1351
|
+
this.isOpened = false;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
isComponentClicked(targetElement) {
|
|
1356
|
+
const parentElement = targetElement.parentElement;
|
|
1357
|
+
if (parentElement) {
|
|
1358
|
+
const clickedOnComponent = parentElement.classList.contains('custom-select');
|
|
1359
|
+
if (clickedOnComponent) {
|
|
1360
|
+
return true;
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
return this.isComponentClicked(parentElement);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
return false;
|
|
1367
|
+
}
|
|
1368
|
+
valueChange = new EventEmitter();
|
|
1369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ReactiveSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1370
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ReactiveSelectComponent, selector: "lib-reactive-select", inputs: { idField: "idField", nameField: "nameField", label: "label", data: "data" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "document:click": "onClick($event)" } }, providers: [SELECT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"custom-select w-200px\">\r\n <div class=\"form-group\">\r\n <label *ngIf=\"label\" class=\"form-label w-100\">{{label}}</label>\r\n <div class=\"position-relative\">\r\n <div (click)=\"isOpened = !isOpened;\" [ngClass]=\"isDisabled ? 'disable' : ''\" class=\"form-select dropselect w-100\">\r\n {{selected?.[nameField]}}</div>\r\n <div *ngIf=\"isOpened\" class=\"card py-2 w-100 position-absolute end-0 z-1 drop-list\">\r\n <ul class=\"list-unstyled mb-2 w-100\">\r\n <li *ngFor=\"let item of data\" (click)=\"onSelect(item)\"\r\n [ngClass]=\"item?.[idField] === selected?.[idField] ? 'active' : ''\"\r\n class=\"text px-5 items cursor-pointer py-4 w-100\">\r\n {{item?.[nameField]}}\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-select .items:hover,.custom-select .tems.focus,.custom-select .items.active,.custom-select .camera.focus-visible{background:#f9fafb!important}.custom-select .drop-list{max-height:300px;overflow-y:auto}.custom-select .dropselect{color:var(--Gray-500, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;cursor:default;white-space:nowrap}.custom-select .text{color:var(--Gray-700, #344054);font-size:14px;font-weight:500;line-height:20px}.custom-select .disable{pointer-events:none;background-color:#f9fafb!important}.custom-select.items:hover,.custom-select .tems.focus,.custom-select .items.active,.custom-select .camera.focus-visible{background:#eaf8ff!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1371
|
+
}
|
|
1372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ReactiveSelectComponent, decorators: [{
|
|
1373
|
+
type: Component,
|
|
1374
|
+
args: [{ selector: 'lib-reactive-select', providers: [SELECT_CONTROL_VALUE_ACCESSOR], template: "<div class=\"custom-select w-200px\">\r\n <div class=\"form-group\">\r\n <label *ngIf=\"label\" class=\"form-label w-100\">{{label}}</label>\r\n <div class=\"position-relative\">\r\n <div (click)=\"isOpened = !isOpened;\" [ngClass]=\"isDisabled ? 'disable' : ''\" class=\"form-select dropselect w-100\">\r\n {{selected?.[nameField]}}</div>\r\n <div *ngIf=\"isOpened\" class=\"card py-2 w-100 position-absolute end-0 z-1 drop-list\">\r\n <ul class=\"list-unstyled mb-2 w-100\">\r\n <li *ngFor=\"let item of data\" (click)=\"onSelect(item)\"\r\n [ngClass]=\"item?.[idField] === selected?.[idField] ? 'active' : ''\"\r\n class=\"text px-5 items cursor-pointer py-4 w-100\">\r\n {{item?.[nameField]}}\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-select .items:hover,.custom-select .tems.focus,.custom-select .items.active,.custom-select .camera.focus-visible{background:#f9fafb!important}.custom-select .drop-list{max-height:300px;overflow-y:auto}.custom-select .dropselect{color:var(--Gray-500, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px;cursor:default;white-space:nowrap}.custom-select .text{color:var(--Gray-700, #344054);font-size:14px;font-weight:500;line-height:20px}.custom-select .disable{pointer-events:none;background-color:#f9fafb!important}.custom-select.items:hover,.custom-select .tems.focus,.custom-select .items.active,.custom-select .camera.focus-visible{background:#eaf8ff!important}\n"] }]
|
|
1375
|
+
}], propDecorators: { idField: [{
|
|
1376
|
+
type: Input
|
|
1377
|
+
}], nameField: [{
|
|
1378
|
+
type: Input
|
|
1379
|
+
}], label: [{
|
|
1380
|
+
type: Input
|
|
1381
|
+
}], data: [{
|
|
1382
|
+
type: Input
|
|
1383
|
+
}], onClick: [{
|
|
1384
|
+
type: HostListener,
|
|
1385
|
+
args: ['document:click', ['$event']]
|
|
1386
|
+
}], valueChange: [{
|
|
1387
|
+
type: Output
|
|
1388
|
+
}] } });
|
|
1389
|
+
|
|
1390
|
+
class ImageDirectoryComponent {
|
|
1391
|
+
Zonev2Service;
|
|
1392
|
+
gs;
|
|
1393
|
+
cd;
|
|
1394
|
+
modalService;
|
|
1395
|
+
fb;
|
|
1396
|
+
selectIndex = 0;
|
|
1397
|
+
selectedTime;
|
|
1398
|
+
objData;
|
|
1399
|
+
objectsArray;
|
|
1400
|
+
imagesArrayData;
|
|
1401
|
+
processType = "footfall";
|
|
1402
|
+
headerData;
|
|
1403
|
+
folderView = true;
|
|
1404
|
+
dayjs = dayjs;
|
|
1405
|
+
dateArray;
|
|
1406
|
+
form;
|
|
1407
|
+
noData = false;
|
|
1408
|
+
loading = true;
|
|
1409
|
+
storeArrayValue;
|
|
1410
|
+
storeIdarray;
|
|
1411
|
+
constructor(Zonev2Service, gs, cd, modalService, fb) {
|
|
1412
|
+
this.Zonev2Service = Zonev2Service;
|
|
1413
|
+
this.gs = gs;
|
|
1414
|
+
this.cd = cd;
|
|
1415
|
+
this.modalService = modalService;
|
|
1416
|
+
this.fb = fb;
|
|
1417
|
+
this.form = this.fb.group({
|
|
1418
|
+
selectValue: new FormControl('') // Initialize as FormControl
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
ngOnInit() {
|
|
1422
|
+
this.gs.dataRangeValue
|
|
1423
|
+
.pipe(takeUntil(this.destroy$), debounceTime$1(300))
|
|
1424
|
+
.subscribe((data) => {
|
|
1425
|
+
if (data !== null || data?.client !== null) {
|
|
1426
|
+
this.headerData = data;
|
|
1427
|
+
this.storeIdarray = this.headerData?.stores.filter((store) => store.checked).map((store) => store.storeId);
|
|
1428
|
+
this.objData = {
|
|
1429
|
+
storeId: data.stores
|
|
1430
|
+
.filter((store) => store.checked)
|
|
1431
|
+
.map((store) => store.storeId),
|
|
1432
|
+
clientId: data.client,
|
|
1433
|
+
processType: this.processType,
|
|
1434
|
+
footfallDate: this.headerData.date.endDate,
|
|
1435
|
+
};
|
|
1436
|
+
const initialValue = this.getInitialValue();
|
|
1437
|
+
const selectControl = this.form.get('selectValue');
|
|
1438
|
+
if (selectControl) {
|
|
1439
|
+
selectControl.setValue(initialValue);
|
|
1440
|
+
}
|
|
1441
|
+
this.backToFootfall();
|
|
1442
|
+
this.displayDateRange();
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
destroy$ = new Subject();
|
|
1447
|
+
ngOnDestroy() {
|
|
1448
|
+
this.destroy$.next(true);
|
|
1449
|
+
this.destroy$.complete();
|
|
1450
|
+
}
|
|
1451
|
+
getImageFolder() {
|
|
1452
|
+
delete this.objData.folderName;
|
|
1453
|
+
this.Zonev2Service
|
|
1454
|
+
.getFootfallDirectoryFolders(this.objData)
|
|
1455
|
+
.pipe(takeUntil(this.destroy$))
|
|
1456
|
+
?.subscribe({
|
|
1457
|
+
next: (res) => {
|
|
1458
|
+
if (res && res.code === 200) {
|
|
1459
|
+
this.objectsArray = res?.data.footfallData;
|
|
1460
|
+
this.selectedTime = this.objectsArray[0].folderName;
|
|
1461
|
+
this.objData.folderName = this.selectedTime;
|
|
1462
|
+
this.getImageView();
|
|
1463
|
+
this.cd.detectChanges();
|
|
1464
|
+
}
|
|
1465
|
+
else {
|
|
1466
|
+
this.loading = false;
|
|
1467
|
+
this.noData = true;
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
error: (err) => {
|
|
1471
|
+
this.cd.detectChanges();
|
|
1472
|
+
},
|
|
1473
|
+
complete: () => { },
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
getImageView() {
|
|
1477
|
+
this.loading = true;
|
|
1478
|
+
this.noData = false;
|
|
1479
|
+
this.Zonev2Service
|
|
1480
|
+
.getFootfallDirectory(this.objData)
|
|
1481
|
+
.pipe(takeUntil(this.destroy$))
|
|
1482
|
+
?.subscribe({
|
|
1483
|
+
next: (res) => {
|
|
1484
|
+
if (res && res.code === 200) {
|
|
1485
|
+
if (!res?.data.footfallData.length) {
|
|
1486
|
+
this.loading = false;
|
|
1487
|
+
this.noData = true;
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
this.imagesArrayData = res?.data.footfallData;
|
|
1491
|
+
this.storeArrayValue = res?.data.storeName;
|
|
1492
|
+
this.loading = false;
|
|
1493
|
+
this.noData = false;
|
|
1494
|
+
this.cd.detectChanges();
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
else {
|
|
1498
|
+
this.loading = false;
|
|
1499
|
+
this.noData = true;
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
error: (err) => {
|
|
1503
|
+
this.cd.detectChanges();
|
|
1504
|
+
},
|
|
1505
|
+
complete: () => { },
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
getimages(index, obj) {
|
|
1509
|
+
this.selectIndex = index;
|
|
1510
|
+
(this.objData.footfallDate = obj), (this.folderView = false);
|
|
1511
|
+
this.getImageFolder();
|
|
1512
|
+
}
|
|
1513
|
+
backToFootfall() {
|
|
1514
|
+
this.selectIndex = 0;
|
|
1515
|
+
this.folderView = true;
|
|
1516
|
+
}
|
|
1517
|
+
selectedTimes(val) {
|
|
1518
|
+
this.selectedTime = val;
|
|
1519
|
+
this.objData.folderName = val;
|
|
1520
|
+
this.folderView = false;
|
|
1521
|
+
this.selectedTime = val;
|
|
1522
|
+
this.getImageView();
|
|
1523
|
+
}
|
|
1524
|
+
imageView(obj, footfallDate) {
|
|
1525
|
+
const modalRef = this.modalService.open(ImageDirectoryViewComponent, {
|
|
1526
|
+
centered: true,
|
|
1527
|
+
size: "xl",
|
|
1528
|
+
scrollable: true,
|
|
1529
|
+
});
|
|
1530
|
+
modalRef.componentInstance.Imagedata = obj;
|
|
1531
|
+
modalRef.componentInstance.processType = this.objData.processType;
|
|
1532
|
+
modalRef.componentInstance.footfallDate = footfallDate;
|
|
1533
|
+
modalRef.componentInstance.storeName = this.storeArrayValue;
|
|
1534
|
+
modalRef.componentInstance.storeId = this.storeIdarray;
|
|
1535
|
+
modalRef.componentInstance.headerData = this.headerData;
|
|
1536
|
+
modalRef.componentInstance.imageArray = this.objectsArray;
|
|
1537
|
+
modalRef.componentInstance.folderName = this.objData.folderName;
|
|
1538
|
+
modalRef.result.then((result) => { });
|
|
1539
|
+
}
|
|
1540
|
+
getDateRangeArray(fromDate, toDate) {
|
|
1541
|
+
const start = new Date(fromDate); // Convert string to Date object
|
|
1542
|
+
const end = new Date(toDate); // Convert string to Date object
|
|
1543
|
+
const dateArray = [];
|
|
1544
|
+
// Check if the dates are valid
|
|
1545
|
+
if (isNaN(start.getTime()) || isNaN(end.getTime())) {
|
|
1546
|
+
return dateArray;
|
|
1547
|
+
}
|
|
1548
|
+
// Loop from start date to end date
|
|
1549
|
+
let currentDate = start;
|
|
1550
|
+
while (currentDate <= end) {
|
|
1551
|
+
dateArray.push(currentDate.toISOString().split("T")[0]); // Format YYYY-MM-DD
|
|
1552
|
+
currentDate.setDate(currentDate.getDate() + 1); // Increment the date by 1 day
|
|
1553
|
+
}
|
|
1554
|
+
return dateArray;
|
|
1555
|
+
}
|
|
1556
|
+
// Method to display or log the date range array
|
|
1557
|
+
displayDateRange() {
|
|
1558
|
+
const dates = this.getDateRangeArray(this.headerData.date.startDate, this.headerData.date.endDate);
|
|
1559
|
+
this.dateArray = dates;
|
|
1560
|
+
}
|
|
1561
|
+
datasets = [
|
|
1562
|
+
{ value: 'footfall', label: 'Footfall' },
|
|
1563
|
+
{ value: 'bounced', label: 'Bounced Footfall' },
|
|
1564
|
+
{ value: 'engager', label: 'Engagers' },
|
|
1565
|
+
{ value: 'missedOpportunity', label: 'Missed Opportunity' },
|
|
1566
|
+
{ value: 'conversion', label: 'Conversion' }
|
|
1567
|
+
];
|
|
1568
|
+
getInitialValue() {
|
|
1569
|
+
// For example, selecting the second item in the dataset
|
|
1570
|
+
return this.datasets[0].value; // Change as needed
|
|
1571
|
+
}
|
|
1572
|
+
onValueChange(selectedId) {
|
|
1573
|
+
this.objData.processType = selectedId,
|
|
1574
|
+
this.getImageFolder();
|
|
1575
|
+
}
|
|
1576
|
+
get selectControl() {
|
|
1577
|
+
return this.form.get('selectValue');
|
|
1578
|
+
}
|
|
1579
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ImageDirectoryComponent, deps: [{ token: Zonev2Service }, { token: i2.GlobalStateService }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbModal }, { token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ImageDirectoryComponent, selector: "lib-image-directory", ngImport: i0, template: " <div class=\"card-header border-0 px-0\">\r\n <div class=\"col-md-12\">\r\n <div class=\"switch-form-card\">\r\n <div class=\"d-flex align-items-center\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#DAF1FF\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#EAF8FF\" stroke-width=\"6\" />\r\n <path d=\"M23.8333 14.6666L15.5 24.6666H23L22.1667 31.3333L30.5 21.3333H23L23.8333 14.6666Z\"\r\n stroke=\"#00A3FF\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <div class=\"txt-one ms-2\">\r\n <ng-container>Examine individual footfall in gallery view with optimal sample images for detailed analysis.</ng-container>\r\n <!-- <ng-container *ngIf=\"isMultiple\">Upload multiple stores for configuration</ng-container> -->\r\n </div>\r\n </div>\r\n <div>\r\n <!-- <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path\r\n d=\"M18.295 7.115C18.6844 6.72564 18.6844 6.09436 18.295 5.705C17.9056 5.31564 17.2744 5.31564 16.885 5.705L12 10.59L7.115 5.705C6.72564 5.31564 6.09436 5.31564 5.705 5.705C5.31564 6.09436 5.31564 6.72564 5.705 7.115L10.59 12L5.705 16.885C5.31564 17.2744 5.31564 17.9056 5.705 18.295C6.09436 18.6844 6.72564 18.6844 7.115 18.295L12 13.41L16.885 18.295C17.2744 18.6844 17.9056 18.6844 18.295 18.295C18.6844 17.9056 18.6844 17.2744 18.295 16.885L13.41 12L18.295 7.115Z\"\r\n fill=\"black\" />\r\n </svg> -->\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"folderView\" class=\"p-1\">\r\n <div class=\"row\">\r\n <div class=\"col-md-1 mt-5 text-center\" *ngFor=\"let obj of dateArray;let i = index\">\r\n <div (click)=\"getimages(i,obj)\">\r\n <div *ngIf=\"i === selectIndex;\">\r\n <span class=\"cursor-pointer\"><svg width=\"57\" height=\"56\" viewBox=\"0 0 57 56\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.154297\" width=\"56\" height=\"56\" rx=\"12\" fill=\"#33B5FF\" />\r\n <path\r\n d=\"M39.8216 36.1667C39.8216 36.7855 39.5758 37.379 39.1382 37.8166C38.7006 38.2542 38.1071 38.5 37.4883 38.5H18.8216C18.2028 38.5 17.6093 38.2542 17.1717 37.8166C16.7341 37.379 16.4883 36.7855 16.4883 36.1667V19.8333C16.4883 19.2145 16.7341 18.621 17.1717 18.1834C17.6093 17.7458 18.2028 17.5 18.8216 17.5H24.6549L26.9883 21H37.4883C38.1071 21 38.7006 21.2458 39.1382 21.6834C39.5758 22.121 39.8216 22.7145 39.8216 23.3333V36.1667Z\"\r\n stroke=\"white\" stroke-width=\"2.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span>\r\n <div class=\"text-center mt-2\">{{obj | date:'dd MMM'}}</div>\r\n </div>\r\n <div *ngIf=\"i !== selectIndex;\">\r\n <span class=\"cursor-pointer\"><svg width=\"57\" height=\"56\" viewBox=\"0 0 57 56\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.462891\" width=\"56\" height=\"56\" rx=\"12\" fill=\"#EAF8FF\" />\r\n <path\r\n d=\"M40.1302 36.1667C40.1302 36.7855 39.8844 37.379 39.4468 37.8166C39.0092 38.2542 38.4157 38.5 37.7969 38.5H19.1302C18.5114 38.5 17.9179 38.2542 17.4803 37.8166C17.0427 37.379 16.7969 36.7855 16.7969 36.1667V19.8333C16.7969 19.2145 17.0427 18.621 17.4803 18.1834C17.9179 17.7458 18.5114 17.5 19.1302 17.5H24.9635L27.2969 21H37.7969C38.4157 21 39.0092 21.2458 39.4468 21.6834C39.8844 22.121 40.1302 22.7145 40.1302 23.3333V36.1667Z\"\r\n stroke=\"#00A3FF\" stroke-width=\"2.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span>\r\n <div class=\"text-center mt-2\">{{obj | date:'dd MMM'}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n </div>\r\n <div *ngIf=\"!folderView\" class=\"p1\">\r\n <div class=\"row\">\r\n <div class=\"d-flex flex-shrink-0 mt-3 justify-content-between align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backToFootfall()\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_2585_7036)\">\r\n <rect x=\"2\" y=\"1\" width=\"36\" height=\"36\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"35\" height=\"35\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M25.8327 19H14.166M14.166 19L19.9993 24.8334M14.166 19L19.9993 13.1667\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_2585_7036\" x=\"0\" y=\"0\" width=\"40\" height=\"40\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow_2585_7036\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_2585_7036\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg>\r\n </span>\r\n <div class=\"ms-auto text-end\">\r\n <form [formGroup]=\"form\">\r\n <lib-reactive-select \r\n [formControl]=\"selectControl\" \r\n [idField]=\"'value'\"\r\n [nameField]=\"'label'\"\r\n [data]=\"datasets\"\r\n class=\"w-100 text-start\"\r\n (valueChange)=\"onValueChange($event)\">\r\n </lib-reactive-select>\r\n </form>\r\n </div>\r\n </div>\r\n <div class=\"d-flex mt-6 p-0 w-100 overflow-x\">\r\n <div class=\"col text-nowrap\" *ngFor=\"let obj of objectsArray\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs border-transparent flex-nowrap\">\r\n <li class=\"nav-item cursor-pointer\">\r\n <a (click)=\"selectedTimes(obj.folderName)\"\r\n [ngClass]=\"selectedTime === obj?.folderName ? 'active' : ''\" class=\"nav-link cursor-pointer no-border mx-3 mb-2\">\r\n {{obj?.folderName}}<span class=\"mx-2 \" [ngClass]=\"selectedTime === obj?.folderName ? 'badge-num-primary' :'badge-num-muted'\">{{obj?.count?obj?.count:0}}</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this image directory</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row p-3 img-traffic contain\" *ngIf=\"!noData && !loading\">\r\n <div class=\"col-md-3 border-gray mx-2 p-2 mt-5\" *ngFor=\"let obj of imagesArrayData\">\r\n <img *ngIf=\"obj.images.entryTimeImage\" class=\"img-src cursor-pointer\" [src]=\"obj.images.entryTimeImage\" (error)=\"obj?.images.entryTimeImage = null\" alt=\"\" (click)=\"imageView(obj,objData.footfallDate)\">\r\n <div *ngIf=\"!obj.images.entryTimeImage\" class=\"no-preview\">\r\n <span class=\"mb-5\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-5 text-center\">Preview not available</span>\r\n <span class=\"description mb-5 text-center\">The selected camera is not available at the\r\n moment.</span>\r\n </div>\r\n <div class=\"row px-2 mb-2\">\r\n <div class=\"col-md-8\">\r\n <div class=\"py-2 img-doc-directory\">{{obj.tempId}} <span class=\"badge badge-light-success ms-2\">{{selectControl.value | titlecase}}</span></div>\r\n <div class=\"py-2 img-doc-time\">Entry Time</div>\r\n <div class=\"py-2 img-doc-time\">Exit Time</div>\r\n <div class=\"py-2 img-doc-time\">Total Time Spent</div>\r\n </div>\r\n <div class=\"col-md-4 text-end\" >\r\n <div class=\"py-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"16\" viewBox=\"0 0 17 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1841_143300)\">\r\n <path d=\"M14.1986 5.33333V14H2.19857V5.33333M6.86523 8H9.5319M0.865234 2H15.5319V5.33333H0.865234V2Z\" stroke=\"#101828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1841_143300\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(0.199219)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.entryTime}} </div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.exitTime}}</div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.totalTimeSpent}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n\r\n", styles: [".switch-form-card{padding:8px 16px;border-radius:4px;border-left:3px solid var(--Primary-600, #00A3FF);background:var(--Primary-25, #F6FCFF);display:flex;align-items:center;justify-content:space-between}.switch-form-card .txt-one{color:var(--Gray-700, #344054);font-size:14px;font-weight:600;line-height:140%}.nav-item .nav-link.active{border:none;border-radius:6px;background:var(--Primary-50, #EAF8FF);padding:8px 12px}.nav-item .nav-link:hover{border:none}.badge-num-primary{border-radius:16px!important;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3)!important;text-align:center;font-size:14px!important;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}.badge-num-muted{border-radius:16px!important;background:var(--Primary-50, #F2F4F7)!important;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}.img-src{width:100%;height:210px;border-radius:.625rem}.img-traffic .col-md-3{width:24%!important}.border-gray{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.img-doc-directory{color:var(--Gray-900, #101828)!important;font-size:14px!important;font-weight:600;line-height:20px;text-decoration-line:underline}.img-doc-time{color:var(--Gray-500, #667085);font-size:12px;font-style:normal;font-weight:400;line-height:18px}.img-doc-value{color:var(--Gray-600, #475467);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.overflow-x{overflow-x:auto}.no-preview{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:41px 16px}.no-preview .header{color:#f04438;font-size:20px;font-weight:700;line-height:20px}.no-preview .description{color:#f04438;font-size:12px;font-weight:500;line-height:18px}.img-nodata{width:25%;height:15%}.nodata-title{font-size:14px!important;font-weight:600}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ReactiveSelectComponent, selector: "lib-reactive-select", inputs: ["idField", "nameField", "label", "data"], outputs: ["valueChange"] }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
|
|
1581
|
+
}
|
|
1582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ImageDirectoryComponent, decorators: [{
|
|
1583
|
+
type: Component,
|
|
1584
|
+
args: [{ selector: 'lib-image-directory', template: " <div class=\"card-header border-0 px-0\">\r\n <div class=\"col-md-12\">\r\n <div class=\"switch-form-card\">\r\n <div class=\"d-flex align-items-center\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#DAF1FF\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#EAF8FF\" stroke-width=\"6\" />\r\n <path d=\"M23.8333 14.6666L15.5 24.6666H23L22.1667 31.3333L30.5 21.3333H23L23.8333 14.6666Z\"\r\n stroke=\"#00A3FF\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <div class=\"txt-one ms-2\">\r\n <ng-container>Examine individual footfall in gallery view with optimal sample images for detailed analysis.</ng-container>\r\n <!-- <ng-container *ngIf=\"isMultiple\">Upload multiple stores for configuration</ng-container> -->\r\n </div>\r\n </div>\r\n <div>\r\n <!-- <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path\r\n d=\"M18.295 7.115C18.6844 6.72564 18.6844 6.09436 18.295 5.705C17.9056 5.31564 17.2744 5.31564 16.885 5.705L12 10.59L7.115 5.705C6.72564 5.31564 6.09436 5.31564 5.705 5.705C5.31564 6.09436 5.31564 6.72564 5.705 7.115L10.59 12L5.705 16.885C5.31564 17.2744 5.31564 17.9056 5.705 18.295C6.09436 18.6844 6.72564 18.6844 7.115 18.295L12 13.41L16.885 18.295C17.2744 18.6844 17.9056 18.6844 18.295 18.295C18.6844 17.9056 18.6844 17.2744 18.295 16.885L13.41 12L18.295 7.115Z\"\r\n fill=\"black\" />\r\n </svg> -->\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"folderView\" class=\"p-1\">\r\n <div class=\"row\">\r\n <div class=\"col-md-1 mt-5 text-center\" *ngFor=\"let obj of dateArray;let i = index\">\r\n <div (click)=\"getimages(i,obj)\">\r\n <div *ngIf=\"i === selectIndex;\">\r\n <span class=\"cursor-pointer\"><svg width=\"57\" height=\"56\" viewBox=\"0 0 57 56\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.154297\" width=\"56\" height=\"56\" rx=\"12\" fill=\"#33B5FF\" />\r\n <path\r\n d=\"M39.8216 36.1667C39.8216 36.7855 39.5758 37.379 39.1382 37.8166C38.7006 38.2542 38.1071 38.5 37.4883 38.5H18.8216C18.2028 38.5 17.6093 38.2542 17.1717 37.8166C16.7341 37.379 16.4883 36.7855 16.4883 36.1667V19.8333C16.4883 19.2145 16.7341 18.621 17.1717 18.1834C17.6093 17.7458 18.2028 17.5 18.8216 17.5H24.6549L26.9883 21H37.4883C38.1071 21 38.7006 21.2458 39.1382 21.6834C39.5758 22.121 39.8216 22.7145 39.8216 23.3333V36.1667Z\"\r\n stroke=\"white\" stroke-width=\"2.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span>\r\n <div class=\"text-center mt-2\">{{obj | date:'dd MMM'}}</div>\r\n </div>\r\n <div *ngIf=\"i !== selectIndex;\">\r\n <span class=\"cursor-pointer\"><svg width=\"57\" height=\"56\" viewBox=\"0 0 57 56\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.462891\" width=\"56\" height=\"56\" rx=\"12\" fill=\"#EAF8FF\" />\r\n <path\r\n d=\"M40.1302 36.1667C40.1302 36.7855 39.8844 37.379 39.4468 37.8166C39.0092 38.2542 38.4157 38.5 37.7969 38.5H19.1302C18.5114 38.5 17.9179 38.2542 17.4803 37.8166C17.0427 37.379 16.7969 36.7855 16.7969 36.1667V19.8333C16.7969 19.2145 17.0427 18.621 17.4803 18.1834C17.9179 17.7458 18.5114 17.5 19.1302 17.5H24.9635L27.2969 21H37.7969C38.4157 21 39.0092 21.2458 39.4468 21.6834C39.8844 22.121 40.1302 22.7145 40.1302 23.3333V36.1667Z\"\r\n stroke=\"#00A3FF\" stroke-width=\"2.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg></span>\r\n <div class=\"text-center mt-2\">{{obj | date:'dd MMM'}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n </div>\r\n <div *ngIf=\"!folderView\" class=\"p1\">\r\n <div class=\"row\">\r\n <div class=\"d-flex flex-shrink-0 mt-3 justify-content-between align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backToFootfall()\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_2585_7036)\">\r\n <rect x=\"2\" y=\"1\" width=\"36\" height=\"36\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"35\" height=\"35\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M25.8327 19H14.166M14.166 19L19.9993 24.8334M14.166 19L19.9993 13.1667\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_2585_7036\" x=\"0\" y=\"0\" width=\"40\" height=\"40\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow_2585_7036\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_2585_7036\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg>\r\n </span>\r\n <div class=\"ms-auto text-end\">\r\n <form [formGroup]=\"form\">\r\n <lib-reactive-select \r\n [formControl]=\"selectControl\" \r\n [idField]=\"'value'\"\r\n [nameField]=\"'label'\"\r\n [data]=\"datasets\"\r\n class=\"w-100 text-start\"\r\n (valueChange)=\"onValueChange($event)\">\r\n </lib-reactive-select>\r\n </form>\r\n </div>\r\n </div>\r\n <div class=\"d-flex mt-6 p-0 w-100 overflow-x\">\r\n <div class=\"col text-nowrap\" *ngFor=\"let obj of objectsArray\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs border-transparent flex-nowrap\">\r\n <li class=\"nav-item cursor-pointer\">\r\n <a (click)=\"selectedTimes(obj.folderName)\"\r\n [ngClass]=\"selectedTime === obj?.folderName ? 'active' : ''\" class=\"nav-link cursor-pointer no-border mx-3 mb-2\">\r\n {{obj?.folderName}}<span class=\"mx-2 \" [ngClass]=\"selectedTime === obj?.folderName ? 'badge-num-primary' :'badge-num-muted'\">{{obj?.count?obj?.count:0}}</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this image directory</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row p-3 img-traffic contain\" *ngIf=\"!noData && !loading\">\r\n <div class=\"col-md-3 border-gray mx-2 p-2 mt-5\" *ngFor=\"let obj of imagesArrayData\">\r\n <img *ngIf=\"obj.images.entryTimeImage\" class=\"img-src cursor-pointer\" [src]=\"obj.images.entryTimeImage\" (error)=\"obj?.images.entryTimeImage = null\" alt=\"\" (click)=\"imageView(obj,objData.footfallDate)\">\r\n <div *ngIf=\"!obj.images.entryTimeImage\" class=\"no-preview\">\r\n <span class=\"mb-5\">\r\n <svg width=\"23\" height=\"20\" viewBox=\"0 0 23 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"Group\">\r\n <path id=\"Vector\"\r\n d=\"M6.5 6.32227H6.51M16.25 9.32227H21.5L18 16.3223L14.91 12.0023\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path id=\"Vector_2\"\r\n d=\"M1.5 16.3229H5.26C5.63273 16.3255 5.99877 16.2239 6.31682 16.0295C6.63487 15.8352 6.89228 15.5558 7.06 15.2229L8.5 12.3229M1.5 18.3229V14.3229M17.5 6.82291L13.5 14.8229L3.11 9.62291C2.42033 9.27553 1.89635 8.6691 1.65272 7.93632C1.40909 7.20354 1.46564 6.4041 1.81 5.71291L3.19 2.92291C3.362 2.58014 3.59984 2.2746 3.88994 2.02375C4.18003 1.7729 4.5167 1.58165 4.88072 1.46093C5.24474 1.34021 5.62897 1.29239 6.01147 1.32018C6.39398 1.34797 6.76726 1.45084 7.11 1.62291L17.5 6.82291Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n <span class=\"header mb-5 text-center\">Preview not available</span>\r\n <span class=\"description mb-5 text-center\">The selected camera is not available at the\r\n moment.</span>\r\n </div>\r\n <div class=\"row px-2 mb-2\">\r\n <div class=\"col-md-8\">\r\n <div class=\"py-2 img-doc-directory\">{{obj.tempId}} <span class=\"badge badge-light-success ms-2\">{{selectControl.value | titlecase}}</span></div>\r\n <div class=\"py-2 img-doc-time\">Entry Time</div>\r\n <div class=\"py-2 img-doc-time\">Exit Time</div>\r\n <div class=\"py-2 img-doc-time\">Total Time Spent</div>\r\n </div>\r\n <div class=\"col-md-4 text-end\" >\r\n <div class=\"py-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"16\" viewBox=\"0 0 17 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1841_143300)\">\r\n <path d=\"M14.1986 5.33333V14H2.19857V5.33333M6.86523 8H9.5319M0.865234 2H15.5319V5.33333H0.865234V2Z\" stroke=\"#101828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1841_143300\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(0.199219)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.entryTime}} </div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.exitTime}}</div>\r\n <div class=\"py-2 img-doc-value\">{{obj.timeSpent.totalTimeSpent}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n\r\n", styles: [".switch-form-card{padding:8px 16px;border-radius:4px;border-left:3px solid var(--Primary-600, #00A3FF);background:var(--Primary-25, #F6FCFF);display:flex;align-items:center;justify-content:space-between}.switch-form-card .txt-one{color:var(--Gray-700, #344054);font-size:14px;font-weight:600;line-height:140%}.nav-item .nav-link.active{border:none;border-radius:6px;background:var(--Primary-50, #EAF8FF);padding:8px 12px}.nav-item .nav-link:hover{border:none}.badge-num-primary{border-radius:16px!important;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3)!important;text-align:center;font-size:14px!important;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}.badge-num-muted{border-radius:16px!important;background:var(--Primary-50, #F2F4F7)!important;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}.img-src{width:100%;height:210px;border-radius:.625rem}.img-traffic .col-md-3{width:24%!important}.border-gray{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.img-doc-directory{color:var(--Gray-900, #101828)!important;font-size:14px!important;font-weight:600;line-height:20px;text-decoration-line:underline}.img-doc-time{color:var(--Gray-500, #667085);font-size:12px;font-style:normal;font-weight:400;line-height:18px}.img-doc-value{color:var(--Gray-600, #475467);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.overflow-x{overflow-x:auto}.no-preview{border:1px solid #F04438;background:#fee4e2;border-radius:8px;stroke-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:41px 16px}.no-preview .header{color:#f04438;font-size:20px;font-weight:700;line-height:20px}.no-preview .description{color:#f04438;font-size:12px;font-weight:500;line-height:18px}.img-nodata{width:25%;height:15%}.nodata-title{font-size:14px!important;font-weight:600}\n"] }]
|
|
1585
|
+
}], ctorParameters: () => [{ type: Zonev2Service }, { type: i2.GlobalStateService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }, { type: i2$1.FormBuilder }] });
|
|
1586
|
+
|
|
1587
|
+
class StoreHeatmapComponent {
|
|
1588
|
+
zone;
|
|
1589
|
+
modalService;
|
|
1590
|
+
fb;
|
|
1591
|
+
Zonev2Service;
|
|
1592
|
+
changeDetector;
|
|
1593
|
+
toast;
|
|
1594
|
+
gs;
|
|
1595
|
+
elementRef;
|
|
1596
|
+
destroy$ = new Subject();
|
|
1597
|
+
selectedTab = '';
|
|
1598
|
+
headerData;
|
|
1599
|
+
dayjs = dayjs;
|
|
1600
|
+
disableDay = false;
|
|
1601
|
+
disableWeek = false;
|
|
1602
|
+
disableMonth = false;
|
|
1603
|
+
type = '';
|
|
1604
|
+
heatmapLoading = true;
|
|
1605
|
+
heatmapNoData = false;
|
|
1606
|
+
zoneName = '';
|
|
1607
|
+
selectedDate = '';
|
|
1608
|
+
overallStoreData = {};
|
|
1609
|
+
overallStoreconcentrationData = {};
|
|
1610
|
+
// zoneConcentrationData: any[] = [];
|
|
1611
|
+
availableZones = [];
|
|
1612
|
+
overallStoreConcentrationDates = [];
|
|
1613
|
+
periodzone = 1;
|
|
1614
|
+
customOption = false;
|
|
1615
|
+
searchInput = "";
|
|
1616
|
+
sortColumName = '';
|
|
1617
|
+
sortBy = 1;
|
|
1618
|
+
sortDirection = -1;
|
|
1619
|
+
genderAnalysis = [];
|
|
1620
|
+
ageAnalysis = [];
|
|
1621
|
+
cardDataLoading = true;
|
|
1622
|
+
cardNoData = false;
|
|
1623
|
+
genderroot;
|
|
1624
|
+
arcroot;
|
|
1625
|
+
currentZone; // Declare as 'any' or use a specific type if known
|
|
1626
|
+
otherZone;
|
|
1627
|
+
arcDiagram;
|
|
1628
|
+
constructor(zone, modalService, fb, Zonev2Service, changeDetector, toast, gs, elementRef) {
|
|
1629
|
+
this.zone = zone;
|
|
1630
|
+
this.modalService = modalService;
|
|
1631
|
+
this.fb = fb;
|
|
1632
|
+
this.Zonev2Service = Zonev2Service;
|
|
1633
|
+
this.changeDetector = changeDetector;
|
|
1634
|
+
this.toast = toast;
|
|
1635
|
+
this.gs = gs;
|
|
1636
|
+
this.elementRef = elementRef;
|
|
1637
|
+
}
|
|
1638
|
+
ngOnInit() {
|
|
1639
|
+
this.gs.dataRangeValue
|
|
1640
|
+
.pipe(takeUntil(this.destroy$), debounceTime(300))
|
|
1641
|
+
.subscribe((data) => {
|
|
1642
|
+
this.headerData = data;
|
|
1643
|
+
let sDate = this.dayjs(this.headerData.date.startDate);
|
|
1644
|
+
let eDate = this.dayjs(this.headerData.date.endDate);
|
|
1645
|
+
if (eDate.diff(sDate, 'day') < 7) {
|
|
1646
|
+
this.disableWeek = true;
|
|
1647
|
+
this.disableMonth = true;
|
|
1648
|
+
this.type = 'daily';
|
|
1649
|
+
}
|
|
1650
|
+
else if (eDate.diff(sDate, 'day') < 28) {
|
|
1651
|
+
this.disableMonth = true;
|
|
1652
|
+
this.type = 'weekly';
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
this.disableDay = false;
|
|
1656
|
+
this.disableWeek = false;
|
|
1657
|
+
this.disableMonth = false;
|
|
1658
|
+
this.type = 'monthly';
|
|
1659
|
+
}
|
|
1660
|
+
this.getAvailableZoneNames();
|
|
1661
|
+
this.getAnalaysisSummary();
|
|
1662
|
+
this.getTrajectoryAnalysis();
|
|
1663
|
+
// this.getOverallStoreConcentrationData();
|
|
1664
|
+
// this.getOverallStoreHeatmapDates();
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
ngOnDestroy() {
|
|
1668
|
+
if (this.genderroot) {
|
|
1669
|
+
this.genderroot.dispose();
|
|
1670
|
+
}
|
|
1671
|
+
if (this.arcroot) {
|
|
1672
|
+
this.arcroot.dispose();
|
|
1673
|
+
}
|
|
1674
|
+
this.destroy$.next(true);
|
|
1675
|
+
this.destroy$.complete();
|
|
1676
|
+
}
|
|
1677
|
+
changeTab(tabName) {
|
|
1678
|
+
this.selectedTab = tabName;
|
|
1679
|
+
this.getOverallStoreHeatmapDates();
|
|
1680
|
+
}
|
|
1681
|
+
getAvailableZoneNames() {
|
|
1682
|
+
this.heatmapLoading = true;
|
|
1683
|
+
this.heatmapNoData = true;
|
|
1684
|
+
const requestData = {
|
|
1685
|
+
fromDate: this.headerData.date.startDate,
|
|
1686
|
+
toDate: this.headerData.date.endDate,
|
|
1687
|
+
storeId: this.headerData.storeId
|
|
1688
|
+
};
|
|
1689
|
+
this.Zonev2Service.getAvailableZoneNames(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
1690
|
+
console.log(response, 'response');
|
|
1691
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
1692
|
+
this.availableZones = response.data.availableZoneData;
|
|
1693
|
+
if (this.availableZones.length) {
|
|
1694
|
+
this.selectedTab = this.availableZones[0].zoneName;
|
|
1695
|
+
// this.changeTab(this.selectedTab);
|
|
1696
|
+
}
|
|
1697
|
+
// this.zoneName = response.data.zoneConcentrationData[0].zoneName;
|
|
1698
|
+
// this.zoneName = this.availableZones.length ? this.availableZones[0].zoneName : '';
|
|
1699
|
+
this.heatmapLoading = false;
|
|
1700
|
+
this.heatmapNoData = false;
|
|
1701
|
+
this.getOverallStoreHeatmapDates();
|
|
1702
|
+
}
|
|
1703
|
+
else {
|
|
1704
|
+
// this.zonesummaryLoading = false;
|
|
1705
|
+
// this.zonesummaryNoData = true;
|
|
1706
|
+
this.heatmapLoading = false;
|
|
1707
|
+
this.heatmapNoData = true;
|
|
1708
|
+
this.availableZones = [];
|
|
1709
|
+
// this.overallStoreData = []
|
|
1710
|
+
this.zoneName = "";
|
|
1711
|
+
this.changeDetector.detectChanges();
|
|
1712
|
+
}
|
|
1713
|
+
}, error => {
|
|
1714
|
+
this.availableZones = [];
|
|
1715
|
+
this.zoneName = "";
|
|
1716
|
+
// this.headerData.date.startDate = null;
|
|
1717
|
+
// this.headerData.date.endDate = null;
|
|
1718
|
+
this.changeDetector.detectChanges();
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
getOverallStoreConcentrationData() {
|
|
1722
|
+
this.heatmapLoading = true;
|
|
1723
|
+
this.heatmapNoData = true;
|
|
1724
|
+
const requestData = {
|
|
1725
|
+
fromDate: this.headerData.date.startDate,
|
|
1726
|
+
toDate: this.headerData.date.endDate,
|
|
1727
|
+
storeId: this.headerData.stores.filter((store) => store.checked).map((store) => store.storeId),
|
|
1728
|
+
// storeId: ["11-1176"],
|
|
1729
|
+
clientId: this.headerData.client,
|
|
1730
|
+
zoneName: this.zoneName,
|
|
1731
|
+
dateType: this.type,
|
|
1732
|
+
zoneDate: this.selectedDate
|
|
1733
|
+
};
|
|
1734
|
+
this.Zonev2Service.getOverallStoreConcentrationData(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
1735
|
+
// this.heatmapLoading = false;
|
|
1736
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
1737
|
+
// this.overallStoreData = response.data.overallStoreConcentrationDatas;
|
|
1738
|
+
this.overallStoreconcentrationData = response.data.overallStoreConcentrationData;
|
|
1739
|
+
this.heatmapLoading = false;
|
|
1740
|
+
this.heatmapNoData = false;
|
|
1741
|
+
}
|
|
1742
|
+
else {
|
|
1743
|
+
this.overallStoreconcentrationData = [];
|
|
1744
|
+
// this.zoneConcentrationData = []
|
|
1745
|
+
this.availableZones = [];
|
|
1746
|
+
this.heatmapLoading = false;
|
|
1747
|
+
this.heatmapNoData = true;
|
|
1748
|
+
}
|
|
1749
|
+
}, error => {
|
|
1750
|
+
this.overallStoreconcentrationData = [];
|
|
1751
|
+
// this.zoneConcentrationData = []
|
|
1752
|
+
this.availableZones = [];
|
|
1753
|
+
console.error('API call failed', error);
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
getOverallStoreHeatmapDates() {
|
|
1757
|
+
this.heatmapLoading = true;
|
|
1758
|
+
this.heatmapNoData = true;
|
|
1759
|
+
const requestData = {
|
|
1760
|
+
fromDate: this.headerData.date.startDate,
|
|
1761
|
+
toDate: this.headerData.date.endDate,
|
|
1762
|
+
storeId: this.headerData.stores.filter((store) => store.checked).map((store) => store.storeId),
|
|
1763
|
+
// storeId: ["11-1176"],
|
|
1764
|
+
clientId: this.headerData.client,
|
|
1765
|
+
zoneName: this.zoneName,
|
|
1766
|
+
dateType: this.type
|
|
1767
|
+
};
|
|
1768
|
+
this.Zonev2Service.getOverallStoreHeatmapDates(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
1769
|
+
// this.heatmapLoading = false;
|
|
1770
|
+
console.log(response?.code === 200 && response?.status === "success" && response.data.overallStoreConcentrationDates.length);
|
|
1771
|
+
if (response?.code === 200 && response?.status === "success" && response.data.overallStoreConcentrationDates.length) {
|
|
1772
|
+
this.overallStoreConcentrationDates = response.data.overallStoreConcentrationDates;
|
|
1773
|
+
this.selectedDate = this.overallStoreConcentrationDates[0].zoneDate;
|
|
1774
|
+
this.getOverallStoreConcentrationData();
|
|
1775
|
+
// this.heatmapLoading = false;
|
|
1776
|
+
// this.heatmapNoData = false;
|
|
1777
|
+
}
|
|
1778
|
+
else {
|
|
1779
|
+
this.heatmapLoading = false;
|
|
1780
|
+
this.heatmapNoData = true;
|
|
1781
|
+
}
|
|
1782
|
+
}, error => {
|
|
1783
|
+
console.error('API call failed', error);
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
onDateChange(date) {
|
|
1787
|
+
if (this.selectedDate !== date) {
|
|
1788
|
+
this.selectedDate = date;
|
|
1789
|
+
this.getOverallStoreConcentrationData();
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
selectPlan(selectedType) {
|
|
1793
|
+
this.type = selectedType;
|
|
1794
|
+
this.getOverallStoreHeatmapDates();
|
|
1795
|
+
// this.getOverallStoreConcentrationData();
|
|
1796
|
+
}
|
|
1797
|
+
onZoneClick(zoneName) {
|
|
1798
|
+
this.zoneName = zoneName;
|
|
1799
|
+
this.getOverallStoreHeatmapDates();
|
|
1800
|
+
}
|
|
1801
|
+
concentrationHeatmap(imageURL) {
|
|
1802
|
+
const modalRef = this.modalService.open(StoreZoomHeatmapComponent, {
|
|
1803
|
+
centered: true, size: 'xl'
|
|
1804
|
+
});
|
|
1805
|
+
modalRef.componentInstance.imageURL = imageURL;
|
|
1806
|
+
modalRef.result.then((result) => {
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
genderchart() {
|
|
1810
|
+
setTimeout(() => {
|
|
1811
|
+
const chartDiv = document.getElementById("genderchartdiv");
|
|
1812
|
+
if (!chartDiv) {
|
|
1813
|
+
console.error("Could not find HTML element with id `genderchartdiv`");
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
if (this.genderroot) {
|
|
1817
|
+
this.genderroot.dispose();
|
|
1818
|
+
}
|
|
1819
|
+
this.genderroot = am5.Root.new('genderchartdiv');
|
|
1820
|
+
const chart = this.genderroot.container.children.push(am5percent.PieChart.new(this.genderroot, {
|
|
1821
|
+
endAngle: 270,
|
|
1822
|
+
innerRadius: am5.percent(60)
|
|
1823
|
+
}));
|
|
1824
|
+
const series = chart.series.push(am5percent.PieSeries.new(this.genderroot, {
|
|
1825
|
+
valueField: 'value',
|
|
1826
|
+
categoryField: 'category',
|
|
1827
|
+
endAngle: 270,
|
|
1828
|
+
alignLabels: false
|
|
1829
|
+
}));
|
|
1830
|
+
series.states.create('hidden', {
|
|
1831
|
+
endAngle: -90
|
|
1832
|
+
});
|
|
1833
|
+
series.labels.template.setAll({
|
|
1834
|
+
textType: 'circular',
|
|
1835
|
+
visible: false,
|
|
1836
|
+
centerX: 0,
|
|
1837
|
+
centerY: 0
|
|
1838
|
+
});
|
|
1839
|
+
series.data.setAll(this.genderAnalysis);
|
|
1840
|
+
const legend = this.genderroot.container.children.push(am5.Legend.new(this.genderroot, {
|
|
1841
|
+
x: am5.percent(50),
|
|
1842
|
+
centerX: am5.percent(50),
|
|
1843
|
+
y: am5.percent(94),
|
|
1844
|
+
layout: this.genderroot.horizontalLayout,
|
|
1845
|
+
}));
|
|
1846
|
+
legend.labels.template.setAll({
|
|
1847
|
+
text: "{category}: {value}%",
|
|
1848
|
+
fill: am5.color("#464E5F"),
|
|
1849
|
+
fontFamily: "Inter",
|
|
1850
|
+
fontSize: "16px",
|
|
1851
|
+
fontWeight: "400",
|
|
1852
|
+
});
|
|
1853
|
+
legend.valueLabels.template.setAll({
|
|
1854
|
+
text: "{value}%",
|
|
1855
|
+
fontWeight: "700",
|
|
1856
|
+
fontFamily: "Inter",
|
|
1857
|
+
fontSize: "14px",
|
|
1858
|
+
fill: am5.color("#464E5F"),
|
|
1859
|
+
});
|
|
1860
|
+
legend.data.setAll(series.dataItems);
|
|
1861
|
+
// Animation
|
|
1862
|
+
series.appear(1000, 100);
|
|
1863
|
+
}, 100);
|
|
1864
|
+
}
|
|
1865
|
+
// getAnalaysisSummary(): void {
|
|
1866
|
+
// this.cardDataLoading = true;
|
|
1867
|
+
// this.cardNoData = true;
|
|
1868
|
+
// const requestData = {
|
|
1869
|
+
// fromDate: this.headerData.date.startDate,
|
|
1870
|
+
// toDate: this.headerData.date.endDate,
|
|
1871
|
+
// storeId: this.headerData.stores.filter((store:any) => store.checked).map((store:any) => store.storeId),
|
|
1872
|
+
// // storeId: ["11-253", "11-511","11-1176"],
|
|
1873
|
+
// clientId:this.headerData.client,
|
|
1874
|
+
// };
|
|
1875
|
+
// this.Zonev2Service.getAnalaysisSummary(requestData).pipe(takeUntil(this.destroy$)).subscribe((response: any) => {
|
|
1876
|
+
// this.cardDataLoading = false;
|
|
1877
|
+
// if (response?.code === 200 && response?.status === "success") {
|
|
1878
|
+
// // this.cardData = response.data.card;
|
|
1879
|
+
// this.genderAnalysis = response.data.genderAnalysis;
|
|
1880
|
+
// this.genderAnalysis.forEach((item:any) => {
|
|
1881
|
+
// item.value = Math.round(item.value)
|
|
1882
|
+
// })
|
|
1883
|
+
// this.ageAnalysis = response.data.ageAnalysis;
|
|
1884
|
+
// setTimeout(() => {
|
|
1885
|
+
// this.genderchart(); // Call this method after data is set
|
|
1886
|
+
// }, 200);
|
|
1887
|
+
// this.cardDataLoading = false;
|
|
1888
|
+
// this.cardNoData = false;
|
|
1889
|
+
// } else {
|
|
1890
|
+
// // this.cardData = []
|
|
1891
|
+
// this.cardDataLoading = false;
|
|
1892
|
+
// this.cardNoData = true;
|
|
1893
|
+
// }
|
|
1894
|
+
// },
|
|
1895
|
+
// error => {
|
|
1896
|
+
// // this.cardData = []
|
|
1897
|
+
// this.changeDetector.detectChanges()
|
|
1898
|
+
// }
|
|
1899
|
+
// );
|
|
1900
|
+
// }
|
|
1901
|
+
getAnalaysisSummary() {
|
|
1902
|
+
this.cardDataLoading = true;
|
|
1903
|
+
this.cardNoData = true;
|
|
1904
|
+
const requestData = {
|
|
1905
|
+
fromDate: this.headerData.date.startDate,
|
|
1906
|
+
toDate: this.headerData.date.endDate,
|
|
1907
|
+
storeId: this.headerData.stores.filter((store) => store.checked).map((store) => store.storeId),
|
|
1908
|
+
// storeId: ["204"],
|
|
1909
|
+
clientId: this.headerData.client,
|
|
1910
|
+
zoneName: "zone-1"
|
|
1911
|
+
};
|
|
1912
|
+
this.Zonev2Service.getAnalaysisSummary(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
1913
|
+
this.cardDataLoading = false;
|
|
1914
|
+
if (response && response.data && response.data.zoneConcentrationData && response.data.zoneConcentrationData.length > 0) {
|
|
1915
|
+
// this.overallStoreData = response.data.overallStoreData;
|
|
1916
|
+
// this.genderAnalysis = response.data.genderAnalysis;
|
|
1917
|
+
// this.genderAnalysis.forEach((item:any) => {
|
|
1918
|
+
// item.value = Math.round(item.value)
|
|
1919
|
+
// })
|
|
1920
|
+
// this.ageAnalysis = response.data.ageAnalysis;
|
|
1921
|
+
this.overallStoreData = response.data.zoneConcentrationData[0]; // Get the first zone data
|
|
1922
|
+
this.ageAnalysis = this.overallStoreData.ageAnalysis || [];
|
|
1923
|
+
this.genderAnalysis = this.overallStoreData.genderAnalysis || [];
|
|
1924
|
+
setTimeout(() => {
|
|
1925
|
+
this.genderchart();
|
|
1926
|
+
}, 200);
|
|
1927
|
+
this.cardDataLoading = false;
|
|
1928
|
+
this.cardNoData = false;
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
// this.cardData = []
|
|
1932
|
+
this.overallStoreData = [];
|
|
1933
|
+
this.cardDataLoading = false;
|
|
1934
|
+
this.cardNoData = true;
|
|
1935
|
+
}
|
|
1936
|
+
}, error => {
|
|
1937
|
+
// this.cardData = []
|
|
1938
|
+
this.overallStoreData = [];
|
|
1939
|
+
this.changeDetector.detectChanges();
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
getAgeArray() {
|
|
1943
|
+
let data = [];
|
|
1944
|
+
this.ageAnalysis.forEach((item, index) => {
|
|
1945
|
+
if (index % 2 == 0) {
|
|
1946
|
+
data.push(index);
|
|
1947
|
+
}
|
|
1948
|
+
});
|
|
1949
|
+
return data;
|
|
1950
|
+
}
|
|
1951
|
+
// getAgeArray(): number[] {
|
|
1952
|
+
// return this.ageAnalysis.map((_, index) => index);
|
|
1953
|
+
// }
|
|
1954
|
+
// createArcDiagram(): void {
|
|
1955
|
+
// setTimeout(() => {
|
|
1956
|
+
// const chartDiv = document.getElementById("arcDiagramDiv");
|
|
1957
|
+
// if (!chartDiv) {
|
|
1958
|
+
// console.error("Could not find HTML element with id `arcDiagramDiv`");
|
|
1959
|
+
// return;
|
|
1960
|
+
// }
|
|
1961
|
+
// if (this.arcroot) {
|
|
1962
|
+
// this.arcroot.dispose();
|
|
1963
|
+
// }
|
|
1964
|
+
// this.arcroot = am5.Root.new("arcDiagramDiv");
|
|
1965
|
+
// const series = this.arcroot.container.children.push(am5flow.ArcDiagram.new(this.arcroot, {
|
|
1966
|
+
// sourceIdField: "from",
|
|
1967
|
+
// targetIdField: "to",
|
|
1968
|
+
// valueField: "value",
|
|
1969
|
+
// orientation: "horizontal"
|
|
1970
|
+
// }));
|
|
1971
|
+
// series.nodes.labels.template.setAll({
|
|
1972
|
+
// fontSize: "0.85em",
|
|
1973
|
+
// paddingLeft: 20,
|
|
1974
|
+
// paddingRight: 20,
|
|
1975
|
+
// width: 160
|
|
1976
|
+
// });
|
|
1977
|
+
// series.bullets.push((_root, _series, dataItem) => {
|
|
1978
|
+
// let bullet = am5.Bullet.new(this.arcroot, {
|
|
1979
|
+
// locationY: Math.random(),
|
|
1980
|
+
// sprite: am5.Circle.new(this.arcroot, {
|
|
1981
|
+
// radius: 2,
|
|
1982
|
+
// fill: dataItem.get("source").get("fill")
|
|
1983
|
+
// })
|
|
1984
|
+
// });
|
|
1985
|
+
// bullet.animate({
|
|
1986
|
+
// key: "locationY",
|
|
1987
|
+
// to: 1,
|
|
1988
|
+
// from: 0,
|
|
1989
|
+
// duration: Math.random() * 1000 + 2000,
|
|
1990
|
+
// loops: Infinity
|
|
1991
|
+
// });
|
|
1992
|
+
// return bullet;
|
|
1993
|
+
// });
|
|
1994
|
+
// // Set the diagram data dynamically
|
|
1995
|
+
// series.data.setAll([
|
|
1996
|
+
// { "from": "zone-1", "to": "zone-2", "value": 10 },
|
|
1997
|
+
// { "from": "zone-1", "to": "zone-3", "value": 10 },
|
|
1998
|
+
// // You can add more connections from API data here
|
|
1999
|
+
// ]);
|
|
2000
|
+
// series.appear(1000, 100);
|
|
2001
|
+
// }, 100);
|
|
2002
|
+
// }
|
|
2003
|
+
// gettrajectoryAnalysis(): void {
|
|
2004
|
+
// this.cardDataLoading = true;
|
|
2005
|
+
// this.cardNoData = true;
|
|
2006
|
+
// const requestData = {
|
|
2007
|
+
// fromDate: "2024-07-01",
|
|
2008
|
+
// toDate: "2024-07-22",
|
|
2009
|
+
// storeId: ["11"],
|
|
2010
|
+
// zoneName: "zone-1"
|
|
2011
|
+
// };
|
|
2012
|
+
// this.Zonev2Service.getTrajectoryAnalysis(requestData).pipe(takeUntil(this.destroy$)).subscribe((response: any) => {
|
|
2013
|
+
// this.cardDataLoading = false;
|
|
2014
|
+
// if (response?.code === 200 && response?.status === "success") {
|
|
2015
|
+
// const data = response.data.trajectoryAnalysisData;
|
|
2016
|
+
// // Update the UI with the current and other zones data
|
|
2017
|
+
// this.currentZone = data.currentZone;
|
|
2018
|
+
// this.otherZone = data.otherZone;
|
|
2019
|
+
// setTimeout(() => {
|
|
2020
|
+
// this.createArcDiagram();
|
|
2021
|
+
// }, 200);
|
|
2022
|
+
// this.cardDataLoading = false;
|
|
2023
|
+
// this.cardNoData = false;
|
|
2024
|
+
// } else {
|
|
2025
|
+
// // this.overallStoreData = [];
|
|
2026
|
+
// this.cardDataLoading = false;
|
|
2027
|
+
// this.cardNoData = true;
|
|
2028
|
+
// }
|
|
2029
|
+
// },
|
|
2030
|
+
// error => {
|
|
2031
|
+
// // this.overallStoreData = [];
|
|
2032
|
+
// this.changeDetector.detectChanges()
|
|
2033
|
+
// }
|
|
2034
|
+
// );
|
|
2035
|
+
// }
|
|
2036
|
+
getTrajectoryAnalysis() {
|
|
2037
|
+
this.cardDataLoading = true;
|
|
2038
|
+
this.cardNoData = true;
|
|
2039
|
+
const requestData = {
|
|
2040
|
+
fromDate: "2024-07-01",
|
|
2041
|
+
toDate: "2024-07-22",
|
|
2042
|
+
storeId: ["11"],
|
|
2043
|
+
zoneName: "zone-1"
|
|
2044
|
+
};
|
|
2045
|
+
this.Zonev2Service.getTrajectoryAnalysis(requestData)
|
|
2046
|
+
.pipe(takeUntil(this.destroy$))
|
|
2047
|
+
.subscribe((response) => {
|
|
2048
|
+
this.cardDataLoading = false;
|
|
2049
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
2050
|
+
const data = response.data.trajectoryAnalysisData;
|
|
2051
|
+
// Update the current zone and other zone info
|
|
2052
|
+
this.currentZone = data.currentZone;
|
|
2053
|
+
this.otherZone = data.otherZone;
|
|
2054
|
+
// Dynamically map the zoneList and create the diagram data
|
|
2055
|
+
const zoneList = data.zoneList;
|
|
2056
|
+
const diagramData = [];
|
|
2057
|
+
for (let i = 0; i < zoneList.length - 1; i++) {
|
|
2058
|
+
diagramData.push({
|
|
2059
|
+
from: zoneList[i],
|
|
2060
|
+
to: zoneList[i + 1],
|
|
2061
|
+
value: this.currentZone.impressionRate,
|
|
2062
|
+
fill: this.getZoneColor(i) // Custom function to get a color for the zone
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
// Check if there are zones to display
|
|
2066
|
+
if (diagramData.length > 0) {
|
|
2067
|
+
setTimeout(() => {
|
|
2068
|
+
this.createArcDiagram(diagramData); // Call the method to create the diagram
|
|
2069
|
+
}, 200);
|
|
2070
|
+
}
|
|
2071
|
+
else {
|
|
2072
|
+
// Handle case with no data if necessary
|
|
2073
|
+
// For example, you might show a message saying "No data available"
|
|
2074
|
+
}
|
|
2075
|
+
this.cardNoData = false; // Only set this to false if there is data
|
|
2076
|
+
}
|
|
2077
|
+
else {
|
|
2078
|
+
// Handle unsuccessful response
|
|
2079
|
+
this.cardNoData = true;
|
|
2080
|
+
}
|
|
2081
|
+
}, error => {
|
|
2082
|
+
this.cardDataLoading = false;
|
|
2083
|
+
this.cardNoData = true; // Set no data flag on error
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
createArcDiagram(diagramData) {
|
|
2087
|
+
const root = am5.Root.new("arcDiagramDiv");
|
|
2088
|
+
const series = root.container.children.push(am5flow.ArcDiagram.new(root, {
|
|
2089
|
+
sourceIdField: "from",
|
|
2090
|
+
targetIdField: "to",
|
|
2091
|
+
valueField: "value",
|
|
2092
|
+
orientation: "horizontal"
|
|
2093
|
+
}));
|
|
2094
|
+
series.nodes.labels.template.setAll({
|
|
2095
|
+
fontSize: "0.85em",
|
|
2096
|
+
paddingLeft: 20,
|
|
2097
|
+
paddingRight: 20,
|
|
2098
|
+
width: 160
|
|
2099
|
+
});
|
|
2100
|
+
// Animated bullets
|
|
2101
|
+
series.bullets.push((root, series, dataItem) => {
|
|
2102
|
+
const bullet = am5.Bullet.new(root, {
|
|
2103
|
+
locationY: Math.random(),
|
|
2104
|
+
sprite: am5.Circle.new(root, {
|
|
2105
|
+
radius: 2,
|
|
2106
|
+
fill: dataItem.get("source").get("fill")
|
|
2107
|
+
})
|
|
2108
|
+
});
|
|
2109
|
+
bullet.animate({
|
|
2110
|
+
key: "locationY",
|
|
2111
|
+
to: 1,
|
|
2112
|
+
from: 0,
|
|
2113
|
+
duration: Math.random() * 1000 + 2000,
|
|
2114
|
+
loops: Infinity
|
|
2115
|
+
});
|
|
2116
|
+
return bullet;
|
|
2117
|
+
});
|
|
2118
|
+
// Set data
|
|
2119
|
+
series.data.setAll([
|
|
2120
|
+
{ "from": "Entrance", "to": "Vincent Chase", "value": 10 },
|
|
2121
|
+
{ "from": "Entrance", "to": "John Jacobs", "value": 20 },
|
|
2122
|
+
{ "from": "Entrance", "to": "Premium Section", "value": 10 },
|
|
2123
|
+
{ "from": "Entrance", "to": "Billing", "value": 30 },
|
|
2124
|
+
{ "from": "Entrance", "to": "Exit", "value": 10 },
|
|
2125
|
+
]);
|
|
2126
|
+
// Make stuff animate on load
|
|
2127
|
+
series.appear(1000, 100);
|
|
2128
|
+
}
|
|
2129
|
+
// createArcDiagram(diagramData: { from: string; to: string; value: number; fill: am5.Color; }[]): void {
|
|
2130
|
+
// // Dispose previous diagram if it exists
|
|
2131
|
+
// if (this.arcDiagram) {
|
|
2132
|
+
// this.arcDiagram.dispose();
|
|
2133
|
+
// }
|
|
2134
|
+
// // Create root element
|
|
2135
|
+
// const root = am5.Root.new("arcDiagramDiv");
|
|
2136
|
+
// // Create series
|
|
2137
|
+
// const series = root.container.children.push(am5flow.ArcDiagram.new(root, {
|
|
2138
|
+
// sourceIdField: "from",
|
|
2139
|
+
// targetIdField: "to",
|
|
2140
|
+
// valueField: "value",
|
|
2141
|
+
// orientation: "horizontal"
|
|
2142
|
+
// }));
|
|
2143
|
+
// // Configure labels
|
|
2144
|
+
// series.nodes.labels.template.setAll({
|
|
2145
|
+
// fontSize: "0.85em",
|
|
2146
|
+
// paddingLeft: 20,
|
|
2147
|
+
// paddingRight: 20,
|
|
2148
|
+
// width: 160
|
|
2149
|
+
// });
|
|
2150
|
+
// // Animated bullets
|
|
2151
|
+
// series.bullets.push((root, series, dataItem) => {
|
|
2152
|
+
// const bullet = am5.Bullet.new(root, {
|
|
2153
|
+
// locationY: Math.random(),
|
|
2154
|
+
// sprite: am5.Circle.new(root, {
|
|
2155
|
+
// radius: 2,
|
|
2156
|
+
// fill: dataItem.get("source").get("fill")
|
|
2157
|
+
// })
|
|
2158
|
+
// });
|
|
2159
|
+
// bullet.animate({
|
|
2160
|
+
// key: "locationY",
|
|
2161
|
+
// to: 1,
|
|
2162
|
+
// from: 0,
|
|
2163
|
+
// duration: Math.random() * 1000 + 2000,
|
|
2164
|
+
// loops: Infinity
|
|
2165
|
+
// });
|
|
2166
|
+
// return bullet;
|
|
2167
|
+
// });
|
|
2168
|
+
// // Set data dynamically from the API response
|
|
2169
|
+
// series.data.setAll(diagramData);
|
|
2170
|
+
// // Make stuff animate on load
|
|
2171
|
+
// series.appear(1000, 100);
|
|
2172
|
+
// // Save the arc diagram instance for potential disposal later
|
|
2173
|
+
// this.arcDiagram = series;
|
|
2174
|
+
// }
|
|
2175
|
+
getZoneColor(index) {
|
|
2176
|
+
const colors = [am5.color(0x4285F4), am5.color(0xAA46BB), am5.color(0xFF7043), am5.color(0x8E24AA)];
|
|
2177
|
+
return colors[index % colors.length];
|
|
2178
|
+
}
|
|
2179
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StoreHeatmapComponent, deps: [{ token: i0.NgZone }, { token: i1$1.NgbModal }, { token: i2$1.FormBuilder }, { token: Zonev2Service }, { token: i0.ChangeDetectorRef }, { token: i4.ToastService }, { token: i2.GlobalStateService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2180
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: StoreHeatmapComponent, selector: "lib-store-heatmap", ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header storecard\">\r\n <div class=\"mt-5 mx-5\">\r\n <button *ngFor=\"let zone of availableZones\" \r\n class=\"btn btn-color-gray-600 btn-active btn-active-secondary px-6 py-3 me-2\"\r\n [ngClass]=\"selectedTab === zone.zoneName ? 'activePlanBtnprimary' : 'inactivePlanBtn'\"\r\n (click)=\"changeTab(zone.zoneName)\">\r\n {{ zone.zoneName }}\r\n </button>\r\n </div>\r\n </div>\r\n \r\n <div class=\"col-lg-12\">\r\n <div class=\"row p-3\">\r\n <div class=\"col-lg-6 right-border my-1\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Store Heatmap</span>\r\n </h3>\r\n \r\n <div class=\"card-toolbar text-nowrap me-4\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'daily',\r\n 'inactivePlanBtn': type !== 'daily',\r\n 'disabled': disableDay\r\n }\" (click)=\"selectPlan('daily')\" [attr.disabled]=\"disableDay ? true : null\">\r\n Day\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'weekly',\r\n 'inactivePlanBtn': type !== 'weekly',\r\n 'disabled': disableWeek\r\n }\" (click)=\"selectPlan('weekly')\" [attr.disabled]=\"disableWeek ? true : null\">\r\n Week\r\n </button>\r\n <button class=\"btn btn-outline px-6 py-3\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'monthly',\r\n 'inactivePlanBtn': type !== 'monthly',\r\n 'disabled': disableMonth\r\n }\" (click)=\"selectPlan('monthly')\" [attr.disabled]=\"disableMonth ? true : null\">\r\n Month\r\n </button>\r\n </div>\r\n \r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!heatmapLoading && !heatmapNoData\">\r\n <div class=\"d-flex\">\r\n <ul *ngIf=\"periodzone == 1 && !customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center m-2\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon active\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <ul *ngIf=\"(periodzone == 2 || periodzone == 3) && !customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 p-3 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center w-90px mx-3\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <ul *ngIf=\"customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 p-3 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center w-90px mx-3\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <ngb-carousel #carousel [interval]=\"0\" [pauseOnHover]=\"true\">\r\n <ng-container *ngFor=\"let image of overallStoreconcentrationData?.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container cursor-pointer\">\r\n <img (click)=\"concentrationHeatmap(overallStoreconcentrationData?.ImageURLs)\"\r\n [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n <a [href]=\"image.URL\" download><svg id=\"download-icon\" width=\"44\" height=\"44\"\r\n viewBox=\"0 0 44 44\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"icon-overlay\">\r\n <g filter=\"url(#filter0_d_3822_19479)\">\r\n <rect x=\"2\" y=\"1\" width=\"40\" height=\"40\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"39\" height=\"39\" rx=\"7.5\"\r\n stroke=\"#D0D5DD\" />\r\n <path\r\n d=\"M29.5 23.5V26.8333C29.5 27.2754 29.3244 27.6993 29.0118 28.0118C28.6993 28.3244 28.2754 28.5 27.8333 28.5H16.1667C15.7246 28.5 15.3007 28.3244 14.9882 28.0118C14.6756 27.6993 14.5 27.2754 14.5 26.8333V23.5M17.8333 19.3333L22 23.5M22 23.5L26.1667 19.3333M22 23.5V13.5\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_3822_19479\" x=\"0\" y=\"0\" width=\"44\" height=\"44\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\r\n result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow_3822_19479\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\"\r\n in2=\"effect1_dropShadow_3822_19479\" result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></a>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n <ng-container *ngIf=\"heatmapLoading\">\r\n <div class=\"row loader concheatmap d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"heatmapNoData && !heatmapLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 my-6\">\r\n <div\r\n class=\"card-body concheatmap d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Overall Store Concentration\r\n Heatmap</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"col-lg-6\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Entrance</span>\r\n </h3>\r\n </div>\r\n <div class=\"body me-4\">\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"m-4\" *ngIf=\"!cardNoData && !cardDataLoading\">\r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Footfall</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title ms-12\">{{ overallStoreData?.footfall?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.footfall?.storeRate || '--' }}%</span> of store footfall\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Impression Rate</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title\">{{ overallStoreData?.impression?.zoneRate || '--' }}%</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.impression?.storeRate || '--' }}%</span> Store Impression\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Bounced Footfall</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title me-6\">{{ overallStoreData?.bounced?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.bounced?.storeRate || '--' }}%</span> of total bounced\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Engagers</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title ms-10\">{{ overallStoreData?.engagers?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.engagers?.storeRate || '--' }}%</span> of total engagers\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Avg. Zone Dwell Time</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title me-5\">{{ overallStoreData?.avgDwellTime?.zoneAvgDwellTime || '--' }} mins</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n Avg. dwell time <span class=\"textprimary mx-1\">{{ overallStoreData?.avgDwellTime?.storeAvgDwellTime || '--' }} mins</span>\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"row\">\r\n <div class=\"col-5\">\r\n <div class=\"headtext p-3\">Age & Gender Analysis</div>\r\n <div class=\"card-body p-0 mb-2\">\r\n <div *ngIf=\"!cardDataLoading && !cardNoData\" id=\"genderchartdiv\"></div>\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"col-7\">\r\n <div class=\"mt-14\">\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n <div class=\"card-body p-0 mt-20\">\r\n <div>\r\n \r\n <table *ngIf=\"!cardDataLoading && !cardNoData\" class=\"table bottom-border\">\r\n <tbody class=\"table-responsive\">\r\n <tr *ngFor=\"let i of getAgeArray()\">\r\n <td>\r\n <div class=\"overalltext\">{{ ageAnalysis[i]?.category || '' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ ageAnalysis[i]?.value?.toFixed(0) || '--' }}%</div>\r\n </td>\r\n <td *ngIf=\"ageAnalysis[i + 1]?.category\">\r\n <div class=\"overalltext\">{{ ageAnalysis[i + 1]?.category || '' }}</div>\r\n </td>\r\n <td *ngIf=\"ageAnalysis[i + 1]?.category\">\r\n <div class=\"table-title\">{{ ageAnalysis[i + 1]?.value?.toFixed(0) || '--' }}%</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row p-8\">\r\n <div class=\"col-12 trajectorycard\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Entrance Trajectory Analysis</span>\r\n </h3> \r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <div class=\"arcdiagram\">\r\n <div id=\"arcDiagramDiv\"></div>\r\n </div>\r\n \r\n </div>\r\n <div class=\"col-6 p-12\">\r\n <!-- <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Other Zones \r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Zone A</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n <!-- <div class=\"col px-2 mt-8\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Zone A\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Other Zones</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div class=\"row ps-15 mt-20\">\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression Rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Entrance\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Other Zones</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression Rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Other Zones\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Entrance</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> \r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n <div ngbAccordion>\r\n <div ngbAccordionItem [collapsed]=\"false\">\r\n <h2 ngbAccordionHeader>\r\n <button class=\"headtext\" ngbAccordionButton>Image Directory<div class=\"divider\"></div></button>\r\n </h2>\r\n <div ngbAccordionCollapse>\r\n <div ngbAccordionBody>\r\n <ng-template>\r\n <lib-image-directory></lib-image-directory>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n</div>\r\n\r\n\r\n\r\n", styles: [".activePlanBtnprimary{border-radius:6px;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.storecard{padding:0px .25rem!important;border-bottom:1px solid var(--Gray-300, #D0D5DD)}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.table-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:700;line-height:20px}.subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}.overalltext{color:var(--Gray-500, #667085);font-size:14px;font-weight:500;line-height:20px}.borderdashed{border-bottom:1px solid var(--Gray-200, #EAECF0)}.conc{width:110%}.overallstore{width:155%}table td{height:60px!important;align-items:center;gap:12px;align-self:stretch}::ng-deep .carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:-8%;margin-left:15%}.category_active{border-bottom:3px solid #009EF7!important;border-radius:3px;margin-bottom:3px!important}.timer_active{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:500;line-height:20px}.cardimg{width:100%;height:450px}.form-control:disabled{background-color:#f9fafb!important}.table-container{position:relative;max-height:400px;overflow-y:auto}.fixed-header th{position:sticky;top:0;background-color:#fff;z-index:2}.table.bottom-border thead th{border-bottom:2px solid #dee2e6}.table.bottom-border tbody tr td{border-bottom:1px solid #dee2e6}.table.bottom-border th,.table.bottom-border td{padding:8px 16px;white-space:nowrap}.table-responsive::-webkit-scrollbar{width:6px}.table-responsive::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rotate{transform:rotate(180deg)}.no-wrap-list{white-space:nowrap;overflow-x:auto;overflow-y:hidden;padding:0;margin:0;display:flex;flex-wrap:nowrap;-ms-overflow-style:none;scrollbar-width:none}.no-wrap-list::-webkit-scrollbar{display:none}.concheatmap{margin-top:20%}.right-border{border-right:1px solid #D0D5DD;padding-right:15px}.image-container{position:relative;display:inline-block}::ng-deep .carousel-control-next{position:absolute;top:40%!important;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff!important;text-align:center;background:none;border:0;opacity:.5;transition:opacity .15s ease;height:20px!important;background-color:transparent}::ng-deep .carousel-control-prev{position:absolute;top:40%!important;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff!important;text-align:center;background:none;border:0;opacity:.5;transition:opacity .15s ease;height:20px!important;background-color:transparent!important}::ng-deep .carousel-control-next-icon{display:inline-block;width:5rem;height:7rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}::ng-deep .carousel-control-prev-icon{display:inline-block;width:5rem;height:7rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.icon-overlay{position:absolute;cursor:pointer;top:10px;right:10px}::ng-deep .carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:8px;height:8px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#009bf3;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}.blue-badge{border-radius:16px;background:var(--Primary-50, #EAF8FF);display:flex;padding:2px 10px;justify-content:center;align-items:center;color:var(--Gray-700, #344054);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.textprimary{color:var(--Primary-700, #009BF3);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.ratecards{padding:30px;width:47%;border-radius:12px;background:var(--White, #FFF)}.primarybar{background:#00a3ff}#genderchartdiv{width:100%;height:190px}table th,table td{padding:0 20px!important;align-items:center;gap:6px;align-self:stretch}table tr{vertical-align:middle}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}::ng-deep .custom-tooltip{border-radius:8px;background:var(--White, #FFF);padding:8px 12px;color:var(--Gray-700, #344054);text-align:center;font-family:Inter;font-size:12px;font-weight:600;line-height:18px}.table-row-spacing{padding-bottom:15px}.trajectorycard{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);align-items:center;gap:16px;align-self:stretch}.card-border{padding:12px;border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.ratetext{color:var(--Gray-700, #344054);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.badgegrey{border-radius:16px;background:var(--Gray-100, #F2F4F7);padding:2px 8px}#arcDiagramDiv{width:100%;height:100%}.arcdiagram{height:60dvh}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i1$1.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i1$1.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i1$1.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i1$1.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i1$1.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "component", type: i1$1.NgbCarousel, selector: "ngb-carousel", inputs: ["animation", "activeId", "interval", "wrap", "keyboard", "pauseOnHover", "pauseOnFocus", "showNavigationArrows", "showNavigationIndicators"], outputs: ["slide", "slid"], exportAs: ["ngbCarousel"] }, { kind: "directive", type: i1$1.NgbSlide, selector: "ng-template[ngbSlide]", inputs: ["id"], outputs: ["slid"] }, { kind: "component", type: ImageDirectoryComponent, selector: "lib-image-directory" }] });
|
|
2181
|
+
}
|
|
2182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StoreHeatmapComponent, decorators: [{
|
|
2183
|
+
type: Component,
|
|
2184
|
+
args: [{ selector: 'lib-store-heatmap', template: "<div class=\"card\">\r\n <div class=\"card-header storecard\">\r\n <div class=\"mt-5 mx-5\">\r\n <button *ngFor=\"let zone of availableZones\" \r\n class=\"btn btn-color-gray-600 btn-active btn-active-secondary px-6 py-3 me-2\"\r\n [ngClass]=\"selectedTab === zone.zoneName ? 'activePlanBtnprimary' : 'inactivePlanBtn'\"\r\n (click)=\"changeTab(zone.zoneName)\">\r\n {{ zone.zoneName }}\r\n </button>\r\n </div>\r\n </div>\r\n \r\n <div class=\"col-lg-12\">\r\n <div class=\"row p-3\">\r\n <div class=\"col-lg-6 right-border my-1\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Store Heatmap</span>\r\n </h3>\r\n \r\n <div class=\"card-toolbar text-nowrap me-4\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'daily',\r\n 'inactivePlanBtn': type !== 'daily',\r\n 'disabled': disableDay\r\n }\" (click)=\"selectPlan('daily')\" [attr.disabled]=\"disableDay ? true : null\">\r\n Day\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'weekly',\r\n 'inactivePlanBtn': type !== 'weekly',\r\n 'disabled': disableWeek\r\n }\" (click)=\"selectPlan('weekly')\" [attr.disabled]=\"disableWeek ? true : null\">\r\n Week\r\n </button>\r\n <button class=\"btn btn-outline px-6 py-3\" [ngClass]=\"{\r\n 'activePlanBtn': type === 'monthly',\r\n 'inactivePlanBtn': type !== 'monthly',\r\n 'disabled': disableMonth\r\n }\" (click)=\"selectPlan('monthly')\" [attr.disabled]=\"disableMonth ? true : null\">\r\n Month\r\n </button>\r\n </div>\r\n \r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!heatmapLoading && !heatmapNoData\">\r\n <div class=\"d-flex\">\r\n <ul *ngIf=\"periodzone == 1 && !customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center m-2\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon active\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <ul *ngIf=\"(periodzone == 2 || periodzone == 3) && !customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 p-3 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center w-90px mx-3\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n <ul *ngIf=\"customOption\"\r\n class=\"d-flex pills nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder align-items-start mb-5 mt-1 p-3 no-wrap-list\">\r\n <li class=\"nav-item nav-overflow\" *ngFor=\"let date of overallStoreConcentrationDates\">\r\n <a data-bs-toggle=\"pill\"\r\n [ngClass]=\"date.zoneDate === selectedDate ? 'category_active' : ''\"\r\n class=\"nav-link d-flex justify-content-between flex-column cursor-pointer flex-center w-90px mx-3\"\r\n (click)=\"onDateChange(date.zoneDate)\">\r\n <div class=\"nav-icon\"></div>\r\n <span class=\"nav-text text-gray-700 fw-bolder fs-7 lh-1 mx-3\">{{ date.zoneDate\r\n }}</span>\r\n <span class=\"bullet-custom position-absolute bottom-0 h-4px bg-primary\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <ngb-carousel #carousel [interval]=\"0\" [pauseOnHover]=\"true\">\r\n <ng-container *ngFor=\"let image of overallStoreconcentrationData?.ImageURLs\">\r\n <ng-template ngbSlide>\r\n <div class=\"w-100 image-container cursor-pointer\">\r\n <img (click)=\"concentrationHeatmap(overallStoreconcentrationData?.ImageURLs)\"\r\n [src]=\"image.URL\" [alt]=\"image.streamName\" class=\"cardimg\" />\r\n <a [href]=\"image.URL\" download><svg id=\"download-icon\" width=\"44\" height=\"44\"\r\n viewBox=\"0 0 44 44\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"icon-overlay\">\r\n <g filter=\"url(#filter0_d_3822_19479)\">\r\n <rect x=\"2\" y=\"1\" width=\"40\" height=\"40\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"39\" height=\"39\" rx=\"7.5\"\r\n stroke=\"#D0D5DD\" />\r\n <path\r\n d=\"M29.5 23.5V26.8333C29.5 27.2754 29.3244 27.6993 29.0118 28.0118C28.6993 28.3244 28.2754 28.5 27.8333 28.5H16.1667C15.7246 28.5 15.3007 28.3244 14.9882 28.0118C14.6756 27.6993 14.5 27.2754 14.5 26.8333V23.5M17.8333 19.3333L22 23.5M22 23.5L26.1667 19.3333M22 23.5V13.5\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_3822_19479\" x=\"0\" y=\"0\" width=\"44\" height=\"44\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\r\n result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow_3822_19479\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\"\r\n in2=\"effect1_dropShadow_3822_19479\" result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></a>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ngb-carousel>\r\n </div>\r\n <ng-container *ngIf=\"heatmapLoading\">\r\n <div class=\"row loader concheatmap d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"heatmapNoData && !heatmapLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 my-6\">\r\n <div\r\n class=\"card-body concheatmap d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Overall Store Concentration\r\n Heatmap</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"col-lg-6\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Entrance</span>\r\n </h3>\r\n </div>\r\n <div class=\"body me-4\">\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"m-4\" *ngIf=\"!cardNoData && !cardDataLoading\">\r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Footfall</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title ms-12\">{{ overallStoreData?.footfall?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.footfall?.storeRate || '--' }}%</span> of store footfall\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Impression Rate</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title\">{{ overallStoreData?.impression?.zoneRate || '--' }}%</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.impression?.storeRate || '--' }}%</span> Store Impression\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Bounced Footfall</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title me-6\">{{ overallStoreData?.bounced?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.bounced?.storeRate || '--' }}%</span> of total bounced\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Engagers</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title ms-10\">{{ overallStoreData?.engagers?.zoneCount || '--' }}</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n <span class=\"textprimary mx-1\">{{ overallStoreData?.engagers?.storeRate || '--' }}%</span> of total engagers\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n \r\n <div class=\"d-flex flex-stack\">\r\n <span class=\"d-flex flex-row align-items-center\">\r\n <div class=\"overalltext me-2\">Avg. Zone Dwell Time</div>\r\n </span>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"table-title me-5\">{{ overallStoreData?.avgDwellTime?.zoneAvgDwellTime || '--' }} mins</span>\r\n </div>\r\n <div class=\"d-flex align-items-center\">\r\n <span class=\"blue-badge\">\r\n Avg. dwell time <span class=\"textprimary mx-1\">{{ overallStoreData?.avgDwellTime?.storeAvgDwellTime || '--' }} mins</span>\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"borderdashed my-6\"></div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"row\">\r\n <div class=\"col-5\">\r\n <div class=\"headtext p-3\">Age & Gender Analysis</div>\r\n <div class=\"card-body p-0 mb-2\">\r\n <div *ngIf=\"!cardDataLoading && !cardNoData\" id=\"genderchartdiv\"></div>\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"col-7\">\r\n <div class=\"mt-14\">\r\n <ng-container *ngIf=\"cardDataLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"cardNoData && !cardDataLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div\r\n class=\"card-body mb-13 d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Gender Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n <div class=\"card-body p-0 mt-20\">\r\n <div>\r\n \r\n <table *ngIf=\"!cardDataLoading && !cardNoData\" class=\"table bottom-border\">\r\n <tbody class=\"table-responsive\">\r\n <tr *ngFor=\"let i of getAgeArray()\">\r\n <td>\r\n <div class=\"overalltext\">{{ ageAnalysis[i]?.category || '' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ ageAnalysis[i]?.value?.toFixed(0) || '--' }}%</div>\r\n </td>\r\n <td *ngIf=\"ageAnalysis[i + 1]?.category\">\r\n <div class=\"overalltext\">{{ ageAnalysis[i + 1]?.category || '' }}</div>\r\n </td>\r\n <td *ngIf=\"ageAnalysis[i + 1]?.category\">\r\n <div class=\"table-title\">{{ ageAnalysis[i + 1]?.value?.toFixed(0) || '--' }}%</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row p-8\">\r\n <div class=\"col-12 trajectorycard\">\r\n <div class=\"card-header border-0 p-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Entrance Trajectory Analysis</span>\r\n </h3> \r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <div class=\"arcdiagram\">\r\n <div id=\"arcDiagramDiv\"></div>\r\n </div>\r\n \r\n </div>\r\n <div class=\"col-6 p-12\">\r\n <!-- <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Other Zones \r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Zone A</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n <!-- <div class=\"col px-2 mt-8\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Zone A\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Other Zones</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div class=\"row ps-15 mt-20\">\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression Rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Entrance\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Other Zones</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col px-2\">\r\n <div class=\"card card-border p-6\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headcount\">{{ currentZone?.impressionRate || '--' }}% \r\n <span class=\"overalltext\">Impression Rate</span>\r\n </span>\r\n </h3>\r\n <span class=\"overalltext my-1\">Other Zones\r\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.33594 8.57096H12.6693M12.6693 8.57096L8.0026 3.9043M12.6693 8.57096L8.0026 13.2376\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"overalltext\">Entrance</span>\r\n </span>\r\n <div class=\"textprimary my-4\">\r\n {{ otherZone?.impressionRate || '--' }}% \r\n <span class=\"ratetext\">{{ otherZone?.gender || '--' }} Rate</span>\r\n <span class=\"badgegrey\">{{ otherZone?.ageGroup || '--' }} age</span>\r\n </div>\r\n </div>\r\n </div> \r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n <div ngbAccordion>\r\n <div ngbAccordionItem [collapsed]=\"false\">\r\n <h2 ngbAccordionHeader>\r\n <button class=\"headtext\" ngbAccordionButton>Image Directory<div class=\"divider\"></div></button>\r\n </h2>\r\n <div ngbAccordionCollapse>\r\n <div ngbAccordionBody>\r\n <ng-template>\r\n <lib-image-directory></lib-image-directory>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n</div>\r\n\r\n\r\n\r\n", styles: [".activePlanBtnprimary{border-radius:6px;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.storecard{padding:0px .25rem!important;border-bottom:1px solid var(--Gray-300, #D0D5DD)}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.table-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:700;line-height:20px}.subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}.overalltext{color:var(--Gray-500, #667085);font-size:14px;font-weight:500;line-height:20px}.borderdashed{border-bottom:1px solid var(--Gray-200, #EAECF0)}.conc{width:110%}.overallstore{width:155%}table td{height:60px!important;align-items:center;gap:12px;align-self:stretch}::ng-deep .carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:-8%;margin-left:15%}.category_active{border-bottom:3px solid #009EF7!important;border-radius:3px;margin-bottom:3px!important}.timer_active{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:500;line-height:20px}.cardimg{width:100%;height:450px}.form-control:disabled{background-color:#f9fafb!important}.table-container{position:relative;max-height:400px;overflow-y:auto}.fixed-header th{position:sticky;top:0;background-color:#fff;z-index:2}.table.bottom-border thead th{border-bottom:2px solid #dee2e6}.table.bottom-border tbody tr td{border-bottom:1px solid #dee2e6}.table.bottom-border th,.table.bottom-border td{padding:8px 16px;white-space:nowrap}.table-responsive::-webkit-scrollbar{width:6px}.table-responsive::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rotate{transform:rotate(180deg)}.no-wrap-list{white-space:nowrap;overflow-x:auto;overflow-y:hidden;padding:0;margin:0;display:flex;flex-wrap:nowrap;-ms-overflow-style:none;scrollbar-width:none}.no-wrap-list::-webkit-scrollbar{display:none}.concheatmap{margin-top:20%}.right-border{border-right:1px solid #D0D5DD;padding-right:15px}.image-container{position:relative;display:inline-block}::ng-deep .carousel-control-next{position:absolute;top:40%!important;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff!important;text-align:center;background:none;border:0;opacity:.5;transition:opacity .15s ease;height:20px!important;background-color:transparent}::ng-deep .carousel-control-prev{position:absolute;top:40%!important;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff!important;text-align:center;background:none;border:0;opacity:.5;transition:opacity .15s ease;height:20px!important;background-color:transparent!important}::ng-deep .carousel-control-next-icon{display:inline-block;width:5rem;height:7rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}::ng-deep .carousel-control-prev-icon{display:inline-block;width:5rem;height:7rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.icon-overlay{position:absolute;cursor:pointer;top:10px;right:10px}::ng-deep .carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:8px;height:8px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#009bf3;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}.blue-badge{border-radius:16px;background:var(--Primary-50, #EAF8FF);display:flex;padding:2px 10px;justify-content:center;align-items:center;color:var(--Gray-700, #344054);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.textprimary{color:var(--Primary-700, #009BF3);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.ratecards{padding:30px;width:47%;border-radius:12px;background:var(--White, #FFF)}.primarybar{background:#00a3ff}#genderchartdiv{width:100%;height:190px}table th,table td{padding:0 20px!important;align-items:center;gap:6px;align-self:stretch}table tr{vertical-align:middle}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}::ng-deep .custom-tooltip{border-radius:8px;background:var(--White, #FFF);padding:8px 12px;color:var(--Gray-700, #344054);text-align:center;font-family:Inter;font-size:12px;font-weight:600;line-height:18px}.table-row-spacing{padding-bottom:15px}.trajectorycard{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);align-items:center;gap:16px;align-self:stretch}.card-border{padding:12px;border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF)}.ratetext{color:var(--Gray-700, #344054);font-size:12px;font-style:normal;font-weight:500;line-height:18px}.badgegrey{border-radius:16px;background:var(--Gray-100, #F2F4F7);padding:2px 8px}#arcDiagramDiv{width:100%;height:100%}.arcdiagram{height:60dvh}\n"] }]
|
|
2185
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i1$1.NgbModal }, { type: i2$1.FormBuilder }, { type: Zonev2Service }, { type: i0.ChangeDetectorRef }, { type: i4.ToastService }, { type: i2.GlobalStateService }, { type: i0.ElementRef }] });
|
|
2186
|
+
|
|
2187
|
+
class CustomerJourneyComponent {
|
|
2188
|
+
zone;
|
|
2189
|
+
elRef;
|
|
2190
|
+
fb;
|
|
2191
|
+
root;
|
|
2192
|
+
form;
|
|
2193
|
+
selectControl;
|
|
2194
|
+
datasets = [
|
|
2195
|
+
{ value: 'highest', label: 'Highest Visited Path' },
|
|
2196
|
+
{ value: 'lowest', label: 'Lowest Visited Path' }
|
|
2197
|
+
];
|
|
2198
|
+
constructor(zone, elRef, fb) {
|
|
2199
|
+
this.zone = zone;
|
|
2200
|
+
this.elRef = elRef;
|
|
2201
|
+
this.fb = fb;
|
|
2202
|
+
}
|
|
2203
|
+
ngOnInit() {
|
|
2204
|
+
this.initializeChart();
|
|
2205
|
+
this.selectControl = new FormControl('highest');
|
|
2206
|
+
this.form = this.fb.group({
|
|
2207
|
+
selectControl: this.selectControl
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
// Function to handle chart creation
|
|
2211
|
+
initializeChart() {
|
|
2212
|
+
// Run the chart code inside Angular's NgZone to avoid conflicts
|
|
2213
|
+
this.zone.runOutsideAngular(() => {
|
|
2214
|
+
let root = am5.Root.new(this.elRef.nativeElement.querySelector('#customerjourney'));
|
|
2215
|
+
// Set themes
|
|
2216
|
+
root.setThemes([
|
|
2217
|
+
am5themes_Animated.new(root)
|
|
2218
|
+
]);
|
|
2219
|
+
// Create series
|
|
2220
|
+
let series = root.container.children.push(am5flow.Sankey.new(root, {
|
|
2221
|
+
sourceIdField: "from",
|
|
2222
|
+
targetIdField: "to",
|
|
2223
|
+
valueField: "value",
|
|
2224
|
+
paddingRight: 50
|
|
2225
|
+
}));
|
|
2226
|
+
// Set the color step if available
|
|
2227
|
+
this.setColorStep(series, 2);
|
|
2228
|
+
// Set data
|
|
2229
|
+
series.data.setAll([
|
|
2230
|
+
{ from: "Entry (1343)", to: "Vincent Chase (1343)", value: 20 },
|
|
2231
|
+
{ from: "Vincent Chase (1343)", to: "John Jacobs (1343)", value: 20 },
|
|
2232
|
+
{ from: "Entry (1343)", to: "John Jacobs (1343)", value: 40 },
|
|
2233
|
+
{ from: "Entry (1343)", to: "Premium Section (1343)", value: 20 },
|
|
2234
|
+
{ from: "John Jacobs (1343)", to: "Billing (1343)", value: 20 },
|
|
2235
|
+
{ from: "Billing (1343)", to: "Exit", value: 20 },
|
|
2236
|
+
{ from: "Premium Section (1343)", to: "Exit", value: 20 },
|
|
2237
|
+
{ from: "Premium Section (1343)", to: "Billing (1343)", value: 20 },
|
|
2238
|
+
]);
|
|
2239
|
+
// Make stuff animate on load
|
|
2240
|
+
series.appear(1000, 100);
|
|
2241
|
+
this.root = root;
|
|
2242
|
+
});
|
|
2243
|
+
}
|
|
2244
|
+
// Function to set color step
|
|
2245
|
+
setColorStep(series, stepValue) {
|
|
2246
|
+
const colors = series.nodes.get("colors");
|
|
2247
|
+
if (colors) {
|
|
2248
|
+
colors.set("step", stepValue);
|
|
2249
|
+
}
|
|
2250
|
+
else {
|
|
2251
|
+
console.warn("Colors property not available on nodes.");
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
onValueChange(event) {
|
|
2255
|
+
console.log('Selected value:', event);
|
|
2256
|
+
// Handle value change logic here
|
|
2257
|
+
}
|
|
2258
|
+
ngOnDestroy() {
|
|
2259
|
+
// Clean up chart instance when the component is destroyed
|
|
2260
|
+
if (this.root) {
|
|
2261
|
+
this.root.dispose();
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CustomerJourneyComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: CustomerJourneyComponent, selector: "lib-customer-journey", ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\"><span class=\"card-label mb-2\">Customer Journey</span></h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 justify-content-between\">\r\n <form class=\"mx-4\" [formGroup]=\"form\">\r\n <lib-reactive-select\r\n [formControl]=\"selectControl\" \r\n [idField]=\"'value'\"\r\n [nameField]=\"'label'\"\r\n [data]=\"datasets\"\r\n class=\"w-100\"\r\n (valueChange)=\"onValueChange($event)\">\r\n </lib-reactive-select>\r\n </form>\r\n\r\n <button \r\n class=\"btn bg-light-primary btn-light-primary btn-active-light-primary\"><span\r\n ><svg \r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\r\n fill=\"none\">\r\n <path d=\"M9.99984 4.16602V15.8327M4.1665 9.99935H15.8332\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n </path>\r\n </svg></span> Add New Zone \r\n </button>\r\n \r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body\">\r\n <div id=\"customerjourney\"></div>\r\n </div>\r\n</div>", styles: ["#customerjourney{width:100%;height:500px}.bg-light-primary{border-radius:8px;border:1px solid var(--Primary-50, #EAF8FF);background:var(--Primary-50, #EAF8FF);box-shadow:0 1px 2px #1018280d;padding:8px 14px;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ReactiveSelectComponent, selector: "lib-reactive-select", inputs: ["idField", "nameField", "label", "data"], outputs: ["valueChange"] }] });
|
|
2266
|
+
}
|
|
2267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CustomerJourneyComponent, decorators: [{
|
|
2268
|
+
type: Component,
|
|
2269
|
+
args: [{ selector: 'lib-customer-journey', template: "<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\"><span class=\"card-label mb-2\">Customer Journey</span></h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 justify-content-between\">\r\n <form class=\"mx-4\" [formGroup]=\"form\">\r\n <lib-reactive-select\r\n [formControl]=\"selectControl\" \r\n [idField]=\"'value'\"\r\n [nameField]=\"'label'\"\r\n [data]=\"datasets\"\r\n class=\"w-100\"\r\n (valueChange)=\"onValueChange($event)\">\r\n </lib-reactive-select>\r\n </form>\r\n\r\n <button \r\n class=\"btn bg-light-primary btn-light-primary btn-active-light-primary\"><span\r\n ><svg \r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\r\n fill=\"none\">\r\n <path d=\"M9.99984 4.16602V15.8327M4.1665 9.99935H15.8332\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n </path>\r\n </svg></span> Add New Zone \r\n </button>\r\n \r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body\">\r\n <div id=\"customerjourney\"></div>\r\n </div>\r\n</div>", styles: ["#customerjourney{width:100%;height:500px}.bg-light-primary{border-radius:8px;border:1px solid var(--Primary-50, #EAF8FF);background:var(--Primary-50, #EAF8FF);box-shadow:0 1px 2px #1018280d;padding:8px 14px;justify-content:center}\n"] }]
|
|
2270
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i2$1.FormBuilder }] });
|
|
2271
|
+
|
|
2272
|
+
class TopPerformingComponent {
|
|
2273
|
+
modalService;
|
|
2274
|
+
fb;
|
|
2275
|
+
Zonev2Service;
|
|
2276
|
+
changeDetector;
|
|
2277
|
+
toast;
|
|
2278
|
+
gs;
|
|
2279
|
+
elementRef;
|
|
2280
|
+
topPerformingStores = [];
|
|
2281
|
+
topPerformingZones = [];
|
|
2282
|
+
searchInput = '';
|
|
2283
|
+
searchDisabled = false;
|
|
2284
|
+
analysisLoading = true;
|
|
2285
|
+
analysisNoData = false;
|
|
2286
|
+
topperformingstoresLoading = true;
|
|
2287
|
+
topperformingstoresNodata = false;
|
|
2288
|
+
headerData;
|
|
2289
|
+
isExport = false;
|
|
2290
|
+
type = 'top-zones';
|
|
2291
|
+
storetype = 'top-Stores';
|
|
2292
|
+
// Default selected type
|
|
2293
|
+
disableTopZones = false; // Control whether the Top 5 Zones button is disabled
|
|
2294
|
+
disableBottomZones = false;
|
|
2295
|
+
disableTopStores = false; // Control whether the Top 5 Zones button is disabled
|
|
2296
|
+
disableBottomStores = false;
|
|
2297
|
+
// invoiceNoData: boolean = true;
|
|
2298
|
+
// invoiceLoading: boolean = false;
|
|
2299
|
+
// isExport: boolean = false;
|
|
2300
|
+
// clientId: string = '';
|
|
2301
|
+
// userType:any = '';
|
|
2302
|
+
destroy$ = new Subject();
|
|
2303
|
+
constructor(modalService, fb, Zonev2Service, changeDetector, toast, gs, elementRef) {
|
|
2304
|
+
this.modalService = modalService;
|
|
2305
|
+
this.fb = fb;
|
|
2306
|
+
this.Zonev2Service = Zonev2Service;
|
|
2307
|
+
this.changeDetector = changeDetector;
|
|
2308
|
+
this.toast = toast;
|
|
2309
|
+
this.gs = gs;
|
|
2310
|
+
this.elementRef = elementRef;
|
|
2311
|
+
}
|
|
2312
|
+
ngOnInit() {
|
|
2313
|
+
this.gs.dataRangeValue
|
|
2314
|
+
.pipe(takeUntil(this.destroy$), debounceTime(300))
|
|
2315
|
+
.subscribe((data) => {
|
|
2316
|
+
this.headerData = data;
|
|
2317
|
+
this.getTopPerformingZones('top');
|
|
2318
|
+
this.getTopPerformingStores('top');
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
ngOnDestroy() {
|
|
2322
|
+
this.destroy$.next(true);
|
|
2323
|
+
this.destroy$.complete();
|
|
2324
|
+
}
|
|
2325
|
+
getTopPerformingZones(sortType) {
|
|
2326
|
+
this.analysisLoading = true;
|
|
2327
|
+
this.analysisNoData = true;
|
|
2328
|
+
const requestData = {
|
|
2329
|
+
// fromDate: this.headerData.date.startDate,
|
|
2330
|
+
// toDate: this.headerData.date.endDate,
|
|
2331
|
+
// storeId: this.headerData.stores.filter((store:any) => store.checked).map((store:any) => store.storeId),
|
|
2332
|
+
// // storeId: ["11-253", "11-511","11-1176"],
|
|
2333
|
+
// clientId:this.headerData.client,
|
|
2334
|
+
fromDate: '2024-07-01',
|
|
2335
|
+
toDate: '2024-07-22',
|
|
2336
|
+
storeId: ['11'],
|
|
2337
|
+
sortType: sortType,
|
|
2338
|
+
sort: 'footfall',
|
|
2339
|
+
sortBy: sortType === 'top' ? 1 : -1
|
|
2340
|
+
};
|
|
2341
|
+
this.Zonev2Service.getTopPerformingZones(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
2342
|
+
this.analysisLoading = false;
|
|
2343
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
2344
|
+
this.topPerformingZones = response.data.topPerformingZones;
|
|
2345
|
+
this.analysisLoading = false;
|
|
2346
|
+
this.analysisNoData = false;
|
|
2347
|
+
}
|
|
2348
|
+
else {
|
|
2349
|
+
this.analysisLoading = false;
|
|
2350
|
+
this.analysisNoData = true;
|
|
2351
|
+
this.topPerformingZones = [];
|
|
2352
|
+
this.changeDetector.detectChanges();
|
|
2353
|
+
}
|
|
2354
|
+
}, error => {
|
|
2355
|
+
this.topPerformingZones = [];
|
|
2356
|
+
this.changeDetector.detectChanges();
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
getTopPerformingStores(sortType) {
|
|
2360
|
+
this.topperformingstoresLoading = true;
|
|
2361
|
+
this.topperformingstoresNodata = true;
|
|
2362
|
+
const requestData = {
|
|
2363
|
+
// fromDate: this.headerData.date.startDate,
|
|
2364
|
+
// toDate: this.headerData.date.endDate,
|
|
2365
|
+
// storeId: this.headerData.stores.filter((store:any) => store.checked).map((store:any) => store.storeId),
|
|
2366
|
+
// // storeId: ["11-253", "11-511","11-1176"],
|
|
2367
|
+
// clientId:this.headerData.client,
|
|
2368
|
+
fromDate: '2024-07-01',
|
|
2369
|
+
toDate: '2024-07-22',
|
|
2370
|
+
storeId: ['11'],
|
|
2371
|
+
sortType: sortType,
|
|
2372
|
+
sort: 'footfall',
|
|
2373
|
+
sortBy: sortType === 'top' ? 1 : -1
|
|
2374
|
+
};
|
|
2375
|
+
this.Zonev2Service.getTopPerformingStores(requestData).pipe(takeUntil(this.destroy$)).subscribe((response) => {
|
|
2376
|
+
this.topperformingstoresLoading = false;
|
|
2377
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
2378
|
+
this.topPerformingStores = response.data.topPerformingStores;
|
|
2379
|
+
this.topperformingstoresLoading = false;
|
|
2380
|
+
this.topperformingstoresNodata = false;
|
|
2381
|
+
}
|
|
2382
|
+
else {
|
|
2383
|
+
this.topperformingstoresLoading = false;
|
|
2384
|
+
this.topperformingstoresNodata = true;
|
|
2385
|
+
this.topPerformingStores = [];
|
|
2386
|
+
this.changeDetector.detectChanges();
|
|
2387
|
+
}
|
|
2388
|
+
}, error => {
|
|
2389
|
+
this.topPerformingStores = [];
|
|
2390
|
+
this.changeDetector.detectChanges();
|
|
2391
|
+
});
|
|
2392
|
+
}
|
|
2393
|
+
selectPlanzone(type) {
|
|
2394
|
+
this.type = type;
|
|
2395
|
+
if (type === 'top-zones') {
|
|
2396
|
+
this.getTopPerformingZones('top'); // Fetch top zones
|
|
2397
|
+
}
|
|
2398
|
+
else if (type === 'bottom-zones') {
|
|
2399
|
+
this.getTopPerformingZones('bottom'); // Fetch bottom zones
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
selectPlanStore(storetype) {
|
|
2403
|
+
console.log("storetype", storetype);
|
|
2404
|
+
this.storetype = storetype;
|
|
2405
|
+
if (storetype === 'top-Stores') {
|
|
2406
|
+
this.getTopPerformingStores('top'); // Fetch top zones
|
|
2407
|
+
}
|
|
2408
|
+
else if (storetype === 'bottom-Stores') {
|
|
2409
|
+
this.getTopPerformingStores('bottom'); // Fetch bottom zones
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TopPerformingComponent, deps: [{ token: i1$1.NgbModal }, { token: i2$1.FormBuilder }, { token: Zonev2Service }, { token: i0.ChangeDetectorRef }, { token: i4.ToastService }, { token: i2.GlobalStateService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2413
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: TopPerformingComponent, selector: "lib-top-performing", ngImport: i0, template: "<div class=\"row \">\r\n <div class=\"d-flex justify-content-between p-3\">\r\n <div class=\"col-lg-6 card\">\r\n <div class=\"h-100\">\r\n <div class=\"card-header border-0 p-4\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Top Performing Zones <span\r\n ngbTooltip=\"Top performing zones across the stores selected\" placement=\"top\"\r\n triggers=\"mouseenter:mouseleave\" tooltipClass=\"custom-tooltip\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3512_32868)\">\r\n <path\r\n d=\"M8.00016 10.6666V7.99998M8.00016 5.33331H8.00683M14.6668 7.99998C14.6668 11.6819 11.6821 14.6666 8.00016 14.6666C4.31826 14.6666 1.3335 11.6819 1.3335 7.99998C1.3335 4.31808 4.31826 1.33331 8.00016 1.33331C11.6821 1.33331 14.6668 4.31808 14.6668 7.99998Z\"\r\n stroke=\"#98A2B3\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3512_32868\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span></span>\r\n <span class=\"subratetext mt-2\">Based on Concentration Rate</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': type === 'top-zones',\r\n 'inactivePlanBtn': type !== 'top-zones',\r\n 'disabled': disableTopZones\r\n }\" \r\n (click)=\"selectPlanzone('top-zones')\" \r\n [attr.disabled]=\"disableTopZones ? true : null\">\r\n Top 5 Zones\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': type === 'bottom-zones',\r\n 'inactivePlanBtn': type !== 'bottom-zones',\r\n 'disabled': disableBottomZones\r\n }\" \r\n (click)=\"selectPlanzone('bottom-zones')\" \r\n [attr.disabled]=\"disableBottomZones ? true : null\">\r\n Bottom 5 Zones\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"table-container mx-4\">\r\n <table *ngIf=\"!analysisLoading && !analysisNoData\" class=\"table bottom-border\">\r\n <thead class=\"fixed-header\">\r\n <tr>\r\n <th>Zone Name</th>\r\n <th>Footfall</th>\r\n <th>Bounced</th>\r\n <th>Engagers</th>\r\n <th>Impressions</th>\r\n \r\n </tr>\r\n </thead>\r\n <tbody class=\"table-responsive topstores\">\r\n <tr *ngFor=\"let zone of topPerformingZones\">\r\n <td>\r\n <div class=\"table-title\">{{ zone?.zoneName ? zone.zoneName : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.footfallCount ? zone.footfallCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.bouncedCount ? zone.bouncedCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.engagersCount ? zone.engagersCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.impressionRate ? zone.impressionRate + '%' : '--' }}</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <ng-container *ngIf=\"analysisLoading\">\r\n <div class=\"row loader Analysiscard d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"analysisNoData && !analysisLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 Analysiscard\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Top Performing Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n <div class=\"col-lg-6 card mx-2\">\r\n <div class=\"h-100\">\r\n <div class=\"card-header border-0 p-4\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Top Performing Stores <span\r\n ngbTooltip=\"Top performing stores and their concentration % along with avg dwell time\" placement=\"top\"\r\n triggers=\"mouseenter:mouseleave\" tooltipClass=\"custom-tooltip\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3512_32868)\">\r\n <path\r\n d=\"M8.00016 10.6666V7.99998M8.00016 5.33331H8.00683M14.6668 7.99998C14.6668 11.6819 11.6821 14.6666 8.00016 14.6666C4.31826 14.6666 1.3335 11.6819 1.3335 7.99998C1.3335 4.31808 4.31826 1.33331 8.00016 1.33331C11.6821 1.33331 14.6668 4.31808 14.6668 7.99998Z\"\r\n stroke=\"#98A2B3\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3512_32868\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span></span>\r\n <span class=\"subratetext mt-2\">Based on Concentration Rate</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': storetype === 'top-Stores',\r\n 'inactivePlanBtn': storetype !== 'top-Stores',\r\n 'disabled': disableTopStores\r\n }\" \r\n (click)=\"selectPlanStore('top-Stores')\" \r\n [attr.disabled]=\"disableTopStores ? true : null\">\r\n Top 5 Stores\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': storetype === 'bottom-Stores',\r\n 'inactivePlanBtn': storetype !== 'bottom-Stores',\r\n 'disabled': disableBottomStores\r\n }\" \r\n (click)=\"selectPlanStore('bottom-Stores')\" \r\n [attr.disabled]=\"disableBottomStores ? true : null\">\r\n Bottom 5 Stores\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"table-container mx-4\">\r\n <table *ngIf=\"!topperformingstoresLoading && !topperformingstoresNodata\" class=\"table bottom-border\">\r\n <thead class=\"fixed-header\">\r\n <tr>\r\n <th>Store Info</th>\r\n <th>Zone Name</th>\r\n <th>Zone Footfall</th>\r\n <th>Concentration</th>\r\n <th>Avg Dwell Time</th>\r\n \r\n \r\n </tr>\r\n </thead>\r\n <tbody class=\"table-responsive topstores\">\r\n <tr *ngFor=\"let store of topPerformingStores\">\r\n <td>\r\n <div class=\"table-title-primary invoice mb-2\">{{ store.storeName || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.zoneName || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.zoneFootfallCount || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.impressionRate || '--' }}%</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.avgDwellTime || '--' }} mins</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <ng-container *ngIf=\"topperformingstoresLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"topperformingstoresNodata && !topperformingstoresLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column mt-18\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Top Performing Stores</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>", styles: [".subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}#zonechartdiv{width:100%;height:365px;margin-bottom:6%}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}tr{vertical-align:middle}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-decoration-line:underline;text-transform:capitalize}table th,table td{height:44px!important;padding:18px 15px!important;align-items:center;gap:12px;align-self:stretch}.Analysiscard,.storescard{margin-top:11%;margin-bottom:20%}.form-control:disabled{background-color:#f9fafb!important}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}.table-container{position:relative;max-height:400px;overflow-y:auto}.fixed-header th{position:sticky;top:0;background-color:#fff;z-index:2}.table.bottom-border thead th{border-bottom:2px solid #dee2e6}.table.bottom-border tbody tr td{border-bottom:1px solid #dee2e6}.table.bottom-border th,.table.bottom-border td{padding:8px 16px;white-space:nowrap}.table-responsive::-webkit-scrollbar{width:6px}.table-responsive::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }] });
|
|
2414
|
+
}
|
|
2415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TopPerformingComponent, decorators: [{
|
|
2416
|
+
type: Component,
|
|
2417
|
+
args: [{ selector: 'lib-top-performing', template: "<div class=\"row \">\r\n <div class=\"d-flex justify-content-between p-3\">\r\n <div class=\"col-lg-6 card\">\r\n <div class=\"h-100\">\r\n <div class=\"card-header border-0 p-4\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Top Performing Zones <span\r\n ngbTooltip=\"Top performing zones across the stores selected\" placement=\"top\"\r\n triggers=\"mouseenter:mouseleave\" tooltipClass=\"custom-tooltip\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3512_32868)\">\r\n <path\r\n d=\"M8.00016 10.6666V7.99998M8.00016 5.33331H8.00683M14.6668 7.99998C14.6668 11.6819 11.6821 14.6666 8.00016 14.6666C4.31826 14.6666 1.3335 11.6819 1.3335 7.99998C1.3335 4.31808 4.31826 1.33331 8.00016 1.33331C11.6821 1.33331 14.6668 4.31808 14.6668 7.99998Z\"\r\n stroke=\"#98A2B3\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3512_32868\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span></span>\r\n <span class=\"subratetext mt-2\">Based on Concentration Rate</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': type === 'top-zones',\r\n 'inactivePlanBtn': type !== 'top-zones',\r\n 'disabled': disableTopZones\r\n }\" \r\n (click)=\"selectPlanzone('top-zones')\" \r\n [attr.disabled]=\"disableTopZones ? true : null\">\r\n Top 5 Zones\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': type === 'bottom-zones',\r\n 'inactivePlanBtn': type !== 'bottom-zones',\r\n 'disabled': disableBottomZones\r\n }\" \r\n (click)=\"selectPlanzone('bottom-zones')\" \r\n [attr.disabled]=\"disableBottomZones ? true : null\">\r\n Bottom 5 Zones\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"table-container mx-4\">\r\n <table *ngIf=\"!analysisLoading && !analysisNoData\" class=\"table bottom-border\">\r\n <thead class=\"fixed-header\">\r\n <tr>\r\n <th>Zone Name</th>\r\n <th>Footfall</th>\r\n <th>Bounced</th>\r\n <th>Engagers</th>\r\n <th>Impressions</th>\r\n \r\n </tr>\r\n </thead>\r\n <tbody class=\"table-responsive topstores\">\r\n <tr *ngFor=\"let zone of topPerformingZones\">\r\n <td>\r\n <div class=\"table-title\">{{ zone?.zoneName ? zone.zoneName : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.footfallCount ? zone.footfallCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.bouncedCount ? zone.bouncedCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.engagersCount ? zone.engagersCount : '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ zone?.impressionRate ? zone.impressionRate + '%' : '--' }}</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <ng-container *ngIf=\"analysisLoading\">\r\n <div class=\"row loader Analysiscard d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"analysisNoData && !analysisLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 Analysiscard\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Top Performing Analysis</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n <div class=\"col-lg-6 card mx-2\">\r\n <div class=\"h-100\">\r\n <div class=\"card-header border-0 p-4\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"headtext\">Top Performing Stores <span\r\n ngbTooltip=\"Top performing stores and their concentration % along with avg dwell time\" placement=\"top\"\r\n triggers=\"mouseenter:mouseleave\" tooltipClass=\"custom-tooltip\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3512_32868)\">\r\n <path\r\n d=\"M8.00016 10.6666V7.99998M8.00016 5.33331H8.00683M14.6668 7.99998C14.6668 11.6819 11.6821 14.6666 8.00016 14.6666C4.31826 14.6666 1.3335 11.6819 1.3335 7.99998C1.3335 4.31808 4.31826 1.33331 8.00016 1.33331C11.6821 1.33331 14.6668 4.31808 14.6668 7.99998Z\"\r\n stroke=\"#98A2B3\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3512_32868\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span></span>\r\n <span class=\"subratetext mt-2\">Based on Concentration Rate</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <!--begin::Nav group-->\r\n <div class=\"nav-group nav-group-outline border-1 btn-group p-0\">\r\n <button class=\"btn btn-outline\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': storetype === 'top-Stores',\r\n 'inactivePlanBtn': storetype !== 'top-Stores',\r\n 'disabled': disableTopStores\r\n }\" \r\n (click)=\"selectPlanStore('top-Stores')\" \r\n [attr.disabled]=\"disableTopStores ? true : null\">\r\n Top 5 Stores\r\n </button>\r\n \r\n <button class=\"btn btn-outline px-6 py-3\" \r\n [ngClass]=\"{\r\n 'activePlanBtn': storetype === 'bottom-Stores',\r\n 'inactivePlanBtn': storetype !== 'bottom-Stores',\r\n 'disabled': disableBottomStores\r\n }\" \r\n (click)=\"selectPlanStore('bottom-Stores')\" \r\n [attr.disabled]=\"disableBottomStores ? true : null\">\r\n Bottom 5 Stores\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"table-container mx-4\">\r\n <table *ngIf=\"!topperformingstoresLoading && !topperformingstoresNodata\" class=\"table bottom-border\">\r\n <thead class=\"fixed-header\">\r\n <tr>\r\n <th>Store Info</th>\r\n <th>Zone Name</th>\r\n <th>Zone Footfall</th>\r\n <th>Concentration</th>\r\n <th>Avg Dwell Time</th>\r\n \r\n \r\n </tr>\r\n </thead>\r\n <tbody class=\"table-responsive topstores\">\r\n <tr *ngFor=\"let store of topPerformingStores\">\r\n <td>\r\n <div class=\"table-title-primary invoice mb-2\">{{ store.storeName || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.zoneName || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.zoneFootfallCount || '--' }}</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.impressionRate || '--' }}%</div>\r\n </td>\r\n <td>\r\n <div class=\"table-title\">{{ store.avgDwellTime || '--' }} mins</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <ng-container *ngIf=\"topperformingstoresLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"topperformingstoresNodata && !topperformingstoresLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column mt-18\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Top Performing Stores</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>", styles: [".subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}#zonechartdiv{width:100%;height:365px;margin-bottom:6%}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}tr{vertical-align:middle}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-decoration-line:underline;text-transform:capitalize}table th,table td{height:44px!important;padding:18px 15px!important;align-items:center;gap:12px;align-self:stretch}.Analysiscard,.storescard{margin-top:11%;margin-bottom:20%}.form-control:disabled{background-color:#f9fafb!important}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}.table-container{position:relative;max-height:400px;overflow-y:auto}.fixed-header th{position:sticky;top:0;background-color:#fff;z-index:2}.table.bottom-border thead th{border-bottom:2px solid #dee2e6}.table.bottom-border tbody tr td{border-bottom:1px solid #dee2e6}.table.bottom-border th,.table.bottom-border td{padding:8px 16px;white-space:nowrap}.table-responsive::-webkit-scrollbar{width:6px}.table-responsive::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}\n"] }]
|
|
2418
|
+
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i2$1.FormBuilder }, { type: Zonev2Service }, { type: i0.ChangeDetectorRef }, { type: i4.ToastService }, { type: i2.GlobalStateService }, { type: i0.ElementRef }] });
|
|
2419
|
+
|
|
2420
|
+
class SummaryTableComponent {
|
|
2421
|
+
Zonev2Service;
|
|
2422
|
+
changeDetector;
|
|
2423
|
+
gs;
|
|
2424
|
+
modalService;
|
|
2425
|
+
router;
|
|
2426
|
+
route;
|
|
2427
|
+
toast;
|
|
2428
|
+
isExport = false;
|
|
2429
|
+
itemsPerPage = 10;
|
|
2430
|
+
currentPage = 1;
|
|
2431
|
+
totalItems = 0;
|
|
2432
|
+
paginationSizes = [10, 20, 30];
|
|
2433
|
+
pageSize = 10;
|
|
2434
|
+
sortColumName = '';
|
|
2435
|
+
sortBy = 1;
|
|
2436
|
+
searchInput = "";
|
|
2437
|
+
topPerformingStores = [];
|
|
2438
|
+
searchDisabled = false;
|
|
2439
|
+
invoiceList = [];
|
|
2440
|
+
zonesummaryLoading = true;
|
|
2441
|
+
zonesummaryNoData = false;
|
|
2442
|
+
headerData;
|
|
2443
|
+
sortDirection = 1;
|
|
2444
|
+
destroy$ = new Subject();
|
|
2445
|
+
// loading: boolean = true;
|
|
2446
|
+
// noData: boolean = false;
|
|
2447
|
+
// user: any;
|
|
2448
|
+
// searchInput = new FormControl("");
|
|
2449
|
+
// receivedData: string = "stores";
|
|
2450
|
+
// columns: any[];
|
|
2451
|
+
// sortColumName: string;
|
|
2452
|
+
// sortDirection: number;
|
|
2453
|
+
constructor(Zonev2Service, changeDetector, gs, modalService, router, route, toast) {
|
|
2454
|
+
this.Zonev2Service = Zonev2Service;
|
|
2455
|
+
this.changeDetector = changeDetector;
|
|
2456
|
+
this.gs = gs;
|
|
2457
|
+
this.modalService = modalService;
|
|
2458
|
+
this.router = router;
|
|
2459
|
+
this.route = route;
|
|
2460
|
+
this.toast = toast;
|
|
2461
|
+
}
|
|
2462
|
+
ngOnDestroy() {
|
|
2463
|
+
this.destroy$.next();
|
|
2464
|
+
this.destroy$.complete();
|
|
2465
|
+
}
|
|
2466
|
+
ngOnInit() {
|
|
2467
|
+
this.gs.dataRangeValue
|
|
2468
|
+
.pipe(takeUntil(this.destroy$), debounceTime(300))
|
|
2469
|
+
.subscribe((data) => {
|
|
2470
|
+
this.headerData = data;
|
|
2471
|
+
this.getSummayTable();
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
getSummayTable() {
|
|
2475
|
+
this.searchDisabled = true;
|
|
2476
|
+
this.zonesummaryLoading = true;
|
|
2477
|
+
this.zonesummaryNoData = true;
|
|
2478
|
+
const requestData = {
|
|
2479
|
+
fromDate: this.headerData.date.startDate,
|
|
2480
|
+
toDate: this.headerData.date.endDate,
|
|
2481
|
+
// storeId: ["11-253", "11-511","11-1176"],
|
|
2482
|
+
storeId: this.headerData.stores.filter((store) => store.checked).map((store) => store.storeId),
|
|
2483
|
+
clientId: this.headerData.client,
|
|
2484
|
+
// valueType: "sum",
|
|
2485
|
+
search: this.searchInput,
|
|
2486
|
+
sort: this.sortColumName,
|
|
2487
|
+
sortBy: this.sortDirection,
|
|
2488
|
+
limit: this.pageSize,
|
|
2489
|
+
offset: this.currentPage,
|
|
2490
|
+
export: false,
|
|
2491
|
+
};
|
|
2492
|
+
this.Zonev2Service.getSummaryTableData(requestData)
|
|
2493
|
+
.pipe(takeUntil(this.destroy$))
|
|
2494
|
+
.subscribe((response) => {
|
|
2495
|
+
this.zonesummaryLoading = false;
|
|
2496
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
2497
|
+
// this.topPerformingStores = response.data;
|
|
2498
|
+
this.topPerformingStores = response.data.zoneSummaryData;
|
|
2499
|
+
this.totalItems = response.data.totalCount;
|
|
2500
|
+
this.zonesummaryLoading = false;
|
|
2501
|
+
this.zonesummaryNoData = false;
|
|
2502
|
+
this.searchDisabled = false;
|
|
2503
|
+
}
|
|
2504
|
+
else {
|
|
2505
|
+
this.zonesummaryLoading = false;
|
|
2506
|
+
this.zonesummaryNoData = true;
|
|
2507
|
+
this.searchDisabled = true;
|
|
2508
|
+
if (this.searchInput?.length) {
|
|
2509
|
+
this.searchDisabled = true;
|
|
2510
|
+
}
|
|
2511
|
+
this.topPerformingStores = [];
|
|
2512
|
+
this.totalItems = 0;
|
|
2513
|
+
this.changeDetector.detectChanges();
|
|
2514
|
+
}
|
|
2515
|
+
}, error => {
|
|
2516
|
+
this.topPerformingStores = [];
|
|
2517
|
+
this.changeDetector.detectChanges();
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
onExport() {
|
|
2521
|
+
this.currentPage = 1;
|
|
2522
|
+
const requestData = {
|
|
2523
|
+
fromDate: this.headerData.date.startDate,
|
|
2524
|
+
toDate: this.headerData.date.endDate,
|
|
2525
|
+
storeId: this.headerData.stores.filter((store) => store.checked).map((store) => store.storeId),
|
|
2526
|
+
// storeId: ["11-253", "11-511","11-1176"],
|
|
2527
|
+
clientId: this.headerData.client,
|
|
2528
|
+
// valueType: "sum",
|
|
2529
|
+
search: this.searchInput,
|
|
2530
|
+
sort: this.sortColumName,
|
|
2531
|
+
sortBy: this.sortDirection,
|
|
2532
|
+
limit: this.pageSize,
|
|
2533
|
+
offset: this.currentPage,
|
|
2534
|
+
export: true
|
|
2535
|
+
};
|
|
2536
|
+
this.Zonev2Service.getSummaryTableExport(requestData)
|
|
2537
|
+
.pipe(takeUntil(this.destroy$))
|
|
2538
|
+
.subscribe({
|
|
2539
|
+
next: (res) => {
|
|
2540
|
+
this.Zonev2Service.saveAsExcelFile(res, 'ZoneSummaryTable');
|
|
2541
|
+
},
|
|
2542
|
+
error: (e) => {
|
|
2543
|
+
this.toast.getErrorToast('Something went Wrong..');
|
|
2544
|
+
}
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
searchField() {
|
|
2548
|
+
this.getSummayTable();
|
|
2549
|
+
}
|
|
2550
|
+
sortData(column) {
|
|
2551
|
+
if (this.sortColumName === column) {
|
|
2552
|
+
this.sortDirection = this.sortDirection === 1 ? -1 : 1;
|
|
2553
|
+
}
|
|
2554
|
+
else {
|
|
2555
|
+
this.sortColumName = column;
|
|
2556
|
+
this.sortDirection = 1;
|
|
2557
|
+
}
|
|
2558
|
+
this.changeDetector.detectChanges();
|
|
2559
|
+
this.getSummayTable();
|
|
2560
|
+
}
|
|
2561
|
+
onPageSizeChange(pageSize) {
|
|
2562
|
+
this.currentPage = 1;
|
|
2563
|
+
this.pageSize = parseInt(pageSize);
|
|
2564
|
+
this.getSummayTable();
|
|
2565
|
+
}
|
|
2566
|
+
onPageChange(pageOffset) {
|
|
2567
|
+
this.currentPage = parseInt(pageOffset);
|
|
2568
|
+
this.getSummayTable();
|
|
2569
|
+
}
|
|
2570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SummaryTableComponent, deps: [{ token: Zonev2Service }, { token: i0.ChangeDetectorRef }, { token: i2.GlobalStateService }, { token: i1$1.NgbModal }, { token: i4$1.Router }, { token: i4$1.ActivatedRoute }, { token: i4.ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2571
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: SummaryTableComponent, selector: "lib-summary-table", ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"card-label mb-2\">Zone Summary Table</span>\r\n <span class=\"text-sub mb-2\"> From {{ headerData?.date?.startDate | date: 'MMM d' }} to {{ headerData?.date?.endDate | date: 'MMM d, y' }}\r\n </span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon footfallsearch svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\"\r\n height=\"2\" rx=\"1\" transform=\"rotate(45 17.0365 15.1223)\"\r\n fill=\"currentColor\">\r\n </rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input [(ngModel)]=\"searchInput\" type=\"text\"\r\n class=\"form-control ps-14 me-4 footfallsearch\"\r\n placeholder=\"Search...\" autocomplete=\"off\" (keyup.enter)=\"searchField()\"\r\n [disabled]=\"searchDisabled\" />\r\n <button type=\"button\" (click)=\"onExport()\" class=\"btn-outline btn align-items-end text-nowrap invheader me-4\" [disabled]=\"!topPerformingStores.length\">\r\n <!-- Export Icon -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M17.5 12.5V15.8333C17.5 16.2754 17.3244 16.6993 17.0118 17.0118C16.6993 17.3244 16.2754 17.5 15.8333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V12.5M14.1667 6.66667L10 2.5M10 2.5L5.83333 6.66667M10 2.5V12.5\" stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n <span class=\"ms-2\"></span> Export\r\n </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table *ngIf=\"!zonesummaryLoading && !zonesummaryNoData\" class=\"table text-nowrap bottom-border\">\r\n <thead>\r\n <tr>\r\n <th>\r\n <div class=\"cursor-pointer\" (click)=\"sortData('date')\">\r\n Date\r\n <svg [ngClass]=\"sortColumName === 'date' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'date' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('zoneName')\">\r\n Zone Name\r\n <svg [ngClass]=\"sortColumName === 'zoneName' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'zoneName' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('storeName')\">\r\n Store Name\r\n <svg [ngClass]=\"sortColumName === 'storeName' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'storeName' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th ><div class=\"cursor-pointer\" (click)=\"sortData('storeId')\">\r\n StoreId\r\n <svg [ngClass]=\"sortColumName === 'storeId' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'storeId' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('concentrationRate')\">\r\n Zone Conc.Rate\r\n <svg [ngClass]=\"sortColumName === 'concentrationRate' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'concentrationRate' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th ><div class=\"cursor-pointer\" (click)=\"sortData('avgDwellTime')\">\r\n Avg.Dwell Time\r\n <svg [ngClass]=\"sortColumName === 'avgDwellTime' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'avgDwellTime' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('footfallCount')\">\r\n Zone FF\r\n <svg [ngClass]=\"sortColumName === 'footfallCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'footfallCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('bouncedCount')\">\r\n Zone Bounced\r\n <svg [ngClass]=\"sortColumName === 'bouncedCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'bouncedCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('engagersCount')\">\r\n Zone Engagers\r\n <svg [ngClass]=\"sortColumName === 'engagersCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'engagersCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('below12')\">\r\n Age Below 12\r\n <svg [ngClass]=\"sortColumName === 'below12' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'below12' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('13-19\r\n ')\">\r\n Age 13-19\r\n <svg [ngClass]=\"sortColumName === '13-19' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '13-19' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('\r\n 20-30')\">\r\n Age 20-30\r\n <svg [ngClass]=\"sortColumName === '20-30' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '20-30' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('31-45')\">\r\n Age 31-45\r\n <svg [ngClass]=\"sortColumName === '31-45' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '31-45' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('46-59\r\n ')\">\r\n Age 46-59\r\n <svg [ngClass]=\"sortColumName === '46-59\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '46-59\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('60 above')\">\r\n Age 60+\r\n <svg [ngClass]=\"sortColumName === '60 above\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '60 above\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('maleCount')\">\r\n Male\r\n <svg [ngClass]=\"sortColumName === 'maleCount\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'maleCount\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('femaleCount')\">\r\n Female\r\n <svg [ngClass]=\"sortColumName === 'femaleCount\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'femaleCount\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let store of topPerformingStores\">\r\n <td><div class=\"table-title\">{{ store?.date | date: 'd MMM, y' || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.zoneName || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.storeName || '--' }}</div></td>\r\n <!-- <td><a class=\"table-title-primary cursor-pointer\" (click)=\"storeView(store.storeId)\">{{ store.storeName || '--' }}</a></td> -->\r\n <td><div class=\"table-title\">{{ store.storeId || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.concentrationRate?.toFixed(0) || '0' }}%</div></td>\r\n <td><div class=\"table-title\">{{ store.avgDwellTime || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.footfallCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.bouncedCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.engagersCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.bellow12 || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['13-19'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['20-30'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['31-45'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['46-59'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['60 above'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.maleCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.femaleCount || '0' }}</div></td>\r\n </tr> \r\n </tbody>\r\n </table>\r\n <ng-container *ngIf=\"zonesummaryLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"zonesummaryNoData && !zonesummaryLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 my-6\">\r\n <div\r\n class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Zone Summary Table</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"!zonesummaryLoading && !zonesummaryNoData\">\r\n <lib-pagination class=\"text-start\" [itemsPerPage]=\"itemsPerPage\"\r\n [currentPage]=\"currentPage\" [totalItems]=\"totalItems\"\r\n [paginationSizes]=\"paginationSizes\" [pageSize]=\"pageSize\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n \r\n </div>\r\n</div>", styles: [".table-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:500;line-height:20px}.subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}.overalltext{color:var(--Gray-500, #667085);font-size:14px;font-weight:500;line-height:20px}.borderdashed{border-bottom:1px solid var(--Gray-200, #EAECF0)}.conc{width:110%}.overallstore{width:155%}::ng-deep .carousel-indicators [data-bs-target]{flex:0 1 auto;width:8px;height:8px;padding:0;cursor:pointer;background-color:#009bf3!important;border-radius:4px;transition:opacity .6s ease;margin-bottom:10px;border:0px}.category_active{border-bottom:3px solid #009EF7!important;border-radius:3px;margin-bottom:3px!important}.timer_active{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:500;line-height:20px}table tr{vertical-align:middle}table th,table td{height:44px!important;padding:20px 15px!important;align-items:center;gap:12px;align-self:stretch}.card .card-header{padding:0 1.25rem}.form-control:disabled{background-color:#f9fafb!important}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}.rotate{transform:rotate(180deg)}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-transform:capitalize}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
|
|
2572
|
+
}
|
|
2573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: SummaryTableComponent, decorators: [{
|
|
2574
|
+
type: Component,
|
|
2575
|
+
args: [{ selector: 'lib-summary-table', template: "<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <span class=\"card-label mb-2\">Zone Summary Table</span>\r\n <span class=\"text-sub mb-2\"> From {{ headerData?.date?.startDate | date: 'MMM d' }} to {{ headerData?.date?.endDate | date: 'MMM d, y' }}\r\n </span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon footfallsearch svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\"\r\n height=\"2\" rx=\"1\" transform=\"rotate(45 17.0365 15.1223)\"\r\n fill=\"currentColor\">\r\n </rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input [(ngModel)]=\"searchInput\" type=\"text\"\r\n class=\"form-control ps-14 me-4 footfallsearch\"\r\n placeholder=\"Search...\" autocomplete=\"off\" (keyup.enter)=\"searchField()\"\r\n [disabled]=\"searchDisabled\" />\r\n <button type=\"button\" (click)=\"onExport()\" class=\"btn-outline btn align-items-end text-nowrap invheader me-4\" [disabled]=\"!topPerformingStores.length\">\r\n <!-- Export Icon -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M17.5 12.5V15.8333C17.5 16.2754 17.3244 16.6993 17.0118 17.0118C16.6993 17.3244 16.2754 17.5 15.8333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V12.5M14.1667 6.66667L10 2.5M10 2.5L5.83333 6.66667M10 2.5V12.5\" stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n <span class=\"ms-2\"></span> Export\r\n </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table *ngIf=\"!zonesummaryLoading && !zonesummaryNoData\" class=\"table text-nowrap bottom-border\">\r\n <thead>\r\n <tr>\r\n <th>\r\n <div class=\"cursor-pointer\" (click)=\"sortData('date')\">\r\n Date\r\n <svg [ngClass]=\"sortColumName === 'date' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'date' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('zoneName')\">\r\n Zone Name\r\n <svg [ngClass]=\"sortColumName === 'zoneName' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'zoneName' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('storeName')\">\r\n Store Name\r\n <svg [ngClass]=\"sortColumName === 'storeName' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'storeName' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th ><div class=\"cursor-pointer\" (click)=\"sortData('storeId')\">\r\n StoreId\r\n <svg [ngClass]=\"sortColumName === 'storeId' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'storeId' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('concentrationRate')\">\r\n Zone Conc.Rate\r\n <svg [ngClass]=\"sortColumName === 'concentrationRate' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'concentrationRate' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th ><div class=\"cursor-pointer\" (click)=\"sortData('avgDwellTime')\">\r\n Avg.Dwell Time\r\n <svg [ngClass]=\"sortColumName === 'avgDwellTime' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'avgDwellTime' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('footfallCount')\">\r\n Zone FF\r\n <svg [ngClass]=\"sortColumName === 'footfallCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'footfallCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('bouncedCount')\">\r\n Zone Bounced\r\n <svg [ngClass]=\"sortColumName === 'bouncedCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'bouncedCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('engagersCount')\">\r\n Zone Engagers\r\n <svg [ngClass]=\"sortColumName === 'engagersCount' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'engagersCount' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('below12')\">\r\n Age Below 12\r\n <svg [ngClass]=\"sortColumName === 'below12' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'below12' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('13-19\r\n ')\">\r\n Age 13-19\r\n <svg [ngClass]=\"sortColumName === '13-19' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '13-19' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('\r\n 20-30')\">\r\n Age 20-30\r\n <svg [ngClass]=\"sortColumName === '20-30' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '20-30' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('31-45')\">\r\n Age 31-45\r\n <svg [ngClass]=\"sortColumName === '31-45' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '31-45' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('46-59\r\n ')\">\r\n Age 46-59\r\n <svg [ngClass]=\"sortColumName === '46-59\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '46-59\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('60 above')\">\r\n Age 60+\r\n <svg [ngClass]=\"sortColumName === '60 above\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === '60 above\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('maleCount')\">\r\n Male\r\n <svg [ngClass]=\"sortColumName === 'maleCount\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'maleCount\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n <th><div class=\"cursor-pointer\" (click)=\"sortData('femaleCount')\">\r\n Female\r\n <svg [ngClass]=\"sortColumName === 'femaleCount\r\n ' && sortDirection === 1 ? 'rotate' : ''\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'femaleCount\r\n ' ? '#00A3FF' : '#667085'\" stroke-width=\"1.33333\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let store of topPerformingStores\">\r\n <td><div class=\"table-title\">{{ store?.date | date: 'd MMM, y' || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.zoneName || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.storeName || '--' }}</div></td>\r\n <!-- <td><a class=\"table-title-primary cursor-pointer\" (click)=\"storeView(store.storeId)\">{{ store.storeName || '--' }}</a></td> -->\r\n <td><div class=\"table-title\">{{ store.storeId || '--' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.concentrationRate?.toFixed(0) || '0' }}%</div></td>\r\n <td><div class=\"table-title\">{{ store.avgDwellTime || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.footfallCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.bouncedCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.engagersCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.bellow12 || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['13-19'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['20-30'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['31-45'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['46-59'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store['60 above'] || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.maleCount || '0' }}</div></td>\r\n <td><div class=\"table-title\">{{ store.femaleCount || '0' }}</div></td>\r\n </tr> \r\n </tbody>\r\n </table>\r\n <ng-container *ngIf=\"zonesummaryLoading\">\r\n <div class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"zonesummaryNoData && !zonesummaryLoading\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 my-6\">\r\n <div\r\n class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodatamaintext mt-3\">No data found</div>\r\n <div class=\"nodatasubtext\">There is no result for Zone Summary Table</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"!zonesummaryLoading && !zonesummaryNoData\">\r\n <lib-pagination class=\"text-start\" [itemsPerPage]=\"itemsPerPage\"\r\n [currentPage]=\"currentPage\" [totalItems]=\"totalItems\"\r\n [paginationSizes]=\"paginationSizes\" [pageSize]=\"pageSize\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n \r\n </div>\r\n</div>", styles: [".table-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:500;line-height:20px}.subtext{color:var(--Gray-800, #1D2939);font-size:14px;font-weight:500;line-height:20px}.headcount{color:var(--Gray-900, #101828);font-size:20px;font-weight:600;line-height:30px}.headtext{color:var(--Gray-700, #344054);font-size:18px;font-weight:600;line-height:28px}.subratetext{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.invoicesearch{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-style:normal;font-weight:500!important;line-height:20px}.invoicesearch::placeholder{color:var(--Gray-700, #344054)!important}.loader .title{width:65%}.loader .link{width:85%}.loader .description{width:95%}.loader .shimmer{padding:15px;width:95%;height:120px;margin:10px auto;background:#fff}.loader .shimmer .image-card{height:90px;width:90px;float:right;border-radius:8px}.loader .stroke{height:15px;background:#777;margin-top:20px}.loader .wrapper{width:0px;animation:fullView .5s forwards linear}@keyframes fullView{to{width:100%}}.loader .animate{animation:shimmer 3s;animation-iteration-count:infinite;background:linear-gradient(to right,#e6e6e6 5%,#ccc 25%,#e6e6e6 35%);background-size:1000px 100%}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}.activePlanBtn{border-radius:6px;background:var(--Primary-50, #EAF8FF);color:var(--Gray-700, #344054);font-size:14px!important;font-weight:500!important;line-height:20px}.inactivePlanBtn{color:var(--Gray-500, #667085)!important;font-size:14px;font-weight:500!important;line-height:20px}.overalltext{color:var(--Gray-500, #667085);font-size:14px;font-weight:500;line-height:20px}.borderdashed{border-bottom:1px solid var(--Gray-200, #EAECF0)}.conc{width:110%}.overallstore{width:155%}::ng-deep .carousel-indicators [data-bs-target]{flex:0 1 auto;width:8px;height:8px;padding:0;cursor:pointer;background-color:#009bf3!important;border-radius:4px;transition:opacity .6s ease;margin-bottom:10px;border:0px}.category_active{border-bottom:3px solid #009EF7!important;border-radius:3px;margin-bottom:3px!important}.timer_active{color:var(--Primary-700, #009BF3);font-size:14px;font-style:normal;font-weight:500;line-height:20px}table tr{vertical-align:middle}table th,table td{height:44px!important;padding:20px 15px!important;align-items:center;gap:12px;align-self:stretch}.card .card-header{padding:0 1.25rem}.form-control:disabled{background-color:#f9fafb!important}.nodatamaintext{font-family:Inter;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#101828}.nodatasubtext{font-family:Inter;font-size:14px;font-weight:400;line-height:20px;text-align:center;color:#667085}.rotate{transform:rotate(180deg)}.table-title-primary{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:500;line-height:20px;text-transform:capitalize}\n"] }]
|
|
2576
|
+
}], ctorParameters: () => [{ type: Zonev2Service }, { type: i0.ChangeDetectorRef }, { type: i2.GlobalStateService }, { type: i1$1.NgbModal }, { type: i4$1.Router }, { type: i4$1.ActivatedRoute }, { type: i4.ToastService }] });
|
|
2577
|
+
|
|
2578
|
+
class ZoneV2Component {
|
|
2579
|
+
pageInfo;
|
|
2580
|
+
gs;
|
|
2581
|
+
storeId = 0;
|
|
2582
|
+
headerData;
|
|
2583
|
+
destroy$ = new Subject();
|
|
2584
|
+
ngOnDestroy() {
|
|
2585
|
+
this.destroy$.next(true);
|
|
2586
|
+
this.destroy$.complete();
|
|
2587
|
+
}
|
|
2588
|
+
constructor(pageInfo, gs) {
|
|
2589
|
+
this.pageInfo = pageInfo;
|
|
2590
|
+
this.gs = gs;
|
|
2591
|
+
}
|
|
2592
|
+
ngOnInit() {
|
|
2593
|
+
this.gs.dataRangeValue
|
|
2594
|
+
.pipe(takeUntil(this.destroy$), debounceTime(300))
|
|
2595
|
+
.subscribe((data) => {
|
|
2596
|
+
console.log("data", data);
|
|
2597
|
+
this.headerData = data;
|
|
2598
|
+
this.updateStoreId();
|
|
2599
|
+
this.setPageData();
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
setPageData() {
|
|
2603
|
+
this.pageInfo.setTitle("Zones");
|
|
2604
|
+
this.pageInfo.setDescription("Zones");
|
|
2605
|
+
this.pageInfo.setBreadcrumbs([
|
|
2606
|
+
{ title: "Analyze", path: "/manage/traffic", isActive: false, isSeparator: false },
|
|
2607
|
+
{ title: "Analyze", path: "/manage/traffic", isActive: false, isSeparator: true },
|
|
2608
|
+
]);
|
|
2609
|
+
}
|
|
2610
|
+
updateStoreId() {
|
|
2611
|
+
this.storeId = this.headerData.stores.filter((store) => store.checked).length;
|
|
2612
|
+
}
|
|
2613
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ZoneV2Component, deps: [{ token: i2.PageInfoService }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2614
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: ZoneV2Component, selector: "lib-zone-v2", ngImport: i0, template: "<lib-zones-cards></lib-zones-cards>\r\n<div class=\"mt-4\">\r\n<lib-customer-journey></lib-customer-journey>\r\n</div>\r\n<div *ngIf=\"storeId === 1\" class=\"mt-4\">\r\n<lib-store-heatmap></lib-store-heatmap>\r\n</div>\r\n<div *ngIf=\"storeId > 1\" class=\"mt-2\">\r\n <lib-top-performing></lib-top-performing>\r\n</div>\r\n<div class=\"mt-4\" >\r\n <lib-summary-table></lib-summary-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ZonesCardsComponent, selector: "lib-zones-cards" }, { kind: "component", type: StoreHeatmapComponent, selector: "lib-store-heatmap" }, { kind: "component", type: CustomerJourneyComponent, selector: "lib-customer-journey" }, { kind: "component", type: TopPerformingComponent, selector: "lib-top-performing" }, { kind: "component", type: SummaryTableComponent, selector: "lib-summary-table" }] });
|
|
2615
|
+
}
|
|
2616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: ZoneV2Component, decorators: [{
|
|
2617
|
+
type: Component,
|
|
2618
|
+
args: [{ selector: 'lib-zone-v2', template: "<lib-zones-cards></lib-zones-cards>\r\n<div class=\"mt-4\">\r\n<lib-customer-journey></lib-customer-journey>\r\n</div>\r\n<div *ngIf=\"storeId === 1\" class=\"mt-4\">\r\n<lib-store-heatmap></lib-store-heatmap>\r\n</div>\r\n<div *ngIf=\"storeId > 1\" class=\"mt-2\">\r\n <lib-top-performing></lib-top-performing>\r\n</div>\r\n<div class=\"mt-4\" >\r\n <lib-summary-table></lib-summary-table>\r\n</div>\r\n" }]
|
|
2619
|
+
}], ctorParameters: () => [{ type: i2.PageInfoService }, { type: i2.GlobalStateService }] });
|
|
2620
|
+
|
|
2621
|
+
const routes = [
|
|
2622
|
+
{
|
|
2623
|
+
path: 'v1',
|
|
2624
|
+
component: TangoAnalyseZoneComponent
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
path: 'v2',
|
|
2628
|
+
component: ZoneV2Component
|
|
2629
|
+
}
|
|
2630
|
+
];
|
|
2631
|
+
class TangoAnalyseZoneRoutingModule {
|
|
2632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2633
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
|
|
2634
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
2635
|
+
}
|
|
2636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneRoutingModule, decorators: [{
|
|
2637
|
+
type: NgModule,
|
|
2638
|
+
args: [{
|
|
2639
|
+
imports: [RouterModule.forChild(routes)],
|
|
2640
|
+
exports: [RouterModule]
|
|
2641
|
+
}]
|
|
2642
|
+
}] });
|
|
2643
|
+
|
|
2644
|
+
class TangoAnalyseZoneModule {
|
|
2645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2646
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneModule, declarations: [OverallcardsComponent,
|
|
2647
|
+
TangoAnalyseZoneComponent,
|
|
2648
|
+
TopPerformingZonesComponent,
|
|
2649
|
+
ZoneSummaryTableComponent,
|
|
2650
|
+
ZoneConcentrationComponent,
|
|
2651
|
+
ConcentrationheatmapComponent,
|
|
2652
|
+
ZoneV2Component,
|
|
2653
|
+
ConcentrationheatmapComponent,
|
|
2654
|
+
ZonesCardsComponent,
|
|
2655
|
+
StoreHeatmapComponent,
|
|
2656
|
+
ImageDirectoryComponent,
|
|
2657
|
+
ImageDirectoryViewComponent,
|
|
2658
|
+
CustomerJourneyComponent,
|
|
2659
|
+
ReactiveSelectComponent,
|
|
2660
|
+
TopPerformingComponent,
|
|
2661
|
+
SummaryTableComponent,
|
|
2662
|
+
StoreZoomHeatmapComponent], imports: [
|
|
2663
|
+
// CommonModule,
|
|
2664
|
+
// TangoAnalyseZoneRoutingModule,
|
|
2665
|
+
// NgbProgressbarModule,
|
|
2666
|
+
// FormsModule,
|
|
2667
|
+
// ReactiveFormsModule,
|
|
2668
|
+
// NgbCarouselModule,
|
|
2669
|
+
// CommonSharedModule,
|
|
2670
|
+
// NgbTooltipModule,
|
|
2671
|
+
// NgbModule
|
|
2672
|
+
CommonModule,
|
|
2673
|
+
TangoAnalyseZoneRoutingModule,
|
|
2674
|
+
NgbProgressbarModule,
|
|
2675
|
+
FormsModule,
|
|
2676
|
+
ReactiveFormsModule,
|
|
2677
|
+
CommonSharedModule,
|
|
2678
|
+
NgbTooltipModule,
|
|
2679
|
+
NgbModule,
|
|
2680
|
+
NgbAccordionModule,
|
|
2681
|
+
CommonSharedModule,
|
|
2682
|
+
NgbCarouselModule] });
|
|
2683
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneModule, imports: [
|
|
2684
|
+
// CommonModule,
|
|
2685
|
+
// TangoAnalyseZoneRoutingModule,
|
|
2686
|
+
// NgbProgressbarModule,
|
|
2687
|
+
// FormsModule,
|
|
2688
|
+
// ReactiveFormsModule,
|
|
2689
|
+
// NgbCarouselModule,
|
|
2690
|
+
// CommonSharedModule,
|
|
2691
|
+
// NgbTooltipModule,
|
|
2692
|
+
// NgbModule
|
|
2693
|
+
CommonModule,
|
|
2694
|
+
TangoAnalyseZoneRoutingModule,
|
|
2695
|
+
NgbProgressbarModule,
|
|
2696
|
+
FormsModule,
|
|
2697
|
+
ReactiveFormsModule,
|
|
2698
|
+
CommonSharedModule,
|
|
2699
|
+
NgbTooltipModule,
|
|
2700
|
+
NgbModule,
|
|
2701
|
+
NgbAccordionModule,
|
|
2702
|
+
CommonSharedModule,
|
|
2703
|
+
NgbCarouselModule] });
|
|
2704
|
+
}
|
|
2705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoAnalyseZoneModule, decorators: [{
|
|
2706
|
+
type: NgModule,
|
|
2707
|
+
args: [{
|
|
2708
|
+
declarations: [
|
|
2709
|
+
OverallcardsComponent,
|
|
2710
|
+
TangoAnalyseZoneComponent,
|
|
2711
|
+
TopPerformingZonesComponent,
|
|
2712
|
+
ZoneSummaryTableComponent,
|
|
2713
|
+
ZoneConcentrationComponent,
|
|
2714
|
+
ConcentrationheatmapComponent,
|
|
2715
|
+
ZoneV2Component,
|
|
2716
|
+
ConcentrationheatmapComponent,
|
|
2717
|
+
ZonesCardsComponent,
|
|
2718
|
+
StoreHeatmapComponent,
|
|
2719
|
+
ImageDirectoryComponent,
|
|
2720
|
+
ImageDirectoryViewComponent,
|
|
2721
|
+
CustomerJourneyComponent,
|
|
2722
|
+
ReactiveSelectComponent,
|
|
2723
|
+
TopPerformingComponent,
|
|
2724
|
+
SummaryTableComponent,
|
|
2725
|
+
StoreZoomHeatmapComponent
|
|
2726
|
+
],
|
|
2727
|
+
imports: [
|
|
2728
|
+
// CommonModule,
|
|
2729
|
+
// TangoAnalyseZoneRoutingModule,
|
|
2730
|
+
// NgbProgressbarModule,
|
|
2731
|
+
// FormsModule,
|
|
2732
|
+
// ReactiveFormsModule,
|
|
2733
|
+
// NgbCarouselModule,
|
|
2734
|
+
// CommonSharedModule,
|
|
2735
|
+
// NgbTooltipModule,
|
|
2736
|
+
// NgbModule
|
|
2737
|
+
CommonModule,
|
|
2738
|
+
TangoAnalyseZoneRoutingModule,
|
|
2739
|
+
NgbProgressbarModule,
|
|
2740
|
+
FormsModule,
|
|
2741
|
+
ReactiveFormsModule,
|
|
2742
|
+
CommonSharedModule,
|
|
2743
|
+
NgbTooltipModule,
|
|
2744
|
+
NgbModule,
|
|
2745
|
+
NgbAccordionModule,
|
|
2746
|
+
CommonSharedModule,
|
|
2747
|
+
NgbCarouselModule
|
|
1129
2748
|
]
|
|
1130
2749
|
}]
|
|
1131
2750
|
}] });
|