kwikid-agent-dashboard 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kwikid-agent-dashboard.umd.js +224 -187
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -1
- package/esm2015/lib/kwikid-agent-dashboard.component.js +2 -2
- package/esm2015/lib/v1/components/customer-details/customer-details.component.js +30 -28
- package/esm2015/lib/v1/components/customer-list/customer-list.component.js +16 -15
- package/esm2015/lib/v1/components/customer-tile/customer-tile.component.js +26 -24
- package/esm2015/lib/v1/components/customer-tile/status-pill/status-pill.component.js +31 -26
- package/esm2015/lib/v1/components/customer-tile/status-pill/status-pill.constants.js +33 -0
- package/esm2015/lib/v1/kwikid-agent-dashboard.component.js +13 -10
- package/esm2015/lib/v1/services/agent.service.js +3 -11
- package/esm2015/lib/v1/services/google-maps.service.js +20 -14
- package/esm2015/lib/v1/services/open-street-maps.service.js +5 -5
- package/esm2015/lib/v2/kwikid-agent-dashboard.component.js +2 -11
- package/fesm2015/kwikid-agent-dashboard.js +166 -134
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/lib/v1/components/customer-details/customer-details.component.d.ts +1 -0
- package/lib/v1/components/customer-tile/customer-tile.component.d.ts +1 -0
- package/lib/v1/components/customer-tile/status-pill/status-pill.component.d.ts +8 -9
- package/lib/v1/components/customer-tile/status-pill/status-pill.constants.d.ts +32 -0
- package/lib/v1/kwikid-agent-dashboard.component.d.ts +3 -2
- package/lib/v1/services/agent.service.d.ts +0 -1
- package/lib/v1/services/google-maps.service.d.ts +1 -1
- package/package.json +3 -3
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
52
52
|
PERFORMANCE OF THIS SOFTWARE.
|
|
53
53
|
***************************************************************************** */
|
|
54
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
54
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
55
55
|
var extendStatics = function (d, b) {
|
|
56
56
|
extendStatics = Object.setPrototypeOf ||
|
|
57
57
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
}
|
|
188
188
|
function __generator(thisArg, body) {
|
|
189
189
|
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
190
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
191
|
-
return g =
|
|
190
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
191
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
192
192
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
193
193
|
function step(op) {
|
|
194
194
|
if (f)
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
if (!Symbol.asyncIterator)
|
|
344
344
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
345
345
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
346
|
-
return i =
|
|
346
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
347
347
|
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
348
348
|
function verb(n, f) { if (g[n]) {
|
|
349
349
|
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); };
|
|
@@ -467,18 +467,26 @@
|
|
|
467
467
|
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
468
468
|
env.hasError = true;
|
|
469
469
|
}
|
|
470
|
+
var r, s = 0;
|
|
470
471
|
function next() {
|
|
471
|
-
while (env.stack.
|
|
472
|
-
var rec = env.stack.pop();
|
|
472
|
+
while (r = env.stack.pop()) {
|
|
473
473
|
try {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
474
|
+
if (!r.async && s === 1)
|
|
475
|
+
return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
476
|
+
if (r.dispose) {
|
|
477
|
+
var result = r.dispose.call(r.value);
|
|
478
|
+
if (r.async)
|
|
479
|
+
return s |= 2, Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
480
|
+
}
|
|
481
|
+
else
|
|
482
|
+
s |= 1;
|
|
477
483
|
}
|
|
478
484
|
catch (e) {
|
|
479
485
|
fail(e);
|
|
480
486
|
}
|
|
481
487
|
}
|
|
488
|
+
if (s === 1)
|
|
489
|
+
return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
482
490
|
if (env.hasError)
|
|
483
491
|
throw env.error;
|
|
484
492
|
}
|
|
@@ -1661,31 +1669,11 @@
|
|
|
1661
1669
|
this.onGetTaskList = new i0.EventEmitter();
|
|
1662
1670
|
this.onClickPerformAction = new i0.EventEmitter();
|
|
1663
1671
|
}
|
|
1664
|
-
KwikIDAgentDashboardComponentV2.prototype.ngOnInit = function () {
|
|
1665
|
-
console.log("Agent Dashboard Config", this.config);
|
|
1666
|
-
console.log("User Config", this.userConfig);
|
|
1667
|
-
console.log("Agent Info", this.agentInfo);
|
|
1668
|
-
console.log("Tasks List", this.taskList);
|
|
1669
|
-
};
|
|
1672
|
+
KwikIDAgentDashboardComponentV2.prototype.ngOnInit = function () { };
|
|
1670
1673
|
KwikIDAgentDashboardComponentV2.prototype.ngOnChanges = function (changes) {
|
|
1671
|
-
var e_1, _a;
|
|
1672
1674
|
var verifyChange = function (key) {
|
|
1673
1675
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1674
1676
|
};
|
|
1675
|
-
try {
|
|
1676
|
-
for (var _b = __values(Object.entries(changes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1677
|
-
var change = _c.value;
|
|
1678
|
-
var key = change[0];
|
|
1679
|
-
var value = change[1].currentValue;
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1683
|
-
finally {
|
|
1684
|
-
try {
|
|
1685
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1686
|
-
}
|
|
1687
|
-
finally { if (e_1) throw e_1.error; }
|
|
1688
|
-
}
|
|
1689
1677
|
if (verifyChange("taskList")) {
|
|
1690
1678
|
this.taskList = changes.taskList.currentValue;
|
|
1691
1679
|
}
|
|
@@ -1933,17 +1921,9 @@
|
|
|
1933
1921
|
AgentService.prototype.toggleMapview = function () {
|
|
1934
1922
|
this.showMapview = !this.showMapview;
|
|
1935
1923
|
};
|
|
1936
|
-
AgentService.prototype.canStartJourney = function (status) {
|
|
1937
|
-
var _a, _b;
|
|
1938
|
-
var noneEditableStatus = (_b = (_a = this.config.dashboard) === null || _a === void 0 ? void 0 : _a.cannotStartJourney) !== null && _b !== void 0 ? _b : this.notRequiredStatus;
|
|
1939
|
-
if (noneEditableStatus.includes(status)) {
|
|
1940
|
-
return false;
|
|
1941
|
-
}
|
|
1942
|
-
return true;
|
|
1943
|
-
};
|
|
1944
1924
|
AgentService.prototype.canPlotMarkers = function (status) {
|
|
1945
|
-
var _a, _b;
|
|
1946
|
-
var nonePlottingSessions = (_b = (_a = this.config
|
|
1925
|
+
var _a, _b, _c;
|
|
1926
|
+
var nonePlottingSessions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.extendedFlags) === null || _b === void 0 ? void 0 : _b.dontPlotMarkers) !== null && _c !== void 0 ? _c : [];
|
|
1947
1927
|
if (nonePlottingSessions.includes(status)) {
|
|
1948
1928
|
return false;
|
|
1949
1929
|
}
|
|
@@ -1983,24 +1963,30 @@
|
|
|
1983
1963
|
// To Initialize Google Maps
|
|
1984
1964
|
GoogleMapsService.prototype.initializeMap = function () {
|
|
1985
1965
|
return __awaiter(this, void 0, void 0, function () {
|
|
1986
|
-
var
|
|
1987
|
-
return __generator(this, function (
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
1966
|
+
var _this = this;
|
|
1967
|
+
return __generator(this, function (_o) {
|
|
1968
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
1969
|
+
var _o;
|
|
1970
|
+
return __generator(this, function (_p) {
|
|
1971
|
+
switch (_p.label) {
|
|
1972
|
+
case 0:
|
|
1973
|
+
_o = this;
|
|
1974
|
+
return [4 /*yield*/, this.getPosition()];
|
|
1975
|
+
case 1:
|
|
1976
|
+
_o.myPosition = _p.sent();
|
|
1977
|
+
this.map = {
|
|
1978
|
+
zoom: 10,
|
|
1979
|
+
center: this.myPosition,
|
|
1980
|
+
streetViewControl: false,
|
|
1981
|
+
mapTypeControl: false,
|
|
1982
|
+
fullscreenControl: false,
|
|
1983
|
+
zoomControl: false
|
|
1984
|
+
};
|
|
1985
|
+
resolve(true);
|
|
1986
|
+
return [2 /*return*/];
|
|
1987
|
+
}
|
|
1988
|
+
});
|
|
1989
|
+
}); })];
|
|
2004
1990
|
});
|
|
2005
1991
|
});
|
|
2006
1992
|
};
|
|
@@ -2015,15 +2001,15 @@
|
|
|
2015
2001
|
switch (_o.label) {
|
|
2016
2002
|
case 0:
|
|
2017
2003
|
// If Fetch Address from Multiple Paths
|
|
2018
|
-
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "
|
|
2019
|
-
config = this.agentService.config.
|
|
2004
|
+
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPaths")) {
|
|
2005
|
+
config = this.agentService.config.extendedFlags.taskLocationPaths;
|
|
2020
2006
|
address = addressConcator(task, config);
|
|
2021
2007
|
// Encode the Address in URI
|
|
2022
2008
|
encodedAddres = encodeURI(address);
|
|
2023
2009
|
}
|
|
2024
2010
|
// If Fetch Address from Single Path
|
|
2025
|
-
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "
|
|
2026
|
-
config = this.agentService.config.
|
|
2011
|
+
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPath")) {
|
|
2012
|
+
config = this.agentService.config.extendedFlags.taskLocationPath;
|
|
2027
2013
|
address = kwikidToolkit.getObjectValueFromPath(task, config);
|
|
2028
2014
|
// Encode the Address in URI
|
|
2029
2015
|
encodedAddres = encodeURI(address);
|
|
@@ -2132,6 +2118,9 @@
|
|
|
2132
2118
|
return __generator(this, function (_o) {
|
|
2133
2119
|
switch (_o.label) {
|
|
2134
2120
|
case 0:
|
|
2121
|
+
if (!this.map || !this.myPosition) {
|
|
2122
|
+
return [2 /*return*/, tasks];
|
|
2123
|
+
}
|
|
2135
2124
|
this.allMarkers = [];
|
|
2136
2125
|
myMarker = {
|
|
2137
2126
|
lat: this.myPosition.lat,
|
|
@@ -2241,15 +2230,15 @@
|
|
|
2241
2230
|
switch (_q.label) {
|
|
2242
2231
|
case 0:
|
|
2243
2232
|
// If Fetch Address from Multiple Paths
|
|
2244
|
-
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "
|
|
2245
|
-
config = this.agentService.config.
|
|
2233
|
+
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPaths")) {
|
|
2234
|
+
config = this.agentService.config.extendedFlags.taskLocationPaths;
|
|
2246
2235
|
address = addressConcator(task, config);
|
|
2247
2236
|
// Encode the Address in URI
|
|
2248
2237
|
encodedAddres = encodeURI(address);
|
|
2249
2238
|
}
|
|
2250
2239
|
// If Fetch Address from Single Path
|
|
2251
|
-
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "
|
|
2252
|
-
config = this.agentService.config.
|
|
2240
|
+
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPath")) {
|
|
2241
|
+
config = this.agentService.config.extendedFlags.taskLocationPath;
|
|
2253
2242
|
address = kwikidToolkit.getObjectValueFromPath(task, config);
|
|
2254
2243
|
// Encode the Address in URI
|
|
2255
2244
|
encodedAddres = encodeURI(address);
|
|
@@ -2501,45 +2490,81 @@
|
|
|
2501
2490
|
args: ["directionsRender"]
|
|
2502
2491
|
}] } });
|
|
2503
2492
|
|
|
2493
|
+
var STATUS = {
|
|
2494
|
+
kyc_result_rejected: {
|
|
2495
|
+
color: "#eb3434",
|
|
2496
|
+
label: "KYC Result Rejected",
|
|
2497
|
+
background: "#ffd4da",
|
|
2498
|
+
hint: "KYC Result Rejected"
|
|
2499
|
+
},
|
|
2500
|
+
kyc_result_approved: {
|
|
2501
|
+
color: "#01663e",
|
|
2502
|
+
label: "KYC Result Approved",
|
|
2503
|
+
background: "#d7faee",
|
|
2504
|
+
hint: "KYC Result Approved"
|
|
2505
|
+
},
|
|
2506
|
+
kyc_result_partial_update: {
|
|
2507
|
+
color: "#023b57",
|
|
2508
|
+
label: "Partial Update",
|
|
2509
|
+
background: "#b5e0f5",
|
|
2510
|
+
hint: "Partial Update"
|
|
2511
|
+
},
|
|
2512
|
+
waiting: {
|
|
2513
|
+
color: "#000",
|
|
2514
|
+
label: "Waiting",
|
|
2515
|
+
background: "#f5ecb5",
|
|
2516
|
+
hint: "Waiting"
|
|
2517
|
+
}
|
|
2518
|
+
};
|
|
2519
|
+
var DEFAULT_STYLES = {
|
|
2520
|
+
color: "#fff",
|
|
2521
|
+
label: "Waiting",
|
|
2522
|
+
background: "#888",
|
|
2523
|
+
hint: "Waiting"
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2504
2526
|
var StatusPillComponent = /** @class */ (function () {
|
|
2505
2527
|
function StatusPillComponent() {
|
|
2506
|
-
this.
|
|
2507
|
-
this.
|
|
2508
|
-
this.statusClass = {};
|
|
2528
|
+
this.styles = {};
|
|
2529
|
+
this.value = "";
|
|
2509
2530
|
}
|
|
2510
2531
|
StatusPillComponent.prototype.ngOnInit = function () {
|
|
2511
|
-
this
|
|
2532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2533
|
+
return __generator(this, function (_c) {
|
|
2534
|
+
this.setupStatus();
|
|
2535
|
+
return [2 /*return*/];
|
|
2536
|
+
});
|
|
2537
|
+
});
|
|
2512
2538
|
};
|
|
2513
2539
|
StatusPillComponent.prototype.ngOnChanges = function (changes) {
|
|
2514
2540
|
var verifyChange = function (key) {
|
|
2515
2541
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
2516
2542
|
};
|
|
2543
|
+
if (verifyChange("config")) {
|
|
2544
|
+
this.config = changes.config.currentValue;
|
|
2545
|
+
}
|
|
2517
2546
|
if (verifyChange("status")) {
|
|
2518
2547
|
this.status = changes.status.currentValue;
|
|
2519
|
-
this.
|
|
2548
|
+
this.setupStatus();
|
|
2520
2549
|
}
|
|
2521
2550
|
};
|
|
2522
|
-
StatusPillComponent.prototype.
|
|
2523
|
-
|
|
2524
|
-
|
|
2551
|
+
StatusPillComponent.prototype.setupStatus = function () {
|
|
2552
|
+
var _a, _b;
|
|
2553
|
+
if (kwikidToolkit.checkObjectPathExists(this.config, "mapping") &&
|
|
2554
|
+
kwikidToolkit.checkObjectKeyExists(this.config.mapping, this.status)) {
|
|
2555
|
+
this.styles = Object.assign(Object.assign({}, DEFAULT_STYLES), this.config.mapping[this.status]);
|
|
2556
|
+
this.value =
|
|
2557
|
+
(_b = (_a = this.config.mapping[this.status]) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : kwikidToolkit.convertSnakeCaseToNormalText(this.status);
|
|
2558
|
+
}
|
|
2559
|
+
else {
|
|
2560
|
+
this.styles = DEFAULT_STYLES;
|
|
2561
|
+
this.value = kwikidToolkit.convertSnakeCaseToNormalText(this.status);
|
|
2525
2562
|
}
|
|
2526
|
-
this.statusText = this.getStatusLabel(status);
|
|
2527
|
-
this.statusClass = this.getStatusPillClass(status);
|
|
2528
|
-
};
|
|
2529
|
-
StatusPillComponent.prototype.getStatusPillClass = function (status) {
|
|
2530
|
-
var newStatus = status
|
|
2531
|
-
.replace("_", "-")
|
|
2532
|
-
.replace("_", "-")
|
|
2533
|
-
.replace("_", "-");
|
|
2534
|
-
return "status-pill " + newStatus;
|
|
2535
|
-
};
|
|
2536
|
-
StatusPillComponent.prototype.getStatusLabel = function (status) {
|
|
2537
|
-
return status.replace("_", " ").replace("_", " ").replace("_", " ");
|
|
2538
2563
|
};
|
|
2539
2564
|
return StatusPillComponent;
|
|
2540
2565
|
}());
|
|
2541
2566
|
/** @nocollapse */ StatusPillComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StatusPillComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2542
|
-
/** @nocollapse */ StatusPillComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { status: "status" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div
|
|
2567
|
+
/** @nocollapse */ StatusPillComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { config: "config", status: "status" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"task-iem-status-container\"\n [style]=\"styles\"\n>\n {{ value }}\n</div>\n", styles: [".task-iem-status-container{width:-moz-fit-content;width:fit-content;padding:0 .4rem;font-size:.7rem;border-radius:1rem}\n"] });
|
|
2543
2568
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StatusPillComponent, decorators: [{
|
|
2544
2569
|
type: i0.Component,
|
|
2545
2570
|
args: [{
|
|
@@ -2547,7 +2572,9 @@
|
|
|
2547
2572
|
templateUrl: "./status-pill.component.html",
|
|
2548
2573
|
styleUrls: ["./status-pill.component.css"]
|
|
2549
2574
|
}]
|
|
2550
|
-
}], propDecorators: {
|
|
2575
|
+
}], ctorParameters: function () { return []; }, propDecorators: { config: [{
|
|
2576
|
+
type: i0.Input
|
|
2577
|
+
}], status: [{
|
|
2551
2578
|
type: i0.Input
|
|
2552
2579
|
}] } });
|
|
2553
2580
|
|
|
@@ -2671,46 +2698,49 @@
|
|
|
2671
2698
|
this.parseData();
|
|
2672
2699
|
}
|
|
2673
2700
|
};
|
|
2701
|
+
CustomerDetailsComponent.prototype.getValueFromArray = function (paths) {
|
|
2702
|
+
var _this = this;
|
|
2703
|
+
var data = "";
|
|
2704
|
+
// eslint-disable-next-line array-callback-return
|
|
2705
|
+
paths.map(function (path) {
|
|
2706
|
+
var value = kwikidToolkit.getObjectValueFromPath(_this.customer, path);
|
|
2707
|
+
data = data + " " + value;
|
|
2708
|
+
});
|
|
2709
|
+
return data;
|
|
2710
|
+
};
|
|
2674
2711
|
CustomerDetailsComponent.prototype.parseData = function () {
|
|
2675
2712
|
var _this = this;
|
|
2676
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
2677
|
-
var identifier = (
|
|
2713
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2714
|
+
var identifier = (_a = this.config.taskUI.details.header.taskId.path) !== null && _a !== void 0 ? _a : "user_id";
|
|
2678
2715
|
this.taskId = kwikidToolkit.getObjectValueFromPath(this.customer, identifier);
|
|
2679
2716
|
var detailsConfig = [];
|
|
2680
|
-
if (kwikidToolkit.checkObjectPathExists(this.config, "
|
|
2681
|
-
kwikidToolkit.isNotEmptyArray(this.config.
|
|
2682
|
-
detailsConfig = this.config.dashboard.viewTaskDetails;
|
|
2717
|
+
if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.details.data") &&
|
|
2718
|
+
kwikidToolkit.isNotEmptyArray(this.config.taskUI.details.data)) {
|
|
2683
2719
|
var data_1 = [];
|
|
2720
|
+
detailsConfig = this.config.taskUI.details.data;
|
|
2684
2721
|
detailsConfig.map(function (field) {
|
|
2685
|
-
var value
|
|
2722
|
+
var value;
|
|
2723
|
+
if (Array.isArray(field.path)) {
|
|
2724
|
+
value = _this.getValueFromArray(field.path);
|
|
2725
|
+
}
|
|
2726
|
+
else {
|
|
2727
|
+
value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path);
|
|
2728
|
+
}
|
|
2686
2729
|
data_1.push({ label: field.label, value: value });
|
|
2687
2730
|
return true;
|
|
2688
2731
|
});
|
|
2689
2732
|
this.labelValuePairData = data_1;
|
|
2690
2733
|
}
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
detailsConfig = this.config.dashboard.taskUI.details.data;
|
|
2694
|
-
var data_2 = [];
|
|
2695
|
-
detailsConfig.map(function (field) {
|
|
2696
|
-
var value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path);
|
|
2697
|
-
data_2.push({ label: field.label, value: value });
|
|
2698
|
-
return true;
|
|
2699
|
-
});
|
|
2700
|
-
this.labelValuePairData = data_2;
|
|
2701
|
-
}
|
|
2702
|
-
this.labelValuePairConfig =
|
|
2703
|
-
(_h = (_g = (_f = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.dashboard) === null || _e === void 0 ? void 0 : _e.taskUI) === null || _f === void 0 ? void 0 : _f.details) === null || _g === void 0 ? void 0 : _g.config) !== null && _h !== void 0 ? _h : {};
|
|
2704
|
-
this.title =
|
|
2705
|
-
(_p = (_o = (_m = (_l = (_k = (_j = this.config) === null || _j === void 0 ? void 0 : _j.dashboard) === null || _k === void 0 ? void 0 : _k.taskUI) === null || _l === void 0 ? void 0 : _l.details) === null || _m === void 0 ? void 0 : _m.header) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : this.title;
|
|
2734
|
+
this.labelValuePairConfig = (_e = (_d = (_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.taskUI) === null || _c === void 0 ? void 0 : _c.details) === null || _d === void 0 ? void 0 : _d.config) !== null && _e !== void 0 ? _e : {};
|
|
2735
|
+
this.title = (_k = (_j = (_h = (_g = (_f = this.config) === null || _f === void 0 ? void 0 : _f.taskUI) === null || _g === void 0 ? void 0 : _g.details) === null || _h === void 0 ? void 0 : _h.header) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : this.title;
|
|
2706
2736
|
};
|
|
2707
2737
|
CustomerDetailsComponent.prototype.getTaskCreationTime = function (task) {
|
|
2708
|
-
var _a;
|
|
2709
|
-
if (
|
|
2710
|
-
var time = kwikidToolkit.getObjectValueFromPath(task, this.
|
|
2738
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2739
|
+
if ((_d = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.taskUI) === null || _b === void 0 ? void 0 : _b.details) === null || _c === void 0 ? void 0 : _c.time) === null || _d === void 0 ? void 0 : _d.path) {
|
|
2740
|
+
var time = kwikidToolkit.getObjectValueFromPath(task, (_h = (_g = (_f = (_e = this.config) === null || _e === void 0 ? void 0 : _e.taskUI) === null || _f === void 0 ? void 0 : _f.details) === null || _g === void 0 ? void 0 : _g.time) === null || _h === void 0 ? void 0 : _h.path);
|
|
2711
2741
|
return this.convertEpochToDate(time);
|
|
2712
2742
|
}
|
|
2713
|
-
return this.convertEpochToDate((
|
|
2743
|
+
return this.convertEpochToDate((_j = task === null || task === void 0 ? void 0 : task.task_creation_time) !== null && _j !== void 0 ? _j : task === null || task === void 0 ? void 0 : task.start_time);
|
|
2714
2744
|
};
|
|
2715
2745
|
CustomerDetailsComponent.prototype.convertEpochToDate = function (epochTime) {
|
|
2716
2746
|
if (typeof epochTime === "string")
|
|
@@ -2733,7 +2763,7 @@
|
|
|
2733
2763
|
CustomerDetailsComponent.prototype.close = function () {
|
|
2734
2764
|
var _a, _b;
|
|
2735
2765
|
this.agentService.currentTaskDetails = undefined;
|
|
2736
|
-
if (((_b = (_a = this.
|
|
2766
|
+
if (((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.mapType) === "google-maps") {
|
|
2737
2767
|
this.googleMapsService.plotDirectionsForSelectedTask(null);
|
|
2738
2768
|
}
|
|
2739
2769
|
else {
|
|
@@ -2749,7 +2779,7 @@
|
|
|
2749
2779
|
return CustomerDetailsComponent;
|
|
2750
2780
|
}());
|
|
2751
2781
|
/** @nocollapse */ CustomerDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, deps: [{ token: AgentService }, { token: GoogleMapsService }, { token: OpenStreetMapsService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2752
|
-
/** @nocollapse */ CustomerDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerDetailsComponent, selector: "customer-details", inputs: { customer: "customer", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div>\n <kwikui-button\n icon=\"tuiIconChevronLeft\"\n label=\"Back\"\n shape=\"rounded\"\n size=\"s\"\n (onClick)=\"close()\"\n ></kwikui-button>\n </div>\n <div class=\"customer-details-heading\">{{ title }}</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n {{ taskId }}\n\n <status-pill\n *ngIf=\"config?.
|
|
2782
|
+
/** @nocollapse */ CustomerDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerDetailsComponent, selector: "customer-details", inputs: { customer: "customer", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div>\n <kwikui-button\n icon=\"tuiIconChevronLeft\"\n label=\"Back\"\n shape=\"rounded\"\n size=\"s\"\n (onClick)=\"close()\"\n ></kwikui-button>\n </div>\n <div class=\"customer-details-heading\">{{ title }}</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n {{ taskId }}\n\n <status-pill\n *ngIf=\"config?.utilityFlags?.isShowTaskStatus\"\n [config]=\"config?.taskUI?.details?.header?.taskStatus\"\n [status]=\"\n customer[\n config?.taskUI?.details?.header?.taskStatus?.path ??\n 'session_status'\n ]\n \"\n ></status-pill>\n </div>\n\n <div class=\"customer-details-table\">\n <kwikui-label-value-pair\n [config]=\"labelValuePairConfig\"\n [data]=\"labelValuePairData\"\n ></kwikui-label-value-pair>\n </div>\n\n <div\n class=\"customer-details-actions\"\n *ngIf=\"\n config?.taskUI?.details?.action &&\n config?.taskUI?.details?.action?.length > 0\n \"\n >\n <ng-container *ngFor=\"let action of config?.taskUI?.details?.action\">\n <kwikid-action-button\n [action]=\"action\"\n [config]=\"config\"\n [customer]=\"customer\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-action-button>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [".customer-details-wrapper{display:flex;flex-direction:column;align-items:stretch;overflow:auto;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;font-size:1rem}.customer-details-wrapper .customer-details-body .customer-details-user-id{display:flex;flex-direction:row;grid-gap:.6rem;gap:.6rem;align-items:center;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{padding:.5rem 0;display:flex;flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:flex-start;grid-gap:.5rem;gap:.5rem}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: StatusPillComponent, selector: "status-pill", inputs: ["config", "status"] }, { type: i1__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["config", "data", "id"] }, { type: ActionButtonComponent, selector: "kwikid-action-button", inputs: ["action", "config", "customer"], outputs: ["onClickPerformAction"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
|
|
2753
2783
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, decorators: [{
|
|
2754
2784
|
type: i0.Component,
|
|
2755
2785
|
args: [{
|
|
@@ -2770,6 +2800,7 @@
|
|
|
2770
2800
|
type: i0.Output
|
|
2771
2801
|
}] } });
|
|
2772
2802
|
|
|
2803
|
+
/* eslint-disable no-prototype-builtins */
|
|
2773
2804
|
var CustomerTileComponent = /** @class */ (function () {
|
|
2774
2805
|
function CustomerTileComponent(googleMapsService, openStreetMapsService, agentService, hostElement) {
|
|
2775
2806
|
this.googleMapsService = googleMapsService;
|
|
@@ -2807,38 +2838,40 @@
|
|
|
2807
2838
|
this.parseData();
|
|
2808
2839
|
}
|
|
2809
2840
|
};
|
|
2841
|
+
CustomerTileComponent.prototype.getValueFromArray = function (paths) {
|
|
2842
|
+
var _this = this;
|
|
2843
|
+
var data = "";
|
|
2844
|
+
// eslint-disable-next-line array-callback-return
|
|
2845
|
+
paths.map(function (path) {
|
|
2846
|
+
var value = kwikidToolkit.getObjectValueFromPath(_this.customer, path);
|
|
2847
|
+
data = data + " " + value;
|
|
2848
|
+
});
|
|
2849
|
+
return data;
|
|
2850
|
+
};
|
|
2810
2851
|
CustomerTileComponent.prototype.parseData = function () {
|
|
2811
2852
|
var _this = this;
|
|
2812
|
-
var _a, _b, _c, _d, _e, _f
|
|
2813
|
-
var identifier = (
|
|
2853
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2854
|
+
var identifier = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.taskIdentifier) !== null && _b !== void 0 ? _b : "user_id";
|
|
2814
2855
|
this.taskId = kwikidToolkit.getObjectValueFromPath(this.customer, identifier);
|
|
2815
2856
|
var detailsConfig = [];
|
|
2816
|
-
if (kwikidToolkit.checkObjectPathExists(this.config, "
|
|
2817
|
-
kwikidToolkit.isNotEmptyArray(this.config.
|
|
2818
|
-
detailsConfig = this.config.dashboard.viewTaskDetails;
|
|
2857
|
+
if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.details.data") &&
|
|
2858
|
+
kwikidToolkit.isNotEmptyArray(this.config.taskUI.details.data)) {
|
|
2819
2859
|
var data_1 = [];
|
|
2860
|
+
detailsConfig = this.config.taskUI.details.data;
|
|
2820
2861
|
detailsConfig.map(function (field) {
|
|
2821
|
-
|
|
2822
|
-
|
|
2862
|
+
var value;
|
|
2863
|
+
if (Array.isArray(field.path)) {
|
|
2864
|
+
value = _this.getValueFromArray(field.path);
|
|
2865
|
+
}
|
|
2866
|
+
else {
|
|
2867
|
+
value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path);
|
|
2868
|
+
}
|
|
2823
2869
|
data_1.push({ label: field.label, value: value });
|
|
2824
2870
|
return true;
|
|
2825
2871
|
});
|
|
2826
2872
|
this.labelValuePairData = data_1;
|
|
2827
2873
|
}
|
|
2828
|
-
|
|
2829
|
-
kwikidToolkit.isNotEmptyArray(this.config.dashboard.taskUI.details.data)) {
|
|
2830
|
-
detailsConfig = this.config.dashboard.taskUI.details.data;
|
|
2831
|
-
var data_2 = [];
|
|
2832
|
-
detailsConfig.map(function (field) {
|
|
2833
|
-
var value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path);
|
|
2834
|
-
data_2.push({ label: field.label, value: value });
|
|
2835
|
-
return true;
|
|
2836
|
-
});
|
|
2837
|
-
this.labelValuePairData = data_2;
|
|
2838
|
-
}
|
|
2839
|
-
console.log("DATA", this.labelValuePairData);
|
|
2840
|
-
this.labelValuePairConfig =
|
|
2841
|
-
(_h = (_g = (_f = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.dashboard) === null || _e === void 0 ? void 0 : _e.taskUI) === null || _f === void 0 ? void 0 : _f.details) === null || _g === void 0 ? void 0 : _g.config) !== null && _h !== void 0 ? _h : {};
|
|
2874
|
+
this.labelValuePairConfig = (_f = (_e = (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.taskUI) === null || _d === void 0 ? void 0 : _d.details) === null || _e === void 0 ? void 0 : _e.config) !== null && _f !== void 0 ? _f : {};
|
|
2842
2875
|
};
|
|
2843
2876
|
CustomerTileComponent.prototype.openDetails = function () {
|
|
2844
2877
|
var _a, _b, _c, _d;
|
|
@@ -2851,7 +2884,7 @@
|
|
|
2851
2884
|
this.agentService.currentTaskDetails = undefined;
|
|
2852
2885
|
}
|
|
2853
2886
|
if (this.agentService.showMapview) {
|
|
2854
|
-
if (((_d = (_c = this.agentService.config) === null || _c === void 0 ? void 0 : _c.
|
|
2887
|
+
if (((_d = (_c = this.agentService.config) === null || _c === void 0 ? void 0 : _c.maps) === null || _d === void 0 ? void 0 : _d.mapType) === "google-maps") {
|
|
2855
2888
|
this.googleMapsService.plotDirectionsForSelectedTask(this.agentService.currentTaskDetails);
|
|
2856
2889
|
}
|
|
2857
2890
|
else {
|
|
@@ -2874,7 +2907,7 @@
|
|
|
2874
2907
|
return CustomerTileComponent;
|
|
2875
2908
|
}());
|
|
2876
2909
|
/** @nocollapse */ CustomerTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, deps: [{ token: GoogleMapsService }, { token: OpenStreetMapsService }, { token: AgentService }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2877
|
-
/** @nocollapse */ CustomerTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", config: "config" }, outputs: { onClickPerformAction: "onClickPerformAction", nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id\n ? 'customer-tile-wrapper customer-tile-active'\n : 'customer-tile-wrapper'\n \"\n>\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ taskId }}\n </div>\n <status-pill\n *ngIf=\"config?.
|
|
2910
|
+
/** @nocollapse */ CustomerTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", config: "config" }, outputs: { onClickPerformAction: "onClickPerformAction", nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id\n ? 'customer-tile-wrapper customer-tile-active'\n : 'customer-tile-wrapper'\n \"\n>\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ taskId }}\n </div>\n <status-pill\n *ngIf=\"config?.utilityFlags?.isShowTaskStatus\"\n [config]=\"config?.taskUI?.header?.taskStatus\"\n [status]=\"\n customer[config?.taskUI?.header?.taskStatus?.path ?? 'session_status']\n \"\n ></status-pill>\n </div>\n <kwikui-button\n *ngIf=\"!agentService.isMobileView && !agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronLeftLarge'\n : 'tuiIconChevronRightLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"agentService.isMobileView || agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n </div>\n <div\n *ngIf=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n \"\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <kwikui-label-value-pair\n [config]=\"labelValuePairConfig\"\n [data]=\"labelValuePairData\"\n ></kwikui-label-value-pair>\n <!-- <div\n *ngIf=\"\n agentService.config?.maps?.sho &&\n agentService.config?.isShowDistanceAndTime &&\n openStreetMapsService.getSelectedTaskDistanceAndTime()\n \"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n Distance: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.distance }} |\n Time: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.time }}\n </div> -->\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <ng-container *ngFor=\"let action of config?.taskUI?.details?.action\">\n <kwikid-action-button\n [action]=\"action\"\n [config]=\"config\"\n [customer]=\"customer\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-action-button>\n </ng-container>\n <!-- <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button\n *ngIf=\"config?.isAllowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"config?.isShowCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n handleOnClickNext({\n customer: customer,\n stepType: 'SHARE_JOURNEY_LINK'\n })\n \"\n ></kwikui-button>\n </div>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n *ngIf=\"config?.isShowMaps && customer?.isValidLocation\"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.googleMapsUrl)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config?.isAllowStartJourney &&\n agentService.canStartJourney(customer.session_status)\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n handleOnClickNext({ 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;margin:1rem;padding:1rem .25rem 1rem 1rem;border-radius:1rem;border:.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:column;flex-wrap:wrap;align-content:stretch;justify-content:flex-start;align-items:flex-start}.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{padding:.5rem 0;display:flex;flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:flex-start;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .data-collasped{display:none}.customer-tile-active{background-color:#dcedfd}\n"], components: [{ type: StatusPillComponent, selector: "status-pill", inputs: ["config", "status"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i1__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["config", "data", "id"] }, { type: ActionButtonComponent, selector: "kwikid-action-button", inputs: ["action", "config", "customer"], outputs: ["onClickPerformAction"] }], directives: [{ type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2878
2911
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
|
|
2879
2912
|
type: i0.Component,
|
|
2880
2913
|
args: [{
|
|
@@ -2985,7 +3018,7 @@
|
|
|
2985
3018
|
}
|
|
2986
3019
|
CustomerListComponent.prototype.ngOnInit = function () {
|
|
2987
3020
|
return __awaiter(this, void 0, void 0, function () {
|
|
2988
|
-
return __generator(this, function (
|
|
3021
|
+
return __generator(this, function (_g) {
|
|
2989
3022
|
this.handleInitialDateRange();
|
|
2990
3023
|
this.handleSearchAndSortFormControls();
|
|
2991
3024
|
return [2 /*return*/];
|
|
@@ -3001,14 +3034,14 @@
|
|
|
3001
3034
|
}
|
|
3002
3035
|
};
|
|
3003
3036
|
CustomerListComponent.prototype.handleInitialDateRange = function () {
|
|
3004
|
-
var _a, _b, _c, _d, _e;
|
|
3005
|
-
var
|
|
3037
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3038
|
+
var searchFilterStartPoint = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.extendedFlags) === null || _b === void 0 ? void 0 : _b.searchFilterStartPoint) !== null && _c !== void 0 ? _c : {
|
|
3006
3039
|
day: 0,
|
|
3007
3040
|
month: 0,
|
|
3008
3041
|
year: 0
|
|
3009
3042
|
};
|
|
3010
3043
|
var currentDate = new Date();
|
|
3011
|
-
var startDate = new Date((
|
|
3044
|
+
var startDate = new Date((_d = currentDate.getFullYear() - (searchFilterStartPoint === null || searchFilterStartPoint === void 0 ? void 0 : searchFilterStartPoint.year)) !== null && _d !== void 0 ? _d : 0, (_e = currentDate.getMonth() - (searchFilterStartPoint === null || searchFilterStartPoint === void 0 ? void 0 : searchFilterStartPoint.month)) !== null && _e !== void 0 ? _e : 0, (_f = currentDate.getDate() - (searchFilterStartPoint === null || searchFilterStartPoint === void 0 ? void 0 : searchFilterStartPoint.day)) !== null && _f !== void 0 ? _f : 0);
|
|
3012
3045
|
this.fromDate = convertNormalDateToStringFormat(startDate);
|
|
3013
3046
|
this.toDate = convertNormalDateToStringFormat(null);
|
|
3014
3047
|
this.searchDateFormControl = new i2$1.FormControl({
|
|
@@ -3027,42 +3060,42 @@
|
|
|
3027
3060
|
(_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.extendedFlags) === null || _b === void 0 ? void 0 : _b.sortFilterKeys) !== null && _c !== void 0 ? _c : this.sortFilterOptions;
|
|
3028
3061
|
};
|
|
3029
3062
|
CustomerListComponent.prototype.setUpMaps = function () {
|
|
3030
|
-
var _a, _b;
|
|
3063
|
+
var _a, _b, _c, _d;
|
|
3031
3064
|
return __awaiter(this, void 0, void 0, function () {
|
|
3032
|
-
return __generator(this, function (
|
|
3033
|
-
switch (
|
|
3065
|
+
return __generator(this, function (_g) {
|
|
3066
|
+
switch (_g.label) {
|
|
3034
3067
|
case 0:
|
|
3035
|
-
if (!((_a = this.config
|
|
3036
|
-
if (!(((
|
|
3068
|
+
if (!((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.isShowMaps)) return [3 /*break*/, 4];
|
|
3069
|
+
if (!(((_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.maps) === null || _d === void 0 ? void 0 : _d.mapType) === "open-street")) return [3 /*break*/, 2];
|
|
3037
3070
|
return [4 /*yield*/, this.openStreetMapsService.initializeMap()];
|
|
3038
3071
|
case 1:
|
|
3039
|
-
|
|
3072
|
+
_g.sent();
|
|
3040
3073
|
return [3 /*break*/, 4];
|
|
3041
3074
|
case 2: return [4 /*yield*/, this.googleMapsService.initializeMap()];
|
|
3042
3075
|
case 3:
|
|
3043
|
-
|
|
3044
|
-
|
|
3076
|
+
_g.sent();
|
|
3077
|
+
_g.label = 4;
|
|
3045
3078
|
case 4: return [2 /*return*/];
|
|
3046
3079
|
}
|
|
3047
3080
|
});
|
|
3048
3081
|
});
|
|
3049
3082
|
};
|
|
3050
3083
|
CustomerListComponent.prototype.setCustomersList = function () {
|
|
3051
|
-
var _a;
|
|
3084
|
+
var _a, _b;
|
|
3052
3085
|
return __awaiter(this, void 0, void 0, function () {
|
|
3053
|
-
var
|
|
3054
|
-
return __generator(this, function (
|
|
3055
|
-
switch (
|
|
3086
|
+
var _g;
|
|
3087
|
+
return __generator(this, function (_h) {
|
|
3088
|
+
switch (_h.label) {
|
|
3056
3089
|
case 0:
|
|
3057
|
-
if (!((_a = this.config
|
|
3058
|
-
|
|
3090
|
+
if (!((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.isShowMaps)) return [3 /*break*/, 2];
|
|
3091
|
+
_g = this;
|
|
3059
3092
|
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
3060
3093
|
case 1:
|
|
3061
|
-
|
|
3094
|
+
_g.filteredData = _h.sent();
|
|
3062
3095
|
return [3 /*break*/, 3];
|
|
3063
3096
|
case 2:
|
|
3064
3097
|
this.filteredData = this.customers;
|
|
3065
|
-
|
|
3098
|
+
_h.label = 3;
|
|
3066
3099
|
case 3: return [2 /*return*/];
|
|
3067
3100
|
}
|
|
3068
3101
|
});
|
|
@@ -3070,17 +3103,18 @@
|
|
|
3070
3103
|
};
|
|
3071
3104
|
CustomerListComponent.prototype.ngAfterViewInit = function () {
|
|
3072
3105
|
var _this = this;
|
|
3073
|
-
var _a, _b;
|
|
3074
|
-
this.maxLength =
|
|
3106
|
+
var _a, _b, _c;
|
|
3107
|
+
this.maxLength =
|
|
3108
|
+
(_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.extendedFlags) === null || _b === void 0 ? void 0 : _b.searchFilterThreshold) !== null && _c !== void 0 ? _c : this.maxLength;
|
|
3075
3109
|
setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
3076
|
-
return __generator(this, function (
|
|
3077
|
-
switch (
|
|
3110
|
+
return __generator(this, function (_g) {
|
|
3111
|
+
switch (_g.label) {
|
|
3078
3112
|
case 0: return [4 /*yield*/, this.setUpMaps()];
|
|
3079
3113
|
case 1:
|
|
3080
|
-
|
|
3114
|
+
_g.sent();
|
|
3081
3115
|
return [4 /*yield*/, this.setCustomersList()];
|
|
3082
3116
|
case 2:
|
|
3083
|
-
|
|
3117
|
+
_g.sent();
|
|
3084
3118
|
return [2 /*return*/];
|
|
3085
3119
|
}
|
|
3086
3120
|
});
|
|
@@ -3088,11 +3122,11 @@
|
|
|
3088
3122
|
};
|
|
3089
3123
|
CustomerListComponent.prototype.ngOnChanges = function () {
|
|
3090
3124
|
return __awaiter(this, void 0, void 0, function () {
|
|
3091
|
-
return __generator(this, function (
|
|
3092
|
-
switch (
|
|
3125
|
+
return __generator(this, function (_g) {
|
|
3126
|
+
switch (_g.label) {
|
|
3093
3127
|
case 0: return [4 /*yield*/, this.setCustomersList()];
|
|
3094
3128
|
case 1:
|
|
3095
|
-
|
|
3129
|
+
_g.sent();
|
|
3096
3130
|
return [2 /*return*/];
|
|
3097
3131
|
}
|
|
3098
3132
|
});
|
|
@@ -3102,28 +3136,28 @@
|
|
|
3102
3136
|
this.nextStep.emit(e);
|
|
3103
3137
|
};
|
|
3104
3138
|
CustomerListComponent.prototype.plotMarkers = function (customers) {
|
|
3105
|
-
var _a, _b;
|
|
3139
|
+
var _a, _b, _c, _d;
|
|
3106
3140
|
return __awaiter(this, void 0, void 0, function () {
|
|
3107
3141
|
var _this = this;
|
|
3108
|
-
return __generator(this, function (
|
|
3109
|
-
switch (
|
|
3142
|
+
return __generator(this, function (_g) {
|
|
3143
|
+
switch (_g.label) {
|
|
3110
3144
|
case 0:
|
|
3111
|
-
if (!((_a = this.config
|
|
3145
|
+
if (!((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.utilityFlags) === null || _b === void 0 ? void 0 : _b.isPlotCompletedTaskMarkers)) {
|
|
3112
3146
|
customers = customers.filter(function (customer) {
|
|
3113
3147
|
return _this.agentService.canPlotMarkers(customer.session_status);
|
|
3114
3148
|
});
|
|
3115
3149
|
}
|
|
3116
|
-
if (!(((
|
|
3150
|
+
if (!(((_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.maps) === null || _d === void 0 ? void 0 : _d.mapType) === "open-street")) return [3 /*break*/, 2];
|
|
3117
3151
|
return [4 /*yield*/, this.openStreetMapsService.plotDirectionsForAllTasks(customers)];
|
|
3118
3152
|
case 1:
|
|
3119
3153
|
customers =
|
|
3120
|
-
|
|
3154
|
+
_g.sent();
|
|
3121
3155
|
return [3 /*break*/, 4];
|
|
3122
3156
|
case 2: return [4 /*yield*/, this.googleMapsService.plotDirectionsForAllTasks(customers)];
|
|
3123
3157
|
case 3:
|
|
3124
3158
|
customers =
|
|
3125
|
-
|
|
3126
|
-
|
|
3159
|
+
_g.sent();
|
|
3160
|
+
_g.label = 4;
|
|
3127
3161
|
case 4: return [2 /*return*/, customers];
|
|
3128
3162
|
}
|
|
3129
3163
|
});
|
|
@@ -3172,7 +3206,7 @@
|
|
|
3172
3206
|
return CustomerListComponent;
|
|
3173
3207
|
}());
|
|
3174
3208
|
/** @nocollapse */ CustomerListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, deps: [{ token: GoogleMapsService }, { token: OpenStreetMapsService }, { token: AgentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3175
|
-
/** @nocollapse */ CustomerListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div\n class=\"customer-list-filter\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"task-list-search-icons\">\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconSearchLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('search-text')\"\n ></kwikui-button>\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconCalendarLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('search-date')\"\n ></kwikui-button>\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconFilterLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('sort-filter')\"\n ></kwikui-button>\n </div>\n\n <div\n class=\"task-list-search-action\"\n *ngIf=\"activeSearchAction\"\n >\n <kwikui-input-date-range\n *ngIf=\"activeSearchAction == 'search-date'\"\n class=\"task-list-date-box\"\n label=\"Search by Date Range\"\n id=\"dateRange\"\n size=\"m\"\n [max]=\"max\"\n [maxLength]=\"maxLength\"\n formControlName=\"search-date\"\n [formControl]=\"searchDateFormControl\"\n (getKeyValue)=\"handleOnChangeDateRange($event)\"\n ></kwikui-input-date-range>\n\n <kwikui-input\n *ngIf=\"activeSearchAction == 'search-text'\"\n label=\"Search\"\n id=\"search\"\n icon=\"tuiIconSearch\"\n placeholder=\"Search any task from here\"\n size=\"m\"\n [formControl]=\"searchTextFormControl\"\n formControlName=\"search-text\"\n (getKeyValue)=\"handleOnChangeSearchText($event)\"\n ></kwikui-input>\n\n <div\n *ngIf=\"activeSearchAction == 'sort-filter'\"\n class=\"task-list-sort-action\"\n >\n <kwikui-button\n appearance=\"outline\"\n [icon]=\"\n sortInAscendingOrder\n ? 'tuiIconChevronsUpLarge'\n : 'tuiIconChevronsDownLarge'\n \"\n size=\"m\"\n type=\"button\"\n (onClick)=\"handleOnClickChangeSortOrder()\"\n ></kwikui-button>\n <kwikui-input-select\n class=\"task-list-sort-key\"\n formControlName=\"sort-filter\"\n label=\"Sort By Key\"\n size=\"m\"\n [formControl]=\"sortFilterKeyFormControl\"\n [options]=\"sortFilterOptions\"\n [searchable]=\"false\"\n (getKeyValue)=\"handleOnChangeSortFilter($event)\"\n ></kwikui-input-select>\n </div>\n </div>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport\n itemSize=\"1\"\n class=\"customer-task-list-scroll\"\n >\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 [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div\n class=\"customer-list-empty\"\n *ngIf=\"filteredData.length === 0\"\n >\n
|
|
3209
|
+
/** @nocollapse */ CustomerListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div\n class=\"customer-list-filter\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"task-list-search-icons\">\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconSearchLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('search-text')\"\n ></kwikui-button>\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconCalendarLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('search-date')\"\n ></kwikui-button>\n <kwikui-button\n appearance=\"mono\"\n icon=\"tuiIconFilterLarge\"\n size=\"s\"\n type=\"button\"\n (onClick)=\"handleOnClickSearchType('sort-filter')\"\n ></kwikui-button>\n </div>\n\n <div\n class=\"task-list-search-action\"\n *ngIf=\"activeSearchAction\"\n >\n <kwikui-input-date-range\n *ngIf=\"activeSearchAction == 'search-date'\"\n class=\"task-list-date-box\"\n label=\"Search by Date Range\"\n id=\"dateRange\"\n size=\"m\"\n [max]=\"max\"\n [maxLength]=\"maxLength\"\n formControlName=\"search-date\"\n [formControl]=\"searchDateFormControl\"\n (getKeyValue)=\"handleOnChangeDateRange($event)\"\n ></kwikui-input-date-range>\n\n <kwikui-input\n *ngIf=\"activeSearchAction == 'search-text'\"\n label=\"Search\"\n id=\"search\"\n icon=\"tuiIconSearch\"\n placeholder=\"Search any task from here\"\n size=\"m\"\n [formControl]=\"searchTextFormControl\"\n formControlName=\"search-text\"\n (getKeyValue)=\"handleOnChangeSearchText($event)\"\n ></kwikui-input>\n\n <div\n *ngIf=\"activeSearchAction == 'sort-filter'\"\n class=\"task-list-sort-action\"\n >\n <kwikui-button\n appearance=\"outline\"\n [icon]=\"\n sortInAscendingOrder\n ? 'tuiIconChevronsUpLarge'\n : 'tuiIconChevronsDownLarge'\n \"\n size=\"m\"\n type=\"button\"\n (onClick)=\"handleOnClickChangeSortOrder()\"\n ></kwikui-button>\n <kwikui-input-select\n class=\"task-list-sort-key\"\n formControlName=\"sort-filter\"\n label=\"Sort By Key\"\n size=\"m\"\n [formControl]=\"sortFilterKeyFormControl\"\n [options]=\"sortFilterOptions\"\n [searchable]=\"false\"\n (getKeyValue)=\"handleOnChangeSortFilter($event)\"\n ></kwikui-input-select>\n </div>\n </div>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport\n itemSize=\"1\"\n class=\"customer-task-list-scroll\"\n >\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 [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div\n class=\"customer-list-empty\"\n *ngIf=\"filteredData.length === 0\"\n >\n No 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-filter .task-list-search-icons{display:flex;justify-content:flex-end;align-items:center;flex-direction:row;grid-gap:.5rem;gap:.5rem}.customer-list-filter .task-list-search-action{margin-top:.5rem}.customer-list-filter .task-list-search-action .task-list-sort-action{display:flex;flex-direction:row;grid-gap:.5rem;gap:.5rem}.customer-list-filter .task-list-search-action .task-list-sort-action .task-list-sort-key{flex:1}.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: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputDateRangeComponent, selector: "kwikui-input-date-range", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxLength", "min", "minLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i5__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "config"], outputs: ["onClickPerformAction", "nextStep", "removeTask"] }], directives: [{ type: i2__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i5__namespace.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], pipes: { "filter": Ng2SearchPipe$1 } });
|
|
3176
3210
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, decorators: [{
|
|
3177
3211
|
type: i0.Component,
|
|
3178
3212
|
args: [{
|
|
@@ -3201,7 +3235,9 @@
|
|
|
3201
3235
|
this.httpClient = httpClient;
|
|
3202
3236
|
this.hostElement = hostElement;
|
|
3203
3237
|
this.dialogService = dialogService;
|
|
3238
|
+
this.agentInfo = {};
|
|
3204
3239
|
this.config = {};
|
|
3240
|
+
this.userConfig = {};
|
|
3205
3241
|
this.taskList = [];
|
|
3206
3242
|
this.nextStep = new i0.EventEmitter();
|
|
3207
3243
|
this.addTask = new i0.EventEmitter();
|
|
@@ -3209,7 +3245,6 @@
|
|
|
3209
3245
|
this.filterTaskList = new i0.EventEmitter();
|
|
3210
3246
|
this.onClickPerformAction = new i0.EventEmitter();
|
|
3211
3247
|
this.loading = true;
|
|
3212
|
-
this.console = console;
|
|
3213
3248
|
this.open = false;
|
|
3214
3249
|
this.allFormsData = {};
|
|
3215
3250
|
this.String = String;
|
|
@@ -3225,17 +3260,15 @@
|
|
|
3225
3260
|
}
|
|
3226
3261
|
};
|
|
3227
3262
|
KwikIDAgentDashboardComponentV1.prototype.ngOnInit = function () {
|
|
3228
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
3263
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3229
3264
|
return __awaiter(this, void 0, void 0, function () {
|
|
3230
3265
|
var _this = this;
|
|
3231
|
-
return __generator(this, function (
|
|
3266
|
+
return __generator(this, function (_k) {
|
|
3232
3267
|
this.agentService.config = this.config;
|
|
3233
|
-
this.agentService.showMapview = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.
|
|
3234
|
-
this.
|
|
3235
|
-
(
|
|
3236
|
-
|
|
3237
|
-
kwikidToolkit.isNotEmptyValue((_k = (_j = this.config) === null || _j === void 0 ? void 0 : _j.dashboard) === null || _k === void 0 ? void 0 : _k.googleMapsAPIKey)) {
|
|
3238
|
-
this.loadMaps((_m = (_l = this.config) === null || _l === void 0 ? void 0 : _l.dashboard) === null || _m === void 0 ? void 0 : _m.googleMapsAPIKey).subscribe(function (loaded) {
|
|
3268
|
+
this.agentService.showMapview = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.isShowMaps) !== null && _c !== void 0 ? _c : false;
|
|
3269
|
+
if (((_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.maps) === null || _e === void 0 ? void 0 : _e.mapType) === "google-maps" &&
|
|
3270
|
+
kwikidToolkit.isNotEmptyValue((_g = (_f = this.config) === null || _f === void 0 ? void 0 : _f.maps) === null || _g === void 0 ? void 0 : _g.apiKey)) {
|
|
3271
|
+
this.loadMaps((_j = (_h = this.config) === null || _h === void 0 ? void 0 : _h.maps) === null || _j === void 0 ? void 0 : _j.apiKey).subscribe(function (loaded) {
|
|
3239
3272
|
_this.mapsLoaded = loaded;
|
|
3240
3273
|
if (loaded) {
|
|
3241
3274
|
console.log("Google Maps JavaScript API loaded successfully.");
|
|
@@ -3321,7 +3354,7 @@
|
|
|
3321
3354
|
return KwikIDAgentDashboardComponentV1;
|
|
3322
3355
|
}());
|
|
3323
3356
|
/** @nocollapse */ KwikIDAgentDashboardComponentV1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponentV1, deps: [{ token: GoogleMapsService }, { token: AgentService }, { token: i3__namespace$2.HttpClient }, { token: i0__namespace.ElementRef }, { token: i3.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3324
|
-
/** @nocollapse */ KwikIDAgentDashboardComponentV1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponentV1, selector: "kwikid-agent-dashboard-v1", inputs: { config: "config", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList", onClickPerformAction: "onClickPerformAction" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: i2$2.MapInfoWindow, descendants: true }, { propertyName: "mapElement", first: true, predicate: ["map"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div\n class=\"kwikid-agent-dashboard\"\n *ngIf=\"!loading\"\n>\n <div class=\"wrapper\">\n <header>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button\n [icon]=\"'tuiIconMenuLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"m\"\n [tuiDropdown]=\"dropdownContent\"\n [tuiDropdownManual]=\"open\"\n (tuiObscured)=\"onObscured($event)\"\n ></kwikui-button>\n <ng-template #dropdownContent>\n <div class=\"menu-dropdown\">\n <div class=\"menu-dropdown-header\">\n <!-- <img\n *ngIf=\"\n agentService.config?.clientLogo &&\n agentService.config?.dashboard?.isShowClientLogo\n \"\n [src]=\"agentService.config.clientLogo\"\n class=\"client-logo\"\n />\n <div\n *ngIf=\"\n !agentService.config.clientLogo ||\n !agentService.config?.dashboard?.isShowClientLogo\n \"\n class=\"client-name\"\n >\n <kwikui-button\n [icon]=\"'tuiIconLink'\"\n appearance=\"mono\"\n size=\"m\"\n ></kwikui-button>\n\n {{ agentService.config.clientName }}\n </div> -->\n <div class=\"menu-dropdown-header-agent-name\">\n {{ agentService.config.agentName }}\n </div>\n <div class=\"menu-dropdown-header-agent-id\">\n Agent ID: {{ agentService.config.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=\"agentService.config?.dashboard?.isAllowAddTask\"\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"Refresh\"\n [icon]=\"'tuiIconRefreshCw'\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"this.config.dashboard.isShowMaps\"\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"{{\n agentService.showMapview ? 'Hide Maps' : 'Show Maps'\n }}\"\n type=\"button\"\n icon=\"{{\n agentService.showMapview ? 'tuiIconEyeOff' : 'tuiIconEye'\n }}\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"padding: 0rem !important\"\n (onClick)=\"agentService.toggleMapview()\"\n ></kwikui-button>\n </div>\n <hr />\n <div class=\"menu-dropdown-footer\">\n <kwikui-button\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"Logout\"\n icon=\"tuiIconLogOut\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"handleOnClickLogout()\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\n <div class=\"actions\">\n <kwikui-button\n *ngIf=\"agentService.config?.dashboard?.isAllowAddTask\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"primary\"\n [label]=\"\n agentService.config?.dashboard?.addTaskButtonLabel ?? 'Add User'\n \"\n icon=\"tuiIconPlus\"\n shape=\"rounded\"\n size=\"s\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button>\n </div>\n </header>\n\n <div class=\"dashboard-body\">\n <div\n *ngIf=\"mapsLoaded\"\n [class]=\"agentService.showMapview ? 'map' : 'map-hidden'\"\n >\n <google-map\n *ngIf=\"agentService.config?.dashboard?.mapType == 'google-maps'\"\n [options]=\"this.googleMapsService.map\"\n height=\"100%\"\n width=\"100%\"\n >\n <map-marker\n #marker=\"mapMarker\"\n *ngFor=\"\n let markerPosition of this.googleMapsService.allMarkers;\n let index = index\n \"\n [position]=\"markerPosition\"\n [label]=\"{ text: String(index) }\"\n ></map-marker>\n <map-directions-renderer\n *ngIf=\"\n this.googleMapsService.directionsResults$\n | async as directionsResults\n \"\n [directions]=\"directionsResults\"\n [options]=\"this.googleMapsService.directionsRenderOption\"\n ></map-directions-renderer>\n </google-map>\n\n <div\n *ngIf=\"agentService.config?.dashboard?.mapType == 'open-street'\"\n id=\"map\"\n style=\"height: 100%\"\n ></div>\n </div>\n\n <div\n class=\"task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.currentTaskDetails != undefined &&\n !agentService.showMapview\n \"\n >\n <customer-details\n [customer]=\"agentService.currentTaskDetails\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-details>\n </div>\n\n <div\n class=\"no-task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.currentTaskDetails == undefined &&\n !agentService.showMapview\n \"\n >\n <img\n src=\"assets/No-Results.jpg\"\n class=\"no-task-img\"\n alt=\"No Task\"\n />\n <div class=\"\">Select a Task to view it's details.</div>\n </div>\n\n <div class=\"customer-list\">\n <customer-list\n [customers]=\"taskList\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-list>\n </div>\n </div>\n </div>\n</div>\n\n<div\n class=\"kwikid-agent-dashboard-loader\"\n *ngIf=\"loading\"\n>\n <span class=\"loader\"></span>\n</div>\n\n<ng-template\n #template\n let-observer\n>\n <div class=\"add-task-header\">\n <h2>{{ agentService?.addTaskForm?.title ?? \"Create User\" }}</h2>\n <kwikui-button\n icon=\"tuiIconX\"\n id=\"\"\n styles=\"\"\n type=\"button\"\n appearance=\"mono\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"observer.complete()\"\n ></kwikui-button>\n </div>\n <kwikid-form-view\n [allFormsData]=\"allFormsData\"\n [formConfig]=\"agentService.addTaskForm\"\n [isMobileView]=\"true\"\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 header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:80px;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper header .actions{display:flex;flex-direction:row;align-items:center}.kwikid-agent-dashboard .wrapper header .actions>*{margin-right:.5rem}.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%;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 header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.75rem;max-height:80px;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper 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;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;border:1px solid #cdcdcd;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;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper .dashboard-body .no-task-details{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;grid-gap:.5rem;gap:.5rem;overflow:hidden;color:#555}.kwikid-agent-dashboard .wrapper .dashboard-body .no-task-details .no-task-img{height:100px;width:100px}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{min-width:300px;max-width:320px;width:100%;height:100%;overflow:hidden;border:1px solid #cdcdcd}}.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;margin:0 auto;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;margin:0 auto;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}.client-logo{height:40px;width:-moz-fit-content;width:fit-content;margin:0 auto;padding-left:1rem}.client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;margin:0 auto;font-weight:600}\n"], components: [{ type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i2__namespace$2.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", "config"], outputs: ["nextStep", "removeTask", "onClickPerformAction"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "config"], outputs: ["nextStep", "removeTask", "filterTaskList", "onClickPerformAction"] }, { type: i3__namespace$1.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "extraData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig", "stepConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickViewFile", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i3__namespace.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i3__namespace.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i3__namespace.TuiDropdownPositionDirective, selector: "[tuiDropdown]" }, { type: i3__namespace.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i3__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$2.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: i2__namespace$2.MapDirectionsRenderer, selector: "map-directions-renderer", inputs: ["directions", "options"], outputs: ["directionsChanged"], exportAs: ["mapDirectionsRenderer"] }], pipes: { "async": i7__namespace.AsyncPipe } });
|
|
3357
|
+
/** @nocollapse */ KwikIDAgentDashboardComponentV1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponentV1, selector: "kwikid-agent-dashboard-v1", inputs: { agentInfo: "agentInfo", config: "config", userConfig: "userConfig", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList", onClickPerformAction: "onClickPerformAction" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: i2$2.MapInfoWindow, descendants: true }, { propertyName: "mapElement", first: true, predicate: ["map"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div\n class=\"kwikid-agent-dashboard\"\n *ngIf=\"!loading\"\n>\n <div class=\"wrapper\">\n <header>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button\n [icon]=\"'tuiIconMenuLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"m\"\n [tuiDropdown]=\"dropdownContent\"\n [tuiDropdownManual]=\"open\"\n (tuiObscured)=\"onObscured($event)\"\n ></kwikui-button>\n <img\n *ngIf=\"\n userConfig?.theme?.clientLogo &&\n config?.utilityFlags?.isShowClientLogo &&\n !config?.utilityFlags?.isAllowAddTask\n \"\n [src]=\"userConfig?.theme.clientLogo\"\n class=\"client-logo\"\n />\n <ng-template #dropdownContent>\n <div class=\"menu-dropdown\">\n <div class=\"menu-dropdown-header\">\n <div class=\"menu-dropdown-header-agent-name\">\n {{ agentInfo.agent_name ?? userConfig?.theme?.clientName }}\n </div>\n <div class=\"menu-dropdown-header-agent-id\">\n Agent ID: {{ agentInfo.agent_id }}\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 appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"Refresh\"\n [icon]=\"'tuiIconRefreshCw'\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"this.config?.maps?.isShowMaps\"\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"{{\n agentService.showMapview ? 'Hide Maps' : 'Show Maps'\n }}\"\n type=\"button\"\n icon=\"{{\n agentService.showMapview ? 'tuiIconEyeOff' : 'tuiIconEye'\n }}\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"padding: 0rem !important\"\n (onClick)=\"agentService.toggleMapview()\"\n ></kwikui-button>\n </div>\n <hr />\n <div class=\"menu-dropdown-footer\">\n <kwikui-button\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n label=\"Logout\"\n icon=\"tuiIconLogOut\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"handleOnClickLogout()\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\n <div class=\"actions\">\n <kwikui-button\n *ngIf=\"config?.utilityFlags?.isAllowAddTask\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"primary\"\n [label]=\"config?.formsConfig?.addTaskForm?.title ?? 'Add User'\"\n icon=\"tuiIconPlus\"\n shape=\"rounded\"\n size=\"s\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button>\n </div>\n </header>\n\n <div class=\"dashboard-body\">\n <div\n *ngIf=\"mapsLoaded\"\n [class]=\"agentService.showMapview ? 'map' : 'map-hidden'\"\n >\n <google-map\n *ngIf=\"config?.maps?.mapType == 'google-maps'\"\n [options]=\"this.googleMapsService.map\"\n height=\"100%\"\n width=\"100%\"\n >\n <map-marker\n #marker=\"mapMarker\"\n *ngFor=\"\n let markerPosition of this.googleMapsService.allMarkers;\n let index = index\n \"\n [position]=\"markerPosition\"\n [label]=\"{ text: String(index) }\"\n ></map-marker>\n <map-directions-renderer\n *ngIf=\"\n this.googleMapsService.directionsResults$\n | async as directionsResults\n \"\n [directions]=\"directionsResults\"\n [options]=\"this.googleMapsService.directionsRenderOption\"\n ></map-directions-renderer>\n </google-map>\n\n <div\n *ngIf=\"config?.maps?.mapType == 'open-street'\"\n id=\"map\"\n style=\"height: 100%\"\n ></div>\n </div>\n\n <div\n class=\"task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.currentTaskDetails != undefined &&\n !agentService.showMapview\n \"\n >\n <customer-details\n [customer]=\"agentService.currentTaskDetails\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-details>\n </div>\n\n <div\n class=\"no-task-details\"\n *ngIf=\"\n agentService.currentTaskDetails == undefined &&\n !agentService.isMobileView &&\n !agentService.showMapview\n \"\n >\n <img\n src=\"assets/No-Results.jpg\"\n class=\"no-task-img\"\n alt=\"No Task\"\n />\n <div>Select a Task to view it's details.</div>\n </div>\n\n <div class=\"customer-list\">\n <customer-list\n [customers]=\"taskList\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></customer-list>\n </div>\n </div>\n </div>\n</div>\n\n<div\n class=\"kwikid-agent-dashboard-loader\"\n *ngIf=\"loading\"\n>\n <span class=\"loader\"></span>\n</div>\n\n<ng-template\n #template\n let-observer\n>\n <div class=\"add-task-header\">\n <h2>{{ config?.formsConfig?.addTaskForm?.title ?? \"Create User\" }}</h2>\n <kwikui-button\n icon=\"tuiIconX\"\n id=\"\"\n styles=\"\"\n type=\"button\"\n appearance=\"mono\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"observer.complete()\"\n ></kwikui-button>\n </div>\n <kwikid-form-view\n [allFormsData]=\"allFormsData\"\n [formConfig]=\"config?.formsConfig?.addTaskForm\"\n [isMobileView]=\"true\"\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 header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:80px;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper header .actions{display:flex;flex-direction:row;align-items:center}.kwikid-agent-dashboard .wrapper header .actions>*{margin-right:.5rem}.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%;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 header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.75rem;max-height:80px;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper 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;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;border:1px solid #cdcdcd;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;border:1px solid #cdcdcd}.kwikid-agent-dashboard .wrapper .dashboard-body .no-task-details{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;grid-gap:.5rem;gap:.5rem;overflow:hidden;color:#555}.kwikid-agent-dashboard .wrapper .dashboard-body .no-task-details .no-task-img{height:100px;width:100px}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{min-width:300px;max-width:320px;width:100%;height:100%;overflow:hidden;border:1px solid #cdcdcd}}.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;margin:0 auto;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;margin:0 auto;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}.client-logo{height:40px;width:-moz-fit-content;width:fit-content;margin:0 auto;padding-left:1rem}.client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;margin:0 auto;font-weight:600}\n"], components: [{ type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i2__namespace$2.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", "config"], outputs: ["nextStep", "removeTask", "onClickPerformAction"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "config"], outputs: ["nextStep", "removeTask", "filterTaskList", "onClickPerformAction"] }, { type: i3__namespace$1.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "extraData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig", "stepConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickViewFile", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i3__namespace.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i3__namespace.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i3__namespace.TuiDropdownPositionDirective, selector: "[tuiDropdown]" }, { type: i3__namespace.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i3__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$2.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: i2__namespace$2.MapDirectionsRenderer, selector: "map-directions-renderer", inputs: ["directions", "options"], outputs: ["directionsChanged"], exportAs: ["mapDirectionsRenderer"] }], pipes: { "async": i7__namespace.AsyncPipe } });
|
|
3325
3358
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponentV1, decorators: [{
|
|
3326
3359
|
type: i0.Component,
|
|
3327
3360
|
args: [{
|
|
@@ -3337,8 +3370,12 @@
|
|
|
3337
3370
|
}, propDecorators: { windowResizeWatcher: [{
|
|
3338
3371
|
type: i0.HostListener,
|
|
3339
3372
|
args: ["window:resize", ["$event"]]
|
|
3373
|
+
}], agentInfo: [{
|
|
3374
|
+
type: i0.Input
|
|
3340
3375
|
}], config: [{
|
|
3341
3376
|
type: i0.Input
|
|
3377
|
+
}], userConfig: [{
|
|
3378
|
+
type: i0.Input
|
|
3342
3379
|
}], taskList: [{
|
|
3343
3380
|
type: i0.Input
|
|
3344
3381
|
}], nextStep: [{
|
|
@@ -3406,7 +3443,7 @@
|
|
|
3406
3443
|
return KwikIDAgentDashboardComponent;
|
|
3407
3444
|
}());
|
|
3408
3445
|
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3409
|
-
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { agentInfo: "agentInfo", config: "config", userConfig: "userConfig", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList", onGetTaskList: "onGetTaskList", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div *ngIf=\"config?.version === 2\">\n <kwikid-agent-dashboard-v2\n [agentInfo]=\"agentInfo\"\n [config]=\"config\"\n [taskList]=\"taskList\"\n [userConfig]=\"userConfig\"\n (onGetTaskList)=\"handleOnGetTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-agent-dashboard-v2>\n</div>\n\n<div *ngIf=\"config?.version !== 2\">\n <kwikid-agent-dashboard-v1\n [config]=\"config\"\n [taskList]=\"taskList\"\n (nextStep)=\"handleOnClickNext($event)\"\n (addTask)=\"handleOnClickAddTask($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-agent-dashboard-v1>\n</div>\n", styles: ["div{height:100%}\n"], components: [{ type: KwikIDAgentDashboardComponentV2, selector: "kwikid-agent-dashboard-v2", inputs: ["config", "userConfig", "agentInfo", "taskList"], outputs: ["onGetTaskList", "onClickPerformAction"] }, { type: KwikIDAgentDashboardComponentV1, selector: "kwikid-agent-dashboard-v1", inputs: ["config", "taskList"], outputs: ["nextStep", "addTask", "removeTask", "filterTaskList", "onClickPerformAction"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3446
|
+
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { agentInfo: "agentInfo", config: "config", userConfig: "userConfig", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList", onGetTaskList: "onGetTaskList", onClickPerformAction: "onClickPerformAction" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div *ngIf=\"config?.version === 2\">\n <kwikid-agent-dashboard-v2\n [agentInfo]=\"agentInfo\"\n [config]=\"config\"\n [taskList]=\"taskList\"\n [userConfig]=\"userConfig\"\n (onGetTaskList)=\"handleOnGetTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-agent-dashboard-v2>\n</div>\n\n<div *ngIf=\"config?.version !== 2\">\n <kwikid-agent-dashboard-v1\n [agentInfo]=\"agentInfo\"\n [config]=\"config\"\n [taskList]=\"taskList\"\n [userConfig]=\"userConfig\"\n (nextStep)=\"handleOnClickNext($event)\"\n (addTask)=\"handleOnClickAddTask($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n (filterTaskList)=\"handleOnFilterTaskList($event)\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-agent-dashboard-v1>\n</div>\n", styles: ["div{height:100%}\n"], components: [{ type: KwikIDAgentDashboardComponentV2, selector: "kwikid-agent-dashboard-v2", inputs: ["config", "userConfig", "agentInfo", "taskList"], outputs: ["onGetTaskList", "onClickPerformAction"] }, { type: KwikIDAgentDashboardComponentV1, selector: "kwikid-agent-dashboard-v1", inputs: ["agentInfo", "config", "userConfig", "taskList"], outputs: ["nextStep", "addTask", "removeTask", "filterTaskList", "onClickPerformAction"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3410
3447
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, decorators: [{
|
|
3411
3448
|
type: i0.Component,
|
|
3412
3449
|
args: [{
|