kwikid-agent-dashboard 0.0.28 → 0.0.30
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 +709 -312
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -1
- package/esm2015/lib/components/customer-details/customer-details.component.js +19 -11
- package/esm2015/lib/components/customer-list/customer-list.component.js +34 -19
- package/esm2015/lib/components/customer-tile/customer-tile.component.js +34 -17
- package/esm2015/lib/helpers/maps.helpers.js +46 -0
- package/esm2015/lib/kwikid-agent-dashboard.component.js +48 -23
- package/esm2015/lib/services/google-maps.service.js +209 -0
- package/esm2015/lib/services/open-street-maps.service.js +250 -0
- package/fesm2015/kwikid-agent-dashboard.js +491 -191
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/lib/components/customer-details/customer-details.component.d.ts +5 -3
- package/lib/components/customer-list/customer-list.component.d.ts +5 -3
- package/lib/components/customer-tile/customer-tile.component.d.ts +7 -4
- package/lib/helpers/maps.helpers.d.ts +3 -0
- package/lib/kwikid-agent-dashboard.component.d.ts +6 -4
- package/lib/services/google-maps.service.d.ts +31 -0
- package/lib/services/{map.service.d.ts → open-street-maps.service.d.ts} +13 -16
- package/package.json +1 -1
- package/esm2015/lib/services/map.service.js +0 -254
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/google-maps'), require('@taiga-ui/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('kwikid-agent-dashboard', ['exports', '@angular/core', '@angular/google-maps', '@taiga-ui/core', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-agent-dashboard"] = {}, global.ng.core, global.ng.googleMaps, global["@taiga-ui/core"], global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/google-maps'), require('@taiga-ui/core'), require('kwikid-toolkit'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('kwikui'), require('leaflet'), require('leaflet-routing-machine'), require('@angular/common'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@angular/cdk/scrolling'), require('kwikid-forms'), require('@taiga-ui/addon-mobile')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('kwikid-agent-dashboard', ['exports', '@angular/core', '@angular/google-maps', '@taiga-ui/core', 'kwikid-toolkit', 'rxjs', 'rxjs/operators', '@angular/common/http', 'kwikui', 'leaflet', 'leaflet-routing-machine', '@angular/common', '@angular/forms', '@taiga-ui/cdk', '@angular/cdk/scrolling', 'kwikid-forms', '@taiga-ui/addon-mobile'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-agent-dashboard"] = {}, global.ng.core, global.ng.googleMaps, global["@taiga-ui/core"], global.kwikidToolkit, global.rxjs, global.rxjs.operators, global.ng.common.http, global.i4, global.L, null, global.ng.common, global.ng.forms, global["@taiga-ui/cdk"], global.ng.cdk.scrolling, global.i8, global["@taiga-ui/addon-mobile"]));
|
|
5
|
+
})(this, (function (exports, i0, i2, i11, kwikidToolkit, rxjs, operators, i3, i4, L, leafletRoutingMachine, i6, i7, i10, i5, i8, addonMobile) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,15 +23,16 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
26
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
|
+
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
29
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
30
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
31
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
32
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
33
29
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
|
+
var L__namespace = /*#__PURE__*/_interopNamespace(L);
|
|
31
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
34
32
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
33
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
34
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
35
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
35
36
|
|
|
36
37
|
/******************************************************************************
|
|
37
38
|
Copyright (c) Microsoft Corporation.
|
|
@@ -497,6 +498,62 @@
|
|
|
497
498
|
__disposeResources: __disposeResources,
|
|
498
499
|
};
|
|
499
500
|
|
|
501
|
+
// To Calculate Distance between two markers
|
|
502
|
+
var calculateDistance = function (point1, point2) {
|
|
503
|
+
var lat1 = point1.lat;
|
|
504
|
+
var lng1 = point1.lng;
|
|
505
|
+
var lat2 = point2.lat;
|
|
506
|
+
var lng2 = point2.lng;
|
|
507
|
+
var R = 6371; // Earth radius in kilometers
|
|
508
|
+
var dLat = (lat2 - lat1) * (Math.PI / 180);
|
|
509
|
+
var dLng = (lng2 - lng1) * (Math.PI / 180);
|
|
510
|
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
511
|
+
Math.cos((lat1 * Math.PI) / 180) *
|
|
512
|
+
Math.cos((lat2 * Math.PI) / 180) *
|
|
513
|
+
Math.sin(dLng / 2) *
|
|
514
|
+
Math.sin(dLng / 2);
|
|
515
|
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
516
|
+
var distance = R * c;
|
|
517
|
+
return distance;
|
|
518
|
+
};
|
|
519
|
+
// To calculate nearest distance from marker
|
|
520
|
+
var nearestNeighborAlgorithm = function (startingPoint, unvisitedPoints) {
|
|
521
|
+
var e_1, _a;
|
|
522
|
+
var currentPoint = startingPoint;
|
|
523
|
+
var path = [currentPoint];
|
|
524
|
+
var visitedPoints = new Set([currentPoint]);
|
|
525
|
+
while (unvisitedPoints.length > 0) {
|
|
526
|
+
var nearestPoint = null;
|
|
527
|
+
var minDistance = Number.POSITIVE_INFINITY;
|
|
528
|
+
try {
|
|
529
|
+
for (var unvisitedPoints_1 = (e_1 = void 0, __values(unvisitedPoints)), unvisitedPoints_1_1 = unvisitedPoints_1.next(); !unvisitedPoints_1_1.done; unvisitedPoints_1_1 = unvisitedPoints_1.next()) {
|
|
530
|
+
var point = unvisitedPoints_1_1.value;
|
|
531
|
+
var distance = calculateDistance(currentPoint, point);
|
|
532
|
+
if (distance < minDistance) {
|
|
533
|
+
minDistance = distance;
|
|
534
|
+
nearestPoint = point;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
539
|
+
finally {
|
|
540
|
+
try {
|
|
541
|
+
if (unvisitedPoints_1_1 && !unvisitedPoints_1_1.done && (_a = unvisitedPoints_1.return)) _a.call(unvisitedPoints_1);
|
|
542
|
+
}
|
|
543
|
+
finally { if (e_1) throw e_1.error; }
|
|
544
|
+
}
|
|
545
|
+
path.push(nearestPoint);
|
|
546
|
+
visitedPoints.add(nearestPoint);
|
|
547
|
+
currentPoint = nearestPoint;
|
|
548
|
+
unvisitedPoints = unvisitedPoints.filter(function (point) { return !visitedPoints.has(point); });
|
|
549
|
+
}
|
|
550
|
+
return path;
|
|
551
|
+
};
|
|
552
|
+
var addressConcator = function (data, config) {
|
|
553
|
+
var address = config.reduce(function (accumulator, currentValue) { return accumulator + '' + kwikidToolkit.getObjectValueFromPath(data, currentValue); }, '');
|
|
554
|
+
return address;
|
|
555
|
+
};
|
|
556
|
+
|
|
500
557
|
var EStatus;
|
|
501
558
|
(function (EStatus) {
|
|
502
559
|
EStatus["NOT_STARTED"] = "not_started";
|
|
@@ -684,25 +741,388 @@
|
|
|
684
741
|
}]
|
|
685
742
|
}], ctorParameters: function () { return []; } });
|
|
686
743
|
|
|
687
|
-
var
|
|
688
|
-
function
|
|
744
|
+
var GoogleMapsService = /** @class */ (function () {
|
|
745
|
+
function GoogleMapsService(agentService, mapDirectionsService, httpClient) {
|
|
746
|
+
this.agentService = agentService;
|
|
747
|
+
this.mapDirectionsService = mapDirectionsService;
|
|
748
|
+
this.httpClient = httpClient;
|
|
749
|
+
this.allMarkers = [];
|
|
750
|
+
}
|
|
751
|
+
// To get Current Position
|
|
752
|
+
GoogleMapsService.prototype.getPosition = function () {
|
|
753
|
+
return new Promise(function (resolve, reject) {
|
|
754
|
+
navigator.geolocation.watchPosition(function (resp) {
|
|
755
|
+
resolve({
|
|
756
|
+
lng: resp.coords.longitude,
|
|
757
|
+
lat: resp.coords.latitude
|
|
758
|
+
});
|
|
759
|
+
}, function (err) {
|
|
760
|
+
reject(err);
|
|
761
|
+
});
|
|
762
|
+
});
|
|
763
|
+
};
|
|
764
|
+
// Load Google Maps
|
|
765
|
+
GoogleMapsService.prototype.loadMaps = function (apiKey) {
|
|
766
|
+
var url = "https://maps.googleapis.com/maps/api/js?key=" + apiKey + "&v=3.exp&libraries=geometry,drawing,places";
|
|
767
|
+
this.apiKey = apiKey;
|
|
768
|
+
return this.httpClient.jsonp(url, 'callback').pipe(operators.map(function () { return true; }), operators.catchError(function () {
|
|
769
|
+
console.error('Error loading Google Maps JavaScript API.');
|
|
770
|
+
return rxjs.of(false);
|
|
771
|
+
}));
|
|
772
|
+
};
|
|
773
|
+
// To Initialize Google Maps
|
|
774
|
+
GoogleMapsService.prototype.initializeMap = function () {
|
|
775
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
776
|
+
var _o;
|
|
777
|
+
return __generator(this, function (_p) {
|
|
778
|
+
switch (_p.label) {
|
|
779
|
+
case 0:
|
|
780
|
+
_o = this;
|
|
781
|
+
return [4 /*yield*/, this.getPosition()];
|
|
782
|
+
case 1:
|
|
783
|
+
_o.myPosition = _p.sent();
|
|
784
|
+
this.map = {
|
|
785
|
+
zoom: 10,
|
|
786
|
+
center: this.myPosition,
|
|
787
|
+
streetViewControl: false,
|
|
788
|
+
mapTypeControl: false,
|
|
789
|
+
fullscreenControl: false,
|
|
790
|
+
zoomControl: false
|
|
791
|
+
};
|
|
792
|
+
return [2 /*return*/];
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
});
|
|
796
|
+
};
|
|
797
|
+
// To extract Location from the Task Details
|
|
798
|
+
GoogleMapsService.prototype.getLocation = function (task) {
|
|
799
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
800
|
+
var _this = this;
|
|
801
|
+
return __generator(this, function (_o) {
|
|
802
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
803
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, encodedAddres, config, address, config, address, address, url, response, data, isValidLocation, location;
|
|
804
|
+
return __generator(this, function (_o) {
|
|
805
|
+
switch (_o.label) {
|
|
806
|
+
case 0:
|
|
807
|
+
// If Fetch Address from Multiple Paths
|
|
808
|
+
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, 'dashboard.taskLocationPaths')) {
|
|
809
|
+
config = this.agentService.config.dashboard.taskLocationPaths;
|
|
810
|
+
address = addressConcator(task, config);
|
|
811
|
+
// Encode the Address in URI
|
|
812
|
+
encodedAddres = encodeURI(address);
|
|
813
|
+
}
|
|
814
|
+
// If Fetch Address from Single Path
|
|
815
|
+
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, 'dashboard.taskLocationPath')) {
|
|
816
|
+
config = this.agentService.config.dashboard.taskLocationPath;
|
|
817
|
+
address = kwikidToolkit.getObjectValueFromPath(task, config);
|
|
818
|
+
// Encode the Address in URI
|
|
819
|
+
encodedAddres = encodeURI(address);
|
|
820
|
+
}
|
|
821
|
+
// Default Address Paths Avaiable
|
|
822
|
+
else {
|
|
823
|
+
address = (_k = (_j = (_g = (_d = (_c = (_b = (_a = task === null || task === void 0 ? void 0 : task.extras) === null || _a === void 0 ? void 0 : _a.task_details) === null || _b === void 0 ? void 0 : _b.customer_details) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : (_f = (_e = task === null || task === void 0 ? void 0 : task.task_details) === null || _e === void 0 ? void 0 : _e.customer_details) === null || _f === void 0 ? void 0 : _f.address) !== null && _g !== void 0 ? _g : (_h = task === null || task === void 0 ? void 0 : task.extras) === null || _h === void 0 ? void 0 : _h.address) !== null && _j !== void 0 ? _j : task === null || task === void 0 ? void 0 : task.address) !== null && _k !== void 0 ? _k : '';
|
|
824
|
+
// Encode the Address in URI
|
|
825
|
+
encodedAddres = encodeURI(address);
|
|
826
|
+
}
|
|
827
|
+
url = "https://maps.googleapis.com/maps/api/geocode/json?key=" + this.apiKey + "&address=" + encodedAddres;
|
|
828
|
+
return [4 /*yield*/, fetch(url)];
|
|
829
|
+
case 1:
|
|
830
|
+
response = _o.sent();
|
|
831
|
+
return [4 /*yield*/, response.json()];
|
|
832
|
+
case 2:
|
|
833
|
+
data = _o.sent();
|
|
834
|
+
isValidLocation = kwikidToolkit.isNotEmptyArray(data === null || data === void 0 ? void 0 : data.results);
|
|
835
|
+
location = isValidLocation
|
|
836
|
+
? (_m = (_l = data === null || data === void 0 ? void 0 : data.results[0]) === null || _l === void 0 ? void 0 : _l.geometry) === null || _m === void 0 ? void 0 : _m.location
|
|
837
|
+
: this.myPosition;
|
|
838
|
+
// Set Location validation & Google Maps URL
|
|
839
|
+
location['isValidLocation'] = isValidLocation;
|
|
840
|
+
location['googleMapsUrl'] = "https://www.google.com/maps/place/" + (location === null || location === void 0 ? void 0 : location.lat) + "," + (location === null || location === void 0 ? void 0 : location.lng);
|
|
841
|
+
resolve(location);
|
|
842
|
+
return [2 /*return*/];
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
}); })];
|
|
846
|
+
});
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
// Get Tasks | Markers Location Co Ordinates
|
|
850
|
+
GoogleMapsService.prototype.getMarkersLocation = function (myMarker, tasks) {
|
|
851
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
852
|
+
var _this = this;
|
|
853
|
+
return __generator(this, function (_o) {
|
|
854
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
855
|
+
var markers, promises;
|
|
856
|
+
var _this = this;
|
|
857
|
+
return __generator(this, function (_o) {
|
|
858
|
+
switch (_o.label) {
|
|
859
|
+
case 0:
|
|
860
|
+
markers = [];
|
|
861
|
+
markers.push(myMarker);
|
|
862
|
+
promises = tasks.map(function (task) { return __awaiter(_this, void 0, void 0, function () {
|
|
863
|
+
var marker;
|
|
864
|
+
return __generator(this, function (_o) {
|
|
865
|
+
switch (_o.label) {
|
|
866
|
+
case 0: return [4 /*yield*/, this.getLocation(task)];
|
|
867
|
+
case 1:
|
|
868
|
+
marker = _o.sent();
|
|
869
|
+
task = Object.assign(Object.assign({}, task), marker);
|
|
870
|
+
markers.push(task);
|
|
871
|
+
return [2 /*return*/];
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}); });
|
|
875
|
+
return [4 /*yield*/, Promise.all(promises)];
|
|
876
|
+
case 1:
|
|
877
|
+
_o.sent();
|
|
878
|
+
resolve(markers);
|
|
879
|
+
return [2 /*return*/];
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}); })];
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
};
|
|
886
|
+
// Plot All Markers
|
|
887
|
+
GoogleMapsService.prototype.plotAllMarkers = function (tasks) {
|
|
888
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
889
|
+
var _this = this;
|
|
890
|
+
return __generator(this, function (_o) {
|
|
891
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
892
|
+
var path, promises;
|
|
893
|
+
var _this = this;
|
|
894
|
+
return __generator(this, function (_o) {
|
|
895
|
+
switch (_o.label) {
|
|
896
|
+
case 0:
|
|
897
|
+
path = [];
|
|
898
|
+
promises = tasks.map(function (task) {
|
|
899
|
+
path.push({
|
|
900
|
+
location: task,
|
|
901
|
+
stopover: true
|
|
902
|
+
});
|
|
903
|
+
_this.allMarkers.push(task);
|
|
904
|
+
});
|
|
905
|
+
return [4 /*yield*/, Promise.all(promises)];
|
|
906
|
+
case 1:
|
|
907
|
+
_o.sent();
|
|
908
|
+
resolve(path);
|
|
909
|
+
return [2 /*return*/];
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
}); })];
|
|
913
|
+
});
|
|
914
|
+
});
|
|
915
|
+
};
|
|
916
|
+
// To Plot Directions for All Tasks
|
|
917
|
+
GoogleMapsService.prototype.plotDirectionsForAllTasks = function (tasks) {
|
|
918
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
919
|
+
var myMarker, markers, startingPoint, unvisitedWaypoints, optimizedRoute, path, request;
|
|
920
|
+
return __generator(this, function (_o) {
|
|
921
|
+
switch (_o.label) {
|
|
922
|
+
case 0:
|
|
923
|
+
this.allMarkers = [];
|
|
924
|
+
myMarker = {
|
|
925
|
+
lat: this.myPosition.lat,
|
|
926
|
+
lng: this.myPosition.lng,
|
|
927
|
+
title: 0,
|
|
928
|
+
color: 'red'
|
|
929
|
+
};
|
|
930
|
+
return [4 /*yield*/, this.getMarkersLocation(myMarker, tasks)];
|
|
931
|
+
case 1:
|
|
932
|
+
markers = _o.sent();
|
|
933
|
+
startingPoint = markers[0];
|
|
934
|
+
unvisitedWaypoints = markers.slice(1);
|
|
935
|
+
optimizedRoute = nearestNeighborAlgorithm(startingPoint, unvisitedWaypoints);
|
|
936
|
+
// Sort All Tasks as per optimized routes
|
|
937
|
+
tasks = optimizedRoute.slice(1);
|
|
938
|
+
this.allMarkers = [myMarker];
|
|
939
|
+
return [4 /*yield*/, this.plotAllMarkers(tasks)];
|
|
940
|
+
case 2:
|
|
941
|
+
path = _o.sent();
|
|
942
|
+
request = {
|
|
943
|
+
origin: this.myPosition,
|
|
944
|
+
destination: this.myPosition,
|
|
945
|
+
waypoints: path,
|
|
946
|
+
travelMode: google.maps.TravelMode.DRIVING
|
|
947
|
+
};
|
|
948
|
+
this.directionsRenderOption = {
|
|
949
|
+
suppressMarkers: true
|
|
950
|
+
};
|
|
951
|
+
this.directionsResults$ = this.mapDirectionsService
|
|
952
|
+
.route(request)
|
|
953
|
+
.pipe(operators.map(function (response) { return response.result; }));
|
|
954
|
+
this.directionsResults$.subscribe(function (val) { });
|
|
955
|
+
this.allDirectionsResults$ = this.directionsResults$;
|
|
956
|
+
return [2 /*return*/, tasks];
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
});
|
|
960
|
+
};
|
|
961
|
+
// To Plot Directions for Selected Tasks
|
|
962
|
+
GoogleMapsService.prototype.plotDirectionsForSelectedTask = function (index) {
|
|
963
|
+
if (index != null) {
|
|
964
|
+
var taskMarker = this.allMarkers[index + 1];
|
|
965
|
+
// If Location is Available in Task Details
|
|
966
|
+
if (taskMarker.isValidLocation) {
|
|
967
|
+
var request = {
|
|
968
|
+
origin: this.myPosition,
|
|
969
|
+
destination: taskMarker,
|
|
970
|
+
optimizeWaypoints: true,
|
|
971
|
+
travelMode: google.maps.TravelMode.DRIVING
|
|
972
|
+
};
|
|
973
|
+
this.directionsResults$ = this.mapDirectionsService
|
|
974
|
+
.route(request)
|
|
975
|
+
.pipe(operators.map(function (response) { return response.result; }));
|
|
976
|
+
this.directionsResults$.subscribe();
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
alert('No Location Available');
|
|
980
|
+
this.directionsResults$ = this.allDirectionsResults$;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
else {
|
|
984
|
+
this.directionsResults$ = this.allDirectionsResults$;
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
return GoogleMapsService;
|
|
988
|
+
}());
|
|
989
|
+
/** @nocollapse */ GoogleMapsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GoogleMapsService, deps: [{ token: AgentService }, { token: i2__namespace.MapDirectionsService }, { token: i3__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
990
|
+
/** @nocollapse */ GoogleMapsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GoogleMapsService, providedIn: 'root' });
|
|
991
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GoogleMapsService, decorators: [{
|
|
992
|
+
type: i0.Injectable,
|
|
993
|
+
args: [{
|
|
994
|
+
providedIn: 'root'
|
|
995
|
+
}]
|
|
996
|
+
}], ctorParameters: function () { return [{ type: AgentService }, { type: i2__namespace.MapDirectionsService }, { type: i3__namespace.HttpClient }]; }, propDecorators: { directionsRenders: [{
|
|
997
|
+
type: i0.ViewChildren,
|
|
998
|
+
args: ['directionsRender']
|
|
999
|
+
}] } });
|
|
1000
|
+
|
|
1001
|
+
var OpenStreetMapsService = /** @class */ (function () {
|
|
1002
|
+
function OpenStreetMapsService(agentService, mapDirectionsService, httpClient) {
|
|
689
1003
|
this.agentService = agentService;
|
|
1004
|
+
this.mapDirectionsService = mapDirectionsService;
|
|
1005
|
+
this.httpClient = httpClient;
|
|
690
1006
|
this.allMarkers = [];
|
|
691
1007
|
}
|
|
692
|
-
// To
|
|
693
|
-
|
|
1008
|
+
// To get Current Position
|
|
1009
|
+
OpenStreetMapsService.prototype.getPosition = function () {
|
|
1010
|
+
return new Promise(function (resolve, reject) {
|
|
1011
|
+
navigator.geolocation.watchPosition(function (resp) {
|
|
1012
|
+
resolve({
|
|
1013
|
+
lng: resp.coords.longitude,
|
|
1014
|
+
lat: resp.coords.latitude
|
|
1015
|
+
});
|
|
1016
|
+
}, function (err) {
|
|
1017
|
+
reject(err);
|
|
1018
|
+
});
|
|
1019
|
+
});
|
|
1020
|
+
};
|
|
1021
|
+
// To extract Location from the Task Details
|
|
1022
|
+
OpenStreetMapsService.prototype.getLocation = function (task) {
|
|
1023
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1024
|
+
var _this = this;
|
|
1025
|
+
return __generator(this, function (_q) {
|
|
1026
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
1027
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, encodedAddres, config, address, config, address, address, url, response, data, isValidLocation, location;
|
|
1028
|
+
return __generator(this, function (_q) {
|
|
1029
|
+
switch (_q.label) {
|
|
1030
|
+
case 0:
|
|
1031
|
+
// If Fetch Address from Multiple Paths
|
|
1032
|
+
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, 'dashboard.taskLocationPaths')) {
|
|
1033
|
+
config = this.agentService.config.dashboard.taskLocationPaths;
|
|
1034
|
+
address = addressConcator(task, config);
|
|
1035
|
+
// Encode the Address in URI
|
|
1036
|
+
encodedAddres = encodeURI(address);
|
|
1037
|
+
}
|
|
1038
|
+
// If Fetch Address from Single Path
|
|
1039
|
+
else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, 'dashboard.taskLocationPath')) {
|
|
1040
|
+
config = this.agentService.config.dashboard.taskLocationPath;
|
|
1041
|
+
address = kwikidToolkit.getObjectValueFromPath(task, config);
|
|
1042
|
+
// Encode the Address in URI
|
|
1043
|
+
encodedAddres = encodeURI(address);
|
|
1044
|
+
}
|
|
1045
|
+
// Default Address Paths Avaiable
|
|
1046
|
+
else {
|
|
1047
|
+
address = (_k = (_j = (_g = (_d = (_c = (_b = (_a = task === null || task === void 0 ? void 0 : task.extras) === null || _a === void 0 ? void 0 : _a.task_details) === null || _b === void 0 ? void 0 : _b.customer_details) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : (_f = (_e = task === null || task === void 0 ? void 0 : task.task_details) === null || _e === void 0 ? void 0 : _e.customer_details) === null || _f === void 0 ? void 0 : _f.address) !== null && _g !== void 0 ? _g : (_h = task === null || task === void 0 ? void 0 : task.extras) === null || _h === void 0 ? void 0 : _h.address) !== null && _j !== void 0 ? _j : task === null || task === void 0 ? void 0 : task.address) !== null && _k !== void 0 ? _k : '';
|
|
1048
|
+
// Encode the Address in URI
|
|
1049
|
+
encodedAddres = encodeURI(address);
|
|
1050
|
+
}
|
|
1051
|
+
url = "https://nominatim.openstreetmap.org/search?q=" + encodedAddres + "&format=json";
|
|
1052
|
+
return [4 /*yield*/, fetch(url)];
|
|
1053
|
+
case 1:
|
|
1054
|
+
response = _q.sent();
|
|
1055
|
+
return [4 /*yield*/, response.json()];
|
|
1056
|
+
case 2:
|
|
1057
|
+
data = _q.sent();
|
|
1058
|
+
isValidLocation = kwikidToolkit.isNotEmptyArray(data) && ((_l = data[0]) === null || _l === void 0 ? void 0 : _l.lat) & ((_m = data[0]) === null || _m === void 0 ? void 0 : _m.lon);
|
|
1059
|
+
location = isValidLocation
|
|
1060
|
+
? { lat: (_o = data[0]) === null || _o === void 0 ? void 0 : _o.lat, lng: (_p = data[0]) === null || _p === void 0 ? void 0 : _p.lon }
|
|
1061
|
+
: this.myPosition;
|
|
1062
|
+
// Set Location validation & Google Maps URL
|
|
1063
|
+
location['isValidLocation'] = isValidLocation;
|
|
1064
|
+
location['color'] = isValidLocation ? 'blue' : 'red';
|
|
1065
|
+
location['googleMapsUrl'] = "https://www.google.com/maps/place/" + (location === null || location === void 0 ? void 0 : location.lat) + "," + (location === null || location === void 0 ? void 0 : location.lng);
|
|
1066
|
+
resolve(location);
|
|
1067
|
+
return [2 /*return*/];
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
}); })];
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
};
|
|
1074
|
+
// Get Tasks | Markers Location Co Ordinates
|
|
1075
|
+
OpenStreetMapsService.prototype.getMarkersLocation = function (myMarker, tasks) {
|
|
1076
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1077
|
+
var _this = this;
|
|
1078
|
+
return __generator(this, function (_q) {
|
|
1079
|
+
return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
1080
|
+
var markers, promises;
|
|
1081
|
+
var _this = this;
|
|
1082
|
+
return __generator(this, function (_q) {
|
|
1083
|
+
switch (_q.label) {
|
|
1084
|
+
case 0:
|
|
1085
|
+
markers = [];
|
|
1086
|
+
markers.push(myMarker);
|
|
1087
|
+
promises = tasks.map(function (task) { return __awaiter(_this, void 0, void 0, function () {
|
|
1088
|
+
var marker;
|
|
1089
|
+
return __generator(this, function (_q) {
|
|
1090
|
+
switch (_q.label) {
|
|
1091
|
+
case 0: return [4 /*yield*/, this.getLocation(task)];
|
|
1092
|
+
case 1:
|
|
1093
|
+
marker = _q.sent();
|
|
1094
|
+
task = Object.assign(Object.assign({}, task), marker);
|
|
1095
|
+
markers.push(task);
|
|
1096
|
+
return [2 /*return*/];
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}); });
|
|
1100
|
+
return [4 /*yield*/, Promise.all(promises)];
|
|
1101
|
+
case 1:
|
|
1102
|
+
_q.sent();
|
|
1103
|
+
resolve(markers);
|
|
1104
|
+
return [2 /*return*/];
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}); })];
|
|
1108
|
+
});
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1111
|
+
// To Initialize Open Street Map
|
|
1112
|
+
OpenStreetMapsService.prototype.initializeMap = function () {
|
|
694
1113
|
return __awaiter(this, void 0, void 0, function () {
|
|
695
|
-
var
|
|
696
|
-
return __generator(this, function (
|
|
697
|
-
switch (
|
|
1114
|
+
var _q;
|
|
1115
|
+
return __generator(this, function (_r) {
|
|
1116
|
+
switch (_r.label) {
|
|
698
1117
|
case 0:
|
|
699
|
-
|
|
1118
|
+
console.log('Running Init Open Street Maps');
|
|
1119
|
+
_q = this;
|
|
700
1120
|
return [4 /*yield*/, this.getPosition()];
|
|
701
1121
|
case 1:
|
|
702
|
-
|
|
1122
|
+
_q.myPosition = _r.sent();
|
|
703
1123
|
this.map = L__namespace.map('map', {
|
|
704
1124
|
center: [this.myPosition.lat, this.myPosition.lng],
|
|
705
|
-
zoom:
|
|
1125
|
+
zoom: 11
|
|
706
1126
|
});
|
|
707
1127
|
L__namespace.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(this.map);
|
|
708
1128
|
return [2 /*return*/];
|
|
@@ -710,9 +1130,9 @@
|
|
|
710
1130
|
});
|
|
711
1131
|
});
|
|
712
1132
|
};
|
|
713
|
-
// To Add Marker in Map
|
|
714
|
-
|
|
715
|
-
var lat =
|
|
1133
|
+
// To Add Open Street Marker in Map
|
|
1134
|
+
OpenStreetMapsService.prototype.addMarker = function (_q) {
|
|
1135
|
+
var lat = _q.lat, lng = _q.lng, title = _q.title, color = _q.color;
|
|
716
1136
|
L__namespace.marker([lat, lng], {
|
|
717
1137
|
icon: L__namespace.icon({
|
|
718
1138
|
iconUrl: color == 'red'
|
|
@@ -723,51 +1143,57 @@
|
|
|
723
1143
|
.addTo(this.map)
|
|
724
1144
|
.bindPopup(title);
|
|
725
1145
|
};
|
|
726
|
-
// To Plot Directions for All Tasks
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
1146
|
+
// To Plot Open Street Directions for All Tasks
|
|
1147
|
+
OpenStreetMapsService.prototype.plotDirectionsForAllTasks = function (tasks) {
|
|
1148
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1149
|
+
var myMarker, _q, startingPoint, unvisitedWaypoints, optimizedRoute, styles;
|
|
1150
|
+
var _this = this;
|
|
1151
|
+
return __generator(this, function (_r) {
|
|
1152
|
+
switch (_r.label) {
|
|
1153
|
+
case 0:
|
|
1154
|
+
if (!this.map) return [3 /*break*/, 2];
|
|
1155
|
+
this.allMarkers = [];
|
|
1156
|
+
myMarker = {
|
|
1157
|
+
lat: this.myPosition.lat,
|
|
1158
|
+
lng: this.myPosition.lng,
|
|
1159
|
+
title: 0,
|
|
1160
|
+
color: 'red'
|
|
1161
|
+
};
|
|
1162
|
+
this.addMarker(myMarker);
|
|
1163
|
+
this.allMarkers.push(myMarker);
|
|
1164
|
+
// Create Markers for all Tasks
|
|
1165
|
+
_q = this;
|
|
1166
|
+
return [4 /*yield*/, this.getMarkersLocation(myMarker, tasks)];
|
|
1167
|
+
case 1:
|
|
1168
|
+
// Create Markers for all Tasks
|
|
1169
|
+
_q.allMarkers = _r.sent();
|
|
1170
|
+
startingPoint = this.allMarkers[0];
|
|
1171
|
+
unvisitedWaypoints = this.allMarkers.slice(1);
|
|
1172
|
+
optimizedRoute = nearestNeighborAlgorithm(startingPoint, unvisitedWaypoints);
|
|
1173
|
+
// Sort All Markers as per optimized routes
|
|
1174
|
+
this.allMarkers = this.sortTasksAsPerDistance(optimizedRoute, this.allMarkers, true);
|
|
1175
|
+
// Sort All Tasks as per optimized routes
|
|
1176
|
+
tasks = this.sortTasksAsPerDistance(optimizedRoute.slice(1), tasks, false);
|
|
1177
|
+
// Plot Markers for All Tasks
|
|
1178
|
+
tasks.map(function (task) {
|
|
1179
|
+
var marker = _this.getLocation(task);
|
|
1180
|
+
_this.addMarker(marker);
|
|
1181
|
+
});
|
|
1182
|
+
styles = [
|
|
1183
|
+
{ color: 'blue', opacity: 1, weight: 8 },
|
|
1184
|
+
{ color: 'white', opacity: 0.6, weight: 12 }
|
|
1185
|
+
];
|
|
1186
|
+
// Set Routes for all Tasks
|
|
1187
|
+
this.allTasksRoutes = this.setRoutes(this.allMarkers, styles);
|
|
1188
|
+
this.fitMapBounds();
|
|
1189
|
+
_r.label = 2;
|
|
1190
|
+
case 2: return [2 /*return*/, tasks];
|
|
1191
|
+
}
|
|
757
1192
|
});
|
|
758
|
-
|
|
759
|
-
var styles = [
|
|
760
|
-
{ color: 'blue', opacity: 1, weight: 8 },
|
|
761
|
-
{ color: 'white', opacity: 0.6, weight: 12 }
|
|
762
|
-
];
|
|
763
|
-
// Set Routes for all Tasks
|
|
764
|
-
this.allTasksRoutes = this.setRoutes(this.allMarkers, styles);
|
|
765
|
-
this.fitMapBounds();
|
|
766
|
-
}
|
|
767
|
-
return tasks;
|
|
1193
|
+
});
|
|
768
1194
|
};
|
|
769
|
-
// To plot Direction for selected Task
|
|
770
|
-
|
|
1195
|
+
// To plot Open Street Direction for selected Task
|
|
1196
|
+
OpenStreetMapsService.prototype.plotDirectionsForSelectedTask = function (index) {
|
|
771
1197
|
if (index !== null) {
|
|
772
1198
|
// Remove Previously Selected Task Route
|
|
773
1199
|
if (this.selectedTaskRoutes) {
|
|
@@ -803,11 +1229,11 @@
|
|
|
803
1229
|
this.fitMapBounds();
|
|
804
1230
|
};
|
|
805
1231
|
// Get Distance & Time of Selected Task
|
|
806
|
-
|
|
1232
|
+
OpenStreetMapsService.prototype.getSelectedTaskDistanceAndTime = function () {
|
|
807
1233
|
return this.selectedTaskDistanceAndTime;
|
|
808
1234
|
};
|
|
809
1235
|
// Set Distance & Time of Selected Task
|
|
810
|
-
|
|
1236
|
+
OpenStreetMapsService.prototype.setSelectedTaskDistanceAndTime = function () {
|
|
811
1237
|
this.selectedTaskRoutes.on('routesfound', function (e) {
|
|
812
1238
|
var routes = e.routes;
|
|
813
1239
|
var summary = routes[0].summary;
|
|
@@ -819,8 +1245,8 @@
|
|
|
819
1245
|
};
|
|
820
1246
|
});
|
|
821
1247
|
};
|
|
822
|
-
// To sort Task as per nearest distance
|
|
823
|
-
|
|
1248
|
+
// To sort Open Street Maps Task as per nearest distance
|
|
1249
|
+
OpenStreetMapsService.prototype.sortTasksAsPerDistance = function (order, tasks, isMarker) {
|
|
824
1250
|
var sortedTasks = [];
|
|
825
1251
|
for (var i = 0; i < tasks.length; i++) {
|
|
826
1252
|
var title = isMarker ? order[i].title : order[i].title - 1;
|
|
@@ -829,8 +1255,8 @@
|
|
|
829
1255
|
}
|
|
830
1256
|
return sortedTasks;
|
|
831
1257
|
};
|
|
832
|
-
// To set routes in the maps
|
|
833
|
-
|
|
1258
|
+
// To set Open Street routes in the maps
|
|
1259
|
+
OpenStreetMapsService.prototype.setRoutes = function (markers, styles) {
|
|
834
1260
|
return L__namespace.Routing.control({
|
|
835
1261
|
waypoints: markers,
|
|
836
1262
|
lineOptions: {
|
|
@@ -842,115 +1268,21 @@
|
|
|
842
1268
|
routeWhileDragging: true
|
|
843
1269
|
}).addTo(this.map);
|
|
844
1270
|
};
|
|
845
|
-
// To set view point on the map
|
|
846
|
-
|
|
1271
|
+
// To set Open Street view point on the map
|
|
1272
|
+
OpenStreetMapsService.prototype.fitMapBounds = function () {
|
|
847
1273
|
var markerLatLngs = this.allMarkers.map(function (marker) { return L__namespace.latLng(marker.lat, marker.lng); });
|
|
848
1274
|
this.map.fitBounds(markerLatLngs);
|
|
849
1275
|
};
|
|
850
|
-
|
|
851
|
-
MapService.prototype.getPosition = function () {
|
|
852
|
-
return new Promise(function (resolve, reject) {
|
|
853
|
-
navigator.geolocation.watchPosition(function (resp) {
|
|
854
|
-
resolve({
|
|
855
|
-
lng: resp.coords.longitude,
|
|
856
|
-
lat: resp.coords.latitude
|
|
857
|
-
});
|
|
858
|
-
}, function (err) {
|
|
859
|
-
reject(err);
|
|
860
|
-
});
|
|
861
|
-
});
|
|
862
|
-
};
|
|
863
|
-
// To extract Location from the Task Details
|
|
864
|
-
MapService.prototype.getLocation = function (task) {
|
|
865
|
-
var _a, _b, _c, _d, _e, _f;
|
|
866
|
-
if (kwikidToolkit.checkObjectPathExists(this.agentService.config, 'dashboard.taskLocationPath')) {
|
|
867
|
-
var location = kwikidToolkit.getObjectValueFromPath(task, this.agentService.config.dashboard.taskLocationPath);
|
|
868
|
-
return location;
|
|
869
|
-
}
|
|
870
|
-
else {
|
|
871
|
-
return ((_d = (_c = (_b = (_a = task === null || task === void 0 ? void 0 : task.extras) === null || _a === void 0 ? void 0 : _a.task_details) === null || _b === void 0 ? void 0 : _b.customer_details) === null || _c === void 0 ? void 0 : _c.location) !== null && _d !== void 0 ? _d : (_f = (_e = task === null || task === void 0 ? void 0 : task.task_details) === null || _e === void 0 ? void 0 : _e.customer_details) === null || _f === void 0 ? void 0 : _f.location);
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
// To get Latitude & Longitude from Task Location
|
|
875
|
-
MapService.prototype.getLatLng = function (data, index) {
|
|
876
|
-
try {
|
|
877
|
-
var url = data.split('@');
|
|
878
|
-
var lat_long_match = url[1].split(',');
|
|
879
|
-
var lat = Number(lat_long_match[0]);
|
|
880
|
-
var long = Number(lat_long_match[1]);
|
|
881
|
-
return { lat: lat, lng: long, title: index + 1, color: 'blue' };
|
|
882
|
-
}
|
|
883
|
-
catch (_a) {
|
|
884
|
-
// If could not find Google Maps Location URL in Task
|
|
885
|
-
return {
|
|
886
|
-
lat: this.myPosition.lat,
|
|
887
|
-
lng: this.myPosition.lng,
|
|
888
|
-
title: index + 1,
|
|
889
|
-
color: 'red'
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
// To Calculate Distance between two markers
|
|
894
|
-
MapService.prototype.calculateDistance = function (point1, point2) {
|
|
895
|
-
var lat1 = point1.lat;
|
|
896
|
-
var lng1 = point1.lng;
|
|
897
|
-
var lat2 = point2.lat;
|
|
898
|
-
var lng2 = point2.lng;
|
|
899
|
-
var R = 6371; // Earth radius in kilometers
|
|
900
|
-
var dLat = (lat2 - lat1) * (Math.PI / 180);
|
|
901
|
-
var dLng = (lng2 - lng1) * (Math.PI / 180);
|
|
902
|
-
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
903
|
-
Math.cos((lat1 * Math.PI) / 180) *
|
|
904
|
-
Math.cos((lat2 * Math.PI) / 180) *
|
|
905
|
-
Math.sin(dLng / 2) *
|
|
906
|
-
Math.sin(dLng / 2);
|
|
907
|
-
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
908
|
-
var distance = R * c;
|
|
909
|
-
return distance;
|
|
910
|
-
};
|
|
911
|
-
// To calculate nearest distance from marker
|
|
912
|
-
MapService.prototype.nearestNeighborAlgorithm = function (startingPoint, unvisitedPoints) {
|
|
913
|
-
var e_1, _g;
|
|
914
|
-
var currentPoint = startingPoint;
|
|
915
|
-
var path = [currentPoint];
|
|
916
|
-
var visitedPoints = new Set([currentPoint]);
|
|
917
|
-
while (unvisitedPoints.length > 0) {
|
|
918
|
-
var nearestPoint = null;
|
|
919
|
-
var minDistance = Number.POSITIVE_INFINITY;
|
|
920
|
-
try {
|
|
921
|
-
for (var unvisitedPoints_1 = (e_1 = void 0, __values(unvisitedPoints)), unvisitedPoints_1_1 = unvisitedPoints_1.next(); !unvisitedPoints_1_1.done; unvisitedPoints_1_1 = unvisitedPoints_1.next()) {
|
|
922
|
-
var point = unvisitedPoints_1_1.value;
|
|
923
|
-
var distance = this.calculateDistance(currentPoint, point);
|
|
924
|
-
if (distance < minDistance) {
|
|
925
|
-
minDistance = distance;
|
|
926
|
-
nearestPoint = point;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
931
|
-
finally {
|
|
932
|
-
try {
|
|
933
|
-
if (unvisitedPoints_1_1 && !unvisitedPoints_1_1.done && (_g = unvisitedPoints_1.return)) _g.call(unvisitedPoints_1);
|
|
934
|
-
}
|
|
935
|
-
finally { if (e_1) throw e_1.error; }
|
|
936
|
-
}
|
|
937
|
-
path.push(nearestPoint);
|
|
938
|
-
visitedPoints.add(nearestPoint);
|
|
939
|
-
currentPoint = nearestPoint;
|
|
940
|
-
unvisitedPoints = unvisitedPoints.filter(function (point) { return !visitedPoints.has(point); });
|
|
941
|
-
}
|
|
942
|
-
return path;
|
|
943
|
-
};
|
|
944
|
-
return MapService;
|
|
1276
|
+
return OpenStreetMapsService;
|
|
945
1277
|
}());
|
|
946
|
-
/** @nocollapse */
|
|
947
|
-
/** @nocollapse */
|
|
948
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type:
|
|
1278
|
+
/** @nocollapse */ OpenStreetMapsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, deps: [{ token: AgentService }, { token: i2__namespace.MapDirectionsService }, { token: i3__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1279
|
+
/** @nocollapse */ OpenStreetMapsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, providedIn: 'root' });
|
|
1280
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, decorators: [{
|
|
949
1281
|
type: i0.Injectable,
|
|
950
1282
|
args: [{
|
|
951
1283
|
providedIn: 'root'
|
|
952
1284
|
}]
|
|
953
|
-
}], ctorParameters: function () { return [{ type: AgentService }]; }, propDecorators: { directionsRenders: [{
|
|
1285
|
+
}], ctorParameters: function () { return [{ type: AgentService }, { type: i2__namespace.MapDirectionsService }, { type: i3__namespace.HttpClient }]; }, propDecorators: { directionsRenders: [{
|
|
954
1286
|
type: i0.ViewChildren,
|
|
955
1287
|
args: ['directionsRender']
|
|
956
1288
|
}] } });
|
|
@@ -973,7 +1305,7 @@
|
|
|
973
1305
|
return StatusPillComponent;
|
|
974
1306
|
}());
|
|
975
1307
|
/** @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 });
|
|
976
|
-
/** @nocollapse */ StatusPillComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { status: "status" }, ngImport: i0__namespace, template: "<div [ngClass]=\"getStatusPillClass(status)\">{{ getStatusLabel(status) }}</div>\n", styles: [".status-pill{background-color:#555;padding:.1rem .5rem;border-radius:1rem;font-size:.7rem;color:#fff}.complete,.kyc-request-accepted,.kyc-result-approved{background-color:var(--tui-positive)}.rejected,.kyc-request-rejected,.kyc-result-rejected,.kyc-rejected{background-color:var(--tui-negative)}.auditing,.on-going,.kyc-result-partial-update,.kyc-resut-partial-update{background-color:var(--tui-primary)}.after-audit,.waiting,.kyc-result-under-review{background-color:var(--tui-warning-fill);color:#222}\n"], directives: [{ type:
|
|
1308
|
+
/** @nocollapse */ StatusPillComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StatusPillComponent, selector: "status-pill", inputs: { status: "status" }, ngImport: i0__namespace, template: "<div [ngClass]=\"getStatusPillClass(status)\">{{ getStatusLabel(status) }}</div>\n", styles: [".status-pill{background-color:#555;padding:.1rem .5rem;border-radius:1rem;font-size:.7rem;color:#fff}.complete,.kyc-request-accepted,.kyc-result-approved{background-color:var(--tui-positive)}.rejected,.kyc-request-rejected,.kyc-result-rejected,.kyc-rejected{background-color:var(--tui-negative)}.auditing,.on-going,.kyc-result-partial-update,.kyc-resut-partial-update{background-color:var(--tui-primary)}.after-audit,.waiting,.kyc-result-under-review{background-color:var(--tui-warning-fill);color:#222}\n"], directives: [{ type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
977
1309
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StatusPillComponent, decorators: [{
|
|
978
1310
|
type: i0.Component,
|
|
979
1311
|
args: [{
|
|
@@ -986,9 +1318,10 @@
|
|
|
986
1318
|
}] } });
|
|
987
1319
|
|
|
988
1320
|
var CustomerDetailsComponent = /** @class */ (function () {
|
|
989
|
-
function CustomerDetailsComponent(agentService,
|
|
1321
|
+
function CustomerDetailsComponent(agentService, googleMapsService, openStreetMapsService, cdr) {
|
|
990
1322
|
this.agentService = agentService;
|
|
991
|
-
this.
|
|
1323
|
+
this.googleMapsService = googleMapsService;
|
|
1324
|
+
this.openStreetMapsService = openStreetMapsService;
|
|
992
1325
|
this.cdr = cdr;
|
|
993
1326
|
this.customer = {
|
|
994
1327
|
agent_id: 'sparkcpaital_dev_agent_1',
|
|
@@ -1060,16 +1393,22 @@
|
|
|
1060
1393
|
this.nextStep.emit(e);
|
|
1061
1394
|
};
|
|
1062
1395
|
CustomerDetailsComponent.prototype.close = function () {
|
|
1396
|
+
var _a, _b;
|
|
1063
1397
|
this.agentService.isShowTaskDetails = undefined;
|
|
1064
|
-
this.
|
|
1398
|
+
if (((_b = (_a = this.agentService.config) === null || _a === void 0 ? void 0 : _a.dashboard) === null || _b === void 0 ? void 0 : _b.mapType) == 'google-maps') {
|
|
1399
|
+
this.googleMapsService.plotDirectionsForSelectedTask(null);
|
|
1400
|
+
}
|
|
1401
|
+
else {
|
|
1402
|
+
this.openStreetMapsService.plotDirectionsForSelectedTask(null);
|
|
1403
|
+
}
|
|
1065
1404
|
};
|
|
1066
1405
|
CustomerDetailsComponent.prototype.handleOnClickRemoveTask = function (task) {
|
|
1067
1406
|
this.removeTask.emit(task);
|
|
1068
1407
|
};
|
|
1069
1408
|
return CustomerDetailsComponent;
|
|
1070
1409
|
}());
|
|
1071
|
-
/** @nocollapse */ CustomerDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, deps: [{ token: AgentService }, { token:
|
|
1072
|
-
/** @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" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div class=\"customer-details-heading\">User Details</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n <kwikui-label-value-pair\n [data]=\"customer\"\n [field]=\"config?.dashboard?.taskIdentifier ?? {value:'$.user_id', type: 'string'} \"\n ></kwikui-label-value-pair>\n\n <status-pill\n *ngIf=\"config?.dashboard?.isShowTaskStatus\"\n [status]=\"customer.session_status\"\n ></status-pill>\n </div>\n\n <div class=\"customer-details-table\">\n <div\n class=\"customer-details-table-data\"\n *ngFor=\"let taskData of viewTaskDetails\"\n >\n <kwikui-label-value-pair\n [field]=\"taskData\"\n [data]=\"customer\"\n ></kwikui-label-value-pair>\n </div>\n </div>\n\n <div class=\"customer-details-date\">\n Created at: {{ getTaskCreationTime(customer) }}\n </div>\n\n <div class=\"customer-details-actions\">\n <div class=\"customer-details-task-buttons\">\n <kwikui-button\n *ngIf=\"config.dashboard?.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.dashboard?.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-details-journey-buttons\">\n <kwikui-button\n *ngIf=\"\n config.dashboard?.isShowMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToMaps(customer?.task_details?.customer_details?.location)\n \"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config.dashboard?.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-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;grid-gap:1.25rem;gap:1.25rem}.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{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:1rem 0}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons .customer-share-link{font-size:.7rem}::-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:
|
|
1410
|
+
/** @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 });
|
|
1411
|
+
/** @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" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div class=\"customer-details-heading\">User Details</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n <kwikui-label-value-pair\n [data]=\"customer\"\n [field]=\"config?.dashboard?.taskIdentifier ?? {value:'$.user_id', type: 'string'} \"\n ></kwikui-label-value-pair>\n\n <status-pill\n *ngIf=\"config?.dashboard?.isShowTaskStatus\"\n [status]=\"customer.session_status\"\n ></status-pill>\n </div>\n\n <div class=\"customer-details-table\">\n <div\n class=\"customer-details-table-data\"\n *ngFor=\"let taskData of viewTaskDetails\"\n >\n <kwikui-label-value-pair\n [field]=\"taskData\"\n [data]=\"customer\"\n ></kwikui-label-value-pair>\n </div>\n </div>\n\n <div class=\"customer-details-date\">\n Created at: {{ getTaskCreationTime(customer) }}\n </div>\n\n <div class=\"customer-details-actions\">\n <div class=\"customer-details-task-buttons\">\n <kwikui-button\n *ngIf=\"config.dashboard?.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.dashboard?.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-details-journey-buttons\">\n <kwikui-button\n *ngIf=\"\n config.dashboard?.isShowMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n goToMaps(customer?.task_details?.customer_details?.location)\n \"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config.dashboard?.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-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;grid-gap:1.25rem;gap:1.25rem}.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{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:1rem 0}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons .customer-share-link{font-size:.7rem}::-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: i4__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["field", "data"] }, { type: StatusPillComponent, selector: "status-pill", inputs: ["status"] }, { type: i4__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
|
|
1073
1412
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, decorators: [{
|
|
1074
1413
|
type: i0.Component,
|
|
1075
1414
|
args: [{
|
|
@@ -1078,7 +1417,7 @@
|
|
|
1078
1417
|
styleUrls: ['./customer-details.component.scss'],
|
|
1079
1418
|
changeDetection: i0.ChangeDetectionStrategy.Default
|
|
1080
1419
|
}]
|
|
1081
|
-
}], ctorParameters: function () { return [{ type: AgentService }, { type:
|
|
1420
|
+
}], ctorParameters: function () { return [{ type: AgentService }, { type: GoogleMapsService }, { type: OpenStreetMapsService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { customer: [{
|
|
1082
1421
|
type: i0.Input
|
|
1083
1422
|
}], config: [{
|
|
1084
1423
|
type: i0.Input
|
|
@@ -1089,8 +1428,9 @@
|
|
|
1089
1428
|
}] } });
|
|
1090
1429
|
|
|
1091
1430
|
var CustomerTileComponent = /** @class */ (function () {
|
|
1092
|
-
function CustomerTileComponent(
|
|
1093
|
-
this.
|
|
1431
|
+
function CustomerTileComponent(googleMapsService, openStreetMapsService, agentService, hostElement) {
|
|
1432
|
+
this.googleMapsService = googleMapsService;
|
|
1433
|
+
this.openStreetMapsService = openStreetMapsService;
|
|
1094
1434
|
this.agentService = agentService;
|
|
1095
1435
|
this.hostElement = hostElement;
|
|
1096
1436
|
this.customer = {};
|
|
@@ -1113,17 +1453,33 @@
|
|
|
1113
1453
|
this.viewTaskDetails =
|
|
1114
1454
|
(_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.dashboard) === null || _b === void 0 ? void 0 : _b.viewTaskDetails) !== null && _c !== void 0 ? _c : this.viewTaskDetails;
|
|
1115
1455
|
};
|
|
1116
|
-
CustomerTileComponent.prototype.getTaskDetails = function (taskData) {
|
|
1117
|
-
return kwikidToolkit.getObjectValueFromPath(this.customer, taskData);
|
|
1118
|
-
};
|
|
1119
1456
|
CustomerTileComponent.prototype.openDetails = function () {
|
|
1457
|
+
var _a, _b;
|
|
1458
|
+
if (((_b = (_a = this.agentService.config) === null || _a === void 0 ? void 0 : _a.dashboard) === null || _b === void 0 ? void 0 : _b.mapType) == 'google-maps') {
|
|
1459
|
+
this.openGoogleMapsDetails();
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
this.plotOpenStreetMapsDirection();
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
CustomerTileComponent.prototype.openGoogleMapsDetails = function () {
|
|
1120
1466
|
if (this.agentService.isShowTaskDetails !== this.index) {
|
|
1121
1467
|
this.agentService.isShowTaskDetails = this.index;
|
|
1122
|
-
this.
|
|
1468
|
+
this.googleMapsService.plotDirectionsForSelectedTask(this.index);
|
|
1123
1469
|
}
|
|
1124
1470
|
else {
|
|
1125
1471
|
this.agentService.isShowTaskDetails = undefined;
|
|
1126
|
-
this.
|
|
1472
|
+
this.googleMapsService.plotDirectionsForSelectedTask(null);
|
|
1473
|
+
}
|
|
1474
|
+
};
|
|
1475
|
+
CustomerTileComponent.prototype.plotOpenStreetMapsDirection = function () {
|
|
1476
|
+
if (this.agentService.isShowTaskDetails !== this.index) {
|
|
1477
|
+
this.agentService.isShowTaskDetails = this.index;
|
|
1478
|
+
this.openStreetMapsService.plotDirectionsForSelectedTask(this.index);
|
|
1479
|
+
}
|
|
1480
|
+
else {
|
|
1481
|
+
this.agentService.isShowTaskDetails = undefined;
|
|
1482
|
+
this.openStreetMapsService.plotDirectionsForSelectedTask(null);
|
|
1127
1483
|
}
|
|
1128
1484
|
};
|
|
1129
1485
|
CustomerTileComponent.prototype.goToMaps = function (location) {
|
|
@@ -1137,8 +1493,8 @@
|
|
|
1137
1493
|
};
|
|
1138
1494
|
return CustomerTileComponent;
|
|
1139
1495
|
}());
|
|
1140
|
-
/** @nocollapse */ CustomerTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, deps: [{ token:
|
|
1141
|
-
/** @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: { nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n index == agentService.isShowTaskDetails\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 <kwikui-label-value-pair\n [data]=\"customer\"\n [field]=\"config?.dashboard?.taskIdentifier ?? {value:'$.user_id', type: 'string'} \"\n ></kwikui-label-value-pair>\n </div>\n <status-pill\n *ngIf=\"config?.dashboard?.isShowTaskStatus\"\n [status]=\"customer.session_status\"\n ></status-pill>\n </div>\n <kwikui-button\n *ngIf=\"!agentService.isMobileView && !agentService.showMapview\"\n [icon]=\"\n agentService.isShowTaskDetails == index\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.isShowTaskDetails == index\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 [ngClass]=\"\n index == agentService.isShowTaskDetails &&\n (agentService.isMobileView || agentService.showMapview)\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <div\n *ngFor=\"let taskData of viewTaskDetails\"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n <kwikui-label-value-pair\n [field]=\"taskData\"\n [data]=\"customer\"\n ></kwikui-label-value-pair>\n </div>\n <div\n *ngIf=\"\n agentService.config?.dashboard?.
|
|
1496
|
+
/** @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 });
|
|
1497
|
+
/** @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: { nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n index == agentService.isShowTaskDetails\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 <kwikui-label-value-pair\n [data]=\"customer\"\n [field]=\"config?.dashboard?.taskIdentifier ?? {value:'$.user_id', type: 'string'} \"\n ></kwikui-label-value-pair>\n </div>\n <status-pill\n *ngIf=\"config?.dashboard?.isShowTaskStatus\"\n [status]=\"customer.session_status\"\n ></status-pill>\n </div>\n <kwikui-button\n *ngIf=\"!agentService.isMobileView && !agentService.showMapview\"\n [icon]=\"\n agentService.isShowTaskDetails == index\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.isShowTaskDetails == index\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 [ngClass]=\"\n index == agentService.isShowTaskDetails &&\n (agentService.isMobileView || agentService.showMapview)\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <div\n *ngFor=\"let taskData of viewTaskDetails\"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n <kwikui-label-value-pair\n [field]=\"taskData\"\n [data]=\"customer\"\n ></kwikui-label-value-pair>\n </div>\n <!-- <div\n *ngIf=\"\n agentService.config?.dashboard?.maps?.sho &&\n agentService.config?.dashboard?.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 <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button\n *ngIf=\"config.dashboard?.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.dashboard?.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=\"\n config.dashboard?.isShowMaps &&\n customer?.task_details?.customer_details?.location\n \"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.task_details.customer_details.location)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config.dashboard?.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;padding:1rem;border-bottom:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:row;flex-wrap:wrap;align-content:stretch;justify-content:space-evenly;align-items:center}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-userid{font-weight:500;font-size:1.1rem;line-height:1rem}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.7rem;grid-gap:.3rem;gap:.3rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-custom-details{width:100%;height:100%;line-height:.9rem;word-wrap:break-word}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons .customer-share-link{font-size:.7rem}.customer-tile-wrapper .data-collasped{display:none}.customer-tile-active{background-color:#dcedfd}\n"], components: [{ type: i4__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["field", "data"] }, { type: StatusPillComponent, selector: "status-pill", inputs: ["status"] }, { type: i4__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }], directives: [{ type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1142
1498
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
|
|
1143
1499
|
type: i0.Component,
|
|
1144
1500
|
args: [{
|
|
@@ -1146,7 +1502,7 @@
|
|
|
1146
1502
|
templateUrl: './customer-tile.component.html',
|
|
1147
1503
|
styleUrls: ['./customer-tile.component.scss']
|
|
1148
1504
|
}]
|
|
1149
|
-
}], ctorParameters: function () { return [{ type:
|
|
1505
|
+
}], ctorParameters: function () { return [{ type: GoogleMapsService }, { type: OpenStreetMapsService }, { type: AgentService }, { type: i0__namespace.ElementRef }]; }, propDecorators: { windowResizeWatcher: [{
|
|
1150
1506
|
type: i0.HostListener,
|
|
1151
1507
|
args: ['window:resize', ['$event']]
|
|
1152
1508
|
}], customer: [{
|
|
@@ -1226,64 +1582,74 @@
|
|
|
1226
1582
|
}] });
|
|
1227
1583
|
|
|
1228
1584
|
var CustomerListComponent = /** @class */ (function () {
|
|
1229
|
-
function CustomerListComponent(
|
|
1230
|
-
this.
|
|
1585
|
+
function CustomerListComponent(googleMapsService, openStreetMapsService, agentService) {
|
|
1586
|
+
this.googleMapsService = googleMapsService;
|
|
1587
|
+
this.openStreetMapsService = openStreetMapsService;
|
|
1231
1588
|
this.agentService = agentService;
|
|
1232
1589
|
this.nextStep = new i0.EventEmitter();
|
|
1233
1590
|
this.removeTask = new i0.EventEmitter();
|
|
1234
1591
|
this.filterTaskList = new i0.EventEmitter();
|
|
1235
1592
|
this.filteredData = [];
|
|
1236
|
-
this.formGroup = new
|
|
1593
|
+
this.formGroup = new i7.FormGroup({});
|
|
1237
1594
|
this.fromDate = this.getDate(null);
|
|
1238
1595
|
this.toDate = this.getDate(null);
|
|
1239
|
-
this.dateRangeFormControl = new
|
|
1240
|
-
value: new
|
|
1596
|
+
this.dateRangeFormControl = new i7.FormControl({
|
|
1597
|
+
value: new i10.TuiDayRange(new i10.TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()), new i10.TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())),
|
|
1241
1598
|
disabled: false
|
|
1242
1599
|
});
|
|
1243
1600
|
this.formGroup.addControl('dateRange', this.dateRangeFormControl);
|
|
1244
|
-
this.searchFormControl = new
|
|
1601
|
+
this.searchFormControl = new i7.FormControl('');
|
|
1245
1602
|
this.formGroup.addControl('search', this.searchFormControl);
|
|
1246
1603
|
}
|
|
1247
|
-
CustomerListComponent.prototype.ngOnInit = function () {
|
|
1604
|
+
CustomerListComponent.prototype.ngOnInit = function () {
|
|
1605
|
+
};
|
|
1248
1606
|
CustomerListComponent.prototype.ngAfterViewInit = function () {
|
|
1249
1607
|
var _this = this;
|
|
1250
1608
|
setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1251
|
-
var
|
|
1252
|
-
return __generator(this, function (
|
|
1253
|
-
switch (
|
|
1609
|
+
var _a, _c;
|
|
1610
|
+
return __generator(this, function (_d) {
|
|
1611
|
+
switch (_d.label) {
|
|
1254
1612
|
case 0:
|
|
1255
|
-
if (!this.config.dashboard.isShowMaps) return [3 /*break*/,
|
|
1256
|
-
return [
|
|
1613
|
+
if (!this.config.dashboard.isShowMaps) return [3 /*break*/, 6];
|
|
1614
|
+
if (!(((_a = this.config.dashboard) === null || _a === void 0 ? void 0 : _a.mapType) == 'open-street')) return [3 /*break*/, 2];
|
|
1615
|
+
return [4 /*yield*/, this.openStreetMapsService.initializeMap()];
|
|
1257
1616
|
case 1:
|
|
1258
|
-
|
|
1259
|
-
_b = this;
|
|
1260
|
-
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
1261
|
-
case 2:
|
|
1262
|
-
_b.filteredData = _c.sent();
|
|
1617
|
+
_d.sent();
|
|
1263
1618
|
return [3 /*break*/, 4];
|
|
1619
|
+
case 2: return [4 /*yield*/, this.googleMapsService.initializeMap()];
|
|
1264
1620
|
case 3:
|
|
1621
|
+
_d.sent();
|
|
1622
|
+
_d.label = 4;
|
|
1623
|
+
case 4:
|
|
1624
|
+
_c = this;
|
|
1625
|
+
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
1626
|
+
case 5:
|
|
1627
|
+
_c.filteredData = _d.sent();
|
|
1628
|
+
return [3 /*break*/, 7];
|
|
1629
|
+
case 6:
|
|
1265
1630
|
this.filteredData = this.customers;
|
|
1266
|
-
|
|
1267
|
-
case
|
|
1631
|
+
_d.label = 7;
|
|
1632
|
+
case 7: return [2 /*return*/];
|
|
1268
1633
|
}
|
|
1269
1634
|
});
|
|
1270
1635
|
}); }, 1000);
|
|
1271
1636
|
};
|
|
1272
1637
|
CustomerListComponent.prototype.ngOnChanges = function () {
|
|
1273
1638
|
return __awaiter(this, void 0, void 0, function () {
|
|
1274
|
-
var
|
|
1275
|
-
return __generator(this, function (
|
|
1276
|
-
switch (
|
|
1639
|
+
var _c;
|
|
1640
|
+
return __generator(this, function (_d) {
|
|
1641
|
+
switch (_d.label) {
|
|
1277
1642
|
case 0:
|
|
1278
|
-
if (!this.config.dashboard.isShowMaps
|
|
1279
|
-
|
|
1643
|
+
if (!(this.config.dashboard.isShowMaps &&
|
|
1644
|
+
(this.googleMapsService.map || this.openStreetMapsService.map))) return [3 /*break*/, 2];
|
|
1645
|
+
_c = this;
|
|
1280
1646
|
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
1281
1647
|
case 1:
|
|
1282
|
-
|
|
1648
|
+
_c.filteredData = _d.sent();
|
|
1283
1649
|
return [3 /*break*/, 3];
|
|
1284
1650
|
case 2:
|
|
1285
1651
|
this.filteredData = this.customers;
|
|
1286
|
-
|
|
1652
|
+
_d.label = 3;
|
|
1287
1653
|
case 3: return [2 /*return*/];
|
|
1288
1654
|
}
|
|
1289
1655
|
});
|
|
@@ -1305,21 +1671,27 @@
|
|
|
1305
1671
|
return today;
|
|
1306
1672
|
};
|
|
1307
1673
|
CustomerListComponent.prototype.plotMarkers = function (customers) {
|
|
1308
|
-
var _a;
|
|
1674
|
+
var _a, _b;
|
|
1309
1675
|
return __awaiter(this, void 0, void 0, function () {
|
|
1310
1676
|
var _this = this;
|
|
1311
|
-
return __generator(this, function (
|
|
1312
|
-
switch (
|
|
1677
|
+
return __generator(this, function (_c) {
|
|
1678
|
+
switch (_c.label) {
|
|
1313
1679
|
case 0:
|
|
1314
1680
|
if (!((_a = this.config.dashboard) === null || _a === void 0 ? void 0 : _a.isPlotCompletedTaskMarkers)) {
|
|
1315
1681
|
customers = customers.filter(function (customer) {
|
|
1316
1682
|
return _this.agentService.canPlotMarkers(customer.session_status);
|
|
1317
1683
|
});
|
|
1318
1684
|
}
|
|
1319
|
-
return [
|
|
1685
|
+
if (!(((_b = this.config.dashboard) === null || _b === void 0 ? void 0 : _b.mapType) == 'open-street')) return [3 /*break*/, 2];
|
|
1686
|
+
return [4 /*yield*/, this.openStreetMapsService.plotDirectionsForAllTasks(customers)];
|
|
1320
1687
|
case 1:
|
|
1321
|
-
customers =
|
|
1322
|
-
return [
|
|
1688
|
+
customers = _c.sent();
|
|
1689
|
+
return [3 /*break*/, 4];
|
|
1690
|
+
case 2: return [4 /*yield*/, this.googleMapsService.plotDirectionsForAllTasks(customers)];
|
|
1691
|
+
case 3:
|
|
1692
|
+
customers = _c.sent();
|
|
1693
|
+
_c.label = 4;
|
|
1694
|
+
case 4: return [2 /*return*/, customers];
|
|
1323
1695
|
}
|
|
1324
1696
|
});
|
|
1325
1697
|
});
|
|
@@ -1351,8 +1723,8 @@
|
|
|
1351
1723
|
};
|
|
1352
1724
|
return CustomerListComponent;
|
|
1353
1725
|
}());
|
|
1354
|
-
/** @nocollapse */ CustomerListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, deps: [{ token:
|
|
1355
|
-
/** @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" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"config?.dashboard?.isAllowDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"config?.dashboard?.isAllowSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{config?.dashboard?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type:
|
|
1726
|
+
/** @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 });
|
|
1727
|
+
/** @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" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"config?.dashboard?.isAllowDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"config?.dashboard?.isAllowSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{config?.dashboard?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i4__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: i4__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: i5__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "config"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7__namespace.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 } });
|
|
1356
1728
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, decorators: [{
|
|
1357
1729
|
type: i0.Component,
|
|
1358
1730
|
args: [{
|
|
@@ -1360,7 +1732,7 @@
|
|
|
1360
1732
|
templateUrl: './customer-list.component.html',
|
|
1361
1733
|
styleUrls: ['./customer-list.component.css']
|
|
1362
1734
|
}]
|
|
1363
|
-
}], ctorParameters: function () { return [{ type:
|
|
1735
|
+
}], ctorParameters: function () { return [{ type: GoogleMapsService }, { type: OpenStreetMapsService }, { type: AgentService }]; }, propDecorators: { customers: [{
|
|
1364
1736
|
type: i0.Input
|
|
1365
1737
|
}], config: [{
|
|
1366
1738
|
type: i0.Input
|
|
@@ -1373,8 +1745,8 @@
|
|
|
1373
1745
|
}] } });
|
|
1374
1746
|
|
|
1375
1747
|
var KwikIDAgentDashboardComponent = /** @class */ (function () {
|
|
1376
|
-
function KwikIDAgentDashboardComponent(
|
|
1377
|
-
this.
|
|
1748
|
+
function KwikIDAgentDashboardComponent(googleMapsService, agentService, httpClient, hostElement, dialogService) {
|
|
1749
|
+
this.googleMapsService = googleMapsService;
|
|
1378
1750
|
this.agentService = agentService;
|
|
1379
1751
|
this.httpClient = httpClient;
|
|
1380
1752
|
this.hostElement = hostElement;
|
|
@@ -1386,6 +1758,7 @@
|
|
|
1386
1758
|
this.removeTask = new i0.EventEmitter();
|
|
1387
1759
|
this.filterTaskList = new i0.EventEmitter();
|
|
1388
1760
|
this.loading = true;
|
|
1761
|
+
this.console = console;
|
|
1389
1762
|
this.open = false;
|
|
1390
1763
|
this.allFormsData = {};
|
|
1391
1764
|
this.String = String;
|
|
@@ -1401,17 +1774,41 @@
|
|
|
1401
1774
|
}
|
|
1402
1775
|
};
|
|
1403
1776
|
KwikIDAgentDashboardComponent.prototype.ngOnInit = function () {
|
|
1404
|
-
var
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1777
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1778
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1779
|
+
var _this = this;
|
|
1780
|
+
return __generator(this, function (_o) {
|
|
1781
|
+
this.agentService.config = this.config;
|
|
1782
|
+
this.agentService.showMapview = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.dashboard) === null || _b === void 0 ? void 0 : _b.isShowMaps) !== null && _c !== void 0 ? _c : false;
|
|
1783
|
+
this.agentService.addTaskForm =
|
|
1784
|
+
(_f = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.dashboard) === null || _e === void 0 ? void 0 : _e.addTaskForm) !== null && _f !== void 0 ? _f : this.agentService.addTaskForm;
|
|
1785
|
+
if (((_h = (_g = this.config) === null || _g === void 0 ? void 0 : _g.dashboard) === null || _h === void 0 ? void 0 : _h.mapType) == 'google-maps' &&
|
|
1786
|
+
kwikidToolkit.isNotEmptyValue((_k = (_j = this.config) === null || _j === void 0 ? void 0 : _j.dashboard) === null || _k === void 0 ? void 0 : _k.googleMapsAPIKey)) {
|
|
1787
|
+
this.googleMapsService
|
|
1788
|
+
.loadMaps((_m = (_l = this.config) === null || _l === void 0 ? void 0 : _l.dashboard) === null || _m === void 0 ? void 0 : _m.googleMapsAPIKey)
|
|
1789
|
+
.subscribe(function (loaded) {
|
|
1790
|
+
_this.mapsLoaded = loaded;
|
|
1791
|
+
if (loaded) {
|
|
1792
|
+
console.log('Google Maps JavaScript API loaded successfully.');
|
|
1793
|
+
_this.loading = false;
|
|
1794
|
+
// Initialize and render Google Map here
|
|
1795
|
+
}
|
|
1796
|
+
else {
|
|
1797
|
+
console.error('Google Maps JavaScript API failed to load.');
|
|
1798
|
+
_this.loading = false;
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
else {
|
|
1803
|
+
this.mapsLoaded = true;
|
|
1804
|
+
this.loading = false;
|
|
1805
|
+
}
|
|
1806
|
+
setTimeout(function () {
|
|
1807
|
+
_this.windowResizeWatcher();
|
|
1808
|
+
}, 1000);
|
|
1809
|
+
return [2 /*return*/];
|
|
1810
|
+
});
|
|
1811
|
+
});
|
|
1415
1812
|
};
|
|
1416
1813
|
KwikIDAgentDashboardComponent.prototype.handleOnClickNext = function (e) {
|
|
1417
1814
|
this.nextStep.emit(e);
|
|
@@ -1453,8 +1850,8 @@
|
|
|
1453
1850
|
KwikIDAgentDashboardComponent.prototype.handleOnClickViewForms = function (e) { };
|
|
1454
1851
|
return KwikIDAgentDashboardComponent;
|
|
1455
1852
|
}());
|
|
1456
|
-
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, deps: [{ token:
|
|
1457
|
-
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { config: "config", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: googleMaps.MapInfoWindow, descendants: true }, { propertyName: "mapElement", first: true, predicate: ["map"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"kwikid-agent-dashboard\" *ngIf=\"!loading\">\n <div class=\"wrapper\">\n <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>\n <kwikui-button\n *ngIf=\"agentService.config?.dashboard?.isAllowAddTask\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconAddRowLarge'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button>\n <kwikui-button\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n [icon]=\"'tuiIconRefreshCwLarge'\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button\n [icon]=\"'tuiIconSettingsLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"m\"\n [tuiDropdown]=\"dropdownContent\"\n [tuiDropdownManual]=\"open\"\n (tuiObscured)=\"onObscured($event)\"\n ></kwikui-button>\n <ng-template #dropdownContent>\n <div class=\"menu-dropdown\">\n <div class=\"menu-dropdown-header\">\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=\"this.config.dashboard.isShowMaps\"\n id=\"\"\n label=\"{{\n agentService.showMapview ? 'Hide Maps' : 'Show Maps'\n }}\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\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 <div class=\"menu-dropdown-footer\">\n <kwikui-button\n id=\"\"\n label=\"Logout\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconLogOut'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"handleOnClickNext({ stepType: 'LOGOUT' })\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\n </div>\n </header>\n\n <div class=\"dashboard-body\">\n <div [class]=\"agentService.showMapview ? 'map' : 'map-hidden'\">\n <div id=\"map\" style=\"height: 100%\"></div>\n </div>\n\n <div\n class=\"task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.isShowTaskDetails != undefined &&\n !agentService.showMapview\n \"\n >\n <customer-details\n [customer]=\"taskList[agentService.isShowTaskDetails]\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-details>\n </div>\n\n <div\n class=\"no-task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.isShowTaskDetails == undefined &&\n !agentService.showMapview\n \"\n >\n <img src=\"assets/No-Results.jpg\" class=\"no-task-img\" alt=\"No Task\" />\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 ></customer-list>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"kwikid-agent-dashboard-loader\" *ngIf=\"loading\">\n <span class=\"loader\"></span>\n</div>\n\n<ng-template #template let-observer>\n <div class=\"add-task-header\">\n <h2>{{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 (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n</ng-template>\n", styles: [".kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%;position:relative}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:4rem;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper header .client-logo{height:100%;padding-left:1rem}.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:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{width:100%;height:100%;background-color:#fafafa;overflow:hidden}@media screen and (min-width: 600px){.kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:4rem;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.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;padding:1.5rem;grid-gap:1.5rem;gap:1.5rem;overflow:auto;background-color:#fafafa}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .task-details{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .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:400px;width:100%;height:100%;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}}.menu{position:absolute;transition:\"0.15s linear 0s\"}.kwikid-agent-dashboard-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-agent-dashboard-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-agent-dashboard-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-agent-dashboard-loader .t-loader{display:none!important}.add-task-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:.5rem 0 1rem 1rem}:host{width:100%;height:100%}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.menu-dropdown{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;grid-gap:.5rem;gap:.5rem;padding:1rem 1.5rem}.menu-dropdown .menu-dropdown-header{display:flex;flex-direction:column;align-content:flex-start;justify-content:space-between;align-items:flex-start;grid-gap:1rem;gap:1rem}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-name{font-size:1.2rem;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}\n"], components: [{ type: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: CustomerDetailsComponent, selector: "customer-details", inputs: ["customer", "config"], outputs: ["nextStep", "removeTask"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "config"], outputs: ["nextStep", "removeTask", "filterTaskList"] }, { type: i7__namespace.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i10__namespace.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i10__namespace.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i10__namespace.TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])" }, { type: i10__namespace.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i10__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }] });
|
|
1853
|
+
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, deps: [{ token: GoogleMapsService }, { token: AgentService }, { token: i3__namespace.HttpClient }, { token: i0__namespace.ElementRef }, { token: i11.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1854
|
+
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { config: "config", taskList: "taskList" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask", filterTaskList: "filterTaskList" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "infoWindow", first: true, predicate: i2.MapInfoWindow, descendants: true }, { propertyName: "mapElement", first: true, predicate: ["map"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"kwikid-agent-dashboard\" *ngIf=\"!loading\">\n <div class=\"wrapper\">\n <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=\"actions\">\n <kwikui-button\n *ngIf=\"agentService.config?.dashboard?.isAllowAddTask\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"primary\"\n [label]=\"agentService.config?.dashboard?.addTaskButtonLabel ?? 'Add User'\"\n [icon]=\"'tuiIconPlus'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"s\"\n (onClick)=\"showDialog(template)\"\n ></kwikui-button>\n\n <kwikui-button\n *ngIf=\"!agentService.config?.dashboard?.isAllowAddTask\"\n appearance=\"mono\"\n class=\"menu-dropdown-buttons\"\n [icon]=\"'tuiIconRefreshCwLarge'\"\n size=\"m\"\n type=\"button\"\n (onClick)=\"refresh()\"\n ></kwikui-button>\n <span (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <kwikui-button\n [icon]=\"'tuiIconSettingsLarge'\"\n (onClick)=\"onClick()\"\n appearance=\"mono\"\n size=\"s\"\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 <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 id=\"\"\n label=\"{{\n agentService.showMapview ? 'Hide Maps' : 'Show Maps'\n }}\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\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 id=\"\"\n label=\"Logout\"\n styles=\"\"\n class=\"menu-dropdown-buttons\"\n type=\"button\"\n appearance=\"mono\"\n [icon]=\"'tuiIconLogOut'\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n (onClick)=\"handleOnClickNext({ stepType: 'LOGOUT' })\"\n ></kwikui-button>\n </div>\n </div>\n </ng-template>\n </span>\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.isShowTaskDetails != undefined &&\n !agentService.showMapview\n \"\n >\n <customer-details\n [customer]=\"taskList[agentService.isShowTaskDetails]\"\n [config]=\"config\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-details>\n </div>\n\n <div\n class=\"no-task-details\"\n *ngIf=\"\n !agentService.isMobileView &&\n agentService.isShowTaskDetails == undefined &&\n !agentService.showMapview\n \"\n >\n <img src=\"assets/No-Results.jpg\" class=\"no-task-img\" alt=\"No Task\" />\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 ></customer-list>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"kwikid-agent-dashboard-loader\" *ngIf=\"loading\">\n <span class=\"loader\"></span>\n</div>\n\n<ng-template #template let-observer>\n <div class=\"add-task-header\">\n <h2>{{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 (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n</ng-template>\n", styles: [".kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%;position:relative}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:4rem;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper header .client-logo{height:100%;padding-left:1rem}.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 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%;background-color:#fafafa;overflow:hidden}@media screen and (min-width: 600px){.kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:4rem;border:1px solid #fafafa;box-shadow:0 2px 10px -6px #000}.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;padding:1.5rem;grid-gap:1.5rem;gap:1.5rem;overflow:auto;background-color:#fafafa}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .task-details{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .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:400px;width:100%;height:100%;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}}.menu{position:absolute;transition:\"0.15s linear 0s\"}.kwikid-agent-dashboard-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-agent-dashboard-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-agent-dashboard-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-agent-dashboard-loader .t-loader{display:none!important}.add-task-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:.5rem 0 1rem 1rem}:host{width:100%;height:100%}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.menu-dropdown{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;grid-gap:.5rem;gap:.5rem;padding:1rem 1.5rem}.menu-dropdown .menu-dropdown-header{display:flex;flex-direction:column;align-content:flex-start;justify-content:space-between;align-items:flex-start;grid-gap:1rem;gap:1rem}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-name{font-size:1.2rem;font-weight:600}.menu-dropdown .menu-dropdown-header .menu-dropdown-header-agent-id{font-size:.8rem;font-weight:600}.menu-dropdown .menu-dropdown-buttons ::ng-deep .t-wrapper{padding:0!important}\n"], components: [{ type: i4__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.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"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers", "config"], outputs: ["nextStep", "removeTask", "filterTaskList"] }, { type: i8__namespace.KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i11__namespace.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { type: i11__namespace.TuiDropdownDriverDirective, selector: "[tuiDropdown]" }, { type: i11__namespace.TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])" }, { type: i11__namespace.TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: ["tuiDropdownManual"] }, { type: i11__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.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.MapDirectionsRenderer, selector: "map-directions-renderer", inputs: ["directions", "options"], outputs: ["directionsChanged"], exportAs: ["mapDirectionsRenderer"] }], pipes: { "async": i6__namespace.AsyncPipe } });
|
|
1458
1855
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, decorators: [{
|
|
1459
1856
|
type: i0.Component,
|
|
1460
1857
|
args: [{
|
|
@@ -1463,9 +1860,9 @@
|
|
|
1463
1860
|
styleUrls: ['./kwikid-agent-dashboard.component.scss']
|
|
1464
1861
|
}]
|
|
1465
1862
|
}], ctorParameters: function () {
|
|
1466
|
-
return [{ type:
|
|
1863
|
+
return [{ type: GoogleMapsService }, { type: AgentService }, { type: i3__namespace.HttpClient }, { type: i0__namespace.ElementRef }, { type: i11__namespace.TuiDialogService, decorators: [{
|
|
1467
1864
|
type: i0.Inject,
|
|
1468
|
-
args: [
|
|
1865
|
+
args: [i11.TuiDialogService]
|
|
1469
1866
|
}] }];
|
|
1470
1867
|
}, propDecorators: { windowResizeWatcher: [{
|
|
1471
1868
|
type: i0.HostListener,
|
|
@@ -1484,7 +1881,7 @@
|
|
|
1484
1881
|
type: i0.Output
|
|
1485
1882
|
}], infoWindow: [{
|
|
1486
1883
|
type: i0.ViewChild,
|
|
1487
|
-
args: [
|
|
1884
|
+
args: [i2.MapInfoWindow, { static: false }]
|
|
1488
1885
|
}], mapElement: [{
|
|
1489
1886
|
type: i0.ViewChild,
|
|
1490
1887
|
args: ['map', { static: true }]
|
|
@@ -1501,55 +1898,55 @@
|
|
|
1501
1898
|
CustomerTileComponent,
|
|
1502
1899
|
Ng2SearchPipe,
|
|
1503
1900
|
StatusPillComponent,
|
|
1504
|
-
CustomerDetailsComponent], imports: [
|
|
1505
|
-
i3
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1901
|
+
CustomerDetailsComponent], imports: [i6.CommonModule,
|
|
1902
|
+
i3.HttpClientModule,
|
|
1903
|
+
i7.FormsModule,
|
|
1904
|
+
i7.ReactiveFormsModule,
|
|
1905
|
+
i4.KwikUIButtonModule,
|
|
1906
|
+
i4.KwikUIInputModule,
|
|
1907
|
+
i4.KwikUIInputDateModule,
|
|
1908
|
+
i4.KwikUIInputDateRangeModule,
|
|
1909
|
+
i4.KwikUIInputSelectModule,
|
|
1910
|
+
i4.KwikUILabelValuePairModule,
|
|
1911
|
+
i4.KwikUITableModule,
|
|
1912
|
+
i4.KwikUITablePaginationModule,
|
|
1913
|
+
i8.KwikIDFormViewModule,
|
|
1914
|
+
i11.TuiRootModule,
|
|
1915
|
+
i11.TuiDialogModule,
|
|
1916
|
+
i11.TuiDropdownModule,
|
|
1520
1917
|
addonMobile.TuiSidebarModule,
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
i3
|
|
1527
|
-
i3
|
|
1918
|
+
i10.TuiActiveZoneModule,
|
|
1919
|
+
i11.TuiGroupModule,
|
|
1920
|
+
i11.TuiSvgModule,
|
|
1921
|
+
i5.ScrollingModule,
|
|
1922
|
+
i2.GoogleMapsModule,
|
|
1923
|
+
i3.HttpClientModule,
|
|
1924
|
+
i3.HttpClientJsonpModule], exports: [KwikIDAgentDashboardComponent] });
|
|
1528
1925
|
/** @nocollapse */ KwikIDAgentDashboardModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, imports: [[
|
|
1529
|
-
|
|
1530
|
-
i3
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1926
|
+
i6.CommonModule,
|
|
1927
|
+
i3.HttpClientModule,
|
|
1928
|
+
i7.FormsModule,
|
|
1929
|
+
i7.ReactiveFormsModule,
|
|
1930
|
+
i4.KwikUIButtonModule,
|
|
1931
|
+
i4.KwikUIInputModule,
|
|
1932
|
+
i4.KwikUIInputDateModule,
|
|
1933
|
+
i4.KwikUIInputDateRangeModule,
|
|
1934
|
+
i4.KwikUIInputSelectModule,
|
|
1935
|
+
i4.KwikUILabelValuePairModule,
|
|
1936
|
+
i4.KwikUITableModule,
|
|
1937
|
+
i4.KwikUITablePaginationModule,
|
|
1938
|
+
i8.KwikIDFormViewModule,
|
|
1939
|
+
i11.TuiRootModule,
|
|
1940
|
+
i11.TuiDialogModule,
|
|
1941
|
+
i11.TuiDropdownModule,
|
|
1545
1942
|
addonMobile.TuiSidebarModule,
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
i3
|
|
1552
|
-
i3
|
|
1943
|
+
i10.TuiActiveZoneModule,
|
|
1944
|
+
i11.TuiGroupModule,
|
|
1945
|
+
i11.TuiSvgModule,
|
|
1946
|
+
i5.ScrollingModule,
|
|
1947
|
+
i2.GoogleMapsModule,
|
|
1948
|
+
i3.HttpClientModule,
|
|
1949
|
+
i3.HttpClientJsonpModule
|
|
1553
1950
|
]] });
|
|
1554
1951
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, decorators: [{
|
|
1555
1952
|
type: i0.NgModule,
|
|
@@ -1563,30 +1960,30 @@
|
|
|
1563
1960
|
CustomerDetailsComponent
|
|
1564
1961
|
],
|
|
1565
1962
|
imports: [
|
|
1566
|
-
|
|
1567
|
-
i3
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1963
|
+
i6.CommonModule,
|
|
1964
|
+
i3.HttpClientModule,
|
|
1965
|
+
i7.FormsModule,
|
|
1966
|
+
i7.ReactiveFormsModule,
|
|
1967
|
+
i4.KwikUIButtonModule,
|
|
1968
|
+
i4.KwikUIInputModule,
|
|
1969
|
+
i4.KwikUIInputDateModule,
|
|
1970
|
+
i4.KwikUIInputDateRangeModule,
|
|
1971
|
+
i4.KwikUIInputSelectModule,
|
|
1972
|
+
i4.KwikUILabelValuePairModule,
|
|
1973
|
+
i4.KwikUITableModule,
|
|
1974
|
+
i4.KwikUITablePaginationModule,
|
|
1975
|
+
i8.KwikIDFormViewModule,
|
|
1976
|
+
i11.TuiRootModule,
|
|
1977
|
+
i11.TuiDialogModule,
|
|
1978
|
+
i11.TuiDropdownModule,
|
|
1582
1979
|
addonMobile.TuiSidebarModule,
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
i3
|
|
1589
|
-
i3
|
|
1980
|
+
i10.TuiActiveZoneModule,
|
|
1981
|
+
i11.TuiGroupModule,
|
|
1982
|
+
i11.TuiSvgModule,
|
|
1983
|
+
i5.ScrollingModule,
|
|
1984
|
+
i2.GoogleMapsModule,
|
|
1985
|
+
i3.HttpClientModule,
|
|
1986
|
+
i3.HttpClientJsonpModule
|
|
1590
1987
|
],
|
|
1591
1988
|
exports: [KwikIDAgentDashboardComponent]
|
|
1592
1989
|
}]
|