kwikid-agent-dashboard 0.0.12 → 0.0.13

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.
@@ -1,26 +1,26 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, ViewChildren, Component, Input, EventEmitter, Output, ViewChild, Pipe, Inject, NgModule } from '@angular/core';
3
- import * as i4 from '@angular/google-maps';
2
+ import { Injectable, ViewChildren, EventEmitter, Component, Input, Output, HostListener, ViewChild, Pipe, Inject, NgModule } from '@angular/core';
3
+ import * as i5 from '@angular/google-maps';
4
4
  import { MapInfoWindow, GoogleMapsModule } from '@angular/google-maps';
5
- import * as i9 from '@taiga-ui/core';
5
+ import * as i11 from '@taiga-ui/core';
6
6
  import { TuiDialogService, TuiRootModule, TuiDialogModule, TuiDropdownModule, TuiGroupModule, TuiSvgModule } from '@taiga-ui/core';
7
7
  import { of } from 'rxjs';
8
8
  import { map, catchError } from 'rxjs/operators';
9
9
  import { __awaiter } from 'tslib';
10
- import * as i2 from '@angular/common/http';
10
+ import * as i3$1 from '@angular/common/http';
11
11
  import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
12
- import * as i4$1 from 'kwikui';
12
+ import * as i2 from 'kwikui';
13
13
  import { KwikUIButtonModule, KwikUIButtonIconModule, KwikUIInputModule, KwikUIInputDateModule, KwikUIInputDateRangeModule, KwikUISelectComboboxModule, KwikUITableModule, KwikUITablePaginationModule } from 'kwikui';
14
+ import { getObjectValueFromPath, isEmptyValue } from 'kwikid-toolkit';
15
+ import * as i6 from '@angular/common';
16
+ import { CommonModule } from '@angular/common';
14
17
  import * as i5$1 from '@angular/forms';
15
18
  import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
16
- import * as i8 from '@taiga-ui/cdk';
19
+ import * as i10 from '@taiga-ui/cdk';
17
20
  import { TuiDayRange, TuiDay, TuiActiveZoneModule } from '@taiga-ui/cdk';
18
21
  import * as i3 from '@angular/cdk/scrolling';
19
22
  import { ScrollingModule } from '@angular/cdk/scrolling';
20
- import { isEmptyValue, getObjectValueFromPath } from 'kwikid-toolkit';
21
- import * as i5 from '@angular/common';
22
- import { CommonModule } from '@angular/common';
23
- import * as i6 from 'kwikid-forms';
23
+ import * as i8 from 'kwikid-forms';
24
24
  import { KwikIDFormViewModule } from 'kwikid-forms';
25
25
  import { TuiSidebarModule } from '@taiga-ui/addon-mobile';
26
26
 
@@ -108,691 +108,176 @@ class MapService {
108
108
  return c;
109
109
  }
110
110
  }
111
- /** @nocollapse */ MapService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapService, deps: [{ token: i4.MapDirectionsService }], target: i0.ɵɵFactoryTarget.Injectable });
111
+ /** @nocollapse */ MapService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapService, deps: [{ token: i5.MapDirectionsService }], target: i0.ɵɵFactoryTarget.Injectable });
112
112
  /** @nocollapse */ MapService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapService, providedIn: 'root' });
113
113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapService, decorators: [{
114
114
  type: Injectable,
115
115
  args: [{
116
116
  providedIn: 'root'
117
117
  }]
118
- }], ctorParameters: function () { return [{ type: i4.MapDirectionsService }]; }, propDecorators: { directionsRenders: [{
118
+ }], ctorParameters: function () { return [{ type: i5.MapDirectionsService }]; }, propDecorators: { directionsRenders: [{
119
119
  type: ViewChildren,
120
120
  args: ['directionsRender']
121
121
  }] } });
122
122
 
