kwikid-agent-dashboard 0.0.22 → 0.0.24
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 +69 -24
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -1
- package/esm2015/lib/components/customer-details/customer-details.component.js +2 -2
- package/esm2015/lib/components/customer-tile/customer-tile.component.js +2 -2
- package/esm2015/lib/components/customer-tile/status-pill/status-pill.component.js +7 -4
- package/esm2015/lib/components/customer-tile/status-pill/status-pill.definitions.js +23 -5
- package/esm2015/lib/services/agent.service.js +24 -1
- package/esm2015/lib/services/map.service.js +4 -2
- package/fesm2015/kwikid-agent-dashboard.js +69 -24
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/lib/components/customer-tile/status-pill/status-pill.component.d.ts +1 -0
- package/lib/components/customer-tile/status-pill/status-pill.definitions.d.ts +14 -5
- package/lib/services/agent.service.d.ts +4 -0
- package/package.json +3 -3
|
@@ -497,6 +497,42 @@
|
|
|
497
497
|
__disposeResources: __disposeResources,
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
+
var EStatus;
|
|
501
|
+
(function (EStatus) {
|
|
502
|
+
EStatus["NOT_STARTED"] = "not_started";
|
|
503
|
+
EStatus["ON_GOING"] = "on_going";
|
|
504
|
+
EStatus["AUDITING"] = "auditing";
|
|
505
|
+
EStatus["REJECTED"] = "rejected";
|
|
506
|
+
EStatus["AFTER_AUDIT"] = "after_audit";
|
|
507
|
+
EStatus["COMPLETE"] = "complete";
|
|
508
|
+
EStatus["WAITING"] = "waiting";
|
|
509
|
+
EStatus["SESSION_EXPIRED"] = "session_expired";
|
|
510
|
+
EStatus["KYC_REJECTED"] = "kyc_rejected";
|
|
511
|
+
EStatus["KYC_REQUEST_REJECTED"] = "kyc_request_rejected";
|
|
512
|
+
EStatus["KYC_REQUEST_ACCEPTED"] = "kyc_request_accepted";
|
|
513
|
+
EStatus["KYC_RESULT_REJECTED"] = "kyc_result_rejected";
|
|
514
|
+
EStatus["KYC_RESULT_APPROVED"] = "kyc_result_approved";
|
|
515
|
+
EStatus["KYC_RESULT_PARTIAL_UPDATE"] = "kyc_result_partial_update";
|
|
516
|
+
EStatus["KYC_RESULT_UNDER_REVIEW"] = "kyc_result_under_review";
|
|
517
|
+
})(EStatus || (EStatus = {}));
|
|
518
|
+
var VStatus = [
|
|
519
|
+
EStatus.NOT_STARTED,
|
|
520
|
+
EStatus.ON_GOING,
|
|
521
|
+
EStatus.AUDITING,
|
|
522
|
+
EStatus.REJECTED,
|
|
523
|
+
EStatus.AFTER_AUDIT,
|
|
524
|
+
EStatus.COMPLETE,
|
|
525
|
+
EStatus.WAITING,
|
|
526
|
+
EStatus.SESSION_EXPIRED,
|
|
527
|
+
EStatus.KYC_REJECTED,
|
|
528
|
+
EStatus.KYC_REQUEST_REJECTED,
|
|
529
|
+
EStatus.KYC_REQUEST_ACCEPTED,
|
|
530
|
+
EStatus.KYC_RESULT_REJECTED,
|
|
531
|
+
EStatus.KYC_RESULT_APPROVED,
|
|
532
|
+
EStatus.KYC_RESULT_PARTIAL_UPDATE,
|
|
533
|
+
EStatus.KYC_RESULT_UNDER_REVIEW
|
|
534
|
+
];
|
|
535
|
+
|
|
500
536
|
var AgentService = /** @class */ (function () {
|
|
501
537
|
function AgentService() {
|
|
502
538
|
this.isListOpen = true;
|
|
@@ -581,6 +617,9 @@
|
|
|
581
617
|
},
|
|
582
618
|
steps: {
|
|
583
619
|
hidden: true
|
|
620
|
+
},
|
|
621
|
+
logo: {
|
|
622
|
+
hidden: true
|
|
584
623
|
}
|
|
585
624
|
},
|
|
586
625
|
footer: {
|
|
@@ -603,6 +642,25 @@
|
|
|
603
642
|
AgentService.prototype.toggleMapview = function () {
|
|
604
643
|
this.showMapview = !this.showMapview;
|
|
605
644
|
};
|
|
645
|
+
AgentService.prototype.canStartJourney = function (status) {
|
|
646
|
+
var noneEditableStatus = [
|
|
647
|
+
EStatus.REJECTED,
|
|
648
|
+
EStatus.AFTER_AUDIT,
|
|
649
|
+
EStatus.COMPLETE,
|
|
650
|
+
EStatus.SESSION_EXPIRED,
|
|
651
|
+
EStatus.KYC_REJECTED,
|
|
652
|
+
EStatus.KYC_RESULT_APPROVED,
|
|
653
|
+
EStatus.KYC_RESULT_REJECTED,
|
|
654
|
+
EStatus.KYC_RESULT_UNDER_REVIEW,
|
|
655
|
+
EStatus.KYC_REQUEST_REJECTED
|
|
656
|
+
];
|
|
657
|
+
if (noneEditableStatus.includes(status)) {
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
return true;
|
|
662
|
+
}
|
|
663
|
+
};
|
|
606
664
|
return AgentService;
|
|
607
665
|
}());
|
|
608
666
|
/** @nocollapse */ AgentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AgentService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -645,7 +703,9 @@
|
|
|
645
703
|
var lat = _g.lat, lng = _g.lng, title = _g.title, color = _g.color;
|
|
646
704
|
L__namespace.marker([lat, lng], {
|
|
647
705
|
icon: L__namespace.icon({
|
|
648
|
-
iconUrl: color == 'red'
|
|
706
|
+
iconUrl: color == 'red'
|
|
707
|
+
? 'https://kwikid.s3.ap-south-1.amazonaws.com/CONFIG/USER/assets/map-marker-0.png'
|
|
708
|
+
: 'https://kwikid.s3.ap-south-1.amazonaws.com/CONFIG/USER/assets/map-marker-1.png'
|
|
649
709
|
})
|
|
650
710
|
})
|
|
651
711
|
.addTo(this.map)
|
|
@@ -970,7 +1030,7 @@
|
|
|
970
1030
|
return CustomerDetailsComponent;
|
|
971
1031
|
}());
|
|
972
1032
|
/** @nocollapse */ CustomerDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, deps: [{ token: AgentService }, { token: MapService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
973
|
-
/** @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" }, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div class=\"customer-details-heading\">Task Details</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n {{\n config?.dashboard?.taskIdentifier\n ? getTaskDetails(config?.dashboard?.taskIdentifier)\n : customer.user_id\n }}\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 <div class=\"customer-details-table-detail-value\">\n {{ getTaskDetails(taskData) }}\n </div>\n </div>\n </div>\n\n <div class=\"customer-details-date\">\n Task Created on: {{ 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({
|
|
1033
|
+
/** @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" }, ngImport: i0__namespace, template: "<div class=\"customer-details-wrapper\">\n <div class=\"customer-details-heading\">Task Details</div>\n <div class=\"customer-details-body\">\n <div class=\"customer-details-user-id\">\n {{\n config?.dashboard?.taskIdentifier\n ? getTaskDetails(config?.dashboard?.taskIdentifier)\n : customer.user_id\n }}\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 <div class=\"customer-details-table-detail-value\">\n {{ getTaskDetails(taskData) }}\n </div>\n </div>\n </div>\n\n <div class=\"customer-details-date\">\n Task Created on: {{ 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:hidden;grid-gap:.5rem;gap:.5rem;padding:1.5rem;height:100%;width:100%}.customer-details-wrapper .customer-details-heading{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:1rem 0;font-size:1.5rem;font-weight:600}.customer-details-wrapper .customer-details-body{display:flex;flex-direction:column;grid-gap:1.25rem;gap:1.25rem}.customer-details-wrapper .customer-details-body .customer-details-user-id{font-size:1.25rem;font-weight:500;padding:.5rem 0}.customer-details-wrapper .customer-details-body .customer-details-table{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:column}.customer-details-wrapper .customer-details-body .customer-details-table .customer-details-table-data .customer-details-table-detail-name{font-weight:500}.customer-details-wrapper .customer-details-body .customer-details-table .customer-details-table-data .customer-details-table-detail-value{word-wrap:break-word}.customer-details-wrapper .customer-details-body .customer-details-date{padding-top:1rem}.customer-details-wrapper .customer-details-body .customer-details-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-task-buttons{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:1rem 0}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.2rem;gap:.2rem;align-items:center;justify-content:flex-end}.customer-details-wrapper .customer-details-body .customer-details-actions .customer-details-journey-buttons .customer-share-link{font-size:.7rem}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
974
1034
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerDetailsComponent, decorators: [{
|
|
975
1035
|
type: i0.Component,
|
|
976
1036
|
args: [{
|
|
@@ -988,40 +1048,25 @@
|
|
|
988
1048
|
type: i0.Output
|
|
989
1049
|
}] } });
|
|
990
1050
|
|
|
991
|
-
var EStatus;
|
|
992
|
-
(function (EStatus) {
|
|
993
|
-
EStatus["NOT_STARTED"] = "not started";
|
|
994
|
-
EStatus["ON_GOING"] = "on going";
|
|
995
|
-
EStatus["AUDITING"] = "auditing";
|
|
996
|
-
EStatus["REJECTED"] = "rejected";
|
|
997
|
-
EStatus["AFTER_AUDIT"] = "after audit";
|
|
998
|
-
EStatus["COMPLETE"] = "complete";
|
|
999
|
-
})(EStatus || (EStatus = {}));
|
|
1000
|
-
var VStatus = [
|
|
1001
|
-
EStatus.NOT_STARTED,
|
|
1002
|
-
EStatus.ON_GOING,
|
|
1003
|
-
EStatus.AUDITING,
|
|
1004
|
-
EStatus.REJECTED,
|
|
1005
|
-
EStatus.AFTER_AUDIT,
|
|
1006
|
-
EStatus.COMPLETE
|
|
1007
|
-
];
|
|
1008
|
-
|
|
1009
1051
|
var StatusPillComponent = /** @class */ (function () {
|
|
1010
1052
|
function StatusPillComponent() {
|
|
1011
1053
|
}
|
|
1012
1054
|
StatusPillComponent.prototype.ngOnInit = function () {
|
|
1013
1055
|
if (kwikidToolkit.isEmptyValue(this.status)) {
|
|
1014
|
-
this.status = EStatus.
|
|
1056
|
+
this.status = EStatus.WAITING;
|
|
1015
1057
|
}
|
|
1016
1058
|
};
|
|
1017
1059
|
StatusPillComponent.prototype.getStatusPillClass = function (status) {
|
|
1018
|
-
var newStatus = status.replace(' ', '-');
|
|
1060
|
+
var newStatus = status.replace('_', '-').replace('_', '-').replace('_', '-');
|
|
1019
1061
|
return "status-pill " + newStatus;
|
|
1020
1062
|
};
|
|
1063
|
+
StatusPillComponent.prototype.getStatusLabel = function (status) {
|
|
1064
|
+
return status.replace('_', ' ').replace('_', ' ').replace('_', ' ');
|
|
1065
|
+
};
|
|
1021
1066
|
return StatusPillComponent;
|
|
1022
1067
|
}());
|
|
1023
1068
|
/** @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 });
|
|
1024
|
-
/** @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)\">{{status}}</div>\n", styles: [".status-pill{background-color:#555;padding:.1rem .5rem;border-radius:1rem;font-size:.7rem;color:#fff}.complete{background-color:var(--tui-positive)}.rejected{background-color:var(--tui-negative)}.auditing
|
|
1069
|
+
/** @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: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1025
1070
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: StatusPillComponent, decorators: [{
|
|
1026
1071
|
type: i0.Component,
|
|
1027
1072
|
args: [{
|
|
@@ -1090,7 +1135,7 @@
|
|
|
1090
1135
|
return CustomerTileComponent;
|
|
1091
1136
|
}());
|
|
1092
1137
|
/** @nocollapse */ CustomerTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, deps: [{ token: MapService }, { token: AgentService }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1093
|
-
/** @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 [ngClass]=\"getClass()\">\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{\n config?.dashboard?.taskIdentifier\n ? getTaskDetails(config?.dashboard?.taskIdentifier)\n : customer.user_id\n }}\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 {{ getTaskDetails(taskData) }}\n </div>\n <div\n *ngIf=\"\n agentService.config?.dashboard?.isShowMaps &&\n agentService.config?.dashboard?.isShowDistanceAndTime &&\n mapService.getSelectedTaskDistanceAndTime()\n \"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n Distance: {{ mapService.getSelectedTaskDistanceAndTime()?.distance }} |\n Time: {{ mapService.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
|
|
1138
|
+
/** @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 [ngClass]=\"getClass()\">\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{\n config?.dashboard?.taskIdentifier\n ? getTaskDetails(config?.dashboard?.taskIdentifier)\n : customer.user_id\n }}\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 {{ getTaskDetails(taskData) }}\n </div>\n <div\n *ngIf=\"\n agentService.config?.dashboard?.isShowMaps &&\n agentService.config?.dashboard?.isShowDistanceAndTime &&\n mapService.getSelectedTaskDistanceAndTime()\n \"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n Distance: {{ mapService.getSelectedTaskDistanceAndTime()?.distance }} |\n Time: {{ mapService.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: StatusPillComponent, selector: "status-pill", inputs: ["status"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1094
1139
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
|
|
1095
1140
|
type: i0.Component,
|
|
1096
1141
|
args: [{
|