123
- class InfoWindowService {
124
- constructor(mapService) {
125
- this.mapService = mapService;
126
- this.config = {
127
- fields: {
128
- name: {
129
- label: 'Name',
130
- value: 'name',
131
- display: 'value',
132
- style: {
133
- fontSize: '1rem',
134
- fontWeight: 600
135
- }
136
- },
137
- phone: {
138
- label: 'Call',
139
- value: 'phone',
140
- display: 'label',
141
- style: {
142
- fontSize: '0.8rem',
143
- padding: '0.1rem 0',
144
- textAlign: 'justify'
123
+ class UserService {
124
+ constructor() {
125
+ this.isListOpen = true;
126
+ this.showMapview = false;
127
+ this.showTaskDetails = 0;
128
+ this.addTaskFormConfig = {
129
+ key: 'ADD_TASK',
130
+ title: 'Add Task',
131
+ fields: [
132
+ {
133
+ key: 'name',
134
+ label: 'Customer Name',
135
+ disabled: false,
136
+ messages: [],
137
+ default: {
138
+ value: {
139
+ is_found: false,
140
+ value: '',
141
+ sources: [
142
+ {
143
+ key: 'OBJECT',
144
+ props: {
145
+ object: {
146
+ key: 'ALL_FORMS_DATA',
147
+ path: '$.ADD_TASK.name'
148
+ }
149
+ },
150
+ value: '',
151
+ validation: {
152
+ is_valid: false,
153
+ triggers: ['ON_INIT'],
154
+ rules: [
155
+ {
156
+ id: '1',
157
+ key: 'VALUE_CHECK',
158
+ props: {
159
+ value: {
160
+ source: {
161
+ key: 'OBJECT',
162
+ props: {
163
+ object: {
164
+ key: 'ALL_FORMS_DATA',
165
+ path: '$.ADD_TASK.name'
166
+ }
167
+ }
168
+ }
169
+ },
170
+ pattern: {
171
+ key: 'IS_NOT_EMPTY'
172
+ }
173
+ }
174
+ }
175
+ ],
176
+ actions: [
177
+ {
178
+ id: '1',
179
+ key: 'SET_FIELD_DEFAULT_VALUE',
180
+ condition: '1',
181
+ props: {
182
+ fieldKey: 'name',
183
+ value: {
184
+ source: {
185
+ key: 'OBJECT',
186
+ props: {
187
+ object: {
188
+ key: 'ALL_FORMS_DATA',
189
+ path: '$.ADD_TASK.name'
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ }
196
+ ]
197
+ }
198
+ }
199
+ ]
200
+ }
145
201
  },
146
- icon: 'https://cdn-icons-png.flaticon.com/512/60/60720.png'
202
+ validators: {
203
+ required: true
204
+ },
205
+ properties: {
206
+ placeholder: 'Please enter the Customer Name',
207
+ readOnly: false,
208
+ case: 'default'
209
+ },
210
+ type: 'text'
147
211
  },
148
- address: {
149
- label: 'Directions',
150
- value: 'address',
151
- display: 'label',
152
- style: {
153
- fontSize: '0.8rem',
154
- padding: '0.1rem 0'
155
- },
156
- icon: 'https://cdn-icons-png.flaticon.com/512/62/62516.png'
157
- }
158
- }
159
- };
160
- this.mainInfoWindowStyle = {
161
- display: 'flex',
162
- 'flex-direction': 'column',
163
- 'justify-content': 'center',
164
- 'align-items': 'stretch',
165
- gap: '0.5rem',
166
- padding: '0.5rem'
167
- };
168
- this.fieldDivStyle = {
169
- gap: ' 0.5rem',
170
- display: 'flex',
171
- 'flex-direction': 'row'
172
- };
173
- }
174
- getOpenMarker() {
175
- return this.openMarker;
176
- }
177
- setOpenMarker(value) {
178
- this.openMarker = value;
179
- }
180
- /**
181
- * @description
182
- * Wrapper method to show Customer Info Window
183
- *
184
- * @function showInfo
185
- * @func showInfo
186
- * @method showInfo
187
- */
188
- showCustomerInformation(customer, marker) {
189
- let map = this.mapService.map;
190
- let contentString = this.createInfoContent(customer);
191
- let infowindow = new google.maps.InfoWindow({
192
- content: contentString
193
- });
194
- this.addEventListeners(customer, infowindow);
195
- this.closeLastOpenedInfoWindow();
196
- infowindow.open(map, marker);
197
- this.lastInfoWindowOpened = infowindow;
198
- this.mapService.map = Object.assign(Object.assign({}, this.mapService.map), { center: marker.getPosition });
199
- // map.setCenter(marker.getPosition());
200
- return { infowindow: infowindow };
201
- }
202
- addEventListeners(customer, infowindow) {
203
- // chnage -
204
- let addressLink = `http://maps.google.com/?q=${customer.extras.loc[0]}, ${customer.extras.loc[1]}`;
205
- google.maps.event.addListener(infowindow, 'domready', function () {
206
- document.getElementById('Call').addEventListener('click', function (e) {
207
- window.open(`tel:${customer.extras.phone}`, '_self');
208
- });
209
- document
210
- .getElementById('Directions')
211
- .addEventListener('click', function (e) {
212
- window.open(`${addressLink}`, '_blank');
213
- });
214
- document
215
- .getElementsByClassName('gm-ui-hover-effect')[0]
216
- .setAttribute('style', ' background: none;\
217
- display: block; \
218
- border: 0px; \
219
- margin: 0px; \
220
- padding: 0px; \
221
- text-transform: none; \
222
- appearance: none; \
223
- position: absolute; \
224
- cursor: pointer; \
225
- user-select: none; \
226
- top: 0px; \
227
- right: 0px; \
228
- width: 30px; \
229
- height: 30px; \
230
- ');
231
- });
232
- }
233
- /**
234
- * @description
235
- * Wrapper method to close Last Info Window
236
- *
237
- * @function closeLastOpenedInfoWindow
238
- * @func closeLastOpenedInfoWindow
239
- * @method closeLastOpenedInfoWindow
240
- */
241
- closeLastOpenedInfoWindow() {
242
- if (this.lastInfoWindowOpened) {
243
- this.lastInfoWindowOpened.close();
244
- }
245
- }
246
- /**
247
- * @description
248
- * Closes the previously opened info window.
249
- *
250
- * @function infoData
251
- * @func infoData
252
- * @method infoData
253
- */
254
- createInfoContent(customer) {
255
- let content = "<div style='padding:4px; font-family: Manrope;' >";
256
- content += this.createFields(customer, this.config.fields);
257
- content += '</div>';
258
- return content;
259
- }
260
- /**
261
- * @description
262
- * Wrapper method to create Fields Container
263
- *
264
- * @function createFields
265
- * @func createFields
266
- * @method createFields
267
- */
268
- createFields(customer, fields) {
269
- let _div = document.createElement('div');
270
- for (const property in this.mainInfoWindowStyle)
271
- _div.style[property] = this.mainInfoWindowStyle[property];
272
- for (let key of Object.keys(fields)) {
273
- let field = fields[key];
274
- let _fieldDiv = document.createElement('div');
275
- _fieldDiv.setAttribute('id', field.label);
276
- for (const property in this.fieldDivStyle)
277
- _fieldDiv.style[property] = this.fieldDivStyle[property];
278
- for (const property in field.style)
279
- _fieldDiv.style[property] = field.style[property];
280
- let string = field.display == 'label' ? field.label : customer.extras[field.value];
281
- if (field.icon) {
282
- let _icon = document.createElement('img');
283
- _icon.src = field.icon;
284
- _icon.style.width = field.style.fontSize;
285
- _icon.style.height = field.style.fontSize;
286
- _fieldDiv.appendChild(_icon);
287
- }
288
- let _fieldText = document.createElement('div');
289
- _fieldText.innerHTML = string;
290
- _fieldDiv.appendChild(_fieldText);
291
- _div.appendChild(_fieldDiv);
292
- }
293
- return _div.outerHTML;
294
- }
295
- }
296
- /** @nocollapse */ InfoWindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, deps: [{ token: MapService }], target: i0.ɵɵFactoryTarget.Injectable });
297
- /** @nocollapse */ InfoWindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, providedIn: 'root' });
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, decorators: [{
299
- type: Injectable,
300
- args: [{
301
- providedIn: 'root'
302
- }]
303
- }], ctorParameters: function () { return [{ type: MapService }]; } });
304
-
305
- var EStatus;
306
- (function (EStatus) {
307
- EStatus["NOT_STARTED"] = "not started";
308
- EStatus["ON_GOING"] = "on going";
309
- EStatus["AUDITING"] = "auditing";
310
- EStatus["REJECTED"] = "rejected";
311
- EStatus["AFTER_AUDIT"] = "after audit";
312
- EStatus["COMPLETE"] = "complete";
313
- })(EStatus || (EStatus = {}));
314
- const VStatus = [
315
- EStatus.NOT_STARTED,
316
- EStatus.ON_GOING,
317
- EStatus.AUDITING,
318
- EStatus.REJECTED,
319
- EStatus.AFTER_AUDIT,
320
- EStatus.COMPLETE
321
- ];
322
-
323
- class StatusPillComponent {
324
- ngOnInit() {
325
- if (isEmptyValue(this.status)) {
326
- this.status = EStatus.NOT_STARTED;
327
- }
328
- }
329
- getStatusPillClass(status) {
330
- let newStatus = status.replace(' ', '-');
331
- return `status-pill ${newStatus}`;
332
- }
333
- }
334
- /** @nocollapse */ StatusPillComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StatusPillComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
335
- /** @nocollapse */ StatusPillComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { status: "status" }, ngImport: i0, template: "<div [ngClass]=\"getStatusPillClass(status)\">{{status}}</div>\n", styles: [".status-pill{background-color:#555;padding:.1rem .5rem;border-radius:1rem;font-size:.7rem;color:#fff}.complete{background-color:var(--tui-positive)}.rejected{background-color:var(--tui-negative)}.auditing{background-color:var(--tui-primary)}.on-going{background-color:var(--tui-primary)}.after-audit{background-color:var(--tui-warning-fill);color:#222}\n"], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StatusPillComponent, decorators: [{
337
- type: Component,
338
- args: [{
339
- selector: 'status-pill',
340
- templateUrl: './status-pill.component.html',
341
- styleUrls: ['./status-pill.component.css']
342
- }]
343
- }], propDecorators: { status: [{
344
- type: Input
345
- }] } });
346
-
347
- class CustomerTileComponent {
348
- /**
349
- * @description
350
- *
351
- * @constructor
352
- */
353
- constructor(mapService, infoWindowService) {
354
- this.mapService = mapService;
355
- this.infoWindowService = infoWindowService;
356
- /**
357
- * @description
358
- * Determines Customer Data
359
- *
360
- * @default
361
- * `{}`
362
- */
363
- this.customer = {};
364
- /**
365
- * @description
366
- * Determines Index of Customer Data in Customer List
367
- *
368
- * @default
369
- *
370
- */
371
- this.index = undefined;
372
- this.viewTaskDetails = [];
373
- /**
374
- * @description
375
- * Emitter to emit next Step
376
- *
377
- * @emits KwikIDAgentDashboardComponent#nextStep
378
- * @fires KwikIDAgentDashboardComponent#nextStep
379
- */
380
- this.nextStep = new EventEmitter();
381
- this.removeTask = new EventEmitter();
382
- }
383
- /**
384
- * @description
385
- * To set Google Maps API on script
386
- *
387
- * @ngOnInit
388
- */
389
- ngOnInit() {
390
- var _a, _b, _c;
391
- this.viewTaskDetails = (_c = (_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.dashboardConfig) === null || _b === void 0 ? void 0 : _b.viewTaskDetails) !== null && _c !== void 0 ? _c : this.viewTaskDetails;
392
- }
393
- getTaskDetails(taskData) {
394
- return getObjectValueFromPath(this.customer, taskData);
395
- }
396
- tileClick() {
397
- if (this.index == this.infoWindowService.getOpenMarker()) {
398
- this.infoWindowService.setOpenMarker(null);
399
- //this.infoWindowService.lastInfoWindowOpened.close();
400
- }
401
- else {
402
- this.showDetails(this.customer, this.index);
403
- }
404
- }
405
- /**
406
- * @description
407
- * Wrapper method to show Customer Info Window
408
- *
409
- * @function showDetails
410
- * @func showDetails
411
- * @method showDetails
412
- */
413
- showDetails(customer, index) {
414
- let markers = this.mapService.getMarkers();
415
- let marker = markers[index + 1];
416
- // let { infowindow } = this.infoWindowService.showCustomerInformation(
417
- // customer,
418
- // marker
419
- // );
420
- this.infoWindowService.setOpenMarker(index);
421
- }
422
- goToMaps(location) {
423
- window.open(`${location}`, '_blank');
424
- }
425
- goToNextStep(e) {
426
- this.nextStep.emit(e);
427
- }
428
- handleOnClickRemoveTask(task) {
429
- this.removeTask.emit(task);
430
- }
431
- }
432
- /** @nocollapse */ CustomerTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerTileComponent, deps: [{ token: MapService }, { token: InfoWindowService }], target: i0.ɵɵFactoryTarget.Component });
433
- /** @nocollapse */ CustomerTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", agentConfig: "agentConfig" }, outputs: { nextStep: "nextStep", removeTask: "removeTask" }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: MapInfoWindow, descendants: true }], ngImport: i0, template: "<div class=\"customer-tile-wrapper\">\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ customer.user_id }}\n </div>\n <status-pill *ngIf=\"agentConfig?.dashboardConfig?.showTaskStatus\" [status]=\"customer.session_status\"></status-pill>\n </div>\n <kwikui-button-icon\n [icon]=\"\n index == infoWindowService.getOpenMarker()\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"tileClick()\"\n ></kwikui-button-icon>\n </div>\n <div\n [ngClass]=\"\n index == infoWindowService.getOpenMarker()\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <div\n *ngFor=\"let taskData of viewTaskDetails\"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n {{ getTaskDetails(taskData) }}\n </div>\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.allowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.showCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'SHARE_JOURNEY_LINK' })\n \"\n ></kwikui-button-icon>\n </div>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.task_details.customer_details.location)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status !== 'complete' &&\n customer.session_status !== ''\n \"\n label=\"Edit Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'EDIT_JOURNEY' })\n \"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status == ''\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'START_JOURNEY' })\n \"\n ></kwikui-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".customer-tile-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto;grid-gap:.5rem;gap:.5rem;padding:1rem;border-bottom:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:row;flex-wrap:wrap;align-content:stretch;justify-content:space-evenly;align-items:center}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-userid{font-weight:500;font-size:1.1rem;line-height:1rem}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.7rem;grid-gap:.3rem;gap:.3rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-custom-details{width:100%;height:100%;line-height:.9rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons .customer-share-link{font-size:.7rem}.customer-tile-wrapper .data-collasped{display:none}\n"], components: [{ type: StatusPillComponent, selector: "status-pill", inputs: ["status"] }, { type: i4$1.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i4$1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerTileComponent, decorators: [{
435
- type: Component,
436
- args: [{
437
- selector: 'customer-tile',
438
- templateUrl: './customer-tile.component.html',
439
- styleUrls: ['./customer-tile.component.scss']
440
- }]
441
- }], ctorParameters: function () { return [{ type: MapService }, { type: InfoWindowService }]; }, propDecorators: { customer: [{
442
- type: Input
443
- }], index: [{
444
- type: Input
445
- }], agentConfig: [{
446
- type: Input
447
- }], nextStep: [{
448
- type: Output
449
- }], removeTask: [{
450
- type: Output
451
- }], infoWindow: [{
452
- type: ViewChild,
453
- args: [MapInfoWindow]
454
- }] } });
455
-
456
- class Ng2SearchPipe {
457
- /**
458
- * @param items object from array
459
- * @param term term's search
460
- * @param excludes array of strings which will ignored during search
461
- */
462
- transform(items, term, excludes = []) {
463
- if (!term || !items)
464
- return items;
465
- return Ng2SearchPipe.filter(items, term, excludes);
466
- }
467
- /**
468
- *
469
- * @param items List of items to filter
470
- * @param term a string term to compare with every property of the list
471
- * @param excludes List of keys which will be ignored during search
472
- *
473
- */
474
- static filter(items, term, excludes) {
475
- const toCompare = term.toLowerCase();
476
- function checkInside(item, term) {
477
- if (typeof item === 'string' &&
478
- item.toString().toLowerCase().includes(toCompare)) {
479
- return true;
480
- }
481
- for (let property in item) {
482
- if (item[property] === null ||
483
- item[property] == undefined ||
484
- excludes.includes(property)) {
485
- continue;
486
- }
487
- if (typeof item[property] === 'object') {
488
- if (checkInside(item[property], term)) {
489
- return true;
490
- }
491
- }
492
- else if (item[property].toString().toLowerCase().includes(toCompare)) {
493
- return true;
494
- }
495
- }
496
- return false;
497
- }
498
- return items.filter(function (item) {
499
- return checkInside(item, term);
500
- });
501
- }
502
- }
503
- /** @nocollapse */ Ng2SearchPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
504
- /** @nocollapse */ Ng2SearchPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, name: "filter", pure: false });
505
- /** @nocollapse */ Ng2SearchPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe });
506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, decorators: [{
507
- type: Pipe,
508
- args: [{
509
- name: 'filter',
510
- pure: false
511
- }]
512
- }, {
513
- type: Injectable
514
- }] });
515
-
516
- class CustomerListComponent {
517
- constructor(mapService) {
518
- this.mapService = mapService;
519
- this.nextStep = new EventEmitter();
520
- this.removeTask = new EventEmitter();
521
- this.filterTaskList = new EventEmitter();
522
- this.filteredData = [];
523
- this.formGroup = new FormGroup({});
524
- this.maxLength = { month: 1 };
525
- this.fromDate = this.getDate(null);
526
- this.toDate = this.getDate(null);
527
- this.dateRangeFormControl = new FormControl({
528
- value: new TuiDayRange(new TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()), new TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())),
529
- disabled: false
530
- });
531
- this.formGroup.addControl('dateRange', this.dateRangeFormControl);
532
- this.searchFormControl = new FormControl('');
533
- this.formGroup.addControl('search', this.searchFormControl);
534
- }
535
- ngOnInit() { }
536
- ngAfterViewInit() {
537
- setTimeout(() => __awaiter(this, void 0, void 0, function* () {
538
- if (this.agentConfig.dashboardConfig.showMaps) {
539
- yield this.mapService.initMap();
540
- this.filteredData = yield this.plotMarkers(this.customers);
541
- }
542
- else {
543
- this.filteredData = this.customers;
544
- }
545
- }), 1000);
546
- }
547
- ngOnChanges() {
548
- if (this.agentConfig.dashboardConfig.showMaps) {
549
- this.filteredData = this.plotMarkers(this.customers);
550
- }
551
- else {
552
- this.filteredData = this.customers;
553
- }
554
- }
555
- goToNextStep(e) {
556
- this.nextStep.emit(e);
557
- }
558
- getDate(d) {
559
- const date = d ? new Date(d) : new Date();
560
- const year = date.getFullYear();
561
- let month = date.getMonth() + 1;
562
- let day = date.getDate();
563
- if (month < 10)
564
- month = '0' + month;
565
- if (day < 10)
566
- day = '0' + day;
567
- const today = `${year}-${month}-${day}`;
568
- return today;
569
- }
570
- plotMarkers(customers) {
571
- let directionsResults$ = this.mapService.plotMarkers(customers);
572
- directionsResults$.subscribe((val) => {
573
- this.filteredData = this.mapService.sortList(val.routes[0].waypoint_order, customers);
574
- });
575
- return customers;
576
- }
577
- getTuiDate(event) {
578
- let year = event.year;
579
- let month = event.month + 1;
580
- let date = event.day;
581
- month = month < 10 ? '0' + month : month;
582
- date = date < 10 ? '0' + date : date;
583
- return `${year}-${month}-${date}`;
584
- }
585
- onDateRangeChange(event) {
586
- this.fromDate = this.getTuiDate(event.value.from);
587
- this.toDate = this.getTuiDate(event.value.to);
588
- this.handleOnFilterTaskList({
589
- from_date: this.fromDate,
590
- to_date: this.toDate
591
- });
592
- }
593
- onSearchFilter(event) {
594
- this.searchText = event.value;
595
- }
596
- handleOnClickRemoveTask(task) {
597
- this.removeTask.emit(task);
598
- }
599
- handleOnFilterTaskList(filter) {
600
- this.filterTaskList.emit(filter);
601
- }
602
- }
603
- /** @nocollapse */ CustomerListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerListComponent, deps: [{ token: MapService }], target: i0.ɵɵFactoryTarget.Component });
604
- /** @nocollapse */ CustomerListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", agentConfig: "agentConfig" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"agentConfig?.dashboardConfig?.showDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [maxLength]=\"maxLength\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"agentConfig?.dashboardConfig?.showSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [agentConfig]=\"agentConfig\"\n [index]=\"index\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{agentConfig?.dashboardConfig?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i4$1.KwikUIInputDateRangeComponent, selector: "kwikui-input-date-range", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minLength", "max", "maxLength", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4$1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "agentConfig"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], pipes: { "filter": Ng2SearchPipe } });
605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerListComponent, decorators: [{
606
- type: Component,
607
- args: [{
608
- selector: 'customer-list',
609
- templateUrl: './customer-list.component.html',
610
- styleUrls: ['./customer-list.component.css']
611
- }]
612
- }], ctorParameters: function () { return [{ type: MapService }]; }, propDecorators: { customers: [{
613
- type: Input
614
- }], agentConfig: [{
615
- type: Input
616
- }], nextStep: [{
617
- type: Output
618
- }], removeTask: [{
619
- type: Output
620
- }], filterTaskList: [{
621
- type: Output
622
- }] } });
623
-
624
- class KwikIDAgentDashboardComponent {
625
- constructor(mapService, httpClient, hostElement, dialogService) {
626
- this.mapService = mapService;
627
- this.httpClient = httpClient;
628
- this.hostElement = hostElement;
629
- this.dialogService = dialogService;
630
- this.agentConfig = {};
631
- this.taskList = [];
632
- this.nextStep = new EventEmitter();
633
- this.addTask = new EventEmitter();
634
- this.removeTask = new EventEmitter();
635
- this.filterTaskList = new EventEmitter();
636
- this.loading = true;
637
- this.showMapview = true;
638
- this.isMobileView = false;
639
- this.listOpen = true;
640
- this.options = {
641
- stops: ['calc(5rem + 74vw)', 'calc(9rem + 74vw)']
642
- };
643
- this.addTaskFormConfig = {
644
- key: 'ADD_TASK',
645
- title: 'Add Task',
646
- fields: [
647
- {
648
- key: 'name',
649
- label: 'Customer Name',
650
- disabled: false,
651
- messages: [],
652
- default: {
653
- value: {
654
- is_found: false,
655
- value: '',
656
- sources: [
657
- {
658
- key: 'OBJECT',
659
- props: {
660
- object: {
661
- key: 'ALL_FORMS_DATA',
662
- path: '$.ADD_TASK.name'
663
- }
664
- },
665
- value: '',
666
- validation: {
667
- is_valid: false,
668
- triggers: ['ON_INIT'],
669
- rules: [
670
- {
671
- id: '1',
672
- key: 'VALUE_CHECK',
673
- props: {
674
- value: {
675
- source: {
676
- key: 'OBJECT',
677
- props: {
678
- object: {
679
- key: 'ALL_FORMS_DATA',
680
- path: '$.ADD_TASK.name'
681
- }
682
- }
683
- }
684
- },
685
- pattern: {
686
- key: 'IS_NOT_EMPTY'
687
- }
688
- }
689
- }
690
- ],
691
- actions: [
692
- {
693
- id: '1',
694
- key: 'SET_FIELD_DEFAULT_VALUE',
695
- condition: '1',
696
- props: {
697
- fieldKey: 'name',
698
- value: {
699
- source: {
700
- key: 'OBJECT',
701
- props: {
702
- object: {
703
- key: 'ALL_FORMS_DATA',
704
- path: '$.ADD_TASK.name'
705
- }
706
- }
707
- }
708
- }
709
- }
710
- }
711
- ]
712
- }
713
- }
714
- ]
715
- }
716
- },
717
- validators: {
718
- required: true
719
- },
720
- properties: {
721
- placeholder: 'Please enter the Customer Name',
722
- readOnly: false,
723
- case: 'default'
724
- },
725
- type: 'text'
726
- },
727
- {
728
- key: 'phone',
729
- label: 'Phone Number',
730
- disabled: false,
731
- messages: [],
732
- default: {
733
- value: {
734
- is_found: false,
735
- value: '',
736
- sources: [
737
- {
738
- key: 'OBJECT',
739
- props: {
740
- object: {
741
- key: 'ALL_FORMS_DATA',
742
- path: '$.ADD_TASK.phone'
743
- }
744
- },
745
- value: '',
746
- validation: {
747
- is_valid: false,
748
- triggers: ['ON_INIT'],
749
- rules: [
750
- {
751
- id: '1',
752
- key: 'VALUE_CHECK',
753
- props: {
754
- value: {
755
- source: {
756
- key: 'OBJECT',
757
- props: {
758
- object: {
759
- key: 'ALL_FORMS_DATA',
760
- path: '$.ADD_TASK.phone'
761
- }
762
- }
763
- }
764
- },
765
- pattern: {
766
- key: 'IS_NOT_EMPTY'
767
- }
768
- }
769
- }
770
- ],
771
- actions: [
772
- {
773
- id: '1',
774
- key: 'SET_FIELD_DEFAULT_VALUE',
775
- condition: '1',
776
- props: {
777
- fieldKey: 'phone',
778
- value: {
779
- source: {
780
- key: 'OBJECT',
781
- props: {
782
- object: {
783
- key: 'ALL_FORMS_DATA',
784
- path: '$.ADD_TASK.phone'
785
- }
786
- }
787
- }
788
- }
789
- }
790
- }
791
- ]
792
- }
793
- }
794
- ]
795
- }
212
+ {
213
+ key: 'phone',
214
+ label: 'Phone Number',
215
+ disabled: false,
216
+ messages: [],
217
+ default: {
218
+ value: {
219
+ is_found: false,
220
+ value: '',
221
+ sources: [
222
+ {
223
+ key: 'OBJECT',
224
+ props: {
225
+ object: {
226
+ key: 'ALL_FORMS_DATA',
227
+ path: '$.ADD_TASK.phone'
228
+ }
229
+ },
230
+ value: '',
231
+ validation: {
232
+ is_valid: false,
233
+ triggers: ['ON_INIT'],
234
+ rules: [
235
+ {
236
+ id: '1',
237
+ key: 'VALUE_CHECK',
238
+ props: {
239
+ value: {
240
+ source: {
241
+ key: 'OBJECT',
242
+ props: {
243
+ object: {
244
+ key: 'ALL_FORMS_DATA',
245
+ path: '$.ADD_TASK.phone'
246
+ }
247
+ }
248
+ }
249
+ },
250
+ pattern: {
251
+ key: 'IS_NOT_EMPTY'
252
+ }
253
+ }
254
+ }
255
+ ],
256
+ actions: [
257
+ {
258
+ id: '1',
259
+ key: 'SET_FIELD_DEFAULT_VALUE',
260
+ condition: '1',
261
+ props: {
262
+ fieldKey: 'phone',
263
+ value: {
264
+ source: {
265
+ key: 'OBJECT',
266
+ props: {
267
+ object: {
268
+ key: 'ALL_FORMS_DATA',
269
+ path: '$.ADD_TASK.phone'
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ ]
277
+ }
278
+ }
279
+ ]
280
+ }
796
281
  },
797
282
  validators: {
798
283
  required: true
@@ -1044,30 +529,689 @@ class KwikIDAgentDashboardComponent {
1044
529
  readOnly: false,
1045
530
  case: 'default'
1046
531
  },
1047
- type: 'text'
532
+ type: 'text'
533
+ }
534
+ ],
535
+ properties: {
536
+ header: {
537
+ title: {
538
+ hidden: true,
539
+ label: 'Add Task'
540
+ },
541
+ steps: {
542
+ hidden: true
543
+ }
544
+ },
545
+ footer: {
546
+ viewFormsButton: {
547
+ hidden: true,
548
+ label: 'View Forms'
549
+ },
550
+ saveButton: {
551
+ hidden: false,
552
+ label: 'Submit'
553
+ }
554
+ }
555
+ }
556
+ };
557
+ }
558
+ ngOnInit() { }
559
+ setAgentConfig(agentConfig) {
560
+ this.agentConfig = agentConfig;
561
+ }
562
+ toggleMapview() {
563
+ this.showMapview = !this.showMapview;
564
+ }
565
+ }
566
+ /** @nocollapse */ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
567
+ /** @nocollapse */ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService, providedIn: 'root' });
568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService, decorators: [{
569
+ type: Injectable,
570
+ args: [{
571
+ providedIn: 'root'
572
+ }]
573
+ }], ctorParameters: function () { return []; } });
574
+
575
+ class CustomerDetailsComponent {
576
+ constructor(userService) {
577
+ this.userService = userService;
578
+ this.customer = {
579
+ agent_id: 'sparkcpaital_dev_agent_1',
580
+ client_name: 'sparkcpaital_dev',
581
+ extras: {},
582
+ session_status: '',
583
+ task_completed_time: '',
584
+ task_creation_time: '1679469532.340057',
585
+ task_details: {
586
+ customer_details: {
587
+ email: 'gaurang.thakkar1997@gmail.com',
588
+ phone: '9930607033',
589
+ lc_lg_code: 'LC123456',
590
+ branch_code: 'HDFC56475H',
591
+ business_code: 'ABCD12345H'
592
+ },
593
+ link_details: {
594
+ queryParams: {
595
+ autoSendMobileOtp: true,
596
+ client_id: 'sparkcpaital_dev',
597
+ mobileOtpVerification: true,
598
+ mobile_number: '9930607033',
599
+ user_id: '9930607033'
600
+ }
601
+ }
602
+ },
603
+ task_id: 'sparkcpaital_dev_4632c291-1b4c-4f5b-bb95-f9acaab45e27',
604
+ task_schedule_time: '1679469532.340057',
605
+ user_id: '9930607033'
606
+ };
607
+ this.viewTaskDetails = [];
608
+ this.nextStep = new EventEmitter();
609
+ this.removeTask = new EventEmitter();
610
+ }
611
+ ngOnInit() {
612
+ var _a, _b, _c;
613
+ this.viewTaskDetails =
614
+ (_c = (_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.dashboardConfig) === null || _b === void 0 ? void 0 : _b.viewTaskDetails) !== null && _c !== void 0 ? _c : this.viewTaskDetails;
615
+ }
616
+ convertToTitleCase(inputString) {
617
+ inputString = inputString.replace('$.task_details.customer_details.', '');
618
+ const words = inputString.split('_');
619
+ const capitalizedWords = words.map((word) => word.charAt(0).toUpperCase() + word.slice(1));
620
+ const titleCaseString = capitalizedWords.join(' ');
621
+ return titleCaseString;
622
+ }
623
+ convertEpochToDate(epochTime) {
624
+ if (typeof epochTime == 'string')
625
+ epochTime = Number(epochTime);
626
+ const date = new Date(epochTime * 1000); // Convert to milliseconds
627
+ const day = date.getDate().toString().padStart(2, '0');
628
+ const month = (date.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based
629
+ const year = date.getFullYear().toString();
630
+ return `${day}-${month}-${year}`;
631
+ }
632
+ getTaskDetails(taskData) {
633
+ return getObjectValueFromPath(this.customer, taskData);
634
+ }
635
+ goToMaps(location) {
636
+ window.open(`${location}`, '_blank');
637
+ }
638
+ goToNextStep(e) {
639
+ this.nextStep.emit(e);
640
+ }
641
+ close() {
642
+ this.userService.showTaskDetails = undefined;
643
+ }
644
+ handleOnClickRemoveTask(task) {
645
+ this.removeTask.emit(task);
646
+ }
647
+ }
648
+ /** @nocollapse */ CustomerDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerDetailsComponent, deps: [{ token: UserService }], target: i0.ɵɵFactoryTarget.Component });
649
+ /** @nocollapse */ CustomerDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerDetailsComponent, selector: "customer-details", inputs: { customer: "customer", agentConfig: "agentConfig" }, outputs: { nextStep: "nextStep", removeTask: "removeTask" }, ngImport: i0, template: "<div class=\"customer-details-wrapper\">\n <div class=\"customer-details-heading\">\n Task Details\n </div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">{{ customer.user_id }}</div>\n\n <div class=\"customer-details-table\">\n <div\n class=\"customer-details-table-data\"\n *ngFor=\"let taskData of viewTaskDetails\"\n >\n <div class=\"customer-details-table-detail-value\">\n {{ getTaskDetails(taskData) }}\n </div>\n </div>\n </div>\n\n <div class=\"customer-details-date\">\n Task Created on: {{convertEpochToDate(customer.task_creation_time)}}\n </div>\n\n <div class=\"customer-details-actions\">\n <div class=\"customer-details-task-buttons\">\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.allowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.showCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'SHARE_JOURNEY_LINK' })\n \"\n ></kwikui-button-icon>\n </div>\n <div class=\"customer-details-journey-buttons\">\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer?.task_details?.customer_details?.location)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status !== 'complete' &&\n customer.session_status !== ''\n \"\n label=\"Edit Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'EDIT_JOURNEY' })\n \"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status == ''\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'START_JOURNEY' })\n \"\n ></kwikui-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".customer-details-wrapper{display:flex;flex-direction:column;align-items:stretch;overflow:hidden;grid-gap:.5rem;gap:.5rem;padding:1.5rem;height:100%;width:100%}.customer-details-wrapper .customer-details-heading{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:1rem 0;font-size:1.5rem;font-weight:600}.customer-details-wrapper .customer-details-body{display:flex;flex-direction:column;grid-gap:1.25rem;gap:1.25rem}.customer-details-wrapper .customer-details-body .customer-details-user-id{font-size:1.25rem;font-weight:500;padding:.5rem 0}.customer-details-wrapper .customer-details-body .customer-details-table{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:column}.customer-details-wrapper .customer-details-body .customer-details-table .customer-details-table-data .customer-details-table-detail-name{font-weight:500}.customer-details-wrapper .customer-details-body .customer-details-table .customer-details-table-data .customer-details-table-detail-value{word-wrap:break-word}.customer-details-wrapper .customer-details-body .customer-details-date{padding-top:1rem}.customer-details-wrapper .customer-details-body .customer-details-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:1rem 0}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons .customer-share-link{font-size:.7rem}\n"], components: [{ type: i2.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i2.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerDetailsComponent, decorators: [{
651
+ type: Component,
652
+ args: [{
653
+ selector: 'customer-details',
654
+ templateUrl: './customer-details.component.html',
655
+ styleUrls: ['./customer-details.component.scss']
656
+ }]
657
+ }], ctorParameters: function () { return [{ type: UserService }]; }, propDecorators: { customer: [{
658
+ type: Input
659
+ }], agentConfig: [{
660
+ type: Input
661
+ }], nextStep: [{
662
+ type: Output
663
+ }], removeTask: [{
664
+ type: Output
665
+ }] } });
666
+
667
+ class InfoWindowService {
668
+ constructor(mapService) {
669
+ this.mapService = mapService;
670
+ this.config = {
671
+ fields: {
672
+ name: {
673
+ label: 'Name',
674
+ value: 'name',
675
+ display: 'value',
676
+ style: {
677
+ fontSize: '1rem',
678
+ fontWeight: 600
679
+ }
680
+ },
681
+ phone: {
682
+ label: 'Call',
683
+ value: 'phone',
684
+ display: 'label',
685
+ style: {
686
+ fontSize: '0.8rem',
687
+ padding: '0.1rem 0',
688
+ textAlign: 'justify'
689
+ },
690
+ icon: 'https://cdn-icons-png.flaticon.com/512/60/60720.png'
691
+ },
692
+ address: {
693
+ label: 'Directions',
694
+ value: 'address',
695
+ display: 'label',
696
+ style: {
697
+ fontSize: '0.8rem',
698
+ padding: '0.1rem 0'
699
+ },
700
+ icon: 'https://cdn-icons-png.flaticon.com/512/62/62516.png'
701
+ }
702
+ }
703
+ };
704
+ this.mainInfoWindowStyle = {
705
+ display: 'flex',
706
+ 'flex-direction': 'column',
707
+ 'justify-content': 'center',
708
+ 'align-items': 'stretch',
709
+ gap: '0.5rem',
710
+ padding: '0.5rem'
711
+ };
712
+ this.fieldDivStyle = {
713
+ gap: ' 0.5rem',
714
+ display: 'flex',
715
+ 'flex-direction': 'row'
716
+ };
717
+ }
718
+ getOpenMarker() {
719
+ return this.openMarker;
720
+ }
721
+ setOpenMarker(value) {
722
+ this.openMarker = value;
723
+ }
724
+ /**
725
+ * @description
726
+ * Wrapper method to show Customer Info Window
727
+ *
728
+ * @function showInfo
729
+ * @func showInfo
730
+ * @method showInfo
731
+ */
732
+ showCustomerInformation(customer, marker) {
733
+ let map = this.mapService.map;
734
+ let contentString = this.createInfoContent(customer);
735
+ let infowindow = new google.maps.InfoWindow({
736
+ content: contentString
737
+ });
738
+ this.addEventListeners(customer, infowindow);
739
+ this.closeLastOpenedInfoWindow();
740
+ infowindow.open(map, marker);
741
+ this.lastInfoWindowOpened = infowindow;
742
+ this.mapService.map = Object.assign(Object.assign({}, this.mapService.map), { center: marker.getPosition });
743
+ // map.setCenter(marker.getPosition());
744
+ return { infowindow: infowindow };
745
+ }
746
+ addEventListeners(customer, infowindow) {
747
+ // chnage -
748
+ let addressLink = `http://maps.google.com/?q=${customer.extras.loc[0]}, ${customer.extras.loc[1]}`;
749
+ google.maps.event.addListener(infowindow, 'domready', function () {
750
+ document.getElementById('Call').addEventListener('click', function (e) {
751
+ window.open(`tel:${customer.extras.phone}`, '_self');
752
+ });
753
+ document
754
+ .getElementById('Directions')
755
+ .addEventListener('click', function (e) {
756
+ window.open(`${addressLink}`, '_blank');
757
+ });
758
+ document
759
+ .getElementsByClassName('gm-ui-hover-effect')[0]
760
+ .setAttribute('style', ' background: none;\
761
+ display: block; \
762
+ border: 0px; \
763
+ margin: 0px; \
764
+ padding: 0px; \
765
+ text-transform: none; \
766
+ appearance: none; \
767
+ position: absolute; \
768
+ cursor: pointer; \
769
+ user-select: none; \
770
+ top: 0px; \
771
+ right: 0px; \
772
+ width: 30px; \
773
+ height: 30px; \
774
+ ');
775
+ });
776
+ }
777
+ /**
778
+ * @description
779
+ * Wrapper method to close Last Info Window
780
+ *
781
+ * @function closeLastOpenedInfoWindow
782
+ * @func closeLastOpenedInfoWindow
783
+ * @method closeLastOpenedInfoWindow
784
+ */
785
+ closeLastOpenedInfoWindow() {
786
+ if (this.lastInfoWindowOpened) {
787
+ this.lastInfoWindowOpened.close();
788
+ }
789
+ }
790
+ /**
791
+ * @description
792
+ * Closes the previously opened info window.
793
+ *
794
+ * @function infoData
795
+ * @func infoData
796
+ * @method infoData
797
+ */
798
+ createInfoContent(customer) {
799
+ let content = "<div style='padding:4px; font-family: Manrope;' >";
800
+ content += this.createFields(customer, this.config.fields);
801
+ content += '</div>';
802
+ return content;
803
+ }
804
+ /**
805
+ * @description
806
+ * Wrapper method to create Fields Container
807
+ *
808
+ * @function createFields
809
+ * @func createFields
810
+ * @method createFields
811
+ */
812
+ createFields(customer, fields) {
813
+ let _div = document.createElement('div');
814
+ for (const property in this.mainInfoWindowStyle)
815
+ _div.style[property] = this.mainInfoWindowStyle[property];
816
+ for (let key of Object.keys(fields)) {
817
+ let field = fields[key];
818
+ let _fieldDiv = document.createElement('div');
819
+ _fieldDiv.setAttribute('id', field.label);
820
+ for (const property in this.fieldDivStyle)
821
+ _fieldDiv.style[property] = this.fieldDivStyle[property];
822
+ for (const property in field.style)
823
+ _fieldDiv.style[property] = field.style[property];
824
+ let string = field.display == 'label' ? field.label : customer.extras[field.value];
825
+ if (field.icon) {
826
+ let _icon = document.createElement('img');
827
+ _icon.src = field.icon;
828
+ _icon.style.width = field.style.fontSize;
829
+ _icon.style.height = field.style.fontSize;
830
+ _fieldDiv.appendChild(_icon);
831
+ }
832
+ let _fieldText = document.createElement('div');
833
+ _fieldText.innerHTML = string;
834
+ _fieldDiv.appendChild(_fieldText);
835
+ _div.appendChild(_fieldDiv);
836
+ }
837
+ return _div.outerHTML;
838
+ }
839
+ }
840
+ /** @nocollapse */ InfoWindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, deps: [{ token: MapService }], target: i0.ɵɵFactoryTarget.Injectable });
841
+ /** @nocollapse */ InfoWindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, providedIn: 'root' });
842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: InfoWindowService, decorators: [{
843
+ type: Injectable,
844
+ args: [{
845
+ providedIn: 'root'
846
+ }]
847
+ }], ctorParameters: function () { return [{ type: MapService }]; } });
848
+
849
+ var EStatus;
850
+ (function (EStatus) {
851
+ EStatus["NOT_STARTED"] = "not started";
852
+ EStatus["ON_GOING"] = "on going";
853
+ EStatus["AUDITING"] = "auditing";
854
+ EStatus["REJECTED"] = "rejected";
855
+ EStatus["AFTER_AUDIT"] = "after audit";
856
+ EStatus["COMPLETE"] = "complete";
857
+ })(EStatus || (EStatus = {}));
858
+ const VStatus = [
859
+ EStatus.NOT_STARTED,
860
+ EStatus.ON_GOING,
861
+ EStatus.AUDITING,
862
+ EStatus.REJECTED,
863
+ EStatus.AFTER_AUDIT,
864
+ EStatus.COMPLETE
865
+ ];
866
+
867
+ class StatusPillComponent {
868
+ ngOnInit() {
869
+ if (isEmptyValue(this.status)) {
870
+ this.status = EStatus.NOT_STARTED;
871
+ }
872
+ }
873
+ getStatusPillClass(status) {
874
+ let newStatus = status.replace(' ', '-');
875
+ return `status-pill ${newStatus}`;
876
+ }
877
+ }
878
+ /** @nocollapse */ StatusPillComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StatusPillComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
879
+ /** @nocollapse */ StatusPillComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { status: "status" }, ngImport: i0, template: "<div [ngClass]=\"getStatusPillClass(status)\">{{status}}</div>\n", styles: [".status-pill{background-color:#555;padding:.1rem .5rem;border-radius:1rem;font-size:.7rem;color:#fff}.complete{background-color:var(--tui-positive)}.rejected{background-color:var(--tui-negative)}.auditing{background-color:var(--tui-primary)}.on-going{background-color:var(--tui-primary)}.after-audit{background-color:var(--tui-warning-fill);color:#222}\n"], directives: [{ type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StatusPillComponent, decorators: [{
881
+ type: Component,
882
+ args: [{
883
+ selector: 'status-pill',
884
+ templateUrl: './status-pill.component.html',
885
+ styleUrls: ['./status-pill.component.css']
886
+ }]
887
+ }], propDecorators: { status: [{
888
+ type: Input
889
+ }] } });
890
+
891
+ class CustomerTileComponent {
892
+ /**
893
+ * @description
894
+ *
895
+ * @constructor
896
+ */
897
+ constructor(mapService, infoWindowService, userService, hostElement) {
898
+ this.mapService = mapService;
899
+ this.infoWindowService = infoWindowService;
900
+ this.userService = userService;
901
+ this.hostElement = hostElement;
902
+ /**
903
+ * @description
904
+ * Determines Customer Data
905
+ *
906
+ * @default
907
+ * `{}`
908
+ */
909
+ this.customer = {};
910
+ /**
911
+ * @description
912
+ * Determines Index of Customer Data in Customer List
913
+ *
914
+ * @default
915
+ *
916
+ */
917
+ this.index = undefined;
918
+ this.isMobileView = false;
919
+ this.viewTaskDetails = [];
920
+ /**
921
+ * @description
922
+ * Emitter to emit next Step
923
+ *
924
+ * @emits KwikIDAgentDashboardComponent#nextStep
925
+ * @fires KwikIDAgentDashboardComponent#nextStep
926
+ */
927
+ this.nextStep = new EventEmitter();
928
+ this.removeTask = new EventEmitter();
929
+ }
930
+ windowResizeWatcher() {
931
+ if (this.hostElement.nativeElement.offsetWidth < 600) {
932
+ this.isMobileView = true;
933
+ }
934
+ else {
935
+ this.isMobileView = false;
936
+ }
937
+ }
938
+ /**
939
+ * @description
940
+ * To set Google Maps API on script
941
+ *
942
+ * @ngOnInit
943
+ */
944
+ ngOnInit() {
945
+ var _a, _b, _c;
946
+ this.viewTaskDetails =
947
+ (_c = (_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.dashboardConfig) === null || _b === void 0 ? void 0 : _b.viewTaskDetails) !== null && _c !== void 0 ? _c : this.viewTaskDetails;
948
+ }
949
+ getTaskDetails(taskData) {
950
+ return getObjectValueFromPath(this.customer, taskData);
951
+ }
952
+ openDetails() {
953
+ if (this.userService.showTaskDetails !== this.index) {
954
+ this.userService.showTaskDetails = this.index;
955
+ }
956
+ else {
957
+ this.userService.showTaskDetails = undefined;
958
+ }
959
+ }
960
+ tileClick() {
961
+ this.openDetails();
962
+ if (this.index == this.infoWindowService.getOpenMarker()) {
963
+ this.infoWindowService.setOpenMarker(null);
964
+ //this.infoWindowService.lastInfoWindowOpened.close();
965
+ }
966
+ else {
967
+ this.showDetails(this.customer, this.index);
968
+ }
969
+ }
970
+ /**
971
+ * @description
972
+ * Wrapper method to show Customer Info Window
973
+ *
974
+ * @function showDetails
975
+ * @func showDetails
976
+ * @method showDetails
977
+ */
978
+ showDetails(customer, index) {
979
+ let markers = this.mapService.getMarkers();
980
+ let marker = markers[index + 1];
981
+ // let { infowindow } = this.infoWindowService.showCustomerInformation(
982
+ // customer,
983
+ // marker
984
+ // );
985
+ this.infoWindowService.setOpenMarker(index);
986
+ }
987
+ getClass() {
988
+ let string = "customer-tile-wrapper";
989
+ if (this.userService.showTaskDetails == this.index) {
990
+ string += " customer-tile-active";
991
+ }
992
+ return string;
993
+ }
994
+ goToMaps(location) {
995
+ window.open(`${location}`, '_blank');
996
+ }
997
+ goToNextStep(e) {
998
+ this.nextStep.emit(e);
999
+ }
1000
+ handleOnClickRemoveTask(task) {
1001
+ this.removeTask.emit(task);
1002
+ }
1003
+ }
1004
+ /** @nocollapse */ CustomerTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerTileComponent, deps: [{ token: MapService }, { token: InfoWindowService }, { token: UserService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1005
+ /** @nocollapse */ CustomerTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", agentConfig: "agentConfig" }, outputs: { nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: MapInfoWindow, descendants: true }], ngImport: i0, template: "<div [ngClass]=\"getClass()\">\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ customer.user_id }}\n </div>\n <status-pill\n *ngIf=\"agentConfig?.dashboardConfig?.showTaskStatus\"\n [status]=\"customer.session_status\"\n ></status-pill>\n </div>\n <kwikui-button-icon\n *ngIf=\"!userService.isMobileView && !userService.showMapview\"\n [icon]=\"\n userService.showTaskDetails==index\n ? 'tuiIconChevronLeftLarge'\n : 'tuiIconChevronRightLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n *ngIf=\"userService.isMobileView || userService.showMapview\"\n [icon]=\"\n userService.showTaskDetails==index\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button-icon>\n </div>\n <div\n [ngClass]=\"\n index == userService.showTaskDetails && userService.isMobileView\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <div\n *ngFor=\"let taskData of viewTaskDetails\"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n {{ getTaskDetails(taskData) }}\n </div>\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.allowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n *ngIf=\"agentConfig.dashboardConfig?.showCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'SHARE_JOURNEY_LINK' })\n \"\n ></kwikui-button-icon>\n </div>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.task_details.customer_details.location)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status !== 'complete' &&\n customer.session_status !== ''\n \"\n label=\"Edit Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'EDIT_JOURNEY' })\n \"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n agentConfig.dashboardConfig?.showStartJourneyButton &&\n customer.session_status == ''\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToNextStep({ customer: customer, stepType: 'START_JOURNEY' })\n \"\n ></kwikui-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".customer-tile-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto;grid-gap:.5rem;gap:.5rem;padding:1rem;border-bottom:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:row;flex-wrap:wrap;align-content:stretch;justify-content:space-evenly;align-items:center}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-userid{font-weight:500;font-size:1.1rem;line-height:1rem}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.7rem;grid-gap:.3rem;gap:.3rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-custom-details{width:100%;height:100%;line-height:.9rem;word-wrap:break-word}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons .customer-share-link{font-size:.7rem}.customer-tile-wrapper .data-collasped{display:none}.customer-tile-active{background-color:#dcedfd}\n"], components: [{ type: StatusPillComponent, selector: "status-pill", inputs: ["status"] }, { type: i2.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i2.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerTileComponent, decorators: [{
1007
+ type: Component,
1008
+ args: [{
1009
+ selector: 'customer-tile',
1010
+ templateUrl: './customer-tile.component.html',
1011
+ styleUrls: ['./customer-tile.component.scss']
1012
+ }]
1013
+ }], ctorParameters: function () { return [{ type: MapService }, { type: InfoWindowService }, { type: UserService }, { type: i0.ElementRef }]; }, propDecorators: { windowResizeWatcher: [{
1014
+ type: HostListener,
1015
+ args: ['window:resize', ['$event']]
1016
+ }], customer: [{
1017
+ type: Input
1018
+ }], index: [{
1019
+ type: Input
1020
+ }], agentConfig: [{
1021
+ type: Input
1022
+ }], nextStep: [{
1023
+ type: Output
1024
+ }], removeTask: [{
1025
+ type: Output
1026
+ }], infoWindow: [{
1027
+ type: ViewChild,
1028
+ args: [MapInfoWindow]
1029
+ }] } });
1030
+
1031
+ class Ng2SearchPipe {
1032
+ /**
1033
+ * @param items object from array
1034
+ * @param term term's search
1035
+ * @param excludes array of strings which will ignored during search
1036
+ */
1037
+ transform(items, term, excludes = []) {
1038
+ if (!term || !items)
1039
+ return items;
1040
+ return Ng2SearchPipe.filter(items, term, excludes);
1041
+ }
1042
+ /**
1043
+ *
1044
+ * @param items List of items to filter
1045
+ * @param term a string term to compare with every property of the list
1046
+ * @param excludes List of keys which will be ignored during search
1047
+ *
1048
+ */
1049
+ static filter(items, term, excludes) {
1050
+ const toCompare = term.toLowerCase();
1051
+ function checkInside(item, term) {
1052
+ if (typeof item === 'string' &&
1053
+ item.toString().toLowerCase().includes(toCompare)) {
1054
+ return true;
1055
+ }
1056
+ for (let property in item) {
1057
+ if (item[property] === null ||
1058
+ item[property] == undefined ||
1059
+ excludes.includes(property)) {
1060
+ continue;
1048
1061
  }
1049
- ],
1050
- properties: {
1051
- header: {
1052
- title: {
1053
- hidden: true,
1054
- label: 'Add Task'
1055
- },
1056
- steps: {
1057
- hidden: true
1058
- }
1059
- },
1060
- footer: {
1061
- viewFormsButton: {
1062
- hidden: true,
1063
- label: 'View Forms'
1064
- },
1065
- saveButton: {
1066
- hidden: false,
1067
- label: 'Submit'
1062
+ if (typeof item[property] === 'object') {
1063
+ if (checkInside(item[property], term)) {
1064
+ return true;
1068
1065
  }
1069
1066
  }
1067
+ else if (item[property].toString().toLowerCase().includes(toCompare)) {
1068
+ return true;
1069
+ }
1070
+ }
1071
+ return false;
1072
+ }
1073
+ return items.filter(function (item) {
1074
+ return checkInside(item, term);
1075
+ });
1076
+ }
1077
+ }
1078
+ /** @nocollapse */ Ng2SearchPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1079
+ /** @nocollapse */ Ng2SearchPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, name: "filter", pure: false });
1080
+ /** @nocollapse */ Ng2SearchPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe });
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: Ng2SearchPipe, decorators: [{
1082
+ type: Pipe,
1083
+ args: [{
1084
+ name: 'filter',
1085
+ pure: false
1086
+ }]
1087
+ }, {
1088
+ type: Injectable
1089
+ }] });
1090
+
1091
+ class CustomerListComponent {
1092
+ constructor(mapService) {
1093
+ this.mapService = mapService;
1094
+ this.nextStep = new EventEmitter();
1095
+ this.removeTask = new EventEmitter();
1096
+ this.filterTaskList = new EventEmitter();
1097
+ this.filteredData = [];
1098
+ this.formGroup = new FormGroup({});
1099
+ this.maxLength = { month: 1 };
1100
+ this.fromDate = this.getDate(null);
1101
+ this.toDate = this.getDate(null);
1102
+ this.dateRangeFormControl = new FormControl({
1103
+ value: new TuiDayRange(new TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()), new TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())),
1104
+ disabled: false
1105
+ });
1106
+ this.formGroup.addControl('dateRange', this.dateRangeFormControl);
1107
+ this.searchFormControl = new FormControl('');
1108
+ this.formGroup.addControl('search', this.searchFormControl);
1109
+ }
1110
+ ngOnInit() { }
1111
+ ngAfterViewInit() {
1112
+ setTimeout(() => __awaiter(this, void 0, void 0, function* () {
1113
+ if (this.agentConfig.dashboardConfig.showMaps) {
1114
+ yield this.mapService.initMap();
1115
+ this.filteredData = yield this.plotMarkers(this.customers);
1116
+ }
1117
+ else {
1118
+ this.filteredData = this.customers;
1070
1119
  }
1120
+ }), 1000);
1121
+ }
1122
+ ngOnChanges() {
1123
+ if (this.agentConfig.dashboardConfig.showMaps) {
1124
+ this.filteredData = this.plotMarkers(this.customers);
1125
+ }
1126
+ else {
1127
+ this.filteredData = this.customers;
1128
+ }
1129
+ }
1130
+ goToNextStep(e) {
1131
+ this.nextStep.emit(e);
1132
+ }
1133
+ getDate(d) {
1134
+ const date = d ? new Date(d) : new Date();
1135
+ const year = date.getFullYear();
1136
+ let month = date.getMonth() + 1;
1137
+ let day = date.getDate();
1138
+ if (month < 10)
1139
+ month = '0' + month;
1140
+ if (day < 10)
1141
+ day = '0' + day;
1142
+ const today = `${year}-${month}-${day}`;
1143
+ return today;
1144
+ }
1145
+ plotMarkers(customers) {
1146
+ let directionsResults$ = this.mapService.plotMarkers(customers);
1147
+ directionsResults$.subscribe((val) => {
1148
+ this.filteredData = this.mapService.sortList(val.routes[0].waypoint_order, customers);
1149
+ });
1150
+ return customers;
1151
+ }
1152
+ getTuiDate(event) {
1153
+ let year = event.year;
1154
+ let month = event.month + 1;
1155
+ let date = event.day;
1156
+ month = month < 10 ? '0' + month : month;
1157
+ date = date < 10 ? '0' + date : date;
1158
+ return `${year}-${month}-${date}`;
1159
+ }
1160
+ onDateRangeChange(event) {
1161
+ this.fromDate = this.getTuiDate(event.value.from);
1162
+ this.toDate = this.getTuiDate(event.value.to);
1163
+ this.handleOnFilterTaskList({
1164
+ from_date: this.fromDate,
1165
+ to_date: this.toDate
1166
+ });
1167
+ }
1168
+ onSearchFilter(event) {
1169
+ this.searchText = event.value;
1170
+ }
1171
+ handleOnClickRemoveTask(task) {
1172
+ this.removeTask.emit(task);
1173
+ }
1174
+ handleOnFilterTaskList(filter) {
1175
+ this.filterTaskList.emit(filter);
1176
+ }
1177
+ }
1178
+ /** @nocollapse */ CustomerListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerListComponent, deps: [{ token: MapService }], target: i0.ɵɵFactoryTarget.Component });
1179
+ /** @nocollapse */ CustomerListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", agentConfig: "agentConfig" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"agentConfig?.dashboardConfig?.showDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [maxLength]=\"maxLength\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"agentConfig?.dashboardConfig?.showSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [agentConfig]=\"agentConfig\"\n [index]=\"index\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{agentConfig?.dashboardConfig?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i2.KwikUIInputDateRangeComponent, selector: "kwikui-input-date-range", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minLength", "max", "maxLength", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "agentConfig"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], pipes: { "filter": Ng2SearchPipe } });
1180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomerListComponent, decorators: [{
1181
+ type: Component,
1182
+ args: [{
1183
+ selector: 'customer-list',
1184
+ templateUrl: './customer-list.component.html',
1185
+ styleUrls: ['./customer-list.component.css']
1186
+ }]
1187
+ }], ctorParameters: function () { return [{ type: MapService }]; }, propDecorators: { customers: [{
1188
+ type: Input
1189
+ }], agentConfig: [{
1190
+ type: Input
1191
+ }], nextStep: [{
1192
+ type: Output
1193
+ }], removeTask: [{
1194
+ type: Output
1195
+ }], filterTaskList: [{
1196
+ type: Output
1197
+ }] } });
1198
+
1199
+ class KwikIDAgentDashboardComponent {
1200
+ constructor(mapService, userService, httpClient, hostElement, dialogService) {
1201
+ this.mapService = mapService;
1202
+ this.userService = userService;
1203
+ this.httpClient = httpClient;
1204
+ this.hostElement = hostElement;
1205
+ this.dialogService = dialogService;
1206
+ this.agentConfig = {};
1207
+ this.taskList = [];
1208
+ this.nextStep = new EventEmitter();
1209
+ this.addTask = new EventEmitter();
1210
+ this.removeTask = new EventEmitter();
1211
+ this.filterTaskList = new EventEmitter();
1212
+ this.loading = true;
1213
+ this.options = {
1214
+ stops: ['calc(5rem + 74vw)', 'calc(9rem + 74vw)']
1071
1215
  };
1072
1216
  this.open = false;
1073
1217
  this.allFormsData = {};
@@ -1076,12 +1220,27 @@ class KwikIDAgentDashboardComponent {
1076
1220
  .jsonp('https://maps.googleapis.com/maps/api/js?key=AIzaSyA63JY0ja6ZGIR796vJqZARc0c2j8Vgpik&v=3.exp&libraries=geometry,drawing,places', 'callback')
1077
1221
  .pipe(map(() => true), catchError(() => of(false)));
1078
1222
  }
1223
+ windowResizeWatcher() {
1224
+ if (this.hostElement.nativeElement.offsetWidth < 600) {
1225
+ this.isMobileView = true;
1226
+ this.userService.isMobileView = true;
1227
+ }
1228
+ else {
1229
+ this.isMobileView = false;
1230
+ this.userService.isMobileView = false;
1231
+ }
1232
+ }
1079
1233
  ngOnInit() {
1080
1234
  var _a, _b, _c, _d, _e, _f;
1081
- this.showMapview = (_c = (_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.dashboardConfig) === null || _b === void 0 ? void 0 : _b.showMaps) !== null && _c !== void 0 ? _c : false;
1082
- this.addTaskFormConfig =
1083
- (_f = (_e = (_d = this.agentConfig) === null || _d === void 0 ? void 0 : _d.dashboardConfig) === null || _e === void 0 ? void 0 : _e.addTaskFormConfig) !== null && _f !== void 0 ? _f : this.addTaskFormConfig;
1235
+ this.userService.agentConfig = this.agentConfig;
1236
+ this.userService.showMapview =
1237
+ (_c = (_b = (_a = this.agentConfig) === null || _a === void 0 ? void 0 : _a.dashboardConfig) === null || _b === void 0 ? void 0 : _b.showMaps) !== null && _c !== void 0 ? _c : false;
1238
+ this.userService.addTaskFormConfig =
1239
+ (_f = (_e = (_d = this.agentConfig) === null || _d === void 0 ? void 0 : _d.dashboardConfig) === null || _e === void 0 ? void 0 : _e.addTaskFormConfig) !== null && _f !== void 0 ? _f : this.userService.addTaskFormConfig;
1084
1240
  this.loading = false;
1241
+ setTimeout(() => {
1242
+ this.windowResizeWatcher();
1243
+ }, 1000);
1085
1244
  }
1086
1245
  goToNextStep(e) {
1087
1246
  this.nextStep.emit(e);
@@ -1098,9 +1257,6 @@ class KwikIDAgentDashboardComponent {
1098
1257
  refresh() {
1099
1258
  window.location.reload();
1100
1259
  }
1101
- toggleMapview() {
1102
- this.showMapview = !this.showMapview;
1103
- }
1104
1260
  onClick() {
1105
1261
  this.open = !this.open;
1106
1262
  }
@@ -1125,8 +1281,8 @@ class KwikIDAgentDashboardComponent {
1125
1281
  }
1126
1282
  handleOnClickViewForms(e) { }
1127
1283
  }
1128
- /** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDAgentDashboardComponent, deps: [{ token: MapService }, { token: i2.HttpClient }, { token: i0.ElementRef }, { token: TuiDialogService }], target: i0.ɵɵFactoryTarget.Component });
1129
- /** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { agentConfig: "agentConfig", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList" }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: MapInfoWindow, descendants: true }], ngImport: i0, template: "<div class=\"kwikid-agent-dashboard\" *ngIf=\"!loading\">\n <div class=\"wrapper\">\n <div class=\"dashboard-header\">\n <div class=\"dashboard-header-client-name\">\n <kwikui-button-icon\n [icon]=\"'tuiIconLink'\"\n appearance=\"mono\"\n size=\"m\"\n ></kwikui-button-icon>\n\n {{ agentConfig.clientName }}\n </div>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button-icon\n [icon]=\"'tuiIconSettingsLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"m\"\n [tuiDropdown]=\"dropdownContent\"\n [tuiDropdownManual]=\"open\"\n (tuiObscured)=\"onObscured($event)\"\n ></kwikui-button-icon>\n <ng-template #dropdownContent>\n <div class=\"menu-dropdown\">\n <div class=\"menu-dropdown-header\">\n <div class=\"menu-dropdown-header-agent-name\">\n {{ agentConfig.agentName }}\n </div>\n <div class=\"menu-dropdown-header-agent-id\">\n Agent ID: {{ agentConfig.agentId }}\n </div>\n </div>\n <hr />\n <div\n class=\"menu-dropdown-body\"\n tuiGroup\n [collapsed]=\"true\"\n [rounded]=\"false\"\n [orientation]=\"'vertical'\"\n [size]=\"'m'\"\n >\n <kwikui-button\n *ngIf=\"this.agentConfig.dashboardConfig.showMaps\"\n id=\"\"\n label=\"{{ showMapview ? 'Hide Maps' : 'Show Maps' }}\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n icon=\"{{ showMapview ? 'tuiIconEyeOff' : 'tuiIconEye' }}\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"padding: 0rem !important\"\n (onClick)=\"toggleMapview()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"this.agentConfig?.dashboardConfig?.allowAddTask\"\n id=\"\"\n label=\"Add Task\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconAddRowLarge'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button>\n <kwikui-button\n id=\"\"\n label=\"Refresh\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconRefreshCw'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n </div>\n <hr />\n <div class=\"menu-dropdown-footer\">\n <kwikui-button\n id=\"\"\n label=\"Logout\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconLogOut'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"goToNextStep({ stepType: 'LOGOUT' })\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\n </div>\n\n <div class=\"dashboard-body\">\n <div\n *ngIf=\"apiLoaded | async\"\n [class]=\"showMapview ? 'map' : 'map-hidden'\"\n >\n <google-map height=\"100%\" width=\"100%\" [options]=\"this.mapService.map\">\n <map-marker\n #marker=\"mapMarker\"\n *ngFor=\"\n let markerPosition of this.mapService.markers;\n let index = index\n \"\n [position]=\"markerPosition\"\n [label]=\"{ text: String(index), color: '#FFF' }\"\n (mapClick)=\"openInfoWindow(marker)\"\n ></map-marker>\n <map-directions-renderer\n *ngIf=\"\n this.mapService.directionsResults$ | async as directionsResults\n \"\n [directions]=\"directionsResults\"\n [options]=\"this.mapService.directionsRenderOption\"\n ></map-directions-renderer>\n <map-info-window>Info Window content</map-info-window>\n </google-map>\n </div>\n <div class=\"customer-list\">\n <customer-list\n [customers]=\"taskList\"\n [agentConfig]=\"agentConfig\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n ></customer-list>\n </div>\n </div>\n </div>\n</div>\n<div class=\"kwikid-agent-dashboard-loader\" *ngIf=\"loading\">\n <span class=\"loader\"></span>\n</div>\n\n<ng-template #template let-observer>\n <div class=\"add-task-header\">\n <h2>Add Task</h2>\n <kwikui-button-icon\n icon=\"tuiIconX\"\n id=\"\"\n label=\"Close\"\n styles=\"\"\n type=\"button\"\n appearance=\"mono\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"observer.complete()\"\n ></kwikui-button-icon>\n </div>\n <kwikid-form-view\n [formConfig]=\"addTaskFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"true\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n</ng-template>\n", styles: [".kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%;position:relative}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{width:100%;height:100%;background-color:#fafafa;overflow:hidden}@media screen and (min-width: 600px){.kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:row-reverse;align-content:center;justify-content:center;align-items:stretch;padding:1.5rem;grid-gap:1.5rem;gap:1.5rem;overflow:auto;background-color:#fafafa}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{min-width:300px;max-width:400px;width:100%;height:100%;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}}.menu{position:absolute;transition:\"0.15s linear 0s\"}.kwikid-agent-dashboard-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-agent-dashboard-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-agent-dashboard-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-agent-dashboard-loader .t-loader{display:none!important}.add-task-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:.5rem 0 1rem 1rem}:host{width:100%;height:100%}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.menu-dropdown{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;grid-gap:.5rem;gap:.5rem;padding:1rem 1.5rem}.menu-dropdown .menu-dropdown-header{display:flex;flex-direction:column;align-content:flex-start;justify-content:space-between;align-items:flex-start;grid-gap:1rem;gap:1rem}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-name{font-size:1.2rem;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}\n"], components: [{ type: i4$1.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i4$1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i4.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "agentConfig"], outputs: ["nextStep", "removeTask", "filterTaskList"] }, { type: i6.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i9.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i9.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i9.TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])" }, { type: i9.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i9.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged"], exportAs: ["mapMarker"] }, { type: i4.MapDirectionsRenderer, selector: "map-directions-renderer", inputs: ["directions", "options"], outputs: ["directionsChanged"], exportAs: ["mapDirectionsRenderer"] }, { type: i4.MapInfoWindow, selector: "map-info-window", inputs: ["options", "position"], outputs: ["closeclick", "contentChanged", "domready", "positionChanged", "zindexChanged"], exportAs: ["mapInfoWindow"] }], pipes: { "async": i5.AsyncPipe } });
1284
+ /** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDAgentDashboardComponent, deps: [{ token: MapService }, { token: UserService }, { token: i3$1.HttpClient }, { token: i0.ElementRef }, { token: TuiDialogService }], target: i0.ɵɵFactoryTarget.Component });
1285
+ /** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { agentConfig: "agentConfig", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: MapInfoWindow, descendants: true }], ngImport: i0, template: "<div class=\"kwikid-agent-dashboard\" *ngIf=\"!loading\">\n <div class=\"wrapper\">\n <div class=\"dashboard-header\">\n <img\n *ngIf=\"userService.agentConfig.clientLogo && userService.agentConfig?.dashboardConfig?.showClientLogo\"\n [src]=\"userService.agentConfig.clientLogo\"\n class=\"dashboard-header-client-logo\"\n />\n <div\n *ngIf=\"!userService.agentConfig.clientLogo || !userService.agentConfig?.dashboardConfig?.showClientLogo\"\n class=\"dashboard-header-client-name\"\n >\n <kwikui-button-icon\n [icon]=\"'tuiIconLink'\"\n appearance=\"mono\"\n size=\"m\"\n ></kwikui-button-icon>\n\n {{ userService.agentConfig.clientName }}\n </div>\n <div>\n <kwikui-button-icon\n *ngIf=\"userService.agentConfig?.dashboardConfig?.allowAddTask\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconAddRowLarge'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button-icon>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button-icon\n [icon]=\"'tuiIconSettingsLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"m\"\n [tuiDropdown]=\"dropdownContent\"\n [tuiDropdownManual]=\"open\"\n (tuiObscured)=\"onObscured($event)\"\n ></kwikui-button-icon>\n <ng-template #dropdownContent>\n <div class=\"menu-dropdown\">\n <div class=\"menu-dropdown-header\">\n <div class=\"menu-dropdown-header-agent-name\">\n {{ userService.agentConfig.agentName }}\n </div>\n <div class=\"menu-dropdown-header-agent-id\">\n Agent ID: {{ userService.agentConfig.agentId }}\n </div>\n </div>\n <hr />\n <div\n class=\"menu-dropdown-body\"\n tuiGroup\n [collapsed]=\"true\"\n [rounded]=\"false\"\n [orientation]=\"'vertical'\"\n [size]=\"'m'\"\n >\n <kwikui-button\n *ngIf=\"this.agentConfig.dashboardConfig.showMaps\"\n id=\"\"\n label=\"{{\n userService.showMapview ? 'Hide Maps' : 'Show Maps'\n }}\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n icon=\"{{\n userService.showMapview ? 'tuiIconEyeOff' : 'tuiIconEye'\n }}\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"padding: 0rem !important\"\n (onClick)=\"userService.toggleMapview()\"\n ></kwikui-button>\n <kwikui-button\n id=\"\"\n label=\"Refresh\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconRefreshCw'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n </div>\n <div class=\"menu-dropdown-footer\">\n <kwikui-button\n id=\"\"\n label=\"Logout\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconLogOut'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"goToNextStep({ stepType: 'LOGOUT' })\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\n </div>\n </div>\n\n <div class=\"dashboard-body\">\n <div\n *ngIf=\"apiLoaded | async\"\n [class]=\"userService.showMapview ? 'map' : 'map-hidden'\"\n >\n <google-map height=\"100%\" width=\"100%\" [options]=\"this.mapService.map\">\n <map-marker\n #marker=\"mapMarker\"\n *ngFor=\"\n let markerPosition of this.mapService.markers;\n let index = index\n \"\n [position]=\"markerPosition\"\n [label]=\"{ text: String(index), color: '#FFF' }\"\n (mapClick)=\"openInfoWindow(marker)\"\n ></map-marker>\n <map-directions-renderer\n *ngIf=\"\n this.mapService.directionsResults$ | async as directionsResults\n \"\n [directions]=\"directionsResults\"\n [options]=\"this.mapService.directionsRenderOption\"\n ></map-directions-renderer>\n <map-info-window>Info Window content</map-info-window>\n </google-map>\n </div>\n <div\n class=\"task-details\"\n *ngIf=\"\n !userService.isMobileView && userService.showTaskDetails != undefined\n \"\n >\n <customer-details\n [customer]=\"taskList[userService.showTaskDetails]\"\n [agentConfig]=\"agentConfig\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-details>\n </div>\n <div class=\"customer-list\">\n <customer-list\n [customers]=\"taskList\"\n [agentConfig]=\"agentConfig\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n ></customer-list>\n </div>\n </div>\n </div>\n</div>\n<div class=\"kwikid-agent-dashboard-loader\" *ngIf=\"loading\">\n <span class=\"loader\"></span>\n</div>\n\n<ng-template #template let-observer>\n <div class=\"add-task-header\">\n <h2>Add Task</h2>\n <kwikui-button-icon\n icon=\"tuiIconX\"\n id=\"\"\n label=\"Close\"\n styles=\"\"\n type=\"button\"\n appearance=\"mono\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"observer.complete()\"\n ></kwikui-button-icon>\n </div>\n <kwikid-form-view\n [formConfig]=\"userService.addTaskFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"true\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n</ng-template>\n", styles: [".kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%;position:relative}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-logo{max-height:50px;padding-left:1rem}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{width:100%;height:100%;background-color:#fafafa;overflow:hidden}@media screen and (min-width: 600px){.kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:row-reverse;align-content:center;justify-content:flex-end;align-items:stretch;padding:1.5rem;grid-gap:1.5rem;gap:1.5rem;overflow:auto;background-color:#fafafa}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .task-details{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{min-width:300px;max-width:400px;width:100%;height:100%;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}}.menu{position:absolute;transition:\"0.15s linear 0s\"}.kwikid-agent-dashboard-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-agent-dashboard-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-agent-dashboard-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-agent-dashboard-loader .t-loader{display:none!important}.add-task-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:.5rem 0 1rem 1rem}:host{width:100%;height:100%}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.menu-dropdown{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;grid-gap:.5rem;gap:.5rem;padding:1rem 1.5rem}.menu-dropdown .menu-dropdown-header{display:flex;flex-direction:column;align-content:flex-start;justify-content:space-between;align-items:flex-start;grid-gap:1rem;gap:1rem}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-name{font-size:1.2rem;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}\n"], components: [{ type: i2.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i2.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i5.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { type: CustomerDetailsComponent, selector: "customer-details", inputs: ["customer", "agentConfig"], outputs: ["nextStep", "removeTask"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "agentConfig"], outputs: ["nextStep", "removeTask", "filterTaskList"] }, { type: i8.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "userConfig", "popupFormCallback"], outputs: ["onClickGoBack", "onClickViewForms", "onClickSaveForm", "onClickApiCall", "onActionShowPopupForm"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i11.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i11.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i11.TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])" }, { type: i11.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i11.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged"], exportAs: ["mapMarker"] }, { type: i5.MapDirectionsRenderer, selector: "map-directions-renderer", inputs: ["directions", "options"], outputs: ["directionsChanged"], exportAs: ["mapDirectionsRenderer"] }, { type: i5.MapInfoWindow, selector: "map-info-window", inputs: ["options", "position"], outputs: ["closeclick", "contentChanged", "domready", "positionChanged", "zindexChanged"], exportAs: ["mapInfoWindow"] }], pipes: { "async": i6.AsyncPipe } });
1130
1286
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDAgentDashboardComponent, decorators: [{
1131
1287
  type: Component,
1132
1288
  args: [{
@@ -1134,10 +1290,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1134
1290
  templateUrl: './kwikid-agent-dashboard.component.html',
1135
1291
  styleUrls: ['./kwikid-agent-dashboard.component.scss']
1136
1292
  }]
1137
- }], ctorParameters: function () { return [{ type: MapService }, { type: i2.HttpClient }, { type: i0.ElementRef }, { type: i9.TuiDialogService, decorators: [{
1293
+ }], ctorParameters: function () { return [{ type: MapService }, { type: UserService }, { type: i3$1.HttpClient }, { type: i0.ElementRef }, { type: i11.TuiDialogService, decorators: [{
1138
1294
  type: Inject,
1139
1295
  args: [TuiDialogService]
1140
- }] }]; }, propDecorators: { agentConfig: [{
1296
+ }] }]; }, propDecorators: { windowResizeWatcher: [{
1297
+ type: HostListener,
1298
+ args: ['window:resize', ['$event']]
1299
+ }], agentConfig: [{
1141
1300
  type: Input
1142
1301
  }], taskList: [{
1143
1302
  type: Input
@@ -1161,7 +1320,8 @@ class KwikIDAgentDashboardModule {
1161
1320
  CustomerListComponent,
1162
1321
  CustomerTileComponent,
1163
1322
  Ng2SearchPipe,
1164
- StatusPillComponent], imports: [CommonModule,
1323
+ StatusPillComponent,
1324
+ CustomerDetailsComponent], imports: [CommonModule,
1165
1325
  HttpClientModule,
1166
1326
  FormsModule,
1167
1327
  ReactiveFormsModule,
@@ -1219,7 +1379,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1219
1379
  CustomerListComponent,
1220
1380
  CustomerTileComponent,
1221
1381
  Ng2SearchPipe,
1222
- StatusPillComponent
1382
+ StatusPillComponent,
1383
+ CustomerDetailsComponent
1223
1384
  ],
1224
1385
  imports: [
1225
1386
  CommonModule,