@aggdirect/coolmap 5.0.9 → 5.0.11
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/fesm2022/aggdirect-coolmap.mjs +109 -28
- package/fesm2022/aggdirect-coolmap.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggdirect-coolmap.mjs","sources":["../../../projects/coolmap/src/lib/coolmap.ts","../../../projects/coolmap/src/lib/components/ag-toast-container/ag-toast-container.component.ts","../../../projects/coolmap/src/lib/components/sms-card-details/sms-card-details.component.ts","../../../projects/coolmap/src/lib/components/sms-card-details/sms-card-details.component.html","../../../projects/coolmap/src/lib/components/driver-list/driver-list.component.ts","../../../projects/coolmap/src/lib/components/driver-list/driver-list.component.html","../../../projects/coolmap/src/lib/components/job-details/job-details.component.ts","../../../projects/coolmap/src/lib/components/job-details/job-details.component.html","../../../projects/coolmap/src/lib/components/job-code/job-code.component.ts","../../../projects/coolmap/src/lib/components/job-code/job-code.component.html","../../../projects/coolmap/src/lib/components/route-info-card/route-info-card.component.ts","../../../projects/coolmap/src/lib/components/route-info-card/route-info-card.component.html","../../../projects/coolmap/src/lib/components/job-route-list/job-route-list.component.ts","../../../projects/coolmap/src/lib/components/job-route-list/job-route-list.component.html","../../../projects/coolmap/src/lib/components/view-route-list/view-route-list.component.ts","../../../projects/coolmap/src/lib/components/view-route-list/view-route-list.component.html","../../../projects/coolmap/src/lib/components/add-route/add-route.component.ts","../../../projects/coolmap/src/lib/components/add-route/add-route.component.html","../../../projects/coolmap/src/lib/components/share-route/share-route.component.ts","../../../projects/coolmap/src/lib/components/share-route/share-route.component.html","../../../projects/coolmap/src/lib/components/coolmap/coolmap.component.ts","../../../projects/coolmap/src/lib/components/coolmap/coolmap.component.html","../../../projects/coolmap/src/public-api.ts","../../../projects/coolmap/src/aggdirect-coolmap.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-coolmap',\n imports: [],\n template: ``,\n styles: ``,\n})\nexport class Coolmap {\n\n}\n","import { Component, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, CheckCircle, XCircle, AlertTriangle, Info, X } from 'lucide-angular';\nimport { AgToastService, Toast } from '@aggdirect/coolmap-services';\n\n@Component({\n selector: 'ag-toast-container',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n template: `\n <div [class]=\"containerClasses\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div [class]=\"getToastClasses(toast)\" role=\"alert\">\n <!-- Icon -->\n <div [class]=\"getIconClasses(toast)\">\n @switch (toast.variant) {\n @case ('success') {\n <lucide-icon [img]=\"successIcon\" [size]=\"20\"></lucide-icon>\n }\n @case ('error') {\n <lucide-icon [img]=\"errorIcon\" [size]=\"20\"></lucide-icon>\n }\n @case ('warning') {\n <lucide-icon [img]=\"warningIcon\" [size]=\"20\"></lucide-icon>\n }\n @default {\n <lucide-icon [img]=\"infoIcon\" [size]=\"20\"></lucide-icon>\n }\n }\n </div>\n \n <!-- Content -->\n <div class=\"toast-content\">\n @if (toast.title) {\n <div class=\"toast-title\">{{ toast.title }}</div>\n }\n <div class=\"toast-message\">{{ toast.message }}</div>\n @if (toast.action) {\n <button class=\"toast-action\" (click)=\"onActionClick(toast)\">\n {{ toast.action.label }}\n </button>\n }\n </div>\n \n <!-- Dismiss button -->\n @if (toast.dismissible) {\n <button class=\"toast-dismiss\" (click)=\"dismiss(toast)\" aria-label=\"Dismiss\">\n <lucide-icon [img]=\"closeIcon\" [size]=\"16\"></lucide-icon>\n </button>\n }\n </div>\n }\n </div>\n `,\n styles: [`\n .toast-container {\n position: fixed;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n pointer-events: none;\n max-width: 400px;\n }\n \n /* Position variants */\n .toast-container.top-right {\n top: 0;\n right: 0;\n }\n \n .toast-container.top-left {\n top: 0;\n left: 0;\n }\n \n .toast-container.bottom-right {\n bottom: 0;\n right: 0;\n }\n \n .toast-container.bottom-left {\n bottom: 0;\n left: 0;\n }\n \n .toast-container.top-center {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n \n .toast-container.bottom-center {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n \n .toast {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 14px 16px;\n background: white;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n pointer-events: auto;\n animation: toastSlideIn 0.3s ease;\n \n :host-context(.dark) & {\n background: #1e293b;\n border-color: #334155;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);\n }\n }\n \n @keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n \n .toast-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1px;\n }\n \n .toast-icon.success { color: #22c55e; }\n .toast-icon.error { color: #ef4444; }\n .toast-icon.warning { color: #f59e0b; }\n .toast-icon.info { color: #3b82f6; }\n \n .toast-content {\n flex: 1;\n min-width: 0;\n }\n \n .toast-title {\n font-size: 14px;\n font-weight: 600;\n color: #1e293b;\n margin-bottom: 2px;\n \n :host-context(.dark) & {\n color: #f1f5f9;\n }\n }\n \n .toast-message {\n font-size: 13px;\n color: #64748b;\n line-height: 1.4;\n \n :host-context(.dark) & {\n color: #94a3b8;\n }\n }\n \n .toast-action {\n margin-top: 8px;\n padding: 0;\n border: none;\n background: transparent;\n color: #3b82f6;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n \n &:hover {\n text-decoration: underline;\n }\n }\n \n .toast-dismiss {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: -4px -4px -4px 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: #94a3b8;\n cursor: pointer;\n transition: all 0.15s ease;\n \n &:hover {\n background: #f1f5f9;\n color: #64748b;\n }\n \n :host-context(.dark) & {\n &:hover {\n background: #334155;\n color: #f1f5f9;\n }\n }\n }\n \n /* Variant borders */\n .toast.success {\n border-left: 3px solid #22c55e;\n }\n \n .toast.error {\n border-left: 3px solid #ef4444;\n }\n \n .toast.warning {\n border-left: 3px solid #f59e0b;\n }\n \n .toast.info {\n border-left: 3px solid #3b82f6;\n }\n `]\n})\nexport class AgToastContainerComponent {\n toastService = inject(AgToastService);\n \n successIcon: any = CheckCircle;\n errorIcon: any = XCircle;\n warningIcon: any = AlertTriangle;\n infoIcon: any = Info;\n closeIcon: any = X;\n \n get containerClasses(): string {\n return `toast-container ${this.toastService.toastPosition()}`;\n }\n \n getToastClasses(toast: Toast): string {\n return `toast ${toast.variant}`;\n }\n \n getIconClasses(toast: Toast): string {\n return `toast-icon ${toast.variant}`;\n }\n \n dismiss(toast: Toast): void {\n this.toastService.dismiss(toast.id);\n }\n \n onActionClick(toast: Toast): void {\n if (toast.action?.onClick) {\n toast.action.onClick();\n }\n this.dismiss(toast);\n }\n}\n","import { NgClass } from '@angular/common';\nimport { Component, EventEmitter, Output, effect, input } from '@angular/core';\nimport { LucideAngularModule, X } from 'lucide-angular';\n\n@Component({\n selector: 'lib-sms-card-details',\n standalone: true,\n imports: [LucideAngularModule, NgClass],\n templateUrl: './sms-card-details.component.html',\n styleUrl: './sms-card-details.component.scss',\n})\nexport class SmsCardDetailsComponent {\n modalOpen = input<boolean>(false);\n smsListcollapse = input<boolean>(false);\n driverListcollapse = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n close() {\n this.modalOpenChange.emit(false);\n }\n icons = {\n X,\n };\n}\n","@if (modalOpen()) {\n<div\n class=\"fixed lg:absolute inset-0 overflow-y-auto lg:top-0 z-[111] lg:z-auto\"\n [ngClass]=\"smsListcollapse() && driverListcollapse() ? 'lg:left-[425px]' : 'lg:left-[670px]'\"\n>\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n <div class=\"flex min-h-full lg:items-start lg:justify-start items-center justify-center p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 text-[13px] font-medium text-gray-900 dark:text-white\">\n SMS All Drivers\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[70vh] overflow-y-auto p-2\">\n <div class=\"device-info\">\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Jobcode</span>\n <span class=\"value\">016164</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Date</span>\n <span class=\"value\">2026-4-1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Total tasks</span>\n <span class=\"value\">1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Material</span>\n <span class=\"value\">#2 Washed Gravel *</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Unit</span>\n <span class=\"value\">Ton</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Pickup Address</span>\n <span class=\"value\">vaibhav loc-1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Delivery Address</span>\n <span class=\"value\">vaibhav loc-2</span>\n </div>\n </div>\n <div class=\"mt-4\">\n <textarea\n rows=\"2\"\n placeholder=\"Text here....\"\n class=\"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm resize-none ng-pristine ng-valid ng-touched\"\n ></textarea>\n </div>\n <div class=\"mt-2 mb-2 flex justify-end\">\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-3 py-1 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-sm\"\n >\n Send SMS\n </button>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n","import { Component, EventEmitter, Output, effect, input, signal } from '@angular/core';\nimport { LucideAngularModule, X } from 'lucide-angular';\nimport { SmsCardDetailsComponent } from '../sms-card-details/sms-card-details.component';\nimport { NgClass } from '@angular/common';\n@Component({\n selector: 'lib-driver-list',\n standalone: true,\n imports: [LucideAngularModule, SmsCardDetailsComponent, NgClass],\n templateUrl: './driver-list.component.html',\n styleUrl: './driver-list.component.scss',\n})\nexport class DriverListComponent {\n showSmsModal = false;\n modalOpen = input<boolean>(false);\n driverListcollapse = input<boolean>(false);\n smsListcollapse = signal(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n close() {\n this.modalOpenChange.emit(false);\n }\n icons = {\n X,\n };\n showSmsModalPopup() {\n this.showSmsModal = !this.showSmsModal;\n this.smsListcollapse.set(this.showSmsModal);\n }\n}\n","@if (modalOpen()) {\n<div\n class=\"absolute inset-0 overflow-y-auto top-0\"\n [ngClass]=\"driverListcollapse() ? 'left-[60px]' : 'left-[300px]'\"\n>\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n <div class=\"flex min-h-full items-start justify-start p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Driver List\n </h3>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-3 sm:px-6 py-1 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-sm\"\n (click)=\"showSmsModalPopup()\"\n >\n SMS\n </button>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[40vh] overflow-y-auto p-2\">\n <ul class=\"flex flex-col gap-2\">\n <li>\n <div\n class=\"driver-row-1 flex flex-col driver-card bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2\"\n >\n <span class=\"driver-name\">Nilufarrr Lokmannn</span>\n <span class=\"com-name\">Aggdirect Android LLC 2</span>\n <div class=\"cont_del flex justify-between text-black dark:text-grey-600\">\n <small>Driver contact: <b>8318428713</b></small>\n <small>Company contact: <b>8318428713</b></small>\n </div>\n </div>\n </li>\n <li>\n <div\n class=\"driver-row-1 flex flex-col driver-card bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2\"\n >\n <span class=\"driver-name\">Nilufarrr Lokmannn</span>\n <span class=\"com-name\">Aggdirect Android LLC 2</span>\n <div class=\"cont_del flex justify-between\">\n <small>Driver contact: <b>8318428713</b></small>\n <small>Company contact: <b>8318428713</b></small>\n </div>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n}\n\n<lib-sms-card-details\n [(modalOpen)]=\"showSmsModal\"\n [smsListcollapse]=\"smsListcollapse()\"\n [driverListcollapse]=\"driverListcollapse()\"\n></lib-sms-card-details>\n","import { Component, EventEmitter, HostListener, Output, input, signal } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { LucideAngularModule, X } from 'lucide-angular';\n@Component({\n selector: 'lib-job-details',\n standalone: true,\n imports: [LucideAngularModule, NgClass],\n templateUrl: './job-details.component.html',\n styleUrl: './job-details.component.scss',\n})\nexport class JobDetailsComponent {\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n noBackdrop = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n dragX = signal(0);\n dragY = signal(0);\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n close() {\n this.modalOpenChange.emit(false);\n }\n icons = {\n X,\n };\n startDrag(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (target.tagName.toLowerCase() === 'button' || target.closest('button')) {\n return;\n }\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging || !this.modalOpen()) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n","@if (modalOpen()) {\n<div \n class=\"z-[11] xl:z-[80] bottom-0 lg:left-[350px] fixed lg:absolute inset-0 overflow-y-auto\"\n [class.pointer-events-none]=\"noBackdrop()\"\n>\n @if (!noBackdrop()) {\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n }\n <div class=\"flex min-h-full lg:items-end lg:justify-start items-center justify-center p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl w-[350px] pointer-events-auto\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n [style.will-change]=\"'transform'\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"startDrag($event)\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b cursor-move border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg select-none\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Job Details\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors text-gray-500\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[50vh] overflow-y-auto p-2\">\n <div class=\"stats-row\">\n <div class=\"stat-item completed\">\n <span class=\"stat-count\">{{ routeData()?.values?.Done || 0 }}</span>\n <span class=\"stat-label\">Done</span>\n </div>\n\n <div class=\"stat-item pending\">\n <span class=\"stat-count\">{{ routeData()?.values?.Ongoing || 0 }}</span>\n <span class=\"stat-label\">Ongoing</span>\n </div>\n\n <div class=\"stat-item active\">\n <span class=\"stat-count\">{{ routeData()?.values?.Open || 0 }}</span>\n <span class=\"stat-label\">Open</span>\n </div>\n </div>\n <div\n class=\"location-flow bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2 rounded-lg mt-4\"\n >\n <span class=\"pickup truncate block\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"inline mr-1 text-green-500\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n Pickup: {{ routeData()?.pickup_location || 'N/A' }}\n </span>\n <span class=\"delivery truncate block mt-1\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"inline mr-1 text-blue-500\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n Delivery: {{ routeData()?.delivery_location || 'N/A' }}\n </span>\n </div>\n <div class=\"device-info mt-2\">\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Jobcode</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.order_number || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Customer</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.customer_name || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Project Name</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.project || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Job Type</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.unit || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Material</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.material || 'General Freight' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Customer Contact</span>\n <span class=\"font-medium\">{{ routeData()?.customer_contact || 'None' }}</span>\n </div>\n <div class=\"flex justify-between py-2 text-xs\">\n <span class=\"text-gray-500 dark:text-slate-500\">Delivery Contact</span>\n <span class=\"font-medium\">{{ routeData()?.delivery_contact || 'None' }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n","import { Component, HostListener, Input, signal, inject, Output, EventEmitter, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { LucideAngularModule, CarFront, Info, LoaderCircle } from 'lucide-angular';\nimport { DriverListComponent } from '../driver-list/driver-list.component';\nimport { JobDetailsComponent } from '../job-details/job-details.component';\nimport { COOLMAP_CONFIG, UtilsService, CoolmapService, CoolmapRoute } from '@aggdirect/coolmap-services';\n\nexport type CardListMode = 'sidebar' | 'floating' | 'inline';\n@Component({\n selector: 'lib-job-code',\n standalone: true,\n imports: [LucideAngularModule, DriverListComponent, JobDetailsComponent, NgClass],\n templateUrl: './job-code.component.html',\n styleUrl: './job-code.component.scss',\n})\nexport class JobCodeComponent {\n config = inject(COOLMAP_CONFIG);\n utils = inject(UtilsService);\n coolmapService = inject(CoolmapService);\n\n showDriverModal = false;\n showDetailModal = false;\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n this.showDriverModal = false;\n }\n });\n }\n @Input() listMode: CardListMode = 'sidebar';\n @Input() collapsible = true;\n @Input() routes: CoolmapRoute[] = [];\n @Input() selectedRouteIds: string[] = [];\n @Input() isLoading: boolean = false;\n @Output() routeSelect = new EventEmitter<string>();\n collapsed = false;\n\n // New Signal States\n selectedJobDetail = signal<any>(null);\n contextMenuVisible = signal(false);\n driverListcollapse = signal(false);\n contextMenuPosition = signal({ x: 0, y: 0 });\n isClickTriggered = false;\n pinnedJobDetail: any = null;\n\n @HostListener('document:keydown.escape')\n icons = {\n CarFront,\n Info,\n LoaderCircle,\n };\n\n toggleRouteSelection(route: CoolmapRoute) {\n const id = route.job_id || route.route_id || (route as any).route_details_id;\n if (!id) return;\n this.routeSelect.emit(id);\n }\n\n toggleCollapse() {\n if (this.collapsible) {\n this.collapsed = !this.collapsed;\n this.driverListcollapse.set(this.collapsed);\n }\n }\n\n calculateStatusPercentage(type: string, route: any) {\n const values = route?.values || { Done: 0, Ongoing: 0, Open: 0 };\n const total = (values.Done || 0) + (values.Ongoing || 0) + (values.Open || 0);\n if (total === 0) return type === 'open' ? 100 : 0;\n \n if (type === 'done') return Math.round((100 * (values.Done || 0)) / total);\n if (type === 'ongoing') return Math.round((100 * (values.Ongoing || 0)) / total);\n if (type === 'open') return Math.round((100 * (values.Open || 0)) / total);\n return 0;\n }\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedJobDetail.set(route);\n this.showDetailModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedJobDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedJobDetail) {\n this.selectedJobDetail.set(this.pinnedJobDetail);\n return;\n }\n this.showDetailModal = false;\n this.selectedJobDetail.set(null);\n } else {\n this.showDetailModal = false;\n this.selectedJobDetail.set(null);\n this.isClickTriggered = false;\n this.pinnedJobDetail = null;\n }\n }\n}\n\n","<div\n class=\"cards-list-container\"\n [class.floating]=\"listMode === 'floating'\"\n [class.sidebar]=\"listMode === 'sidebar'\"\n [class.inline]=\"listMode === 'inline'\"\n [class.collapsed]=\"collapsed\"\n>\n <div class=\"list-header\">\n <div class=\"header-title\">\n <span class=\"title-text\">Routes</span>\n <span class=\"routes-count\">({{ routes.length || 0 }})</span>\n </div>\n <button\n class=\"collapse-btn\"\n (click)=\"toggleCollapse()\"\n [title]=\"collapsed ? 'Expand' : 'Collapse'\"\n >\n @if (collapsed) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n }\n </button>\n </div>\n @if (!collapsed) {\n <div class=\"cards-scroll-container\" #scrollContainer>\n @if (routes.length && isLoading) {\n <div class=\"list-loader\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"32\" class=\"animate-spin text-amber-500\"></lucide-icon>\n </div>\n }\n @if(routes.length){\n <div class=\"cards-list\">\n @for (route of routes; track $index) {\n <div class=\"card-wrapper\" (click)=\"toggleRouteSelection(route)\">\n <div\n class=\"route-card bg-white dark:bg-slate-800 border transition-all duration-200\"\n [class.border-brand-blue]=\"selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.border-gray-300]=\"!selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.dark:border-slate-700]=\"!selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.selected]=\"selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n >\n <div class=\"task-header justify-between\">\n <span class=\"job-code\">{{ route.order_number || 'N/A' }}</span>\n <div class=\"flex gap-2\">\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">{{ route.unit?.charAt(0) || 'U' }}</div>\n @if (config.repository !== 'customer') {\n <div\n class=\"statusunit bg-slate-900 dark:bg-white text-white dark:text-black flex items-center justify-center cursor-pointer hover:opacity-80\"\n (click)=\"showDriverModal = true; toggleCollapse(); $event.stopPropagation()\"\n >\n <lucide-icon [img]=\"icons.CarFront\" [size]=\"15\"></lucide-icon>\n </div>\n }\n <div\n class=\"text-black dark:text-white flex items-center justify-center cursor-pointer hover:opacity-80\"\n (click)=\"openDetail(route, true); $event.stopPropagation()\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\"\n >\n <lucide-icon [img]=\"icons.Info\" [size]=\"20\"></lucide-icon>\n </div>\n </div>\n </div>\n <div class=\"customer-name font-semibold truncate\">{{ route.customer_name }}</div>\n <div class=\"material-info truncate text-gray-600 dark:text-gray-300\">{{ route.project || 'No Project' }}</div>\n <div class=\"location-flow mt-2 text-sm flex items-center gap-2\">\n <span class=\"pickup flex items-center gap-1 truncate max-w-[40%] text-green-600 dark:text-green-400\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.pickup_location || '').split('|')[0] || 'Unknown' }}\n </span>\n <span class=\"arrow text-gray-400\">→</span>\n <span class=\"delivery truncate max-w-[40%] text-brand-blue\">{{ (route.delivery_location || '').split('|')[0] || 'Unknown' }}</span>\n </div>\n <div class=\"material-info mt-2 truncate font-medium\">{{ route.material || '' }}</div>\n <div class=\"driver-row-4 mt-3 flex items-center gap-2\">\n <div class=\"progress-bar flex-1 h-1.5 bg-gray-200 dark:bg-slate-700 rounded-full overflow-hidden flex\">\n <div class=\"progress-segment completed h-full bg-green-500 transition-all duration-300\" [style.width.%]=\"calculateStatusPercentage('done', route)\"></div>\n <div class=\"progress-segment ongoing h-full transition-all duration-300\" [style.backgroundColor]=\"'#fc0'\" [style.width.%]=\"calculateStatusPercentage('ongoing', route)\"></div>\n <div class=\"progress-segment open h-full bg-gray-300 dark:bg-slate-600 transition-all duration-300\" [style.width.%]=\"calculateStatusPercentage('open', route)\"></div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <div class=\"text-gray-600 dark:text-gray-400 mt-2 text-center\">No Job code found.</div>\n </div>\n }\n </div>\n }\n</div>\n<lib-driver-list\n [(modalOpen)]=\"showDriverModal\"\n [driverListcollapse]=\"driverListcollapse()\"\n></lib-driver-list>\n<lib-job-details \n [modalOpen]=\"showDetailModal\" \n (modalOpenChange)=\"$event ? null : closeDetail(false)\" \n [routeData]=\"selectedJobDetail()\" \n [noBackdrop]=\"!isClickTriggered\"\n></lib-job-details>\n","import { Component, EventEmitter, Output, input, inject, computed } from '@angular/core';\nimport { CommonModule, CurrencyPipe } from '@angular/common';\nimport { LucideAngularModule, X } from 'lucide-angular';\nimport { UtilsService } from '@aggdirect/coolmap-services';\n\n@Component({\n selector: 'lib-route-info-card',\n standalone: true,\n imports: [LucideAngularModule, CommonModule, CurrencyPipe],\n templateUrl: './route-info-card.component.html',\n styleUrl: './route-info-card.component.scss',\n})\nexport class RouteInfoCardComponent {\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n repository = input<string | null>('coolmap');\n displayMode = input<'dispatch' | 'catalog'>('dispatch');\n noBackdrop = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() edit = new EventEmitter<void>();\n\n utils = inject(UtilsService);\n addRouteModal = false;\n\n formattedDate = computed(() => {\n const data = this.routeData();\n if (!data?.created_at) return 'N/A';\n return this.utils.getDateFormat(new Date(data.created_at), '/');\n });\n\n close() {\n this.modalOpenChange.emit(false);\n }\n\n icons = {\n X,\n };\n}\n","@if (modalOpen()) {\n<div \n class=\"z-[112] bottom-0 fixed lg:absolute inset-0 overflow-y-auto\"\n [ngClass]=\"displayMode() === 'catalog' ? 'lg:left-[350px]' : 'lg:right-[350px]'\"\n [class.pointer-events-none]=\"noBackdrop()\"\n>\n <div \n class=\"flex min-h-full lg:items-end items-center justify-center p-3\"\n [ngClass]=\"displayMode() === 'catalog' ? 'lg:justify-start' : 'lg:justify-end'\"\n >\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px] pointer-events-auto\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Route Info\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[60vh] overflow-y-auto p-3\">\n <div class=\"space-y-2 bg-gray-50 dark:bg-slate-900/50 border border-gray-200 dark:border-slate-700 p-3 rounded-lg mb-4\">\n <p class=\"text-xs\">\n <b class=\"text-gray-900 dark:text-white\">Pickup:</b> \n <span class=\"text-gray-600 dark:text-gray-400\">\n {{ (routeData()?.pickup_location || '').split('|')[1] || routeData()?.pickup_location || 'N/A' }}\n </span>\n </p>\n <p class=\"text-xs\">\n <b class=\"text-gray-900 dark:text-white\">Delivery:</b> \n <span class=\"text-gray-600 dark:text-gray-400\">\n {{ (routeData()?.delivery_location || '').split('|')[1] || routeData()?.delivery_location || 'N/A' }}\n </span>\n </p>\n </div>\n\n <div class=\"space-y-2.5\">\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Name:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.route_name || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Customer:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.customer_name || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Type:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.unit || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Distance:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.estimated_distance || '0' }} Miles</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Travel Time:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.estimated_time || '0' }} Min</span>\n </div>\n\n @if (repository() !== 'customer') {\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Trucker Pay Estimate:</b>\n <span class=\"text-brand-blue font-medium text-right ml-4\">{{ routeData()?.trucker_pay_estimate | currency }}</span>\n </div>\n }\n\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Customer Price Estimate:</b>\n <span class=\"text-brand-blue font-medium text-right ml-4\">{{ routeData()?.customer_price_estimate | currency }}</span>\n </div>\n\n <div class=\"flex justify-between items-start text-xs dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Notes:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4 italic\">{{ routeData()?.note || 'None' }}</span>\n </div>\n </div>\n\n <div class=\"mt-4 pt-3 border-t border-gray-100 dark:border-slate-700 flex justify-between items-center\">\n <p class=\"text-[10px] text-gray-400 italic\">\n Created by {{ routeData()?.created_by_name || routeData()?.user || 'System' }} on {{ formattedDate() }}\n </p>\n @if (displayMode() === 'catalog') {\n <button \n type=\"button\"\n (click)=\"edit.emit(); close()\"\n class=\"px-3 py-1 text-[11px] font-bold uppercase tracking-wider bg-orange-500 hover:bg-orange-600 text-white rounded transition-colors\"\n >\n Edit\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n}","import { Component, EventEmitter, Output, input, signal, inject, Input, OnInit, computed, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { LucideAngularModule, X, Info, Share2, Search, CheckCircle, LoaderCircle } from 'lucide-angular';\nimport { RouteInfoCardComponent } from '../route-info-card/route-info-card.component';\nimport { COOLMAP_CONFIG, CoolmapRoute, UtilsService, CoolmapService } from '@aggdirect/coolmap-services';\n@Component({\n selector: 'lib-job-route-list',\n standalone: true,\n imports: [LucideAngularModule, RouteInfoCardComponent, NgClass, ScrollingModule],\n templateUrl: './job-route-list.component.html',\n styleUrl: './job-route-list.component.scss',\n})\nexport class JobRouteListComponent implements OnInit {\n config = inject(COOLMAP_CONFIG);\n @Input() customerRepoDetails?: { customer: { id?: string, name?: string }, projectId: string };\n utils = inject(UtilsService);\n coolmapService = inject(CoolmapService);\n \n unitList: any[] = [];\n materialsList: any[] = [];\n \n routes = signal<CoolmapRoute[]>([]);\n searchTerm = signal<string>('');\n selectedRouteIds = input<string[]>([]);\n filters = signal<any[]>([]);\n showSuggestions = signal(false);\n\n suggestions = computed(() => {\n const term = this.searchTerm();\n if (term.length < 1) return [];\n return this.utils.filter(term, this.filters()).filter((opt: any) => opt.type !== 'material');\n });\n\n filteredRoutes = computed(() => {\n let list = this.routes();\n const activeFilters = this.filters();\n \n // Apply category search from V1 logic\n if (activeFilters.length > 0) {\n list = this.utils.getSearchResults(list, activeFilters);\n }\n \n const search = this.searchTerm().toLowerCase().trim();\n if (!search || this.showSuggestions()) return list;\n \n return list.filter(r => {\n const id = this.getRouteId(r).toLowerCase();\n const order = (r.order_number || '').toLowerCase();\n const name = (r.route_name || '').toLowerCase();\n return id.includes(search) || order.includes(search) || name.includes(search);\n });\n });\n\n allSelected = computed(() => {\n const visible = this.filteredRoutes();\n const selected = this.selectedRouteIds();\n if (visible.length === 0) return false;\n return visible.every(r => selected.includes(this.getRouteId(r)));\n });\n\n isAnyPlotting = computed(() => {\n const prefix = this.modalOpen() ? 'jobrouteList' : 'jobcode';\n const plotting = this.coolmapService.plottingIds();\n return Array.from(plotting).some(id => id.startsWith(`${prefix}-`));\n });\n \n showRouteModal = false;\n modalOpen = input<boolean>(false);\n \n @Input() set initialRoutes(val: CoolmapRoute[]) {\n if (val) {\n this.routes.set(val);\n this.utils.clearOptions();\n val.forEach(r => this.utils.makeOptions(r));\n }\n }\n\n selectedRoute = signal<any>(null);\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n }\n });\n }\n\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() routeSelect = new EventEmitter<CoolmapRoute>();\n @Output() masterToggleEvent = new EventEmitter<CoolmapRoute[]>();\n @Output() shareRoute = new EventEmitter<any>();\n\n ngOnInit(): void {\n this.checkAndCallRouteList();\n }\n\n checkAndCallRouteList() {\n this.utils.clearOptions();\n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitList = res;\n this.utils.fetchMaterialsListForCustomer().then((res: any) => {\n this.materialsList = res;\n this.getRouteListForCustomer();\n });\n });\n } else {\n this.getRouteListForCoolMap();\n }\n }\n\n getRouteListForCoolMap() {\n this.utils.getData('routes/all').subscribe((res: any) => {\n if (res && res.data) {\n const list = res.data;\n list.forEach((ele: CoolmapRoute) => this.utils.makeOptions(ele));\n this.routes.set(list);\n }\n });\n }\n\n getRouteListForCustomer() {\n const customerId = this.customerRepoDetails?.customer.id;\n if (customerId) {\n this.utils.postdata('routes/all', { customer_id: customerId }).subscribe((res: any) => {\n if (res && res.data) {\n const list = res.data.map((ele: CoolmapRoute) => {\n ele.unit = this.getUnitName(ele);\n this.utils.makeOptions(ele);\n return ele;\n });\n this.routes.set(list);\n }\n });\n }\n }\n\n getUnitName(data: any): string {\n let unitName = '';\n this.unitList.forEach((res) => {\n if (res.id === data.unit_id) {\n unitName = res.type;\n }\n });\n return unitName || data.unit;\n }\n\n close() {\n this.closeDetail(false);\n this.modalOpenChange.emit(false);\n }\n\n isRouteSelected(route: CoolmapRoute): boolean {\n const id = this.getRouteId(route);\n return this.selectedRouteIds().includes(id || '');\n }\n\n toggleRoute(route: CoolmapRoute) {\n if (this.isPlotting(route)) return;\n this.routeSelect.emit(route);\n }\n\n onMasterToggle() {\n if (this.isAnyPlotting()) return;\n this.masterToggleEvent.emit(this.filteredRoutes());\n }\n\n addFilter(option: any) {\n // V1 behavior: keep single filter\n this.filters.set([{ name: option.label, type: option.type, value: option.value }]);\n this.searchTerm.set('');\n this.showSuggestions.set(false);\n }\n\n removeFilter() {\n this.filters.set([]);\n }\n\n handleSearchInput(val: string) {\n this.searchTerm.set(val);\n this.showSuggestions.set(true);\n }\n\n onSearchBlur() {\n // Delay hiding to allow (click) on suggestions to fire first\n setTimeout(() => {\n this.showSuggestions.set(false);\n }, 200);\n }\n\n get hasFilter(): boolean {\n return this.filters().length > 0;\n }\n\n isPlotting(route: CoolmapRoute): boolean {\n const prefix = this.modalOpen() ? 'jobrouteList' : 'jobcode';\n const id = this.getRouteId(route);\n return this.coolmapService.plottingIds().has(`${prefix}-${id}`);\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n isClickTriggered = false;\n pinnedRouteDetail: any = null;\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedRoute.set(route);\n this.showRouteModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedRouteDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedRouteDetail) {\n this.selectedRoute.set(this.pinnedRouteDetail);\n return;\n }\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n } else {\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n this.isClickTriggered = false;\n this.pinnedRouteDetail = null;\n }\n }\n\n icons = {\n X,\n Info,\n Share2,\n Search,\n CheckCircle,\n LoaderCircle\n };\n}\n","@if (modalOpen()) {\n<div class=\"fixed z-[11] route-list\">\n <!-- <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div> -->\n <aside class=\"detail-drawer top-[0] sm:top-[115px]\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900\"\n >\n <h3 class=\"flex items-center gap-1 font-semibold text-gray-900 dark:text-white text-[14px]\">\n List of Routes\n <span class=\"text-xs font-normal text-gray-400\">({{ filteredRoutes().length }})</span>\n </h3>\n <button\n type=\"button\"\n (click)=\"onMasterToggle()\"\n [disabled]=\"isAnyPlotting()\"\n class=\"inline-flex items-center justify-center gap-2 px-3 sm:px-4 py-1.5 bg-brand-blue hover:bg-blue-700 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-[12px]\"\n >\n {{ allSelected() ? 'Uncheck All' : 'Check All' }}\n </button>\n <button\n (click)=\"close()\"\n class=\"p-1.5 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"18\"></lucide-icon>\n </button>\n </div>\n <div class=\"p-2\">\n <div class=\"relative w-full\">\n <div class=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <lucide-icon [img]=\"hasFilter ? icons.Info : icons.Search\" class=\"text-gray-400\" [size]=\"18\"></lucide-icon>\n </div>\n <input\n type=\"text\"\n #searchinput\n [value]=\"searchTerm()\"\n (input)=\"handleSearchInput(searchinput.value)\"\n (focus)=\"showSuggestions.set(true)\"\n (blur)=\"onSearchBlur()\"\n placeholder=\"Search...\"\n class=\"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n\n <!-- Autocomplete Suggestions Dropdown -->\n @if (showSuggestions() && suggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-60 overflow-y-auto\">\n <ul class=\"py-1 text-sm text-gray-700 dark:text-gray-200\">\n @for (option of suggestions(); track option.label + option.type) {\n <li (click)=\"addFilter(option)\"\n class=\"px-4 py-2 hover:bg-brand-blue/10 dark:hover:bg-brand-blue/20 cursor-pointer flex justify-between items-center group\">\n <span>\n <span class=\"capitalize\">{{option.type}}:</span> \n {{option.label}}\n </span>\n <lucide-icon [img]=\"icons.CheckCircle\" class=\"opacity-0 group-hover:opacity-100 text-brand-blue transition-opacity\" [size]=\"16\"></lucide-icon>\n </li>\n }\n </ul>\n </div>\n }\n </div>\n\n <!-- Active Filter Chips -->\n @if (hasFilter) {\n <div class=\"flex flex-wrap gap-2 mt-2 px-1\">\n @for (filter of filters(); track filter.name + filter.type) {\n <div class=\"inline-flex items-center gap-1.5 px-3 py-1 bg-brand-blue/10 border border-brand-blue/20 text-black dark:text-white rounded-full text-xs font-medium\">\n <span class=\"capitalize\">{{filter.type}}:</span>\n <span class=\"truncate max-w-[150px]\">{{filter.name}}</span>\n <button (click)=\"removeFilter()\" class=\"hover:text-red-500 transition-colors\">\n <lucide-icon [img]=\"icons.X\" [size]=\"14\"></lucide-icon>\n </button>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"overflow-y-auto p-2 drawer-listing-box\">\n <cdk-virtual-scroll-viewport itemSize=\"60\" class=\"routeList-viewport h-[calc(100vh-230px)]\">\n @if (filteredRoutes().length > 0) {\n <ul class=\"route-list-ul gap-2 flex flex-col\">\n @for (route of filteredRoutes(); track getRouteId(route)) {\n <li \n class=\"route-li-v1 bg-white dark:bg-slate-800 border border-gray-300 dark:border-slate-700\" \n [class.selected]=\"isRouteSelected(route)\" \n [class.pointer-events-none]=\"isAnyPlotting()\"\n [class.opacity-60]=\"isAnyPlotting()\"\n (click)=\"toggleRoute(route)\">\n <div class=\"task-header justify-between\">\n <span class=\"job-code\"> {{route.route_name || route.order_number}} </span>\n @if (config.repository === 'coolmap') {\n <span class=\"job-code\">{{route.customer_name}}</span>\n }\n <div class=\"iconprt\">\n @if (isPlotting(route)) {\n <div class=\"plotting-spinner\">\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin text-black dark:text-white flex items-center justify-center relative z-10\" [size]=\"18\"></lucide-icon>\n </div>\n }\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">\n {{ route.unit?.charAt(0) || 'U' }}\n </div>\n <div class=\"infoicon\" \n (click)=\"$event.stopPropagation(); openDetail(route, true)\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\">\n <lucide-icon [img]=\"icons.Info\" [size]=\"18\" class=\"text-gray-400\"></lucide-icon>\n </div>\n @if (config.repository === 'customer') {\n <div class=\"infoicon hover:opacity-80\" (click)=\"$event.stopPropagation(); shareRoute.emit(route)\">\n <lucide-icon [img]=\"icons.Share2\" [size]=\"16\" class=\"text-gray-400\"></lucide-icon>\n </div>\n }\n </div>\n </div>\n \n <div class=\"location-flow bg-gray-100 dark:bg-slate-900 px-2 py-2 pb-3 rounded-lg\">\n <span class=\"pickup\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.pickup_location || '').split('|')[1] ? (route.pickup_location || '').split('|')[1] : (route.pickup_location || '') }}\n </span>\n <span class=\"delivery\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.delivery_location || '').split('|')[1] ? (route.delivery_location || '').split('|')[1] : (route.delivery_location || '') }}\n </span>\n </div>\n </li>\n }\n </ul>\n } @else if (routes().length === 0) {\n <div class=\"p-8 text-center text-gray-400\">\n No routes available for this perspective.\n </div>\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </aside>\n</div>\n}\n<lib-route-info-card [modalOpen]=\"showRouteModal\" (modalOpenChange)=\"$event ? null : closeDetail(false)\" [routeData]=\"selectedRoute()\" [repository]=\"config.repository\" displayMode=\"dispatch\" [noBackdrop]=\"!isClickTriggered\"></lib-route-info-card>\n","import { Component, Input, Output, EventEmitter, signal, inject, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { LucideAngularModule, Info, ChevronRight, ChevronLeft } from 'lucide-angular';\nimport { COOLMAP_CONFIG, CoolmapRoute, CoolmapService } from '@aggdirect/coolmap-services';\nimport { RouteInfoCardComponent } from '../route-info-card/route-info-card.component';\n\nexport type CardListMode = 'sidebar' | 'floating' | 'inline';\n\n@Component({\n selector: 'lib-view-route-list',\n standalone: true,\n imports: [LucideAngularModule, RouteInfoCardComponent, NgClass],\n templateUrl: './view-route-list.component.html',\n styleUrl: './view-route-list.component.scss',\n})\nexport class ViewRouteListComponent {\n showRouteModal = false;\n selectedRoute = signal<CoolmapRoute | null>(null);\n config = inject(COOLMAP_CONFIG);\n coolmapService = inject(CoolmapService);\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n }\n });\n }\n\n @Input() listMode: CardListMode = 'sidebar';\n @Input() collapsible = true;\n @Input() routes: CoolmapRoute[] = [];\n @Input() selectedRouteIds: string[] = [];\n @Output() routeSelect = new EventEmitter<string>();\n @Output() editRoute = new EventEmitter<CoolmapRoute>();\n\n collapsed = false;\n\n icons = {\n Info,\n ChevronRight,\n ChevronLeft\n };\n\n toggleCollapse() {\n if (this.collapsible) {\n this.collapsed = !this.collapsed;\n }\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n isClickTriggered = false;\n pinnedRouteDetail: CoolmapRoute | null = null;\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedRoute.set(route);\n this.showRouteModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedRouteDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedRouteDetail) {\n this.selectedRoute.set(this.pinnedRouteDetail);\n return;\n }\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n } else {\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n this.isClickTriggered = false;\n this.pinnedRouteDetail = null;\n }\n }\n}\n","<div\n class=\"cards-list-container\"\n [class.floating]=\"listMode === 'floating'\"\n [class.sidebar]=\"listMode === 'sidebar'\"\n [class.inline]=\"listMode === 'inline'\"\n [class.collapsed]=\"collapsed\"\n>\n @if (listMode !== 'inline') {\n <div class=\"list-header\">\n <div class=\"header-title\">\n <span class=\"title-text\">View Route</span>\n <span class=\"routes-count\">({{ routes.length || 0 }})</span>\n </div>\n <button\n class=\"collapse-btn\"\n (click)=\"toggleCollapse()\"\n [title]=\"collapsed ? 'Expand' : 'Collapse'\"\n >\n @if (collapsed) {\n <lucide-icon [img]=\"icons.ChevronRight\" [size]=\"16\"></lucide-icon>\n } @else {\n <lucide-icon [img]=\"icons.ChevronLeft\" [size]=\"16\"></lucide-icon>\n }\n </button>\n </div>\n } \n \n @if (!collapsed) {\n <div class=\"cards-scroll-container\" #scrollContainer>\n <div class=\"cards-list\">\n @for (route of routes; track getRouteId(route)) {\n <div class=\"card-wrapper\">\n <div\n class=\"route-card bg-white dark:bg-slate-800 border transition-all duration-200\"\n [class.border-brand-blue]=\"selectedRouteIds.includes(getRouteId(route))\"\n [class.border-gray-200]=\"!selectedRouteIds.includes(getRouteId(route))\"\n [class.dark:border-slate-700]=\"!selectedRouteIds.includes(getRouteId(route))\"\n [class.selected]=\"selectedRouteIds.includes(getRouteId(route))\"\n >\n <div class=\"task-header justify-between items-start mb-1\">\n <h2 class=\"text-sm font-semibold text-gray-900 dark:text-white truncate max-w-[80%]\">\n {{ route.route_name || route.order_number || 'Unnamed Route' }}\n </h2>\n <div class=\"flex gap-2 shrink-0\">\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">\n {{ route.unit?.charAt(0) || 'U' }}\n </div>\n <button\n type=\"button\"\n class=\"text-gray-400 hover:text-brand-blue transition-colors\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\"\n (click)=\"$event.stopPropagation(); openDetail(route, true)\"\n >\n <lucide-icon [img]=\"icons.Info\" [size]=\"18\"></lucide-icon>\n </button>\n </div>\n </div>\n \n @if (config.repository === 'coolmap' && route.customer_name) {\n <div class=\"text-[10px] text-gray-500 dark:text-slate-500 mb-2 uppercase tracking-wider font-medium truncate\">\n {{ route.customer_name }}\n </div>\n }\n\n <div class=\"location-flow bg-gray-50 dark:bg-slate-900/50 border border-gray-100 dark:border-slate-700/50 p-2 rounded-lg\">\n <div class=\"text-[11px] flex items-start gap-1.5 text-gray-600 dark:text-gray-400\">\n <div class=\"w-1.5 h-1.5 rounded-full bg-green-500 shrink-0 bullet mt-1\"></div>\n {{ (route.pickup_location || '').split('|')[1] || route.pickup_location || 'N/A' }}\n </div>\n <div class=\"text-[11px] flex items-start gap-1.5 mt-1 text-gray-600 dark:text-gray-400\">\n <div class=\"w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0 bullet mt-1\"></div>\n {{ (route.delivery_location || '').split('|')[1] || route.delivery_location || 'N/A' }}\n </div>\n </div>\n </div>\n </div>\n } @empty {\n <div class=\"p-8 text-center text-gray-400 text-sm italic\">\n No routes found in this catalog.\n </div>\n }\n </div>\n </div>\n }\n</div>\n\n<lib-route-info-card \n [modalOpen]=\"showRouteModal\" \n (modalOpenChange)=\"$event ? (showRouteModal = true) : closeDetail(false)\"\n [routeData]=\"selectedRoute()\" \n [repository]=\"config.repository\" \n displayMode=\"catalog\"\n [noBackdrop]=\"true\"\n (edit)=\"editRoute.emit(selectedRoute()!)\"\n></lib-route-info-card>\n","import { Component, EventEmitter, HostListener, Output, input, signal, inject, effect, viewChild, ElementRef, AfterViewInit, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { LucideAngularModule, X, ChevronDown, Check, LoaderCircle, Info } from 'lucide-angular';\nimport { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { filter, pairwise } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COOLMAP_CONFIG, UtilsService, CoolmapService, LocationAll } from '@aggdirect/coolmap-services';\nimport { DestroyRef, ChangeDetectorRef } from '@angular/core';\n\ninterface AutocompleteSuggestion {\n placePrediction?: {\n text: { toString(): string };\n toPlace(): {\n fetchFields(options: { fields: string[] }): Promise<void>;\n toJSON(): any;\n };\n };\n}\n\ninterface AutocompleteRequest {\n input: string;\n includedPrimaryTypes?: string[];\n includedRegionCodes?: string[];\n sessionToken?: any;\n language?: string;\n region?: string;\n}\n\ninterface GoogleMapsPlacesLibrary {\n AutocompleteSuggestion: {\n fetchAutocompleteSuggestions(request: AutocompleteRequest): Promise<{ suggestions: AutocompleteSuggestion[] }>;\n };\n AutocompleteSessionToken: new () => any;\n}\n\n@Component({\n selector: 'lib-add-route',\n standalone: true,\n imports: [LucideAngularModule, ReactiveFormsModule, CommonModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './add-route.component.html',\n styleUrl: './add-route.component.scss',\n})\nexport class AddRouteComponent implements AfterViewInit {\n config = inject(COOLMAP_CONFIG);\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n customerRepoDetails = input<any>(null);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() routeDeleted = new EventEmitter<string>();\n @Output() routeSaved = new EventEmitter<any>();\n dragX = signal(0);\n dragY = signal(0);\n isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n\n // New Services\n utils = inject(UtilsService);\n coolMapService = inject(CoolmapService);\n destroyRef = inject(DestroyRef);\n cdr = inject(ChangeDetectorRef);\n\n addRouteForm = new FormGroup({\n route_name: new FormControl('', [Validators.required]),\n customer_name: new FormControl({ value: '', disabled: true }, [Validators.required]),\n customer_id: new FormControl(''),\n unit_id: new FormControl('', [Validators.required]),\n path: new FormControl('', [Validators.required]),\n pickup_location: new FormControl('', [Validators.required]),\n pickup_lat_lng: new FormControl('', [Validators.required]),\n delivery_location: new FormControl('', [Validators.required]),\n delivery_lat_lng: new FormControl('', [Validators.required]),\n estimated_distance: new FormControl('', [Validators.required]),\n estimated_time: new FormControl('', [Validators.required]),\n note: new FormControl('', [Validators.maxLength(2048)]),\n trucker_pay_estimate: new FormControl(null),\n customer_price_estimate: new FormControl(null),\n pickUpSearchOption: new FormControl(inject(COOLMAP_CONFIG).repository === 'coolmap' ? 'system' : 'google'),\n deliverySearchOtption: new FormControl(inject(COOLMAP_CONFIG).repository === 'coolmap' ? 'system' : 'google'),\n });\n\n // Data signals\n unitsList = signal<any[]>([]);\n locationList = signal<LocationAll[]>([]);\n customersList = signal<any[]>([]);\n showDeleteModal = signal(false);\n routeId = signal<string | null>(null);\n preventSave = signal(false);\n preventInitialSave = signal(false);\n showLoader = signal(false);\n \n // Search options\n customerOptions = signal<any[]>([]);\n pickupOptions = signal<LocationAll[]>([]);\n deliveryOptions = signal<LocationAll[]>([]);\n \n // UI toggles\n showCustomerDropdown = signal(false);\n showPickupDropdown = signal(false);\n showDeliveryDropdown = signal(false);\n loadingLocations = signal(false);\n loadingCustomers = signal(false);\n\n pickupSuggestions = signal<AutocompleteSuggestion[]>([]);\n deliverySuggestions = signal<AutocompleteSuggestion[]>([]);\n showPickupSuggestions = signal(false);\n showDeliverySuggestions = signal(false);\n pickupSelected = signal(false);\n deliverySelected = signal(false);\n saveAttempted = signal(false);\n \n \n private placesLibrary: GoogleMapsPlacesLibrary | null = null;\n private sessionToken: any = null;\n private debounceTimer: any = null;\n\n hideDropdown(type: string) {\n setTimeout(() => {\n if (type === 'customer') this.showCustomerDropdown.set(false);\n if (type === 'pickup') this.showPickupDropdown.set(false);\n if (type === 'delivery') this.showDeliveryDropdown.set(false);\n }, 200);\n }\n\n // ElementRefs for Google Maps integration\n filterPickup = viewChild<ElementRef>('filterPickup');\n filterDelivery = viewChild<ElementRef>('filterDelivery');\n\n get isSystemPickup() {\n return this.addRouteForm.get('pickUpSearchOption')?.value === 'system';\n }\n\n get isSystemDelivery() {\n return this.addRouteForm.get('deliverySearchOtption')?.value === 'system';\n }\n\n get selectedUnitName() {\n const unitId = this.addRouteForm.value.unit_id;\n if (!unitId) return 'Select Unit/Driver';\n const unit = this.unitsList().find(u => u.id === unitId);\n return unit ? unit.type : 'Select Unit/Driver';\n }\n\n constructor() {\n\n\n effect(() => {\n const isOpen = this.modalOpen();\n const data = this.routeData();\n \n if (isOpen) {\n this.coolMapService.clearAllRoutes();\n \n // Initial patching\n setTimeout(() => {\n this.inIt(data);\n }, 0);\n\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitsList.set(res || []);\n });\n\n if (this.config.repository === 'coolmap') {\n this.loadingLocations.set(true);\n this.addRouteForm.get('pickup_location')?.disable();\n this.addRouteForm.get('delivery_location')?.disable();\n \n this.utils.fetchLocationlist().then((res: any) => {\n this.locationList.set(res || []);\n this.pickupOptions.set(res || []);\n this.deliveryOptions.set(res || []);\n this.loadingLocations.set(false);\n this.addRouteForm.get('pickup_location')?.enable();\n this.addRouteForm.get('delivery_location')?.enable();\n });\n \n this.loadingCustomers.set(true);\n this.utils.fetchCustomersList().then((res: any) => {\n this.customersList.set(res || []);\n this.customerOptions.set(res || []);\n this.addRouteForm.controls['customer_name'].enable();\n this.loadingCustomers.set(false);\n if (this.config.repository === 'customer' && this.customerRepoDetails()) {\n this.addRouteForm.patchValue({\n customer_id: this.customerRepoDetails().customer?.id,\n customer_name: this.customerRepoDetails().customer?.name,\n }, { emitEvent: false });\n }\n });\n }\n\n setTimeout(() => {\n this.initializePlacesLibrary();\n }, 150);\n }\n });\n\n // Reacting to dropdown changes for re-running calculations\n this.addRouteForm.get('pickup_location')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (res && res !== this.addRouteForm.getRawValue().pickup_location) {\n this.addRouteForm.patchValue({ pickup_lat_lng: '' });\n }\n // Populate dropdown for system\n if (this.isSystemPickup) {\n if (!res) {\n this.pickupOptions.set(this.locationList());\n } else {\n const lower = res.toLowerCase();\n this.pickupOptions.set(this.locationList().filter(l => l.formatted_address.toLowerCase().includes(lower)));\n }\n }\n });\n\n this.addRouteForm.get('delivery_location')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (res && res !== this.addRouteForm.getRawValue().delivery_location) {\n this.addRouteForm.patchValue({ delivery_lat_lng: '' });\n }\n if (this.isSystemDelivery) {\n if (!res) {\n this.deliveryOptions.set(this.locationList());\n } else {\n const lower = res.toLowerCase();\n this.deliveryOptions.set(this.locationList().filter(l => l.formatted_address.toLowerCase().includes(lower)));\n }\n }\n });\n\n this.addRouteForm.get('customer_name')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (!res) {\n this.customerOptions.set(this.customersList());\n } else {\n const lower = res.toLowerCase();\n this.customerOptions.set(this.customersList().filter(c => c.customer_name.toLowerCase().includes(lower)));\n }\n });\n \n // Clear path if logic changes\n this.addRouteForm.valueChanges.pipe(\n takeUntilDestroyed(),\n pairwise(),\n filter(([prev, curr]) => {\n return (prev.pickUpSearchOption === curr.pickUpSearchOption) && \n prev.deliverySearchOtption === curr.deliverySearchOtption\n })\n ).subscribe(() => {\n if (this.preventInitialSave()) {\n this.preventInitialSave.set(false);\n }\n });\n }\n\n ngAfterViewInit() {\n // Listen for search mode changes\n this.addRouteForm.get('pickUpSearchOption')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(val => {\n this.addRouteForm.patchValue({ pickup_location: null, pickup_lat_lng: null });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n });\n\n this.addRouteForm.get('deliverySearchOtption')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(val => {\n this.addRouteForm.patchValue({ delivery_location: null, delivery_lat_lng: null });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n });\n }\n\n\n async initializePlacesLibrary() {\n try {\n this.placesLibrary = await (window as any).google?.maps?.importLibrary('places') as GoogleMapsPlacesLibrary;\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error loading Google Maps Places library:', error);\n }\n }\n\n onInputChange(event: Event, type: 'pickup' | 'delivery') {\n const value = (event.target as HTMLInputElement).value;\n const formKey = type === 'pickup' ? 'pickup_location' : 'delivery_location';\n const latLngKey = type === 'pickup' ? 'pickup_lat_lng' : 'delivery_lat_lng';\n \n this.addRouteForm.patchValue({ \n [formKey]: value,\n [latLngKey]: '' \n }, { emitEvent: false });\n \n if (type === 'pickup') this.pickupSelected.set(false);\n else this.deliverySelected.set(false);\n\n this.checkAndFetchRouteInformation();\n\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => {\n if (value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n } else {\n this.hideSuggestions(type);\n }\n }, 300);\n }\n\n onFocus(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n if (this.isSystemPickup) {\n this.showPickupDropdown.set(true);\n } else {\n const val = this.addRouteForm.get('pickup_location')?.value;\n if (val && val.trim()) this.fetchAutocompleteSuggestions(val, type);\n }\n } else {\n if (this.isSystemDelivery) {\n this.showDeliveryDropdown.set(true);\n } else {\n const val = this.addRouteForm.get('delivery_location')?.value;\n if (val && val.trim()) this.fetchAutocompleteSuggestions(val, type);\n }\n }\n }\n\n async fetchAutocompleteSuggestions(input: string, type: 'pickup' | 'delivery') {\n if (!this.placesLibrary || !input.trim() || !this.sessionToken) return;\n\n try {\n const request: AutocompleteRequest = {\n input: input.trim(),\n sessionToken: this.sessionToken,\n includedRegionCodes: ['US']\n };\n\n const { suggestions } = await this.placesLibrary.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n \n if (type === 'pickup') {\n this.pickupSuggestions.set(suggestions || []);\n this.showPickupSuggestions.set(this.pickupSuggestions().length > 0);\n } else {\n this.deliverySuggestions.set(suggestions || []);\n this.showDeliverySuggestions.set(this.deliverySuggestions().length > 0);\n }\n } catch (error) {\n console.error('Autocomplete error:', error);\n }\n }\n\n async onSuggestionClick(suggestion: AutocompleteSuggestion, type: 'pickup' | 'delivery') {\n if (!suggestion.placePrediction) return;\n\n try {\n const place = suggestion.placePrediction.toPlace();\n await place.fetchFields({ fields: ['displayName', 'formattedAddress', 'location'] });\n const placeData = place.toJSON();\n\n const res = {\n lat: placeData.location.lat,\n lng: placeData.location.lng,\n formatted_address: placeData.formattedAddress || placeData.displayName\n };\n\n this.patchAddressValue(res, type);\n this.hideSuggestions(type);\n \n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error selecting suggestion:', error);\n }\n }\n\n hideSuggestions(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n this.showPickupSuggestions.set(false);\n this.pickupSuggestions.set([]);\n } else {\n this.showDeliverySuggestions.set(false);\n this.deliverySuggestions.set([]);\n }\n }\n\n inIt(changes: any) {\n if (changes && Object.keys(changes).length > 0) {\n if (!changes.prevent) {\n this.preventSave.set(false);\n this.patchFormValue(changes).then(() => {\n this.checkAndFetchRouteInformation(true);\n });\n }\n } else {\n this.preventSave.set(true);\n this.patchFormValue().then(() => {\n this.checkAndFetchRouteInformation();\n });\n }\n }\n\n async patchFormValue(data?: any) {\n this.addRouteForm.reset();\n const isCustomerRepo = this.config.repository === 'customer';\n if (data) {\n this.addRouteForm.patchValue(data, { emitEvent: false });\n this.pickupSelected.set(!!data.pickup_location);\n this.deliverySelected.set(!!data.delivery_location);\n }\n this.saveAttempted.set(false);\n if (isCustomerRepo && this.customerRepoDetails()) {\n this.addRouteForm.patchValue({\n customer_id: this.customerRepoDetails().customer?.id,\n customer_name: this.customerRepoDetails().customer?.name,\n pickUpSearchOption: 'google',\n deliverySearchOtption: 'google'\n }, { emitEvent: false });\n } else {\n this.addRouteForm.patchValue({\n pickUpSearchOption: (!data || (data.hasOwnProperty('is_system_pickup') ? data.is_system_pickup : true)) ? 'system' : 'google',\n deliverySearchOtption: (!data || (data.hasOwnProperty('is_system_delivery') ? data.is_system_delivery : true)) ? 'system' : 'google',\n }, { emitEvent: false });\n }\n this.routeId.set(data?.route_id || data?.id || null);\n await true;\n }\n\n patchAddressValue(data: any, type: string) {\n this.addRouteForm.patchValue({\n [type + '_location']: data.formatted_address,\n [type + '_lat_lng']: `${data.lat},${data.lng}`\n });\n this.addRouteForm.markAsDirty();\n if (type === 'pickup') this.pickupSelected.set(true);\n else this.deliverySelected.set(true);\n this.checkAndFetchRouteInformation();\n }\n\n checkAndFetchRouteInformation(isinitial?: boolean) {\n const val = this.addRouteForm.value;\n if (val.delivery_lat_lng && val.pickup_lat_lng && val.unit_id) {\n const unit = this.unitsList().find((x: any) => x.id === val.unit_id);\n const param = {\n delivery_lat_lng: val.delivery_lat_lng,\n pickup_lat_lng: val.pickup_lat_lng,\n unit: unit?.type || 'Ton'\n };\n // Mapbox estimation route\n this.utils.postdata('calculate/routes/estimation', param).subscribe({\n next: (res: any) => {\n setTimeout(() => {\n if (res && res.path) {\n this.addRouteForm.patchValue({\n estimated_distance: res.dist,\n estimated_time: res.time,\n path: res.path,\n trucker_pay_estimate: res.trucker_haul_cost,\n customer_price_estimate: res.customer_price_estimate\n });\n // Decode and plot\n let path = res.path.split(';').map((str: string) => {\n const parts = str.split(',');\n return [parseFloat(parts[1]), parseFloat(parts[0])];\n });\n const element: any = {\n type: 'FeatureCollection',\n features: [{ type: 'Feature', properties: {}, geometry: { type: 'LineString', coordinates: path } }]\n };\n this.coolMapService.removeRouteAndMarker(1, 'addroute').then(() => {\n this.coolMapService.loadMapProperty(element, 1, unit?.type, {\n pickup_location: val.pickup_location,\n delivery_location: val.delivery_location,\n route_name: val.route_name,\n unit: unit?.type\n });\n this.preventSave.set(true);\n this.cdr.detectChanges();\n });\n } else {\n console.warn('Could not calculate route');\n this.preventSave.set(true);\n this.utils.openSnackBar((res?.status ? res.status : 'Somthing went wrong, Please try different address.'), 'error');\n this.cdr.detectChanges();\n }\n if (this.routeId() && isinitial) {\n this.preventInitialSave.set(true);\n this.cdr.detectChanges();\n }\n });\n }\n });\n } else {\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n }\n }\n\n saveRoute() { \n this.saveAttempted.set(true);\n if (!this.pickupSelected()) {\n this.utils.openSnackBar('Please select a valid pickup location from suggestions', 'error');\n return;\n }\n if (!this.deliverySelected()) {\n this.utils.openSnackBar('Please select a valid delivery location from suggestions', 'error');\n return;\n }\n\n if (this.addRouteForm.valid) {\n const data: any = this.addRouteForm.getRawValue();\n const endpoint = this.routeId() ? 'update/routes' : 'add/routes';\n if (this.routeId()) data.id = this.routeId();\n \n this.showLoader.set(true);\n this.utils.postdata(endpoint, data).subscribe({\n next: (res: any) => {\n this.showLoader.set(false);\n if (res.success) {\n this.utils.openSnackBar(res.message, 'success');\n // Emit the saved data for local synchronization\n this.routeSaved.emit(data);\n this.close();\n } else {\n this.utils.openSnackBar(res.message, 'error');\n }\n },\n error: (err: any) => {\n this.showLoader.set(false);\n this.utils.openSnackBar('Something went wrong. Please try again.', 'error');\n }\n });\n } else {\n console.log('AddRoute Form invalid:', this.addRouteForm.errors, this.addRouteForm.value);\n Object.keys(this.addRouteForm.controls).forEach(key => {\n const controlErrors = this.addRouteForm.get(key)?.errors;\n if (controlErrors != null) {\n console.log('Key: ' + key + ', err:', controlErrors);\n }\n });\n this.addRouteForm.markAllAsTouched();\n }\n }\n\n promptDelete() {\n this.showDeleteModal.set(true);\n }\n\n confirmDelete() {\n if (!this.routeId()) return;\n this.utils.postdata('delete/routes', { uuid: this.routeId() }).subscribe({\n next: (res: any) => {\n if (res?.data?.success) {\n this.utils.openSnackBar(res.data.message, 'success');\n const deletedId = this.routeId()!;\n this.routeDeleted.emit(deletedId);\n this.showDeleteModal.set(false);\n this.close();\n }\n }\n });\n }\n\n close() {\n const isCoolmap = this.config.repository === 'coolmap';\n this.addRouteForm.reset({\n pickUpSearchOption: isCoolmap ? 'system' : 'google',\n deliverySearchOtption: isCoolmap ? 'system' : 'google'\n });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n this.modalOpenChange.emit(false);\n }\n icons = {\n X, ChevronDown, Check, LoaderCircle, Info\n };\n\n // Dynamic dropdown state logic\n dropdownOpen = signal(false);\n selectedUnitDriver = signal<string | null>(null);\n\n toggleDropdown() {\n this.dropdownOpen.update(v => !v);\n }\n\n selectOption(opt: string) {\n this.selectedUnitDriver.set(opt);\n this.dropdownOpen.set(false);\n }\n\n @HostListener('document:click', ['$event'])\n closeDropdowns(event: Event) {\n const target = event.target as HTMLElement;\n \n const isPickupArea = target === this.filterPickup()?.nativeElement || \n target.closest('.pickup-suggestions') || \n target.closest('.pickup-system-dropdown');\n \n const isDeliveryArea = target === this.filterDelivery()?.nativeElement || \n target.closest('.delivery-suggestions') || \n target.closest('.delivery-system-dropdown');\n\n if (!isPickupArea) {\n this.showPickupSuggestions.set(false);\n this.showPickupDropdown.set(false);\n }\n if (!isDeliveryArea) {\n this.showDeliverySuggestions.set(false);\n this.showDeliveryDropdown.set(false);\n }\n\n // Close other dropdowns if click is outside any relative container\n if (!target.closest('.relative')) {\n this.dropdownOpen.set(false);\n this.showCustomerDropdown.set(false);\n }\n }\n\n startDrag(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (target.tagName.toLowerCase() === 'button' || target.closest('button')) {\n return;\n }\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging || !this.modalOpen()) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n }\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n\n","@if (modalOpen()) {\n<div class=\"fixed inset-0 z-[112] pointer-events-none overflow-y-auto\" id=\"add-route-modal\">\n <div class=\"flex min-h-full items-center justify-center p-4\">\n <form\n [formGroup]=\"addRouteForm\"\n (ngSubmit)=\"saveRoute()\"\n class=\"pointer-events-auto relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[1000px]\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n tabindex=\"-1\"\n >\n <div\n class=\"flex items-center justify-between p-4 border-b border-gray-200 dark:border-slate-700 cursor-move\"\n (mousedown)=\"startDrag($event)\"\n >\n <h3 class=\"flex items-center gap-1 text-lg font-semibold text-gray-900 dark:text-white\">\n {{ routeId() ? 'Edit Route' : 'Add Route' }}\n </h3>\n <div class=\"flex items-center gap-4\">\n <button\n type=\"submit\"\n [disabled]=\"(routeId() ? (addRouteForm.invalid || !addRouteForm.dirty) : addRouteForm.invalid) || !pickupSelected() || !deliverySelected() || showLoader()\"\n class=\"inline-flex items-center justify-center gap-2 px-4 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-lg transition-colors text-sm\">\n @if (showLoader()) {\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin\" [size]=\"18\"></lucide-icon>\n } @else {\n {{ routeId() ? 'Update' : 'Save' }}\n }\n </button>\n @if (routeId()) {\n <button\n type=\"button\"\n (click)=\"promptDelete()\"\n class=\"inline-flex items-center gap-2 px-4 py-2 bg-red-600 text-white hover:bg-red-700 font-medium rounded-lg transition-colors text-sm\"\n >\n Delete\n </button>\n }\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-2 px-4 py-2 bg-gray-600 text-white hover:bg-gray-700 font-medium rounded-lg transition-colors text-sm\"\n (click)=\"close()\"\n >\n Close\n </button>\n </div>\n </div>\n <div class=\"p-4\">\n <div class=\"grid grid-cols-2 mb-[1rem] gap-4\">\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Route Name</label\n >\n <input\n type=\"text\"\n formControlName=\"route_name\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n <div class=\"relative\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Customer Name</label>\n <div class=\"relative\">\n <input\n type=\"text\"\n formControlName=\"customer_name\"\n (focus)=\"showCustomerDropdown.set(true)\"\n (blur)=\"hideDropdown('customer')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-300 dark:border-slate-700 bg-gray-100 dark:bg-slate-900 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingCustomers()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n </div>\n @if (showCustomerDropdown() && customerOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto\">\n @for (cust of customerOptions(); track cust.customer_id) {\n <div \n (mousedown)=\"addRouteForm.patchValue({customer_name: cust.customer_name}); addRouteForm.markAsDirty()\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white\">\n {{ cust.customer_name }}\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"grid grid-cols-1 mb-[1rem]\">\n <div class=\"location-flow rounded-lg\">\n @if (config.repository === 'coolmap') {\n <div class=\"flex gap-2 mb-2\">\n <div class=\"radio w-100 md:w-auto\">\n <input\n type=\"radio\"\n formControlName=\"pickUpSearchOption\"\n value=\"system\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"\n />\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\"\n >\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">System Search</div>\n </div>\n </label>\n </div>\n <div class=\"radio w-100 md:w-auto ml-2\">\n <input\n type=\"radio\"\n formControlName=\"pickUpSearchOption\"\n value=\"google\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"\n />\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\"\n >\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">Google Search</div>\n </div>\n </label>\n </div>\n </div>\n }\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Pickup Location</label>\n <input\n #filterPickup\n type=\"text\"\n formControlName=\"pickup_location\"\n placeholder=\"Pickup\"\n (input)=\"!isSystemPickup ? onInputChange($event, 'pickup') : null\"\n (focus)=\"onFocus('pickup')\"\n (blur)=\"isSystemPickup ? hideDropdown('pickup') : null\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingLocations()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n \n <!-- System Suggestions -->\n @if (isSystemPickup && showPickupDropdown() && pickupOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto pickup-system-dropdown\">\n @for (loc of pickupOptions(); track loc.formatted_address) {\n <div \n (mousedown)=\"patchAddressValue(loc, 'pickup')\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white border-b border-gray-50 dark:border-slate-700 last:border-0\">\n {{ loc.formatted_address }}\n </div>\n }\n </div>\n }\n\n <!-- Google Suggestions -->\n @if (!isSystemPickup && showPickupSuggestions() && pickupSuggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto pickup-suggestions\">\n @for (suggestion of pickupSuggestions(); track suggestion.placePrediction?.text?.toString() || $index) {\n <div \n (click)=\"onSuggestionClick(suggestion, 'pickup')\"\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\">\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n @if ((saveAttempted() || addRouteForm.get('pickup_location')?.dirty) && !pickupSelected() && addRouteForm.get('pickup_location')?.value) {\n <div class=\"text-red-500 text-[10px] mt-1 font-medium italic flex items-center gap-1\">\n Please select a valid pickup location from suggestions\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-1 mb-[1rem]\">\n <div class=\"location-flow rounded-lg\">\n @if (config.repository === 'coolmap') {\n <div class=\"flex gap-2 mb-2\">\n <div class=\"radio w-100 md:w-auto\">\n <input\n type=\"radio\"\n formControlName=\"deliverySearchOtption\"\n value=\"system\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"/>\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\">\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">System Search</div>\n </div>\n </label>\n </div>\n <div class=\"radio w-100 md:w-auto ml-2\">\n <input\n type=\"radio\"\n formControlName=\"deliverySearchOtption\"\n value=\"google\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"/>\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full ml-2\">\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">Google Search</div>\n </div>\n </label>\n </div>\n </div>\n }\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Delivery Location</label>\n <input\n #filterDelivery\n type=\"text\"\n formControlName=\"delivery_location\"\n placeholder=\"Delivery\"\n (input)=\"!isSystemDelivery ? onInputChange($event, 'delivery') : null\"\n (focus)=\"onFocus('delivery')\"\n (blur)=\"isSystemDelivery ? hideDropdown('delivery') : null\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingLocations()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n\n <!-- System Suggestions -->\n @if (isSystemDelivery && showDeliveryDropdown() && deliveryOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto delivery-system-dropdown\">\n @for (loc of deliveryOptions(); track loc.formatted_address) {\n <div \n (mousedown)=\"patchAddressValue(loc, 'delivery')\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white border-b border-gray-50 dark:border-slate-700 last:border-0\">\n {{ loc.formatted_address }}\n </div>\n }\n </div>\n }\n\n <!-- Google Suggestions -->\n @if (!isSystemDelivery && showDeliverySuggestions() && deliverySuggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto delivery-suggestions\">\n @for (suggestion of deliverySuggestions(); track suggestion.placePrediction?.text?.toString() || $index) {\n <div \n (click)=\"onSuggestionClick(suggestion, 'delivery')\"\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\">\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n @if ((saveAttempted() || addRouteForm.get('delivery_location')?.dirty) && !deliverySelected() && addRouteForm.get('delivery_location')?.value) {\n <div class=\"text-red-500 text-[10px] mt-1 font-medium italic flex items-center gap-1\">\n Please select a valid delivery location from suggestions\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"flex gap-4 flex-col md:flex-row\">\n <div class=\"w-full md:w-[70%]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Notes</label\n >\n <textarea\n formControlName=\"note\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm h-[46px]\"\n ></textarea>\n </div>\n <div class=\"w-full md:w-[30%]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit Type</label\n >\n <div class=\"relative w-full\">\n <button\n type=\"button\"\n (click)=\"toggleDropdown(); $event.stopPropagation()\"\n class=\"w-full flex justify-between items-center px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm text-left\"\n >\n <span>{{ selectedUnitName }}</span>\n <lucide-icon [img]=\"icons.ChevronDown\" [size]=\"16\" class=\"text-gray-400\"></lucide-icon>\n </button>\n @if (dropdownOpen()) {\n <div class=\"absolute z-10 mt-1 w-full bg-white dark:bg-slate-800 rounded-lg shadow-lg border border-gray-200 dark:border-slate-700 py-1 max-h-60 overflow-auto\">\n @for (opt of unitsList(); track opt.id) {\n <button\n type=\"button\"\n (click)=\"addRouteForm.patchValue({unit_id: opt.id}); addRouteForm.markAsDirty(); checkAndFetchRouteInformation(); dropdownOpen.set(false)\"\n class=\"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-slate-700 transition\"\n >\n <span>{{ opt.type }}</span>\n @if (addRouteForm.value.unit_id === opt.id) {\n <lucide-icon [img]=\"icons.Check\" [size]=\"16\" class=\"text-blue-500\"></lucide-icon>\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-2 mt-2 gap-4\">\n <div class=\"flex flex-col lg:flex-row gap-2\">\n @if(addRouteForm.value.estimated_distance){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Estimation of miles - <b>{{ addRouteForm.value.estimated_distance }}</b>\n </span>\n }\n\n @if(addRouteForm.value.estimated_time){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Estimation of time - <b>{{ addRouteForm.value.estimated_time }}</b>\n </span>\n }\n </div>\n <div class=\"flex flex-col lg:flex-row gap-2 justify-end\">\n @if (config.repository !== 'customer' && addRouteForm.value.trucker_pay_estimate) {\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Trucker Pay Estimate - <b>{{ addRouteForm.value.trucker_pay_estimate | currency }}</b>\n </span>\n }\n @if(addRouteForm.value.customer_price_estimate){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Customer Price Estimate - <b>{{ addRouteForm.value.customer_price_estimate | currency }}</b>\n </span>\n }\n </div>\n </div>\n </div>\n </form>\n\n @if (showDeleteModal()) {\n <div class=\"fixed inset-0 z-[120] flex items-center justify-center bg-black/60 backdrop-blur-sm animate-fade-in pointer-events-auto\">\n <div class=\"bg-white dark:bg-slate-900 rounded-xl shadow-2xl p-6 max-w-sm w-full mx-4 border border-gray-200 dark:border-slate-800\" (click)=\"$event.stopPropagation()\">\n <h3 class=\"text-lg font-bold text-gray-900 dark:text-white mb-2 text-center\">Delete Route?</h3>\n <p class=\"text-gray-600 dark:text-gray-400 text-sm mb-6 text-center\">\n Are you sure you want to delete this route?\n </p>\n <div class=\"flex justify-center gap-3\">\n <button\n type=\"button\"\n (click)=\"showDeleteModal.set(false)\"\n class=\"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 dark:text-gray-300 dark:bg-slate-800 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n (click)=\"confirmDelete()\"\n class=\"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg shadow-sm transition-colors\"\n >\n Delete\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n}\n","import { Component, EventEmitter, HostListener, Output, signal, inject, effect, ElementRef, ViewChild, input, AfterViewInit, CUSTOM_ELEMENTS_SCHEMA, computed } from '@angular/core';\nimport { FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';\nimport { LucideAngularModule, X, Share2, Calendar, MapPin, Hash, User, Phone, Mail, DollarSign, Info, LoaderCircle, Check } from 'lucide-angular';\nimport { NgClass, CurrencyPipe } from '@angular/common';\nimport { UtilsService, COOLMAP_CONFIG } from '@aggdirect/coolmap-services';\n\ninterface AutocompleteSuggestion {\n placePrediction?: {\n text: { toString(): string };\n toPlace(): {\n fetchFields(options: { fields: string[] }): Promise<void>;\n toJSON(): any;\n };\n };\n}\n\ninterface AutocompleteRequest {\n input: string;\n includedPrimaryTypes?: string[];\n includedRegionCodes?: string[];\n sessionToken?: any;\n language?: string;\n region?: string;\n}\n\ninterface GoogleMapsPlacesLibrary {\n AutocompleteSuggestion: {\n fetchAutocompleteSuggestions(request: AutocompleteRequest): Promise<{ suggestions: AutocompleteSuggestion[] }>;\n };\n AutocompleteSessionToken: new () => any;\n}\n\n@Component({\n selector: 'lib-share-route',\n standalone: true,\n imports: [LucideAngularModule, ReactiveFormsModule, NgClass, CurrencyPipe],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './share-route.component.html',\n styleUrl: './share-route.component.scss',\n})\nexport class ShareRouteComponent implements AfterViewInit {\n config = inject(COOLMAP_CONFIG);\n utils = inject(UtilsService);\n\n openShareRouteDetails = input<any>(null);\n userDetails = input<any>(null);\n @Output() closePopupEmit = new EventEmitter<void>();\n\n shareRouteForm: FormGroup;\n pickupDeliveryLatLongObject = signal<any>({ pickup_lat_lng: '', delivery_lat_lng: '' });\n unitsList = signal<any[]>([]);\n showLoader = signal(false);\n \n dragX = signal(0);\n dragY = signal(0);\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n \n @ViewChild('filterPickup') filterPickup!: ElementRef;\n @ViewChild('filterDelivery') filterDelivery!: ElementRef;\n\n pickupSuggestions = signal<AutocompleteSuggestion[]>([]);\n deliverySuggestions = signal<AutocompleteSuggestion[]>([]);\n showPickupSuggestions = signal(false);\n showDeliverySuggestions = signal(false);\n pickupSelected = signal(false);\n deliverySelected = signal(false);\n saveAttempted = signal(false);\n \n private placesLibrary: GoogleMapsPlacesLibrary | null = null;\n private sessionToken: any = null;\n private debounceTimer: any = null;\n\n dateValue = signal('');\n displayDate = computed(() => {\n const val = this.dateValue();\n if (!val) return '';\n const parts = val.split('-');\n if (parts.length !== 3) return val;\n const [y, m, d] = parts;\n return `${m}/${d}/${y}`;\n });\n\n icons = {\n X,\n Share2,\n Calendar,\n MapPin,\n Hash,\n User,\n Phone,\n Mail,\n DollarSign,\n Info,\n LoaderCircle,\n Check\n };\n\n constructor() {\n this.shareRouteForm = new FormGroup({\n uuid: new FormControl('', [Validators.required]),\n routeName: new FormControl('', [Validators.required]),\n customerName: new FormControl('', [Validators.required]),\n customerId: new FormControl('', [Validators.required]),\n special_price: new FormControl(false),\n pickupLocation: new FormControl('', [Validators.required]),\n deliveryLocation: new FormControl('', [Validators.required]),\n routeNotes: new FormControl('', [Validators.maxLength(2048)]),\n distance: new FormControl('', [Validators.required]),\n time: new FormControl('', [Validators.required]),\n date: new FormControl(''),\n quantity: new FormControl(''),\n units: new FormControl('', [Validators.required]),\n contactName: new FormControl('', [Validators.required]),\n contactPhone: new FormControl(null, [Validators.required]),\n contactEmail: new FormControl(null, [Validators.required]),\n price: new FormControl(0, [Validators.required]),\n customerEstimatedPrice: new FormControl(0),\n });\n\n // Handle input changes via effect\n effect(() => {\n const details = this.openShareRouteDetails();\n if (details) {\n this.patchData(details);\n }\n });\n\n effect(() => {\n const user = this.userDetails();\n if (user) {\n this.patchUserData(user);\n }\n });\n\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitsList.set(res || []);\n });\n }\n\n ngAfterViewInit() {\n this.initializePlacesLibrary();\n }\n\n async initializePlacesLibrary() {\n try {\n // Assuming google script is already loaded by the app\n this.placesLibrary = await (window as any).google?.maps?.importLibrary('places') as GoogleMapsPlacesLibrary;\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error loading Google Maps Places library:', error);\n }\n }\n\n onInputChange(event: Event, type: 'pickup' | 'delivery') {\n const value = (event.target as HTMLInputElement).value;\n const formKey = type === 'pickup' ? 'pickupLocation' : 'deliveryLocation';\n this.shareRouteForm.patchValue({ [formKey]: value });\n \n if (type === 'pickup') this.pickupSelected.set(false);\n else this.deliverySelected.set(false);\n\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => {\n if (value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n } else {\n this.hideSuggestions(type);\n }\n }, 300);\n }\n\n onFocus(type: 'pickup' | 'delivery') {\n const value = type === 'pickup' ? \n this.shareRouteForm.get('pickupLocation')?.value : \n this.shareRouteForm.get('deliveryLocation')?.value;\n \n if (value && value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n }\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n \n const isPickupArea = target === this.filterPickup.nativeElement || target.closest('.pickup-suggestions');\n const isDeliveryArea = target === this.filterDelivery.nativeElement || target.closest('.delivery-suggestions');\n\n if (!isPickupArea) {\n this.showPickupSuggestions.set(false);\n }\n if (!isDeliveryArea) {\n this.showDeliverySuggestions.set(false);\n }\n }\n\n async fetchAutocompleteSuggestions(input: string, type: 'pickup' | 'delivery') {\n if (!this.placesLibrary || !input.trim() || !this.sessionToken) return;\n\n try {\n const request: AutocompleteRequest = {\n input: input.trim(),\n sessionToken: this.sessionToken,\n includedRegionCodes: ['US']\n };\n\n const { suggestions } = await this.placesLibrary.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n \n if (type === 'pickup') {\n this.pickupSuggestions.set(suggestions || []);\n this.showPickupSuggestions.set(this.pickupSuggestions().length > 0);\n } else {\n this.deliverySuggestions.set(suggestions || []);\n this.showDeliverySuggestions.set(this.deliverySuggestions().length > 0);\n }\n } catch (error) {\n console.error('Autocomplete error:', error);\n }\n }\n\n async onSuggestionClick(suggestion: AutocompleteSuggestion, type: 'pickup' | 'delivery') {\n if (!suggestion.placePrediction) return;\n\n try {\n const place = suggestion.placePrediction.toPlace();\n await place.fetchFields({ fields: ['displayName', 'formattedAddress', 'location'] });\n const placeData = place.toJSON();\n\n const res = {\n lat: placeData.location.lat,\n lng: placeData.location.lng,\n formatted_address: placeData.formattedAddress || placeData.displayName\n };\n\n this.patchAddressValue(res, type);\n if (type === 'pickup') this.pickupSelected.set(true);\n else this.deliverySelected.set(true);\n this.hideSuggestions(type);\n \n // Refresh session token for next search\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error selecting suggestion:', error);\n }\n }\n\n hideSuggestions(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n this.showPickupSuggestions.set(false);\n this.pickupSuggestions.set([]);\n } else {\n this.showDeliverySuggestions.set(false);\n this.deliverySuggestions.set([]);\n }\n }\n\n patchAddressValue(data: any, type: 'pickup' | 'delivery') {\n this.shareRouteForm.patchValue({\n [type + 'Location']: data.formatted_address\n });\n this.pickupDeliveryLatLongObject.update(prev => ({\n ...prev,\n [type + '_lat_lng']: `${data.lat},${data.lng}`\n }));\n this.checkAndFetchRouteInformation();\n }\n\n patchData(details: any) {\n this.shareRouteForm.patchValue({\n uuid: details.route_id,\n routeName: details.route_name,\n customerName: details.customer_name,\n pickupLocation: details.pickup_location,\n deliveryLocation: details.delivery_location,\n routeNotes: details.notes || null,\n distance: details.estimated_distance?.split(' ')[0],\n time: details.estimated_time?.split(' ')[0],\n units: details.unit,\n price: details.customer_price_estimate,\n customerEstimatedPrice: details.customer_price_estimate\n });\n this.pickupDeliveryLatLongObject.set({\n pickup_lat_lng: details.pickup_lat_lng,\n delivery_lat_lng: details.delivery_lat_lng\n });\n if (details.date) {\n this.dateValue.set(details.date);\n }\n this.pickupSelected.set(!!details.pickup_location);\n this.deliverySelected.set(!!details.delivery_location);\n this.saveAttempted.set(false);\n }\n\n patchUserData(user: any) {\n this.shareRouteForm.patchValue({\n contactName: user.firstname + ' ' + user.lastname,\n contactPhone: user.phone,\n contactEmail: user.email,\n customerId: user.customerId\n });\n }\n\n checkAndFetchRouteInformation() {\n const latLongs = this.pickupDeliveryLatLongObject();\n if (latLongs.delivery_lat_lng?.length > 0 && latLongs.pickup_lat_lng?.length > 0) {\n this.showLoader.set(true);\n const param = {\n delivery_lat_lng: latLongs.delivery_lat_lng,\n pickup_lat_lng: latLongs.pickup_lat_lng,\n unit: this.shareRouteForm.value?.units\n };\n this.utils.postdata('calculate/routes/estimation', param).subscribe({\n next: (res: any) => {\n if (res && res['path']) {\n this.shareRouteForm.patchValue({\n distance: res['dist']?.split(' ')[0],\n time: res['time']?.split(' ')[0],\n price: res['customer_price_estimate'],\n customerEstimatedPrice: res['customer_price_estimate']\n });\n } else {\n this.utils.openSnackBar(res['status'] || 'Estimation failed', 'error');\n }\n this.showLoader.set(false);\n },\n error: () => {\n this.showLoader.set(false);\n }\n });\n }\n }\n\n onDateChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (target && target.value) {\n this.dateValue.set(target.value);\n this.shareRouteForm.patchValue({ date: target.value });\n }\n }\n\n saveShareRoute() {\n this.saveAttempted.set(true);\n if (!this.pickupSelected()) {\n this.utils.openSnackBar('Please select a valid pickup location from suggestions', 'error');\n return;\n }\n if (!this.deliverySelected()) {\n this.utils.openSnackBar('Please select a valid delivery location from suggestions', 'error');\n return;\n }\n\n if (this.shareRouteForm.valid) {\n this.showLoader.set(true);\n const formData = { ...this.shareRouteForm.value };\n if (formData.date) {\n const d = new Date(formData.date);\n formData.date = `${(d.getMonth() + 1).toString().padStart(2, '0')}/${d.getDate().toString().padStart(2, '0')}/${d.getFullYear()}`;\n } else {\n formData.date = 'N/A';\n }\n formData.quantity = formData.quantity || 0;\n \n this.utils.postdata('share/routes', formData).subscribe({\n next: (res: any) => {\n if (res.data?.success) {\n this.utils.openSnackBar(res.data.message, 'success');\n this.closePopup();\n } else {\n this.utils.openSnackBar(res.data?.message || 'Failed to share route', 'error');\n }\n this.showLoader.set(false);\n },\n error: () => {\n this.showLoader.set(false);\n }\n });\n } else {\n this.shareRouteForm.markAllAsTouched();\n }\n }\n\n setValidators(checked: boolean) {\n const priceControl = this.shareRouteForm.get('customerEstimatedPrice');\n if (checked) {\n priceControl?.setValidators(Validators.required);\n } else {\n priceControl?.clearValidators();\n }\n priceControl?.updateValueAndValidity();\n }\n\n closePopup() {\n this.closePopupEmit.emit();\n }\n\n startDrag(event: MouseEvent): void {\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n","<div\n class=\"fixed inset-0 z-[120] flex items-end justify-center p-4 w-full pointer-events-none\"\n \n>\n <div class=\"flex lg:items-start lg:justify-start items-center justify-center p-3\">\n <form\n [formGroup]=\"shareRouteForm\"\n (ngSubmit)=\"saveShareRoute()\"\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl w-[1000px] pointer-events-auto\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n [style.will-change]=\"'transform'\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between p-4 border-b border-gray-200 dark:border-slate-700 cursor-move\"\n (mousedown)=\"startDrag($event)\"\n >\n <h3 class=\"flex items-center gap-1 text-lg font-semibold text-gray-900 dark:text-white\">\n Share Route\n </h3>\n <div class=\"flex items-center gap-4\">\n <button\n type=\"submit\"\n [disabled]=\"shareRouteForm.invalid || showLoader()\"\n class=\"flex items-center gap-2 px-4 py-2.5 rounded-lg bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold text-sm shadow-lg shadow-amber-500/20 transition-all active:scale-95\"\n >\n @if (showLoader()) {\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin\" [size]=\"18\"></lucide-icon> } @else { Send }\n </button>\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-2 px-4 py-2.5 bg-gray-600 text-white hover:bg-gray-700 font-medium rounded-lg transition-colors text-sm\"\n (click)=\"closePopup()\"\n >\n Close\n </button>\n </div>\n </div>\n\n <div class=\"p-4 overflow-y-auto max-h-[50vh]\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Route Name -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Route Name\n </label>\n <input\n formControlName=\"routeName\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Enter route name\"\n />\n </div>\n\n <!-- Unit Type -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit Type\n </label>\n <select\n formControlName=\"units\"\n (change)=\"checkAndFetchRouteInformation()\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n >\n <option value=\"\" disabled>Select Unit</option>\n @for (unit of unitsList(); track unit.type) {\n <option [value]=\"unit.type\">{{ unit.type }}</option>\n }\n </select>\n </div>\n\n <!-- Pickup Location -->\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Pickup\n </label>\n <input\n formControlName=\"pickupLocation\"\n #filterPickup\n (input)=\"onInputChange($event, 'pickup')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Search pickup location...\"\n autocomplete=\"off\"\n />\n @if (showPickupSuggestions() && pickupSuggestions().length > 0) {\n <div\n class=\"absolute z-[110] w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-xl max-h-48 overflow-y-auto\"\n >\n @for (suggestion of pickupSuggestions(); track\n suggestion.placePrediction?.text?.toString() || $index) {\n <div\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\"\n (click)=\"onSuggestionClick(suggestion, 'pickup')\"\n >\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Delivery Location -->\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Delivery\n </label>\n <input\n formControlName=\"deliveryLocation\"\n #filterDelivery\n (input)=\"onInputChange($event, 'delivery')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Search delivery location...\"\n autocomplete=\"off\"\n />\n @if (showDeliverySuggestions() && deliverySuggestions().length > 0) {\n <div\n class=\"absolute z-[110] w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-xl max-h-48 overflow-y-auto\"\n >\n @for (suggestion of deliverySuggestions(); track\n suggestion.placePrediction?.text?.toString() || $index) {\n <div\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\"\n (click)=\"onSuggestionClick(suggestion, 'delivery')\"\n >\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"grid grid-cols-1 md:grid-cols-1 gap-4 mb-[1rem] mt-[1rem]\">\n <!-- Notes -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\"\n >Notes</label\n >\n <textarea\n formControlName=\"routeNotes\"\n rows=\"2\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm resize-none\"\n placeholder=\"List Material and Details\"\n ></textarea>\n </div>\n </div>\n\n <div class=\"grid grid-cols-2 gap-4 mb-[1rem]\">\n <!-- Date Requested -->\n <div class=\"relative\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Date Requested\n </label>\n <div class=\"relative group\">\n <input\n type=\"text\"\n readonly\n [value]=\"displayDate()\"\n (click)=\"dateInput.showPicker()\"\n placeholder=\"MM/DD/YYYY\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n <input\n #dateInput\n type=\"date\"\n [value]=\"dateValue()\"\n (change)=\"onDateChange($event)\"\n class=\"absolute inset-0 w-0 h-0 opacity-0 pointer-events-none\"\n />\n </div>\n </div>\n\n <!-- Quantity Requested -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Quantity Requested\n </label>\n <input\n type=\"number\"\n formControlName=\"quantity\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"0\"\n />\n </div>\n\n <!-- Price -->\n <div class=\"relative -top-[20px]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Customer Haul Price\n </label>\n <div class=\"relative\">\n <input\n formControlName=\"price\"\n readonly\n class=\"w-full px-3 py-3 pl-[47px] rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n <lucide-icon\n [img]=\"icons.DollarSign\"\n class=\"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400\"\n [size]=\"16\"\n ></lucide-icon>\n </div>\n </div>\n\n <!-- Unit Type Display -->\n <div class=\"relative -top-[20px]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit type\n </label>\n <div\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n >\n {{ shareRouteForm.value.units || 'N/A' }}\n </div>\n </div>\n\n <!-- Contact Info Section Title -->\n <div class=\"md:col-span-2 border-t border-gray-100 dark:border-slate-800\">\n <h3 class=\"flex items-center gap-1 text-md font-semibold text-gray-900 dark:text-white\">\n Customer Information\n </h3>\n </div>\n\n <!-- Contact Name -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Name\n </label>\n <input\n formControlName=\"contactName\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Contact Phone -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Phone\n </label>\n <input\n formControlName=\"contactPhone\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Contact Email -->\n <div class=\"space-y-1.5 md:col-span-2\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Email\n </label>\n <input\n formControlName=\"contactEmail\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Special Pricing Checkbox -->\n <div class=\"md:col-span-2 pt-2 flex items-center gap-3\">\n <label class=\"relative flex h-5 w-5 cursor-pointer\">\n <input\n type=\"checkbox\"\n formControlName=\"special_price\"\n (change)=\"setValidators(shareRouteForm.value.special_price)\"\n class=\"h-full w-full appearance-none rounded-md border border-gray-300 dark:border-slate-700 transition-all checked:bg-amber-500 checked:border-amber-500 outline-none cursor-pointer\"\n />\n <lucide-icon\n [img]=\"icons.Check\"\n [size]=\"14\"\n [class.opacity-100]=\"shareRouteForm.get('special_price')?.value\"\n [class.opacity-0]=\"!shareRouteForm.get('special_price')?.value\"\n class=\"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-white transition-opacity pointer-events-none\"\n ></lucide-icon>\n </label>\n <span class=\"text-sm font-medium text-gray-700 dark:text-gray-300\"\n >Request special pricing</span\n >\n </div>\n\n <!-- Special Price Input (Conditional) -->\n @if (shareRouteForm.value.special_price) {\n <div class=\"space-y-1.5 animate-fade-in md:col-span-1\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Requested Price\n </label>\n <div class=\"relative\">\n <input\n formControlName=\"customerEstimatedPrice\"\n class=\"w-full px-3 py-3 pl-[47px] rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n <lucide-icon\n [img]=\"icons.DollarSign\"\n class=\"absolute left-3 top-1/2 -translate-y-1/2 text-amber-500\"\n [size]=\"16\"\n ></lucide-icon>\n </div>\n </div>\n }\n </div>\n </div>\n </form>\n </div>\n</div>\n","import { AfterViewInit, Component, ElementRef, Input, ViewChild, inject, signal, computed, OnInit, OnChanges, SimpleChanges, input, effect, HostListener } from '@angular/core';\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\nimport { AgToastContainerComponent } from '../ag-toast-container/ag-toast-container.component';\nimport { CommonModule } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MapboxService, COOLMAP_CONFIG, UtilsService, CoolmapService, CoolmapRoute } from '@aggdirect/coolmap-services';\nimport { JobCodeComponent } from '../job-code/job-code.component';\nimport { JobRouteListComponent } from '../job-route-list/job-route-list.component';\nimport { ViewRouteListComponent } from '../view-route-list/view-route-list.component';\nimport { AddRouteComponent } from '../add-route/add-route.component';\nimport { ShareRouteComponent } from '../share-route/share-route.component';\nimport { LucideAngularModule, Search, X, Route, LoaderCircle, Calendar } from 'lucide-angular';\n\n@Component({\n selector: 'lib-coolmap',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n CommonModule,\n LucideAngularModule,\n JobCodeComponent,\n ViewRouteListComponent,\n JobRouteListComponent,\n AddRouteComponent,\n ShareRouteComponent,\n AgToastContainerComponent,\n ],\n templateUrl: './coolmap.component.html',\n styleUrl: './coolmap.component.scss',\n})\nexport class CoolmapComponent implements OnInit, AfterViewInit, OnChanges {\n @Input() mobileMode: boolean = false;\n activeSection = input<'Jobcode' | 'ViewRoute'>('Jobcode');\n @Input() customerRepoDetails?: { customer: { id?: string, name?: string }, projectId: string };\n @Input() userDetails?: any;\n darkMode = input<boolean>(false);\n @ViewChild('mapContainer') mapContainer!: ElementRef;\n @ViewChild('searchContainer') searchContainer!: ElementRef;\n public coolmapService = inject(CoolmapService);\n utils = inject(UtilsService);\n config = inject(COOLMAP_CONFIG);\n mapService = inject(MapboxService);\n elRef = inject(ElementRef);\n \n showRouteList = false;\n addRouteModal = false;\n showShareModal = signal(false);\n shareRouteData = signal<any>(null);\n \n // Filtering Signals (Lifted from JobCode)\n routesList = signal<CoolmapRoute[]>([]);\n viewRoutesList = signal<CoolmapRoute[]>([]);\n filters = signal<any[]>([]);\n filteredOptions = signal<any[]>([]);\n dropdownOpen = signal(false);\n dateValue = signal(this.utils.getDateFormat(new Date()));\n displayDate = computed(() => {\n const val = this.dateValue();\n if (!val) return '';\n const parts = val.split('-');\n if (parts.length !== 3) return val;\n const [y, m, d] = parts;\n return `${m}/${d}/${y}`;\n });\n selectedRouteIds = signal<string[]>([]);\n modalPlottedIds = signal<string[]>([]);\n modalPlottedRoutes = signal<CoolmapRoute[]>([]);\n selectedRouteForEdit = signal<CoolmapRoute | null>(null);\n unitList = signal<any[]>([]);\n materialsList = signal<any[]>([]);\n private skipNextRefresh = false;\n private mapOpQueue: Promise<void> = Promise.resolve();\n\n activeFilteredRoutes = computed(() => {\n const list = this.activeSection() === 'Jobcode' ? this.routesList() : this.viewRoutesList();\n const filtersArray = this.filters();\n if (filtersArray.length === 0) return list;\n return this.utils.getSearchResults(list, filtersArray) || [];\n });\n\n filterForm = new FormGroup({\n search: new FormControl('')\n });\n\n allSelected = computed(() => {\n const active = this.activeFilteredRoutes();\n const selected = this.selectedRouteIds();\n if (active.length === 0) return false;\n return active.every(r => selected.includes(this.getRouteId(r)));\n });\n\n modalAllSelected = computed(() => {\n return false;\n });\n\n masterStats = computed(() => {\n const routes = this.activeFilteredRoutes();\n const stats = { Done: 0, Incomplete: 0, Ongoing: 0, Open: 0 };\n \n routes.forEach(route => {\n const v = route?.values || {};\n stats.Done += (v.Done || 0);\n stats.Incomplete += (v.Incomplete || 0);\n stats.Ongoing += (v.Ongoing || 0);\n stats.Open += (v.Open || 0);\n });\n \n // Fallback default: if no routes, but we expect at least 1 \"Open\" slot behavior\n if (routes.length > 0 && stats.Done === 0 && stats.Ongoing === 0 && stats.Open === 0 && stats.Incomplete === 0) {\n stats.Open = routes.length;\n }\n \n return stats;\n });\n\n masterToggle() {\n if (this.allSelected()) {\n this.selectedRouteIds.set([]);\n } else {\n const ids = this.activeFilteredRoutes().map(r => this.getRouteId(r));\n this.selectedRouteIds.set(ids);\n }\n }\n\n modalMasterToggle(modalRoutes: CoolmapRoute[]) {\n const currentPlotted = this.modalPlottedRoutes();\n const isAllPlotted = modalRoutes.every(r => currentPlotted.some(p => this.getRouteId(p) === this.getRouteId(r)));\n\n if (isAllPlotted) {\n // Unplot all routes in this modal's view\n const modalIdsInView = modalRoutes.map(r => this.getRouteId(r));\n this.modalPlottedRoutes.update(curr => curr.filter(r => !modalIdsInView.includes(this.getRouteId(r))));\n } else {\n // Plot all routes in this modal's view (prevent duplicates)\n this.modalPlottedRoutes.update(curr => {\n const newRoutes = modalRoutes.filter(mr => !curr.some(c => this.getRouteId(c) === this.getRouteId(mr)));\n return [...curr, ...newRoutes];\n });\n }\n \n this.modalPlottedIds.set(this.modalPlottedRoutes().map(r => this.getRouteId(r)));\n }\n icons = {\n Route,\n Search,\n X,\n LoaderCircle,\n Calendar\n };\n\n constructor() {\n this.filterForm.get('search')?.valueChanges.pipe(\n takeUntilDestroyed()\n ).subscribe(value => {\n if (value && typeof value === 'string') {\n let options = this.utils.filter(value, this.filters());\n if (this.activeSection() === 'ViewRoute') {\n options = options.filter((opt: any) => opt.type !== 'material');\n }\n this.filteredOptions.set(options);\n this.dropdownOpen.set(options.length > 0);\n } else {\n this.filteredOptions.set([]);\n this.dropdownOpen.set(false);\n }\n });\n\n effect(() => {\n const isDark = this.darkMode();\n this.mapService.updateTheme(isDark);\n });\n\n // Effect 1: Manage Floating List (JobCode)\n effect(async () => {\n if (this.activeSection() === 'Jobcode') {\n const routes = this.routesList();\n const selectedIds = this.selectedRouteIds();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobcode', routes, selectedIds)\n );\n } else {\n // Clear jobcode prefix if not in the section\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobcode', [], [])\n );\n }\n });\n\n // Effect 2: Manage Modal List (JobRouteList)\n effect(async () => {\n const modalRoutes = this.modalPlottedRoutes();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobrouteList', modalRoutes, modalRoutes.map(r => this.getRouteId(r)))\n );\n });\n\n // Effect 3: Manage View Route Section\n effect(async () => {\n if (this.activeSection() === 'ViewRoute') {\n const routes = this.viewRoutesList();\n const selectedIds = this.selectedRouteIds();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('viewroute', routes, selectedIds)\n );\n } else {\n // Clear viewroute prefix if not in the section\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('viewroute', [], [])\n );\n }\n });\n }\n\n @HostListener('document:click', ['$event'])\n onClick(event: MouseEvent) {\n if (this.searchContainer && !this.searchContainer.nativeElement.contains(event.target)) {\n this.dropdownOpen.set(false);\n }\n }\n\n ngOnInit() {\n this.loadData(this.dateValue());\n }\n\n getUnitList() {\n this.utils.getData('unit/all').subscribe((res: any) => {\n if (res && res.data) {\n this.unitList.set(res.data);\n }\n });\n }\n\n getMaterialsList() {\n this.utils.getData('material/all').subscribe((res: any) => {\n if (res && res.data) {\n this.materialsList.set(res.data);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['customerRepoDetails'] && !changes['customerRepoDetails'].firstChange) {\n if (this.config.repository === 'customer') {\n if (this.activeSection() === 'Jobcode') {\n this.loadData(this.dateValue());\n } else {\n this.loadViewRoutes();\n }\n }\n }\n if (changes['activeSection'] && !changes['activeSection'].firstChange) {\n this.selectedRouteIds.set([]);\n this.modalPlottedIds.set([]);\n this.modalPlottedRoutes.set([]);\n this.filters.set([]);\n this.addRouteModal = false;\n this.showRouteList = false;\n this.showShareModal.set(false);\n this.selectedRouteForEdit.set(null);\n if (this.activeSection() === 'Jobcode') {\n this.loadData(this.dateValue());\n } else {\n this.loadViewRoutes();\n }\n }\n }\n\n loadData(value: string, isRefresh = false) {\n this.dateValue.set(value);\n this.coolmapService.isLoading.set(true);\n \n // Clear selection when the base list changes (date/repo switch)\n if (!isRefresh) {\n this.selectedRouteIds.set([]);\n this.filters.set([]);\n this.filterForm.controls['search'].setValue('');\n }\n\n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((unitsRes: any) => {\n this.unitList.set(unitsRes);\n this.utils.fetchMaterialsListForCustomer().then((matRes: any) => {\n this.materialsList.set(matRes);\n this.executeJobReportFetch(value);\n });\n });\n } else {\n this.executeJobReportFetch(value);\n }\n }\n\n private executeJobReportFetch(value: string) {\n let dataSet: any;\n if (this.config.repository === 'customer') {\n const custId = this.customerRepoDetails?.customer?.id || '';\n const projId = this.customerRepoDetails?.projectId || '';\n dataSet = { date: value, customer_id: custId, project_id: projId };\n } else {\n dataSet = { date: value };\n }\n\n this.utils.postdata('jobs_report_v2', dataSet).subscribe({\n next: (res: any) => {\n if (res && res.data && typeof res.data !== 'string') {\n const list = res.data.map((ele: CoolmapRoute) => {\n (ele as any).date = value;\n if (this.config.repository === 'customer') {\n ele.unit = this.getUnitName(ele);\n (ele as any).material = this.getMaterialName(ele).split('|')[0].trim();\n }\n this.utils.makeOptions(ele);\n return ele;\n });\n this.routesList.set(list);\n } else {\n this.routesList.set([]);\n }\n this.coolmapService.isLoading.set(false);\n },\n error: () => {\n this.routesList.set([]);\n this.coolmapService.isLoading.set(false);\n }\n });\n }\n\n loadViewRoutes(isRefresh = false) {\n this.coolmapService.isLoading.set(true);\n if (!isRefresh) {\n this.selectedRouteIds.set([]);\n this.filters.set([]);\n this.filterForm.controls['search'].setValue('');\n }\n \n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((unitsRes: any) => {\n this.unitList.set(unitsRes);\n this.utils.fetchMaterialsListForCustomer().then((matRes: any) => {\n this.materialsList.set(matRes);\n this.executeViewRoutesFetch();\n });\n });\n } else {\n this.executeViewRoutesFetch();\n }\n }\n\n private executeViewRoutesFetch() {\n if (this.config.repository === 'customer') {\n const dataSet = { customer_id: this.customerRepoDetails?.customer?.id || '' };\n this.utils.postdata('routes/all', dataSet).subscribe({\n next: (res: any) => {\n this.handleViewRoutesResponse(res);\n },\n error: () => {\n this.viewRoutesList.set([]);\n this.coolmapService.isLoading.set(false);\n }\n });\n } else {\n this.utils.getData('routes/all').subscribe({\n next: (res: any) => {\n this.handleViewRoutesResponse(res);\n },\n error: () => {\n this.viewRoutesList.set([]);\n this.coolmapService.isLoading.set(false);\n }\n });\n }\n }\n\n private handleViewRoutesResponse(res: any) {\n if (res && res.data && Array.isArray(res.data)) {\n const list = res.data.map((ele: CoolmapRoute) => {\n if (this.config.repository === 'customer') {\n ele.unit = this.getUnitName(ele);\n (ele as any).material = this.getMaterialName(ele).split('|')[0].trim();\n }\n this.utils.makeOptions(ele);\n return ele;\n });\n this.viewRoutesList.set(list);\n } else {\n this.viewRoutesList.set([]);\n }\n this.coolmapService.isLoading.set(false);\n }\n\n getUnitName(data: any): string {\n let unitName = '';\n this.unitList().forEach((res) => {\n if (res.id === data.unit_id) {\n unitName = res.type;\n }\n });\n return unitName || data.unit;\n }\n\n getMaterialName(data: any): string {\n let materialName = '';\n this.materialsList().forEach((res) => {\n if (res.id === data.material_id) {\n materialName = res.name;\n }\n });\n return materialName || data.material || '';\n }\n\n onDateChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (target && target.value) {\n this.coolmapService.resetModals.update(v => v + 1);\n this.loadData(target.value);\n }\n }\n\n onSearchFocus() {\n const value = this.filterForm.get('search')?.value;\n if (value && this.filteredOptions().length > 0) {\n this.dropdownOpen.set(true);\n }\n }\n\n selectFilter(option: any) {\n this.filterForm.controls['search'].setValue('');\n this.selectedRouteIds.set([]); // Clear selection when switching filters\n this.filters.set([\n { name: option.label, type: option.type, value: option }\n ]);\n this.dropdownOpen.set(false);\n }\n\n removeFilter(filter: any) {\n this.filters.update(curr => curr.filter(f => f !== filter));\n }\n\n /**\n * Performs an isolated, diff-based synchronization for a specific route type.\n * This ensures that 'jobcode' and 'jobrouteList' updates never interfere.\n */\n async syncSpecificPrefix(prefix: string, sourceRoutes: CoolmapRoute[], selectedIds: string[]) { \n // 1. Identify desired state for THIS prefix only\n const desiredIds = new Set(sourceRoutes.map(r => `${prefix}-${this.getRouteId(r)}`));\n \n // 2. Get current state for THIS prefix only from map service\n const currentPlottedIds = this.mapService.getRegistryKeys().filter(k => k.startsWith(`${prefix}-`));\n\n // 3. Diff: Identify what to remove and what to add for THIS prefix\n const toRemove = currentPlottedIds.filter(id => !desiredIds.has(id));\n const toAdd = Array.from(desiredIds).filter(id => !currentPlottedIds.includes(id));\n \n // 4. Perform removals for THIS prefix\n for (const regId of toRemove) {\n const id = regId.substring(prefix.length + 1);\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.add(regId);\n return n;\n });\n try {\n await this.mapService.removeRouteAndMarker(id, prefix);\n } finally {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.delete(regId);\n return n;\n });\n }\n }\n\n // 5. Perform additions for THIS prefix\n if (toAdd.length > 0) {\n this.coolmapService.isLoading.set(true);\n for (const regId of toAdd) {\n const id = regId.substring(prefix.length + 1);\n const routeObj = sourceRoutes.find(r => this.getRouteId(r) === id);\n if (routeObj) {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.add(regId);\n return n;\n });\n try {\n await this.mapService.plotRoute(routeObj, id, prefix, false, false);\n } finally {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.delete(regId);\n return n;\n });\n }\n }\n }\n }\n\n // 6. Update Visibility for THIS prefix only\n // This allows jobcode and jobrouteList to have independent visibility states.\n const compositeVisible = selectedIds.map(id => `${prefix}-${id}`);\n const showAllForThisPrefix = (['jobcode', 'viewroute'].includes(prefix) && selectedIds.length === 0);\n \n this.mapService.setRoutesVisibility(compositeVisible, showAllForThisPrefix, prefix);\n this.coolmapService.isLoading.set(false);\n }\n\n toggleSelection(id: string) {\n this.selectedRouteIds.update(ids => {\n if (ids.includes(id)) {\n return ids.filter(i => i !== id);\n } else {\n return [...ids, id];\n }\n });\n }\n\n toggleModalRoute(route: CoolmapRoute) {\n const id = this.getRouteId(route);\n if (!id) return;\n\n this.modalPlottedRoutes.update(routes => {\n const isPlotted = routes.some(r => this.getRouteId(r) === id);\n if (isPlotted) {\n return routes.filter(r => this.getRouteId(r) !== id);\n } else {\n return [...routes, route];\n }\n });\n \n // Also update IDs for UI checkboxes\n this.modalPlottedIds.set(this.modalPlottedRoutes().map(r => this.getRouteId(r)));\n }\n\n async onAddRouteModalChange(isOpen: boolean) {\n this.addRouteModal = isOpen;\n if (!isOpen) {\n if (this.skipNextRefresh) {\n this.skipNextRefresh = false;\n return;\n }\n // Modal closed - restore map state and refresh data\n await this.refreshMapState();\n }\n }\n\n async refreshMapState() {\n if (this.activeSection() === 'Jobcode') {\n await this.loadData(this.dateValue(), true);\n } else {\n await this.loadViewRoutes(true);\n }\n }\n\n onRouteSaved(data: any) {\n if (data.id) {\n if (data.unit_id) {\n data.unit = this.getUnitName(data);\n }\n\n this.skipNextRefresh = true;\n const updater = (list: CoolmapRoute[]) => list.map(r => this.getRouteId(r) === data.id ? { ...r, ...data } : r);\n this.routesList.update(updater);\n this.viewRoutesList.update(updater);\n } else {\n // It was an add - need a re-fetch to get new ID from server\n this.skipNextRefresh = false; // explicitly allow refresh on add to get new ID\n }\n }\n\n onRouteDeleted(id: string) {\n this.skipNextRefresh = true;\n \n // 1. Remove from local signals\n this.routesList.update(list => list.filter(r => this.getRouteId(r) !== id));\n this.viewRoutesList.update(list => list.filter(r => this.getRouteId(r) !== id));\n \n // 2. Clear from selections\n this.selectedRouteIds.update(ids => ids.filter(i => i !== id));\n this.modalPlottedIds.update(ids => ids.filter(i => i !== id));\n this.modalPlottedRoutes.update(routes => routes.filter(r => this.getRouteId(r) !== id));\n\n // 3. Cleanup Map\n this.mapService.removeRouteAndMarker(id, 'jobcode');\n this.mapService.removeRouteAndMarker(id, 'jobrouteList');\n this.mapService.removeRouteAndMarker(id, 'viewroute');\n\n // 4. Update Filter Pills\n this.filters.update(curr => curr.filter(f => {\n if (f.type === 'job') {\n return f.value.job_id !== id;\n }\n return true;\n }));\n\n // 5. Refresh Search Suggestions (Options list in Utils)\n this.utils.clearOptions();\n [...this.routesList(), ...this.viewRoutesList()].forEach(r => this.utils.makeOptions(r));\n }\n\n openAddRouteModal() {\n this.selectedRouteForEdit.set(null);\n this.addRouteModal = true;\n }\n\n openEditModal(route: CoolmapRoute) {\n this.selectedRouteForEdit.set(route);\n this.addRouteModal = true;\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n clearSelection() {\n this.selectedRouteIds.set([]);\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this.mapService.initializeMap(this.mapContainer.nativeElement, this.darkMode());\n\n setTimeout(() => {\n this.mapService.resize();\n }, 200);\n }, 0);\n }\n\n handleShareRoute(data: any) {\n this.shareRouteData.set(data);\n this.showShareModal.set(true);\n }\n}\n","<div class=\"center-area\">\n <div [formGroup]=\"filterForm\" class=\"toolbar flex flex-col sm:flex-row md:h-[55px] h-auto py-2 px-2 gap-3 items-center\">\n <div class=\"toolbar-left flex items-center gap-3 flex-1\">\n @if (activeSection() === 'Jobcode') {\n <div class=\"relative w-full sm:w-auto group mt-[25px]\">\n <input\n type=\"text\"\n [value]=\"displayDate()\"\n readonly\n [disabled]=\"coolmapService.isLoading()\"\n (click)=\"dateInput.showPicker()\"\n class=\"w-full pl-3 pr-10 py-2 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer\"\n />\n <lucide-icon \n [img]=\"icons.Calendar\" \n [size]=\"18\" \n (click)=\"!coolmapService.isLoading() && dateInput.showPicker()\"\n [class.pointer-events-none]=\"coolmapService.isLoading()\"\n [class.opacity-50]=\"coolmapService.isLoading()\"\n class=\"absolute right-[6px] top-[5px] text-white-400 group-hover:text-brand-blue transition-colors cursor-pointer\"\n ></lucide-icon>\n <input\n #dateInput\n type=\"date\"\n [value]=\"dateValue()\"\n (change)=\"onDateChange($event)\"\n [disabled]=\"coolmapService.isLoading()\"\n class=\"absolute inset-0 w-0 h-0 opacity-0 pointer-events-none\"\n />\n </div>\n <span class=\"toolbar-divider hidden sm:flex h-6 w-[1px] bg-gray-200 dark:bg-slate-700\"></span>\n }\n <div #searchContainer class=\"relative items-center flex-1\">\n <lucide-icon [img]=\"icons.Search\" [size]=\"18\" class=\"absolute left-[0.55rem] top-[50%] -translate-y-1/2 text-gray-400\"></lucide-icon>\n <input\n type=\"text\"\n formControlName=\"search\"\n [attr.disabled]=\"coolmapService.isLoading() ? true : null\"\n placeholder=\"Search routes...\"\n class=\"w-full pl-10 pr-10 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 focus:ring-2 focus:ring-amber-500 focus:border-transparent text-sm disabled:opacity-50 disabled:cursor-not-allowed\"\n (focus)=\"onSearchFocus()\"\n />\n\n @if (filterForm.value.search) {\n <button (click)=\"filterForm.controls.search.setValue('')\" class=\"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600\">\n <lucide-icon [img]=\"icons.X\" [size]=\"16\"></lucide-icon>\n </button>\n }\n\n <!-- Autocomplete Dropdown -->\n @if (dropdownOpen() && filteredOptions().length > 0) {\n <div class=\"absolute z-70 left-0 right-0 top-full mt-1 max-h-60 overflow-y-auto bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-600 rounded shadow-lg\">\n @for (option of filteredOptions(); track option.value + option.type) {\n <div (click)=\"selectFilter(option)\" class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-xs font-medium border-b border-gray-100 dark:border-slate-700 last:border-0 dark:text-white\">\n <span class=\"capitalize\">{{ option.type }}:</span>\n {{ option.label }}\n </div>\n }\n </div>\n }\n </div>\n\n @if (filters().length > 0) {\n <div class=\"flex flex-wrap gap-2 ml-2\">\n @for (filter of filters(); track filter.value + filter.type) {\n <div class=\"inline-flex items-center gap-1 px-2 py-1 rounded bg-slate-200 dark:bg-slate-700 text-gray-800 dark:text-gray-200 text-xs font-medium border border-gray-300 dark:border-slate-600\">\n <span class=\"capitalize opacity-80\">{{ filter.type }}:</span> {{ filter.name }}\n <button type=\"button\" (click)=\"removeFilter(filter)\" class=\"hover:opacity-75 transition-opacity ml-1\">\n <lucide-icon [img]=\"icons.X\" [size]=\"12\"></lucide-icon>\n </button>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"toolbar-right\">\n @if (selectedRouteIds().length > 0) {\n <button\n type=\"button\"\n (click)=\"clearSelection()\"\n [disabled]=\"coolmapService.isLoading()\"\n class=\"inline-flex items-center justify-center gap-2 px-5 sm:px-6 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors text-xs md:text-sm\"\n >\n Show all routes ({{ selectedRouteIds().length }})\n </button>\n }\n @if (activeSection() === 'ViewRoute') {\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-5 sm:px-6 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors text-xs md:text-sm\"\n [disabled]=\"coolmapService.isLoading()\"\n (click)=\"openAddRouteModal()\">\n <svg class=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 4v16m8-8H4\"\n />\n </svg>\n Add Route\n </button>\n }\n\n @if(activeSection() === 'Jobcode'){\n <button\n class=\"inline-flex items-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed relative group\"\n (click)=\"showRouteList = true\"\n [disabled]=\"coolmapService.isLoading()\">\n <lucide-icon [img]=\"icons.Route\" [size]=\"20\"></lucide-icon>\n <div\n class=\"absolute top-full right-0 mt-2 group-hover:block hidden bg-gray-800 dark:bg-white text-white dark:text-black text-[10px] rounded py-1 px-2 whitespace-nowrap\">\n Show Route List\n <div\n class=\"absolute -top-[8px] left-[60px] border-4 border-transparent border-b-gray-800 dark:border-b-white\">\n </div>\n </div>\n </button>}\n </div>\n </div>\n <div class=\"view-content\">\n <div class=\"full-view\">\n <div class=\"map-container\">\n <div class=\"mapbox-container\" #mapContainer></div>\n </div>\n </div>\n\n <!-- FOR JOBCODE -->\n @if (activeSection() === 'Jobcode') {\n <lib-job-code \n listMode=\"floating\" \n [routes]=\"activeFilteredRoutes()\"\n [selectedRouteIds]=\"selectedRouteIds()\"\n [isLoading]=\"coolmapService.isLoading()\"\n (routeSelect)=\"toggleSelection($event)\">\n </lib-job-code>\n }\n\n <!-- FOR VIEWROUTE -->\n @if (activeSection() === 'ViewRoute') {\n <lib-view-route-list \n listMode=\"floating\" \n [routes]=\"activeFilteredRoutes()\"\n [selectedRouteIds]=\"selectedRouteIds()\"\n (routeSelect)=\"toggleSelection($event)\"\n (editRoute)=\"openEditModal($event)\"\n ></lib-view-route-list>\n }\n </div>\n @if (config.repository === 'coolmap') {\n <div class=\"status-bar\">\n <div class=\"stats-row\">\n <div class=\"stat-item active\" title=\"Active routes (assigned + in progress)\">\n <span class=\"stat-count\">{{ masterStats().Done }}</span>\n <span class=\"stat-label\">Done</span>\n </div>\n\n <div class=\"stat-item completed\" title=\"Completed tasks\">\n <span class=\"stat-count\">{{ masterStats().Incomplete }}</span>\n <span class=\"stat-label\">Incomplete</span>\n </div>\n\n <div class=\"stat-item declined\" title=\"Declined routes - needs attention\">\n <span class=\"stat-count\">{{ masterStats().Ongoing }}</span>\n <span class=\"stat-label\">Ongoing</span>\n </div>\n\n <div class=\"stat-item scheduled\" title=\"Scheduled jobs for today\">\n <span class=\"stat-count\">{{ masterStats().Open }}</span>\n <span class=\"stat-label\">Open</span>\n </div>\n </div>\n </div>\n }\n</div>\n<lib-job-route-list \n [initialRoutes]=\"viewRoutesList()\"\n [(modalOpen)]=\"showRouteList\"\n [selectedRouteIds]=\"modalPlottedIds()\"\n (routeSelect)=\"toggleModalRoute($event)\"\n (masterToggleEvent)=\"modalMasterToggle($event)\"\n [customerRepoDetails]=\"customerRepoDetails\"\n (shareRoute)=\"handleShareRoute($event)\"\n></lib-job-route-list>\n<lib-add-route \n [modalOpen]=\"addRouteModal\"\n (modalOpenChange)=\"onAddRouteModalChange($event)\"\n (routeSaved)=\"onRouteSaved($event)\"\n (routeDeleted)=\"onRouteDeleted($event)\"\n [customerRepoDetails]=\"customerRepoDetails\"\n [routeData]=\"selectedRouteForEdit()\"\n></lib-add-route>\n\n@if (showShareModal()) {\n <lib-share-route\n [openShareRouteDetails]=\"shareRouteData()\"\n [userDetails]=\"userDetails\"\n (closePopupEmit)=\"showShareModal.set(false)\" class=\"relative\"\n ></lib-share-route>\n}\n\n<ag-toast-container></ag-toast-container>\n","/*\n * Public API Surface of coolmap\n */\n\nexport * from './lib/coolmap';\nexport * from './lib/components/coolmap/coolmap.component';\nexport * from './lib/components/ag-toast-container/ag-toast-container.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i1"],"mappings":";;;;;;;;;;;;;;MAQa,OAAO,CAAA;wGAAP,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,uEAHR,C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,CAAA,4rEAAA,CAAA,EAAA;;sBAKA;;sBAEA;;sBACA;;sBAEA,SAAS;uBAAC,cAAc;;sBACxB,SAAS;uBAAC,iBAAiB;;sBAsL3B,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;AE3N5C;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"aggdirect-coolmap.mjs","sources":["../../../projects/coolmap/src/lib/coolmap.ts","../../../projects/coolmap/src/lib/components/ag-toast-container/ag-toast-container.component.ts","../../../projects/coolmap/src/lib/components/sms-card-details/sms-card-details.component.ts","../../../projects/coolmap/src/lib/components/sms-card-details/sms-card-details.component.html","../../../projects/coolmap/src/lib/components/driver-list/driver-list.component.ts","../../../projects/coolmap/src/lib/components/driver-list/driver-list.component.html","../../../projects/coolmap/src/lib/components/job-details/job-details.component.ts","../../../projects/coolmap/src/lib/components/job-details/job-details.component.html","../../../projects/coolmap/src/lib/components/job-code/job-code.component.ts","../../../projects/coolmap/src/lib/components/job-code/job-code.component.html","../../../projects/coolmap/src/lib/components/route-info-card/route-info-card.component.ts","../../../projects/coolmap/src/lib/components/route-info-card/route-info-card.component.html","../../../projects/coolmap/src/lib/components/job-route-list/job-route-list.component.ts","../../../projects/coolmap/src/lib/components/job-route-list/job-route-list.component.html","../../../projects/coolmap/src/lib/components/view-route-list/view-route-list.component.ts","../../../projects/coolmap/src/lib/components/view-route-list/view-route-list.component.html","../../../projects/coolmap/src/lib/components/add-route/add-route.component.ts","../../../projects/coolmap/src/lib/components/add-route/add-route.component.html","../../../projects/coolmap/src/lib/components/share-route/share-route.component.ts","../../../projects/coolmap/src/lib/components/share-route/share-route.component.html","../../../projects/coolmap/src/lib/components/coolmap/coolmap.component.ts","../../../projects/coolmap/src/lib/components/coolmap/coolmap.component.html","../../../projects/coolmap/src/public-api.ts","../../../projects/coolmap/src/aggdirect-coolmap.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-coolmap',\n imports: [],\n template: ``,\n styles: ``,\n})\nexport class Coolmap {\n\n}\n","import { Component, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, CheckCircle, XCircle, AlertTriangle, Info, X } from 'lucide-angular';\nimport { AgToastService, Toast } from '@aggdirect/coolmap-services';\n\n@Component({\n selector: 'ag-toast-container',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n template: `\n <div [class]=\"containerClasses\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div [class]=\"getToastClasses(toast)\" role=\"alert\">\n <!-- Icon -->\n <div [class]=\"getIconClasses(toast)\">\n @switch (toast.variant) {\n @case ('success') {\n <lucide-icon [img]=\"successIcon\" [size]=\"20\"></lucide-icon>\n }\n @case ('error') {\n <lucide-icon [img]=\"errorIcon\" [size]=\"20\"></lucide-icon>\n }\n @case ('warning') {\n <lucide-icon [img]=\"warningIcon\" [size]=\"20\"></lucide-icon>\n }\n @default {\n <lucide-icon [img]=\"infoIcon\" [size]=\"20\"></lucide-icon>\n }\n }\n </div>\n \n <!-- Content -->\n <div class=\"toast-content\">\n @if (toast.title) {\n <div class=\"toast-title\">{{ toast.title }}</div>\n }\n <div class=\"toast-message\">{{ toast.message }}</div>\n @if (toast.action) {\n <button class=\"toast-action\" (click)=\"onActionClick(toast)\">\n {{ toast.action.label }}\n </button>\n }\n </div>\n \n <!-- Dismiss button -->\n @if (toast.dismissible) {\n <button class=\"toast-dismiss\" (click)=\"dismiss(toast)\" aria-label=\"Dismiss\">\n <lucide-icon [img]=\"closeIcon\" [size]=\"16\"></lucide-icon>\n </button>\n }\n </div>\n }\n </div>\n `,\n styles: [`\n .toast-container {\n position: fixed;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n pointer-events: none;\n max-width: 400px;\n }\n \n /* Position variants */\n .toast-container.top-right {\n top: 0;\n right: 0;\n }\n \n .toast-container.top-left {\n top: 0;\n left: 0;\n }\n \n .toast-container.bottom-right {\n bottom: 0;\n right: 0;\n }\n \n .toast-container.bottom-left {\n bottom: 0;\n left: 0;\n }\n \n .toast-container.top-center {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n \n .toast-container.bottom-center {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n \n .toast {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 14px 16px;\n background: white;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n pointer-events: auto;\n animation: toastSlideIn 0.3s ease;\n \n :host-context(.dark) & {\n background: #1e293b;\n border-color: #334155;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);\n }\n }\n \n @keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n \n .toast-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1px;\n }\n \n .toast-icon.success { color: #22c55e; }\n .toast-icon.error { color: #ef4444; }\n .toast-icon.warning { color: #f59e0b; }\n .toast-icon.info { color: #3b82f6; }\n \n .toast-content {\n flex: 1;\n min-width: 0;\n }\n \n .toast-title {\n font-size: 14px;\n font-weight: 600;\n color: #1e293b;\n margin-bottom: 2px;\n \n :host-context(.dark) & {\n color: #f1f5f9;\n }\n }\n \n .toast-message {\n font-size: 13px;\n color: #64748b;\n line-height: 1.4;\n \n :host-context(.dark) & {\n color: #94a3b8;\n }\n }\n \n .toast-action {\n margin-top: 8px;\n padding: 0;\n border: none;\n background: transparent;\n color: #3b82f6;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n \n &:hover {\n text-decoration: underline;\n }\n }\n \n .toast-dismiss {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: -4px -4px -4px 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: #94a3b8;\n cursor: pointer;\n transition: all 0.15s ease;\n \n &:hover {\n background: #f1f5f9;\n color: #64748b;\n }\n \n :host-context(.dark) & {\n &:hover {\n background: #334155;\n color: #f1f5f9;\n }\n }\n }\n \n /* Variant borders */\n .toast.success {\n border-left: 3px solid #22c55e;\n }\n \n .toast.error {\n border-left: 3px solid #ef4444;\n }\n \n .toast.warning {\n border-left: 3px solid #f59e0b;\n }\n \n .toast.info {\n border-left: 3px solid #3b82f6;\n }\n `]\n})\nexport class AgToastContainerComponent {\n toastService = inject(AgToastService);\n \n successIcon: any = CheckCircle;\n errorIcon: any = XCircle;\n warningIcon: any = AlertTriangle;\n infoIcon: any = Info;\n closeIcon: any = X;\n \n get containerClasses(): string {\n return `toast-container ${this.toastService.toastPosition()}`;\n }\n \n getToastClasses(toast: Toast): string {\n return `toast ${toast.variant}`;\n }\n \n getIconClasses(toast: Toast): string {\n return `toast-icon ${toast.variant}`;\n }\n \n dismiss(toast: Toast): void {\n this.toastService.dismiss(toast.id);\n }\n \n onActionClick(toast: Toast): void {\n if (toast.action?.onClick) {\n toast.action.onClick();\n }\n this.dismiss(toast);\n }\n}\n","import { NgClass } from '@angular/common';\nimport { Component, EventEmitter, Output, effect, input } from '@angular/core';\nimport { LucideAngularModule, X } from 'lucide-angular';\n\n@Component({\n selector: 'lib-sms-card-details',\n standalone: true,\n imports: [LucideAngularModule, NgClass],\n templateUrl: './sms-card-details.component.html',\n styleUrl: './sms-card-details.component.scss',\n})\nexport class SmsCardDetailsComponent {\n modalOpen = input<boolean>(false);\n smsListcollapse = input<boolean>(false);\n driverListcollapse = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n close() {\n this.modalOpenChange.emit(false);\n }\n icons = {\n X,\n };\n}\n","@if (modalOpen()) {\n<div\n class=\"fixed lg:absolute inset-0 overflow-y-auto lg:top-0 z-[111] lg:z-auto\"\n [ngClass]=\"smsListcollapse() && driverListcollapse() ? 'lg:left-[425px]' : 'lg:left-[670px]'\"\n>\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n <div class=\"flex min-h-full lg:items-start lg:justify-start items-center justify-center p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 text-[13px] font-medium text-gray-900 dark:text-white\">\n SMS All Drivers\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[70vh] overflow-y-auto p-2\">\n <div class=\"device-info\">\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Jobcode</span>\n <span class=\"value\">016164</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Date</span>\n <span class=\"value\">2026-4-1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Total tasks</span>\n <span class=\"value\">1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Material</span>\n <span class=\"value\">#2 Washed Gravel *</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Unit</span>\n <span class=\"value\">Ton</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Pickup Address</span>\n <span class=\"value\">vaibhav loc-1</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-sm\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Delivery Address</span>\n <span class=\"value\">vaibhav loc-2</span>\n </div>\n </div>\n <div class=\"mt-4\">\n <textarea\n rows=\"2\"\n placeholder=\"Text here....\"\n class=\"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm resize-none ng-pristine ng-valid ng-touched\"\n ></textarea>\n </div>\n <div class=\"mt-2 mb-2 flex justify-end\">\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-3 py-1 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-sm\"\n >\n Send SMS\n </button>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n","import { Component, EventEmitter, Output, effect, input, signal } from '@angular/core';\nimport { LucideAngularModule, X } from 'lucide-angular';\nimport { SmsCardDetailsComponent } from '../sms-card-details/sms-card-details.component';\nimport { NgClass } from '@angular/common';\n@Component({\n selector: 'lib-driver-list',\n standalone: true,\n imports: [LucideAngularModule, SmsCardDetailsComponent, NgClass],\n templateUrl: './driver-list.component.html',\n styleUrl: './driver-list.component.scss',\n})\nexport class DriverListComponent {\n showSmsModal = false;\n modalOpen = input<boolean>(false);\n driverListcollapse = input<boolean>(false);\n smsListcollapse = signal(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n close() {\n this.modalOpenChange.emit(false);\n }\n icons = {\n X,\n };\n showSmsModalPopup() {\n this.showSmsModal = !this.showSmsModal;\n this.smsListcollapse.set(this.showSmsModal);\n }\n}\n","@if (modalOpen()) {\n<div\n class=\"absolute inset-0 overflow-y-auto top-0\"\n [ngClass]=\"driverListcollapse() ? 'left-[60px]' : 'left-[300px]'\"\n>\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n <div class=\"flex min-h-full items-start justify-start p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Driver List\n </h3>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-3 sm:px-6 py-1 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-sm\"\n (click)=\"showSmsModalPopup()\"\n >\n SMS\n </button>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[40vh] overflow-y-auto p-2\">\n <ul class=\"flex flex-col gap-2\">\n <li>\n <div\n class=\"driver-row-1 flex flex-col driver-card bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2\"\n >\n <span class=\"driver-name\">Nilufarrr Lokmannn</span>\n <span class=\"com-name\">Aggdirect Android LLC 2</span>\n <div class=\"cont_del flex justify-between text-black dark:text-grey-600\">\n <small>Driver contact: <b>8318428713</b></small>\n <small>Company contact: <b>8318428713</b></small>\n </div>\n </div>\n </li>\n <li>\n <div\n class=\"driver-row-1 flex flex-col driver-card bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2\"\n >\n <span class=\"driver-name\">Nilufarrr Lokmannn</span>\n <span class=\"com-name\">Aggdirect Android LLC 2</span>\n <div class=\"cont_del flex justify-between\">\n <small>Driver contact: <b>8318428713</b></small>\n <small>Company contact: <b>8318428713</b></small>\n </div>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n}\n\n<lib-sms-card-details\n [(modalOpen)]=\"showSmsModal\"\n [smsListcollapse]=\"smsListcollapse()\"\n [driverListcollapse]=\"driverListcollapse()\"\n></lib-sms-card-details>\n","import { Component, EventEmitter, HostListener, Output, effect, input, signal } from '@angular/core';\nimport { LucideAngularModule, X } from 'lucide-angular';\n@Component({\n selector: 'lib-job-details',\n standalone: true,\n imports: [LucideAngularModule],\n templateUrl: './job-details.component.html',\n styleUrl: './job-details.component.scss',\n})\nexport class JobDetailsComponent {\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n noBackdrop = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n \n dragX = signal(0);\n dragY = signal(0);\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n\n constructor() {\n effect(() => {\n if (!this.modalOpen()) {\n this.dragX.set(0);\n this.dragY.set(0);\n }\n });\n }\n\n close() {\n this.modalOpenChange.emit(false);\n this.dragX.set(0);\n this.dragY.set(0);\n }\n icons = {\n X,\n };\n startDrag(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (target.tagName.toLowerCase() === 'button' || target.closest('button')) {\n return;\n }\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging || !this.modalOpen()) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n","@if (modalOpen()) {\n<div \n class=\"z-[11] xl:z-[100] bottom-0 lg:left-[350px] fixed lg:absolute inset-0 overflow-y-auto\"\n [class.pointer-events-none]=\"noBackdrop()\"\n>\n @if (!noBackdrop()) {\n <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div>\n }\n <div class=\"flex min-h-full lg:items-end lg:justify-start items-center justify-center p-3\">\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl w-[350px] pointer-events-auto\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n [style.will-change]=\"'transform'\"\n (click)=\"$event.stopPropagation()\"\n \n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b cursor-move border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg select-none\" (mousedown)=\"startDrag($event)\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Job Details\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors text-gray-500\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[50vh] overflow-y-auto p-2\">\n <div class=\"stats-row\">\n <div class=\"stat-item completed\">\n <span class=\"stat-count\">{{ routeData()?.values?.Done || 0 }}</span>\n <span class=\"stat-label\">Done</span>\n </div>\n\n <div class=\"stat-item pending\">\n <span class=\"stat-count\">{{ routeData()?.values?.Ongoing || 0 }}</span>\n <span class=\"stat-label\">Ongoing</span>\n </div>\n\n <div class=\"stat-item active\">\n <span class=\"stat-count\">{{ routeData()?.values?.Open || 0 }}</span>\n <span class=\"stat-label\">Open</span>\n </div>\n </div>\n <div\n class=\"location-flow bg-gray-100 dark:bg-slate-900 border border-gray-300 dark:border-slate-700 px-2 py-2 rounded-lg mt-4\"\n >\n <span class=\"pickup truncate block\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"inline mr-1 text-green-500\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n Pickup: {{ routeData()?.pickup_location || 'N/A' }}\n </span>\n <span class=\"delivery truncate block mt-1\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"inline mr-1 text-blue-500\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n Delivery: {{ routeData()?.delivery_location || 'N/A' }}\n </span>\n </div>\n <div class=\"device-info mt-2\">\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Jobcode</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.order_number || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Customer</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.customer_name || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Project Name</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.project || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Job Type</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.unit || 'N/A' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Material</span>\n <span class=\"font-medium truncate max-w-[65%] text-right\">{{ routeData()?.material || 'General Freight' }}</span>\n </div>\n <div\n class=\"flex justify-between py-2 border-b border-gray-200 dark:border-slate-600 text-xs\"\n >\n <span class=\"text-gray-500 dark:text-slate-500\">Customer Contact</span>\n <span class=\"font-medium\">{{ routeData()?.customer_contact || 'None' }}</span>\n </div>\n <div class=\"flex justify-between py-2 text-xs\">\n <span class=\"text-gray-500 dark:text-slate-500\">Delivery Contact</span>\n <span class=\"font-medium\">{{ routeData()?.delivery_contact || 'None' }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n","import { Component, HostListener, Input, signal, inject, Output, EventEmitter, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { LucideAngularModule, CarFront, Info, LoaderCircle } from 'lucide-angular';\nimport { DriverListComponent } from '../driver-list/driver-list.component';\nimport { JobDetailsComponent } from '../job-details/job-details.component';\nimport { COOLMAP_CONFIG, UtilsService, CoolmapService, CoolmapRoute } from '@aggdirect/coolmap-services';\n\nexport type CardListMode = 'sidebar' | 'floating' | 'inline';\n@Component({\n selector: 'lib-job-code',\n standalone: true,\n imports: [LucideAngularModule, DriverListComponent, JobDetailsComponent, NgClass],\n templateUrl: './job-code.component.html',\n styleUrl: './job-code.component.scss',\n})\nexport class JobCodeComponent {\n config = inject(COOLMAP_CONFIG);\n utils = inject(UtilsService);\n coolmapService = inject(CoolmapService);\n\n showDriverModal = false;\n showDetailModal = false;\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n this.showDriverModal = false;\n }\n });\n }\n @Input() listMode: CardListMode = 'sidebar';\n @Input() collapsible = true;\n @Input() routes: CoolmapRoute[] = [];\n @Input() selectedRouteIds: string[] = [];\n @Input() isLoading: boolean = true;\n @Output() routeSelect = new EventEmitter<string>();\n collapsed = false;\n\n // New Signal States\n selectedJobDetail = signal<any>(null);\n contextMenuVisible = signal(false);\n driverListcollapse = signal(false);\n contextMenuPosition = signal({ x: 0, y: 0 });\n isClickTriggered = false;\n pinnedJobDetail: any = null;\n\n @HostListener('document:keydown.escape')\n icons = {\n CarFront,\n Info,\n LoaderCircle,\n };\n\n toggleRouteSelection(route: CoolmapRoute) {\n const id = route.job_id || route.route_id || (route as any).route_details_id;\n if (!id) return;\n this.routeSelect.emit(id);\n }\n\n toggleCollapse() {\n if (this.collapsible) {\n this.collapsed = !this.collapsed;\n this.driverListcollapse.set(this.collapsed);\n }\n }\n\n calculateStatusPercentage(type: string, route: any) {\n const values = route?.values || { Done: 0, Ongoing: 0, Open: 0 };\n const total = (values.Done || 0) + (values.Ongoing || 0) + (values.Open || 0);\n if (total === 0) return type === 'open' ? 100 : 0;\n \n if (type === 'done') return Math.round((100 * (values.Done || 0)) / total);\n if (type === 'ongoing') return Math.round((100 * (values.Ongoing || 0)) / total);\n if (type === 'open') return Math.round((100 * (values.Open || 0)) / total);\n return 0;\n }\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedJobDetail.set(route);\n this.showDetailModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedJobDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedJobDetail) {\n this.selectedJobDetail.set(this.pinnedJobDetail);\n return;\n }\n this.showDetailModal = false;\n this.selectedJobDetail.set(null);\n } else {\n this.showDetailModal = false;\n this.selectedJobDetail.set(null);\n this.isClickTriggered = false;\n this.pinnedJobDetail = null;\n }\n }\n}\n\n","<div\n class=\"cards-list-container\"\n [class.floating]=\"listMode === 'floating'\"\n [class.sidebar]=\"listMode === 'sidebar'\"\n [class.inline]=\"listMode === 'inline'\"\n [class.collapsed]=\"collapsed\"\n>\n <div class=\"list-header\">\n <div class=\"header-title\">\n <span class=\"title-text\">Routes</span>\n <span class=\"routes-count\">({{ routes.length || 0 }})</span>\n </div>\n <button\n class=\"collapse-btn\"\n (click)=\"toggleCollapse()\"\n [title]=\"collapsed ? 'Expand' : 'Collapse'\"\n >\n @if (collapsed) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n }\n </button>\n </div>\n @if (!collapsed) {\n <div class=\"cards-scroll-container\" #scrollContainer>\n @if (isLoading) {\n <div class=\"list-loader\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"32\" class=\"animate-spin text-amber-500\"></lucide-icon>\n </div>\n }\n @if(!isLoading && routes && routes.length){\n <div class=\"cards-list\">\n @for (route of routes; track $index) {\n <div class=\"card-wrapper\" (click)=\"toggleRouteSelection(route)\">\n <div\n class=\"route-card bg-white dark:bg-slate-800 border transition-all duration-200\"\n [class.border-brand-blue]=\"selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.border-gray-300]=\"!selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.dark:border-slate-700]=\"!selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n [class.selected]=\"selectedRouteIds.includes(route.job_id || route.route_id || route.route_details_id || '')\"\n >\n <div class=\"task-header justify-between\">\n <span class=\"job-code\">{{ route.order_number || 'N/A' }}</span>\n <div class=\"flex gap-2\">\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">{{ route.unit?.charAt(0) || 'U' }}</div>\n @if (config.repository !== 'customer') {\n <div\n class=\"statusunit bg-slate-900 dark:bg-white text-white dark:text-black flex items-center justify-center cursor-pointer hover:opacity-80\"\n (click)=\"showDriverModal = true; toggleCollapse(); $event.stopPropagation()\"\n >\n <lucide-icon [img]=\"icons.CarFront\" [size]=\"15\"></lucide-icon>\n </div>\n }\n <div\n class=\"text-black dark:text-white flex items-center justify-center cursor-pointer hover:opacity-80\"\n (click)=\"openDetail(route, true); $event.stopPropagation()\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\"\n >\n <lucide-icon [img]=\"icons.Info\" [size]=\"20\"></lucide-icon>\n </div>\n </div>\n </div>\n <div class=\"customer-name font-semibold truncate\">{{ route.customer_name }}</div>\n <div class=\"material-info truncate text-gray-600 dark:text-gray-300\">{{ route.project || 'No Project' }}</div>\n <div class=\"location-flow mt-2 text-sm flex items-center gap-2\">\n <span class=\"pickup flex items-center gap-1 truncate max-w-[40%] text-green-600 dark:text-green-400\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.pickup_location || '').split('|')[0] || 'Unknown' }}\n </span>\n <span class=\"arrow text-gray-400\">→</span>\n <span class=\"delivery truncate max-w-[40%] text-brand-blue\">{{ (route.delivery_location || '').split('|')[0] || 'Unknown' }}</span>\n </div>\n <div class=\"material-info mt-2 truncate font-medium\">{{ route.material || '' }}</div>\n <div class=\"driver-row-4 mt-3 flex items-center gap-2\">\n <div class=\"progress-bar flex-1 h-1.5 bg-gray-200 dark:bg-slate-700 rounded-full overflow-hidden flex\">\n <div class=\"progress-segment completed h-full bg-green-500 transition-all duration-300\" [style.width.%]=\"calculateStatusPercentage('done', route)\"></div>\n <div class=\"progress-segment ongoing h-full transition-all duration-300\" [style.backgroundColor]=\"'#fc0'\" [style.width.%]=\"calculateStatusPercentage('ongoing', route)\"></div>\n <div class=\"progress-segment open h-full bg-gray-300 dark:bg-slate-600 transition-all duration-300\" [style.width.%]=\"calculateStatusPercentage('open', route)\"></div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n } @else if(!isLoading && coolmapService.isDataFetched() && (!routes || routes.length === 0)) {\n <div class=\"empty-state\">\n <div class=\"text-gray-600 dark:text-gray-400 mt-2 text-center\">No Job code found.</div>\n </div>\n }\n </div>\n }\n</div>\n<lib-driver-list\n [(modalOpen)]=\"showDriverModal\"\n [driverListcollapse]=\"driverListcollapse()\"\n></lib-driver-list>\n<lib-job-details \n [modalOpen]=\"showDetailModal\" \n (modalOpenChange)=\"$event ? null : closeDetail(false)\" \n [routeData]=\"selectedJobDetail()\" \n [noBackdrop]=\"!isClickTriggered\"\n></lib-job-details>\n","import { Component, EventEmitter, Output, input, inject, computed } from '@angular/core';\nimport { CommonModule, CurrencyPipe } from '@angular/common';\nimport { LucideAngularModule, X } from 'lucide-angular';\nimport { UtilsService } from '@aggdirect/coolmap-services';\n\n@Component({\n selector: 'lib-route-info-card',\n standalone: true,\n imports: [LucideAngularModule, CommonModule, CurrencyPipe],\n templateUrl: './route-info-card.component.html',\n styleUrl: './route-info-card.component.scss',\n})\nexport class RouteInfoCardComponent {\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n repository = input<string | null>('coolmap');\n displayMode = input<'dispatch' | 'catalog'>('dispatch');\n noBackdrop = input<boolean>(false);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() edit = new EventEmitter<void>();\n\n utils = inject(UtilsService);\n addRouteModal = false;\n\n formattedDate = computed(() => {\n const data = this.routeData();\n if (!data?.created_at) return 'N/A';\n return this.utils.getDateFormat(new Date(data.created_at), '/');\n });\n\n close() {\n this.modalOpenChange.emit(false);\n }\n\n icons = {\n X,\n };\n}\n","@if (modalOpen()) {\n<div \n class=\"z-[112] bottom-0 fixed lg:absolute inset-0 overflow-y-auto\"\n [ngClass]=\"displayMode() === 'catalog' ? 'lg:left-[350px]' : 'lg:right-[350px]'\"\n [class.pointer-events-none]=\"noBackdrop()\"\n>\n <div \n class=\"flex min-h-full lg:items-end items-center justify-center p-3\"\n [ngClass]=\"displayMode() === 'catalog' ? 'lg:justify-start' : 'lg:justify-end'\"\n >\n <div\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl animate-slide-up w-[350px] pointer-events-auto\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900 rounded-t-lg\"\n >\n <h3 class=\"flex items-center gap-1 font-medium text-gray-900 dark:text-white text-[13px]\">\n Route Info\n </h3>\n <button\n (click)=\"close()\"\n class=\"p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"20\"></lucide-icon>\n </button>\n </div>\n <div class=\"max-h-[60vh] overflow-y-auto p-3\">\n <div class=\"space-y-2 bg-gray-50 dark:bg-slate-900/50 border border-gray-200 dark:border-slate-700 p-3 rounded-lg mb-4\">\n <p class=\"text-xs\">\n <b class=\"text-gray-900 dark:text-white\">Pickup:</b> \n <span class=\"text-gray-600 dark:text-gray-400\">\n {{ (routeData()?.pickup_location || '').split('|')[1] || routeData()?.pickup_location || 'N/A' }}\n </span>\n </p>\n <p class=\"text-xs\">\n <b class=\"text-gray-900 dark:text-white\">Delivery:</b> \n <span class=\"text-gray-600 dark:text-gray-400\">\n {{ (routeData()?.delivery_location || '').split('|')[1] || routeData()?.delivery_location || 'N/A' }}\n </span>\n </p>\n </div>\n\n <div class=\"space-y-2.5\">\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Name:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.route_name || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Customer:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.customer_name || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Type:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.unit || 'N/A' }}</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Distance:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.estimated_distance || '0' }} Miles</span>\n </div>\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Travel Time:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4\">{{ routeData()?.estimated_time || '0' }} Min</span>\n </div>\n\n @if (repository() !== 'customer') {\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Trucker Pay Estimate:</b>\n <span class=\"text-gray-600 dark:text-gray-400 font-medium text-right ml-4\">{{ routeData()?.trucker_pay_estimate | currency }}</span>\n </div>\n }\n\n <div class=\"flex justify-between items-start text-xs border-b border-gray-100 dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Customer Price Estimate:</b>\n <span class=\"text-gray-600 dark:text-gray-400 font-medium text-right ml-4\">{{ routeData()?.customer_price_estimate | currency }}</span>\n </div>\n\n <div class=\"flex justify-between items-start text-xs dark:border-slate-700/50 pb-2\">\n <b class=\"text-gray-900 dark:text-white whitespace-nowrap\">Notes:</b>\n <span class=\"text-gray-600 dark:text-gray-400 text-right ml-4 italic\">{{ routeData()?.note || 'None' }}</span>\n </div>\n </div>\n\n <div class=\"mt-4 pt-3 border-t border-gray-100 dark:border-slate-700 flex justify-between items-center\">\n <p class=\"text-[10px] text-gray-400 italic\">\n Created by {{ routeData()?.created_by_name || routeData()?.user || 'System' }} on {{ formattedDate() }}\n </p>\n @if (displayMode() === 'catalog') {\n <button \n type=\"button\"\n (click)=\"edit.emit(); close()\"\n class=\"px-3 py-1 text-[11px] font-bold uppercase tracking-wider bg-orange-500 hover:bg-orange-600 text-white rounded transition-colors\"\n >\n Edit\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n}","import { Component, EventEmitter, Output, input, signal, inject, Input, OnInit, computed, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { LucideAngularModule, X, Info, Share2, Search, CheckCircle, LoaderCircle } from 'lucide-angular';\nimport { RouteInfoCardComponent } from '../route-info-card/route-info-card.component';\nimport { COOLMAP_CONFIG, CoolmapRoute, UtilsService, CoolmapService } from '@aggdirect/coolmap-services';\n@Component({\n selector: 'lib-job-route-list',\n standalone: true,\n imports: [LucideAngularModule, RouteInfoCardComponent, NgClass, ScrollingModule],\n templateUrl: './job-route-list.component.html',\n styleUrl: './job-route-list.component.scss',\n})\nexport class JobRouteListComponent implements OnInit {\n config = inject(COOLMAP_CONFIG);\n @Input() customerRepoDetails?: { customer: { id?: string, name?: string }, projectId: string };\n utils = inject(UtilsService);\n coolmapService = inject(CoolmapService);\n \n unitList: any[] = [];\n materialsList: any[] = [];\n \n routes = signal<CoolmapRoute[]>([]);\n searchTerm = signal<string>('');\n selectedRouteIds = input<string[]>([]);\n filters = signal<any[]>([]);\n showSuggestions = signal(false);\n\n suggestions = computed(() => {\n const term = this.searchTerm();\n if (term.length < 1) return [];\n return this.utils.filter(term, this.filters()).filter((opt: any) => opt.type !== 'material');\n });\n\n filteredRoutes = computed(() => {\n let list = this.routes();\n const activeFilters = this.filters();\n \n // Apply category search from V1 logic\n if (activeFilters.length > 0) {\n list = this.utils.getSearchResults(list, activeFilters);\n }\n \n const search = this.searchTerm().toLowerCase().trim();\n if (!search || this.showSuggestions()) return list;\n \n return list.filter(r => {\n const id = this.getRouteId(r).toLowerCase();\n const order = (r.order_number || '').toLowerCase();\n const name = (r.route_name || '').toLowerCase();\n return id.includes(search) || order.includes(search) || name.includes(search);\n });\n });\n\n allSelected = computed(() => {\n const visible = this.filteredRoutes();\n const selected = this.selectedRouteIds();\n if (visible.length === 0) return false;\n return visible.every(r => selected.includes(this.getRouteId(r)));\n });\n\n isAnyPlotting = computed(() => {\n const prefix = this.modalOpen() ? 'jobrouteList' : 'jobcode';\n const plotting = this.coolmapService.plottingIds();\n return Array.from(plotting).some(id => id.startsWith(`${prefix}-`));\n });\n \n showRouteModal = false;\n modalOpen = input<boolean>(false);\n \n @Input() set initialRoutes(val: CoolmapRoute[]) {\n if (val) {\n this.routes.set(val);\n this.utils.clearOptions();\n val.forEach(r => this.utils.makeOptions(r));\n }\n }\n\n selectedRoute = signal<any>(null);\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n }\n });\n }\n\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() routeSelect = new EventEmitter<CoolmapRoute>();\n @Output() masterToggleEvent = new EventEmitter<CoolmapRoute[]>();\n @Output() shareRoute = new EventEmitter<any>();\n\n ngOnInit(): void {\n this.checkAndCallRouteList();\n }\n\n checkAndCallRouteList() {\n this.utils.clearOptions();\n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitList = res;\n this.utils.fetchMaterialsListForCustomer().then((res: any) => {\n this.materialsList = res;\n this.getRouteListForCustomer();\n });\n });\n } else {\n this.getRouteListForCoolMap();\n }\n }\n\n getRouteListForCoolMap() {\n this.utils.getData('routes/all').subscribe((res: any) => {\n if (res && res.data) {\n const list = res.data;\n list.forEach((ele: CoolmapRoute) => this.utils.makeOptions(ele));\n this.routes.set(list);\n }\n });\n }\n\n getRouteListForCustomer() {\n const customerId = this.customerRepoDetails?.customer.id;\n if (customerId) {\n this.utils.postdata('routes/all', { customer_id: customerId }).subscribe((res: any) => {\n if (res && res.data) {\n const list = res.data.map((ele: CoolmapRoute) => {\n ele.unit = this.getUnitName(ele);\n this.utils.makeOptions(ele);\n return ele;\n });\n this.routes.set(list);\n }\n });\n }\n }\n\n getUnitName(data: any): string {\n let unitName = '';\n this.unitList.forEach((res) => {\n if (res.id === data.unit_id) {\n unitName = res.type;\n }\n });\n return unitName || data.unit;\n }\n\n close() {\n this.closeDetail(false);\n this.modalOpenChange.emit(false);\n }\n\n isRouteSelected(route: CoolmapRoute): boolean {\n const id = this.getRouteId(route);\n return this.selectedRouteIds().includes(id || '');\n }\n\n toggleRoute(route: CoolmapRoute) {\n if (this.isPlotting(route)) return;\n this.routeSelect.emit(route);\n }\n\n onMasterToggle() {\n if (this.isAnyPlotting()) return;\n this.masterToggleEvent.emit(this.filteredRoutes());\n }\n\n addFilter(option: any) {\n // V1 behavior: keep single filter\n this.filters.set([{ name: option.label, type: option.type, value: option.value }]);\n this.searchTerm.set('');\n this.showSuggestions.set(false);\n }\n\n removeFilter() {\n this.filters.set([]);\n }\n\n handleSearchInput(val: string) {\n this.searchTerm.set(val);\n this.showSuggestions.set(true);\n }\n\n onSearchBlur() {\n // Delay hiding to allow (click) on suggestions to fire first\n setTimeout(() => {\n this.showSuggestions.set(false);\n }, 200);\n }\n\n get hasFilter(): boolean {\n return this.filters().length > 0;\n }\n\n isPlotting(route: CoolmapRoute): boolean {\n const prefix = this.modalOpen() ? 'jobrouteList' : 'jobcode';\n const id = this.getRouteId(route);\n return this.coolmapService.plottingIds().has(`${prefix}-${id}`);\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n isClickTriggered = false;\n pinnedRouteDetail: any = null;\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedRoute.set(route);\n this.showRouteModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedRouteDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedRouteDetail) {\n this.selectedRoute.set(this.pinnedRouteDetail);\n return;\n }\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n } else {\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n this.isClickTriggered = false;\n this.pinnedRouteDetail = null;\n }\n }\n\n icons = {\n X,\n Info,\n Share2,\n Search,\n CheckCircle,\n LoaderCircle\n };\n}\n","@if (modalOpen()) {\n<div class=\"fixed z-[11] route-list\">\n <!-- <div class=\"fixed inset-0 bg-black/50\" (click)=\"close()\"></div> -->\n <aside class=\"detail-drawer top-[0] sm:top-[115px]\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"flex items-center justify-between px-[12px] py-[10px] border-b border-gray-200 dark:border-slate-700 dark:bg-slate-900\"\n >\n <h3 class=\"flex items-center gap-1 font-semibold text-gray-900 dark:text-white text-[14px]\">\n List of Routes\n <span class=\"text-xs font-normal text-gray-400\">({{ filteredRoutes().length }})</span>\n </h3>\n <button\n type=\"button\"\n (click)=\"onMasterToggle()\"\n [disabled]=\"isAnyPlotting()\"\n class=\"inline-flex items-center justify-center gap-2 px-3 sm:px-4 py-1.5 bg-brand-blue hover:bg-blue-700 disabled:opacity-50 text-white font-medium rounded-md transition-colors text-[12px]\"\n >\n {{ allSelected() ? 'Uncheck All' : 'Check All' }}\n </button>\n <button\n (click)=\"close()\"\n class=\"p-1.5 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n <lucide-icon [img]=\"icons.X\" [size]=\"18\"></lucide-icon>\n </button>\n </div>\n <div class=\"p-2\">\n <div class=\"relative w-full\">\n <div class=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\">\n <lucide-icon [img]=\"hasFilter ? icons.Info : icons.Search\" class=\"text-gray-400\" [size]=\"18\"></lucide-icon>\n </div>\n <input\n type=\"text\"\n #searchinput\n [value]=\"searchTerm()\"\n (input)=\"handleSearchInput(searchinput.value)\"\n (focus)=\"showSuggestions.set(true)\"\n (blur)=\"onSearchBlur()\"\n placeholder=\"Search...\"\n class=\"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n\n <!-- Autocomplete Suggestions Dropdown -->\n @if (showSuggestions() && suggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-60 overflow-y-auto\">\n <ul class=\"py-1 text-sm text-gray-700 dark:text-gray-200\">\n @for (option of suggestions(); track option.label + option.type) {\n <li (click)=\"addFilter(option)\"\n class=\"px-4 py-2 hover:bg-brand-blue/10 dark:hover:bg-brand-blue/20 cursor-pointer flex justify-between items-center group\">\n <span>\n <span class=\"capitalize\">{{option.type}}:</span> \n {{option.label}}\n </span>\n <lucide-icon [img]=\"icons.CheckCircle\" class=\"opacity-0 group-hover:opacity-100 text-brand-blue transition-opacity\" [size]=\"16\"></lucide-icon>\n </li>\n }\n </ul>\n </div>\n }\n </div>\n\n <!-- Active Filter Chips -->\n @if (hasFilter) {\n <div class=\"flex flex-wrap gap-2 mt-2 px-1\">\n @for (filter of filters(); track filter.name + filter.type) {\n <div class=\"inline-flex items-center gap-1.5 px-3 py-1 bg-slate-200 dark:bg-slate-700 border border-brand-blue/20 text-black dark:text-white rounded-full text-xs font-medium\">\n <span class=\"capitalize\">{{filter.type}}:</span>\n <span class=\"truncate max-w-[150px]\">{{filter.name}}</span>\n <button (click)=\"removeFilter()\" class=\"hover:text-red-500 transition-colors\">\n <lucide-icon [img]=\"icons.X\" [size]=\"14\"></lucide-icon>\n </button>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"overflow-y-auto p-2 drawer-listing-box\">\n <cdk-virtual-scroll-viewport itemSize=\"60\" class=\"routeList-viewport h-[calc(100vh-230px)]\">\n @if (filteredRoutes().length > 0) {\n <ul class=\"route-list-ul gap-2 flex flex-col\">\n @for (route of filteredRoutes(); track getRouteId(route)) {\n <li \n class=\"route-li-v1 bg-white dark:bg-slate-800 border border-gray-300 dark:border-slate-700\" \n [class.selected]=\"isRouteSelected(route)\" \n [class.pointer-events-none]=\"isAnyPlotting()\"\n [class.opacity-60]=\"isAnyPlotting()\"\n (click)=\"toggleRoute(route)\">\n <div class=\"task-header justify-between\">\n <span class=\"job-code\"> {{route.route_name || route.order_number}} </span>\n @if (config.repository === 'coolmap') {\n <span class=\"job-code\">{{route.customer_name}}</span>\n }\n <div class=\"iconprt\">\n @if (isPlotting(route)) {\n <div class=\"plotting-spinner\">\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin text-black dark:text-white flex items-center justify-center relative z-10\" [size]=\"18\"></lucide-icon>\n </div>\n }\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">\n {{ route.unit?.charAt(0) || 'U' }}\n </div>\n <div class=\"infoicon\" \n (click)=\"$event.stopPropagation(); openDetail(route, true)\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\">\n <lucide-icon [img]=\"icons.Info\" [size]=\"18\" class=\"text-gray-400\"></lucide-icon>\n </div>\n @if (config.repository === 'customer') {\n <div class=\"infoicon hover:opacity-80\" (click)=\"$event.stopPropagation(); shareRoute.emit(route)\">\n <lucide-icon [img]=\"icons.Share2\" [size]=\"16\" class=\"text-gray-400\"></lucide-icon>\n </div>\n }\n </div>\n </div>\n \n <div class=\"location-flow bg-gray-100 dark:bg-slate-900 px-2 py-2 pb-3 rounded-lg\">\n <span class=\"pickup\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.pickup_location || '').split('|')[1] ? (route.pickup_location || '').split('|')[1] : (route.pickup_location || '') }}\n </span>\n <span class=\"delivery\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"8\" />\n </svg>\n {{ (route.delivery_location || '').split('|')[1] ? (route.delivery_location || '').split('|')[1] : (route.delivery_location || '') }}\n </span>\n </div>\n </li>\n }\n </ul>\n } @else if (routes().length === 0) {\n <div class=\"p-8 text-center text-gray-400\">\n No routes available for this perspective.\n </div>\n }\n </cdk-virtual-scroll-viewport>\n </div>\n </aside>\n</div>\n}\n<lib-route-info-card [modalOpen]=\"showRouteModal\" (modalOpenChange)=\"$event ? null : closeDetail(false)\" [routeData]=\"selectedRoute()\" [repository]=\"config.repository\" displayMode=\"dispatch\" [noBackdrop]=\"!isClickTriggered\"></lib-route-info-card>\n","import { Component, Input, Output, EventEmitter, signal, inject, effect } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { LucideAngularModule, Info, ChevronRight, ChevronLeft, LoaderCircle } from 'lucide-angular';\nimport { COOLMAP_CONFIG, CoolmapRoute, CoolmapService } from '@aggdirect/coolmap-services';\nimport { RouteInfoCardComponent } from '../route-info-card/route-info-card.component';\n\nexport type CardListMode = 'sidebar' | 'floating' | 'inline';\n\n@Component({\n selector: 'lib-view-route-list',\n standalone: true,\n imports: [LucideAngularModule, RouteInfoCardComponent, NgClass],\n templateUrl: './view-route-list.component.html',\n styleUrl: './view-route-list.component.scss',\n})\nexport class ViewRouteListComponent {\n showRouteModal = false;\n selectedRoute = signal<CoolmapRoute | null>(null);\n config = inject(COOLMAP_CONFIG);\n coolmapService = inject(CoolmapService);\n\n constructor() {\n effect(() => {\n if (this.coolmapService.resetModals() > 0) {\n this.closeDetail(false);\n }\n });\n }\n\n @Input() listMode: CardListMode = 'sidebar';\n @Input() collapsible = true;\n @Input() routes: CoolmapRoute[] = [];\n @Input() selectedRouteIds: string[] = [];\n @Input() isLoading: boolean = true;\n @Output() routeSelect = new EventEmitter<string>();\n @Output() editRoute = new EventEmitter<CoolmapRoute>();\n\n collapsed = false;\n\n icons = {\n Info,\n ChevronRight,\n ChevronLeft,\n LoaderCircle\n };\n\n toggleCollapse() {\n if (this.collapsible) {\n this.collapsed = !this.collapsed;\n }\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n isClickTriggered = false;\n pinnedRouteDetail: CoolmapRoute | null = null;\n\n openDetail(route: CoolmapRoute, isClick: boolean) {\n this.selectedRoute.set(route);\n this.showRouteModal = true;\n if (isClick) {\n this.isClickTriggered = true;\n this.pinnedRouteDetail = route;\n }\n }\n\n closeDetail(isMouseLeave: boolean) {\n if (isMouseLeave) {\n if (this.isClickTriggered && this.pinnedRouteDetail) {\n this.selectedRoute.set(this.pinnedRouteDetail);\n return;\n }\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n } else {\n this.showRouteModal = false;\n this.selectedRoute.set(null);\n this.isClickTriggered = false;\n this.pinnedRouteDetail = null;\n }\n }\n}\n","<div\n class=\"cards-list-container\"\n [class.floating]=\"listMode === 'floating'\"\n [class.sidebar]=\"listMode === 'sidebar'\"\n [class.inline]=\"listMode === 'inline'\"\n [class.collapsed]=\"collapsed\"\n>\n @if (listMode !== 'inline') {\n <div class=\"list-header\">\n <div class=\"header-title\">\n <span class=\"title-text\">View Route</span>\n <span class=\"routes-count\">({{ routes.length || 0 }})</span>\n </div>\n <button\n class=\"collapse-btn\"\n (click)=\"toggleCollapse()\"\n [title]=\"collapsed ? 'Expand' : 'Collapse'\"\n >\n @if (collapsed) {\n <lucide-icon [img]=\"icons.ChevronRight\" [size]=\"16\"></lucide-icon>\n } @else {\n <lucide-icon [img]=\"icons.ChevronLeft\" [size]=\"16\"></lucide-icon>\n }\n </button>\n </div>\n } \n \n @if (!collapsed) {\n <div class=\"cards-scroll-container\" #scrollContainer>\n @if (isLoading) {\n <div class=\"list-loader\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"32\" class=\"animate-spin text-amber-500\"></lucide-icon>\n </div>\n }\n @if(!isLoading && routes && routes.length){\n <div class=\"cards-list\">\n @for (route of routes; track getRouteId(route)) {\n <div class=\"card-wrapper\">\n <div\n class=\"route-card bg-white dark:bg-slate-800 border transition-all duration-200\"\n [class.border-brand-blue]=\"selectedRouteIds.includes(getRouteId(route))\"\n [class.border-gray-200]=\"!selectedRouteIds.includes(getRouteId(route))\"\n [class.dark:border-slate-700]=\"!selectedRouteIds.includes(getRouteId(route))\"\n [class.selected]=\"selectedRouteIds.includes(getRouteId(route))\"\n >\n <div class=\"task-header justify-between items-start mb-1\">\n <h2 class=\"text-sm font-semibold text-gray-900 dark:text-white truncate max-w-[80%]\">\n {{ route.route_name || route.order_number || 'Unnamed Route' }}\n </h2>\n <div class=\"flex gap-2 shrink-0\">\n <div class=\"statusunit text-white\" [ngClass]=\"route.unit || ''\">\n {{ route.unit?.charAt(0) || 'U' }}\n </div>\n <button\n type=\"button\"\n class=\"text-gray-400 hover:text-brand-blue transition-colors\"\n (mouseenter)=\"openDetail(route, false)\"\n (mouseleave)=\"closeDetail(true)\"\n (click)=\"$event.stopPropagation(); openDetail(route, true)\"\n >\n <lucide-icon [img]=\"icons.Info\" [size]=\"18\"></lucide-icon>\n </button>\n </div>\n </div>\n \n @if (config.repository === 'coolmap' && route.customer_name) {\n <div class=\"text-[10px] text-gray-500 dark:text-slate-500 mb-2 uppercase tracking-wider font-medium truncate\">\n {{ route.customer_name }}\n </div>\n }\n\n <div class=\"location-flow bg-gray-50 dark:bg-slate-900/50 border border-gray-100 dark:border-slate-700/50 p-2 rounded-lg\">\n <div class=\"text-[11px] flex items-start gap-1.5 text-gray-600 dark:text-gray-400\">\n <div class=\"w-1.5 h-1.5 rounded-full bg-green-500 shrink-0 bullet mt-1\"></div>\n {{ (route.pickup_location || '').split('|')[1] || route.pickup_location || 'N/A' }}\n </div>\n <div class=\"text-[11px] flex items-start gap-1.5 mt-1 text-gray-600 dark:text-gray-400\">\n <div class=\"w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0 bullet mt-1\"></div>\n {{ (route.delivery_location || '').split('|')[1] || route.delivery_location || 'N/A' }}\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n } @else if (!isLoading && coolmapService.isDataFetched() && (!routes || routes.length === 0)) {\n <div class=\"p-8 text-center text-gray-400 text-sm\">\n No routes found.\n </div>\n }\n </div>\n }\n</div>\n\n<lib-route-info-card \n [modalOpen]=\"showRouteModal\" \n (modalOpenChange)=\"$event ? (showRouteModal = true) : closeDetail(false)\"\n [routeData]=\"selectedRoute()\" \n [repository]=\"config.repository\" \n displayMode=\"catalog\"\n [noBackdrop]=\"true\"\n (edit)=\"editRoute.emit(selectedRoute()!)\"\n></lib-route-info-card>\n","import { Component, EventEmitter, HostListener, Output, input, signal, inject, effect, viewChild, ElementRef, AfterViewInit, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { LucideAngularModule, X, ChevronDown, Check, LoaderCircle, Info } from 'lucide-angular';\nimport { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { filter, pairwise } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COOLMAP_CONFIG, UtilsService, CoolmapService, LocationAll } from '@aggdirect/coolmap-services';\nimport { DestroyRef, ChangeDetectorRef } from '@angular/core';\n\ninterface AutocompleteSuggestion {\n placePrediction?: {\n text: { toString(): string };\n toPlace(): {\n fetchFields(options: { fields: string[] }): Promise<void>;\n toJSON(): any;\n };\n };\n}\n\ninterface AutocompleteRequest {\n input: string;\n includedPrimaryTypes?: string[];\n includedRegionCodes?: string[];\n sessionToken?: any;\n language?: string;\n region?: string;\n}\n\ninterface GoogleMapsPlacesLibrary {\n AutocompleteSuggestion: {\n fetchAutocompleteSuggestions(request: AutocompleteRequest): Promise<{ suggestions: AutocompleteSuggestion[] }>;\n };\n AutocompleteSessionToken: new () => any;\n}\n\n@Component({\n selector: 'lib-add-route',\n standalone: true,\n imports: [LucideAngularModule, ReactiveFormsModule, CommonModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './add-route.component.html',\n styleUrl: './add-route.component.scss',\n})\nexport class AddRouteComponent implements AfterViewInit {\n config = inject(COOLMAP_CONFIG);\n modalOpen = input<boolean>(false);\n routeData = input<any>(null);\n customerRepoDetails = input<any>(null);\n @Output() modalOpenChange = new EventEmitter<boolean>();\n @Output() routeDeleted = new EventEmitter<string>();\n @Output() routeSaved = new EventEmitter<any>();\n dragX = signal(0);\n dragY = signal(0);\n isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n\n // New Services\n utils = inject(UtilsService);\n coolMapService = inject(CoolmapService);\n destroyRef = inject(DestroyRef);\n cdr = inject(ChangeDetectorRef);\n\n addRouteForm = new FormGroup({\n route_name: new FormControl('', [Validators.required]),\n customer_name: new FormControl({ value: '', disabled: true }, [Validators.required]),\n customer_id: new FormControl(''),\n unit_id: new FormControl('', [Validators.required]),\n path: new FormControl('', [Validators.required]),\n pickup_location: new FormControl('', [Validators.required]),\n pickup_lat_lng: new FormControl('', [Validators.required]),\n delivery_location: new FormControl('', [Validators.required]),\n delivery_lat_lng: new FormControl('', [Validators.required]),\n estimated_distance: new FormControl('', [Validators.required]),\n estimated_time: new FormControl('', [Validators.required]),\n note: new FormControl('', [Validators.maxLength(2048)]),\n trucker_pay_estimate: new FormControl(null),\n customer_price_estimate: new FormControl(null),\n pickUpSearchOption: new FormControl(inject(COOLMAP_CONFIG).repository === 'coolmap' ? 'system' : 'google'),\n deliverySearchOtption: new FormControl(inject(COOLMAP_CONFIG).repository === 'coolmap' ? 'system' : 'google'),\n });\n\n // Data signals\n unitsList = signal<any[]>([]);\n locationList = signal<LocationAll[]>([]);\n customersList = signal<any[]>([]);\n showDeleteModal = signal(false);\n routeId = signal<string | null>(null);\n preventSave = signal(false);\n preventInitialSave = signal(false);\n showLoader = signal(false);\n \n // Search options\n customerOptions = signal<any[]>([]);\n pickupOptions = signal<LocationAll[]>([]);\n deliveryOptions = signal<LocationAll[]>([]);\n \n // UI toggles\n showCustomerDropdown = signal(false);\n showPickupDropdown = signal(false);\n showDeliveryDropdown = signal(false);\n loadingLocations = signal(false);\n loadingCustomers = signal(false);\n\n pickupSuggestions = signal<AutocompleteSuggestion[]>([]);\n deliverySuggestions = signal<AutocompleteSuggestion[]>([]);\n showPickupSuggestions = signal(false);\n showDeliverySuggestions = signal(false);\n pickupSelected = signal(false);\n deliverySelected = signal(false);\n saveAttempted = signal(false);\n \n \n private placesLibrary: GoogleMapsPlacesLibrary | null = null;\n private sessionToken: any = null;\n private debounceTimer: any = null;\n\n hideDropdown(type: string) {\n setTimeout(() => {\n if (type === 'customer') this.showCustomerDropdown.set(false);\n if (type === 'pickup') this.showPickupDropdown.set(false);\n if (type === 'delivery') this.showDeliveryDropdown.set(false);\n }, 200);\n }\n\n // ElementRefs for Google Maps integration\n filterPickup = viewChild<ElementRef>('filterPickup');\n filterDelivery = viewChild<ElementRef>('filterDelivery');\n unitDropdownWrapper = viewChild<ElementRef>('unitDropdownWrapper');\n\n get isSystemPickup() {\n return this.addRouteForm.get('pickUpSearchOption')?.value === 'system';\n }\n\n get isSystemDelivery() {\n return this.addRouteForm.get('deliverySearchOtption')?.value === 'system';\n }\n\n get selectedUnitName() {\n const unitId = this.addRouteForm.value.unit_id;\n if (!unitId) return 'Select Unit';\n const unit = this.unitsList().find(u => u.id === unitId);\n return unit ? unit.type : 'Select Unit';\n }\n\n constructor() {\n\n\n effect(() => {\n const isOpen = this.modalOpen();\n const data = this.routeData();\n \n if (isOpen) {\n this.coolMapService.clearAllRoutes();\n \n // Initial patching\n setTimeout(() => {\n this.inIt(data);\n }, 0);\n\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitsList.set(res || []);\n });\n\n if (this.config.repository === 'coolmap') {\n this.loadingLocations.set(true);\n this.addRouteForm.get('pickup_location')?.disable();\n this.addRouteForm.get('delivery_location')?.disable();\n \n this.utils.fetchLocationlist().then((res: any) => {\n this.locationList.set(res || []);\n this.pickupOptions.set(res || []);\n this.deliveryOptions.set(res || []);\n this.loadingLocations.set(false);\n this.addRouteForm.get('pickup_location')?.enable();\n this.addRouteForm.get('delivery_location')?.enable();\n });\n \n this.loadingCustomers.set(true);\n this.utils.fetchCustomersList().then((res: any) => {\n this.customersList.set(res || []);\n this.customerOptions.set(res || []);\n this.addRouteForm.controls['customer_name'].enable();\n this.loadingCustomers.set(false);\n if (this.config.repository === 'customer' && this.customerRepoDetails()) {\n this.addRouteForm.patchValue({\n customer_id: this.customerRepoDetails().customer?.id,\n customer_name: this.customerRepoDetails().customer?.name,\n }, { emitEvent: false });\n }\n });\n }\n\n setTimeout(() => {\n this.initializePlacesLibrary();\n }, 150);\n }\n });\n\n // Reacting to dropdown changes for re-running calculations\n this.addRouteForm.get('pickup_location')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (res && res !== this.addRouteForm.getRawValue().pickup_location) {\n this.addRouteForm.patchValue({ pickup_lat_lng: '' });\n }\n // Populate dropdown for system\n if (this.isSystemPickup) {\n if (!res) {\n this.pickupOptions.set(this.locationList());\n } else {\n const lower = res.toLowerCase();\n this.pickupOptions.set(this.locationList().filter(l => l.formatted_address.toLowerCase().includes(lower)));\n }\n }\n });\n\n this.addRouteForm.get('delivery_location')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (res && res !== this.addRouteForm.getRawValue().delivery_location) {\n this.addRouteForm.patchValue({ delivery_lat_lng: '' });\n }\n if (this.isSystemDelivery) {\n if (!res) {\n this.deliveryOptions.set(this.locationList());\n } else {\n const lower = res.toLowerCase();\n this.deliveryOptions.set(this.locationList().filter(l => l.formatted_address.toLowerCase().includes(lower)));\n }\n }\n });\n\n this.addRouteForm.get('customer_name')?.valueChanges.pipe(takeUntilDestroyed()).subscribe(res => {\n if (!res) {\n this.customerOptions.set(this.customersList());\n } else {\n const lower = res.toLowerCase();\n this.customerOptions.set(this.customersList().filter(c => c.customer_name.toLowerCase().includes(lower)));\n }\n });\n \n // Clear path if logic changes\n this.addRouteForm.valueChanges.pipe(\n takeUntilDestroyed(),\n pairwise(),\n filter(([prev, curr]) => {\n return (prev.pickUpSearchOption === curr.pickUpSearchOption) && \n prev.deliverySearchOtption === curr.deliverySearchOtption\n })\n ).subscribe(() => {\n if (this.preventInitialSave()) {\n this.preventInitialSave.set(false);\n }\n });\n }\n\n ngAfterViewInit() {\n // Listen for search mode changes\n this.addRouteForm.get('pickUpSearchOption')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(val => {\n this.addRouteForm.patchValue({ pickup_location: null, pickup_lat_lng: null });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n });\n\n this.addRouteForm.get('deliverySearchOtption')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(val => {\n this.addRouteForm.patchValue({ delivery_location: null, delivery_lat_lng: null });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n });\n }\n\n\n async initializePlacesLibrary() {\n try {\n this.placesLibrary = await (window as any).google?.maps?.importLibrary('places') as GoogleMapsPlacesLibrary;\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error loading Google Maps Places library:', error);\n }\n }\n\n onInputChange(event: Event, type: 'pickup' | 'delivery') {\n const value = (event.target as HTMLInputElement).value;\n const formKey = type === 'pickup' ? 'pickup_location' : 'delivery_location';\n const latLngKey = type === 'pickup' ? 'pickup_lat_lng' : 'delivery_lat_lng';\n \n this.addRouteForm.patchValue({ \n [formKey]: value,\n [latLngKey]: '' \n }, { emitEvent: false });\n \n if (type === 'pickup') this.pickupSelected.set(false);\n else this.deliverySelected.set(false);\n\n this.checkAndFetchRouteInformation();\n\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => {\n if (value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n } else {\n this.hideSuggestions(type);\n }\n }, 300);\n }\n\n onFocus(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n if (this.isSystemPickup) {\n this.showPickupDropdown.set(true);\n } else {\n const val = this.addRouteForm.get('pickup_location')?.value;\n if (val && val.trim()) this.fetchAutocompleteSuggestions(val, type);\n }\n } else {\n if (this.isSystemDelivery) {\n this.showDeliveryDropdown.set(true);\n } else {\n const val = this.addRouteForm.get('delivery_location')?.value;\n if (val && val.trim()) this.fetchAutocompleteSuggestions(val, type);\n }\n }\n }\n\n async fetchAutocompleteSuggestions(input: string, type: 'pickup' | 'delivery') {\n if (!this.placesLibrary || !input.trim() || !this.sessionToken) return;\n\n try {\n const request: AutocompleteRequest = {\n input: input.trim(),\n sessionToken: this.sessionToken,\n includedRegionCodes: ['US']\n };\n\n const { suggestions } = await this.placesLibrary.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n \n if (type === 'pickup') {\n this.pickupSuggestions.set(suggestions || []);\n this.showPickupSuggestions.set(this.pickupSuggestions().length > 0);\n } else {\n this.deliverySuggestions.set(suggestions || []);\n this.showDeliverySuggestions.set(this.deliverySuggestions().length > 0);\n }\n } catch (error) {\n console.error('Autocomplete error:', error);\n }\n }\n\n async onSuggestionClick(suggestion: AutocompleteSuggestion, type: 'pickup' | 'delivery') {\n if (!suggestion.placePrediction) return;\n\n try {\n const place = suggestion.placePrediction.toPlace();\n await place.fetchFields({ fields: ['displayName', 'formattedAddress', 'location'] });\n const placeData = place.toJSON();\n\n const res = {\n lat: placeData.location.lat,\n lng: placeData.location.lng,\n formatted_address: placeData.formattedAddress || placeData.displayName\n };\n\n this.patchAddressValue(res, type);\n this.hideSuggestions(type);\n \n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error selecting suggestion:', error);\n }\n }\n\n hideSuggestions(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n this.showPickupSuggestions.set(false);\n this.pickupSuggestions.set([]);\n } else {\n this.showDeliverySuggestions.set(false);\n this.deliverySuggestions.set([]);\n }\n }\n\n inIt(changes: any) {\n if (changes && Object.keys(changes).length > 0) {\n if (!changes.prevent) {\n this.preventSave.set(false);\n this.patchFormValue(changes).then(() => {\n this.checkAndFetchRouteInformation(true);\n });\n }\n } else {\n this.preventSave.set(true);\n this.patchFormValue().then(() => {\n this.checkAndFetchRouteInformation();\n });\n }\n }\n\n async patchFormValue(data?: any) {\n this.addRouteForm.reset();\n const isCustomerRepo = this.config.repository === 'customer';\n if (data) {\n this.addRouteForm.patchValue(data, { emitEvent: false });\n this.pickupSelected.set(!!data.pickup_location);\n this.deliverySelected.set(!!data.delivery_location);\n }\n this.saveAttempted.set(false);\n if (isCustomerRepo && this.customerRepoDetails()) {\n this.addRouteForm.patchValue({\n customer_id: this.customerRepoDetails().customer?.id,\n customer_name: this.customerRepoDetails().customer?.name,\n pickUpSearchOption: 'google',\n deliverySearchOtption: 'google'\n }, { emitEvent: false });\n } else {\n this.addRouteForm.patchValue({\n pickUpSearchOption: (!data || (data.hasOwnProperty('is_system_pickup') ? data.is_system_pickup : true)) ? 'system' : 'google',\n deliverySearchOtption: (!data || (data.hasOwnProperty('is_system_delivery') ? data.is_system_delivery : true)) ? 'system' : 'google',\n }, { emitEvent: false });\n }\n this.routeId.set(data?.route_id || data?.id || null);\n await true;\n }\n\n patchAddressValue(data: any, type: string) {\n this.addRouteForm.patchValue({\n [type + '_location']: data.formatted_address,\n [type + '_lat_lng']: `${data.lat},${data.lng}`\n });\n this.addRouteForm.markAsDirty();\n if (type === 'pickup') this.pickupSelected.set(true);\n else this.deliverySelected.set(true);\n this.checkAndFetchRouteInformation();\n }\n\n checkAndFetchRouteInformation(isinitial?: boolean) {\n const val = this.addRouteForm.value;\n if (val.delivery_lat_lng && val.pickup_lat_lng && val.unit_id) {\n const unit = this.unitsList().find((x: any) => x.id === val.unit_id);\n const param = {\n delivery_lat_lng: val.delivery_lat_lng,\n pickup_lat_lng: val.pickup_lat_lng,\n unit: unit?.type || 'Ton'\n };\n // Mapbox estimation route\n this.utils.postdata('calculate/routes/estimation', param).subscribe({\n next: (res: any) => {\n setTimeout(() => {\n if (res && res.path) {\n this.addRouteForm.patchValue({\n estimated_distance: res.dist,\n estimated_time: res.time,\n path: res.path,\n trucker_pay_estimate: res.trucker_haul_cost,\n customer_price_estimate: res.customer_price_estimate\n });\n // Decode and plot\n let path = res.path.split(';').map((str: string) => {\n const parts = str.split(',');\n return [parseFloat(parts[1]), parseFloat(parts[0])];\n });\n const element: any = {\n type: 'FeatureCollection',\n features: [{ type: 'Feature', properties: {}, geometry: { type: 'LineString', coordinates: path } }]\n };\n this.coolMapService.removeRouteAndMarker(1, 'addroute').then(() => {\n this.coolMapService.loadMapProperty(element, 1, unit?.type, {\n pickup_location: val.pickup_location,\n delivery_location: val.delivery_location,\n route_name: val.route_name,\n unit: unit?.type\n });\n this.preventSave.set(true);\n this.cdr.detectChanges();\n });\n } else {\n console.warn('Could not calculate route');\n this.preventSave.set(true);\n this.utils.openSnackBar((res?.status ? res.status : 'Somthing went wrong, Please try different address.'), 'error');\n this.cdr.detectChanges();\n }\n if (this.routeId() && isinitial) {\n this.preventInitialSave.set(true);\n this.cdr.detectChanges();\n }\n });\n }\n });\n } else {\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n }\n }\n\n saveRoute() { \n this.saveAttempted.set(true);\n if (!this.pickupSelected()) {\n this.utils.openSnackBar('Please select a valid pickup location from suggestions', 'error');\n return;\n }\n if (!this.deliverySelected()) {\n this.utils.openSnackBar('Please select a valid delivery location from suggestions', 'error');\n return;\n }\n\n if (this.addRouteForm.valid) {\n const data: any = this.addRouteForm.getRawValue();\n const endpoint = this.routeId() ? 'update/routes' : 'add/routes';\n if (this.routeId()) data.id = this.routeId();\n \n this.showLoader.set(true);\n this.utils.postdata(endpoint, data).subscribe({\n next: (res: any) => {\n this.showLoader.set(false);\n if (res.success) {\n this.utils.openSnackBar(res.message, 'success');\n // Emit the saved data for local synchronization\n this.routeSaved.emit(data);\n this.close();\n } else {\n this.utils.openSnackBar(res.message, 'error');\n }\n },\n error: (err: any) => {\n this.showLoader.set(false);\n this.utils.openSnackBar('Something went wrong. Please try again.', 'error');\n }\n });\n } else {\n console.log('AddRoute Form invalid:', this.addRouteForm.errors, this.addRouteForm.value);\n Object.keys(this.addRouteForm.controls).forEach(key => {\n const controlErrors = this.addRouteForm.get(key)?.errors;\n if (controlErrors != null) {\n console.log('Key: ' + key + ', err:', controlErrors);\n }\n });\n this.addRouteForm.markAllAsTouched();\n }\n }\n\n promptDelete() {\n this.showDeleteModal.set(true);\n }\n\n confirmDelete() {\n if (!this.routeId()) return;\n this.utils.postdata('delete/routes', { uuid: this.routeId() }).subscribe({\n next: (res: any) => {\n if (res?.data?.success) {\n this.utils.openSnackBar(res.data.message, 'success');\n const deletedId = this.routeId()!;\n this.routeDeleted.emit(deletedId);\n this.showDeleteModal.set(false);\n this.close();\n }\n }\n });\n }\n\n close() {\n this.dragX.set(0);\n this.dragY.set(0);\n const isCoolmap = this.config.repository === 'coolmap';\n this.addRouteForm.reset({\n pickUpSearchOption: isCoolmap ? 'system' : 'google',\n deliverySearchOtption: isCoolmap ? 'system' : 'google'\n });\n this.coolMapService.removeRouteAndMarker(1, 'addroute');\n this.modalOpenChange.emit(false);\n }\n icons = {\n X, ChevronDown, Check, LoaderCircle, Info\n };\n\n // Dynamic dropdown state logic\n dropdownOpen = signal(false);\n dropdownDirection = signal<'down' | 'up'>('down');\n selectedUnitDriver = signal<string | null>(null);\n\n toggleDropdown() {\n this.dropdownOpen.update(v => {\n if (!v) {\n this.updateDropdownDirection();\n }\n return !v;\n });\n }\n\n private updateDropdownDirection() {\n const el = this.unitDropdownWrapper()?.nativeElement;\n if (el) {\n const rect = el.getBoundingClientRect();\n const spaceBelow = window.innerHeight - rect.bottom;\n // If less than 250px space below, open upwards\n this.dropdownDirection.set(spaceBelow < 150 ? 'up' : 'down');\n }\n }\n\n selectOption(opt: string) {\n this.selectedUnitDriver.set(opt);\n this.dropdownOpen.set(false);\n }\n\n @HostListener('document:click', ['$event'])\n closeDropdowns(event: Event) {\n const target = event.target as HTMLElement;\n \n const isPickupArea = target === this.filterPickup()?.nativeElement || \n target.closest('.pickup-suggestions') || \n target.closest('.pickup-system-dropdown');\n \n const isDeliveryArea = target === this.filterDelivery()?.nativeElement || \n target.closest('.delivery-suggestions') || \n target.closest('.delivery-system-dropdown');\n\n if (!isPickupArea) {\n this.showPickupSuggestions.set(false);\n this.showPickupDropdown.set(false);\n }\n if (!isDeliveryArea) {\n this.showDeliverySuggestions.set(false);\n this.showDeliveryDropdown.set(false);\n }\n\n // Close other dropdowns if click is outside any relative container\n if (!target.closest('.relative')) {\n this.dropdownOpen.set(false);\n this.showCustomerDropdown.set(false);\n }\n }\n\n startDrag(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (target.tagName.toLowerCase() === 'button' || target.closest('button')) {\n return;\n }\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging || !this.modalOpen()) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n \n if (this.dropdownOpen()) {\n this.updateDropdownDirection();\n }\n }\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n\n","@if (modalOpen()) {\n<div class=\"fixed inset-0 z-[112] pointer-events-none overflow-y-auto\" id=\"add-route-modal\">\n <div class=\"flex min-h-full items-end justify-center p-4 pb-12 customer-add-route\">\n <div class=\"pointer-events-auto animate-slide-up\">\n <form\n [formGroup]=\"addRouteForm\"\n (ngSubmit)=\"saveRoute()\"\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl w-[1000px]\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n tabindex=\"-1\"\n >\n <div\n class=\"flex items-center justify-between p-4 border-b border-gray-200 dark:border-slate-700 cursor-move\"\n (mousedown)=\"startDrag($event)\"\n >\n <h3 class=\"flex items-center gap-1 text-lg font-semibold text-gray-900 dark:text-white\">\n {{ routeId() ? 'Edit Route' : 'Add Route' }}\n </h3>\n <div class=\"flex items-center gap-4\">\n <button\n type=\"submit\"\n [disabled]=\"(routeId() ? (addRouteForm.invalid || !addRouteForm.dirty) : addRouteForm.invalid) || !pickupSelected() || !deliverySelected() || showLoader()\"\n class=\"inline-flex items-center justify-center gap-2 px-4 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 text-white font-medium rounded-lg transition-colors text-sm\">\n @if (showLoader()) {\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin\" [size]=\"18\"></lucide-icon>\n } @else {\n {{ routeId() ? 'Update' : 'Save' }}\n }\n </button>\n @if (routeId()) {\n <button\n type=\"button\"\n (click)=\"promptDelete()\"\n class=\"inline-flex items-center gap-2 px-4 py-2 bg-red-600 text-white hover:bg-red-700 font-medium rounded-lg transition-colors text-sm\"\n >\n Delete\n </button>\n }\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-2 px-4 py-2 bg-gray-600 text-white hover:bg-gray-700 font-medium rounded-lg transition-colors text-sm\"\n (click)=\"close()\"\n >\n Close\n </button>\n </div>\n </div>\n <div class=\"p-4\">\n <div class=\"grid grid-cols-2 mb-[1rem] gap-4\">\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Route Name</label\n >\n <input\n type=\"text\"\n formControlName=\"route_name\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n <div class=\"relative\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Customer Name</label>\n <div class=\"relative\">\n <input\n type=\"text\"\n formControlName=\"customer_name\"\n (focus)=\"showCustomerDropdown.set(true)\"\n (blur)=\"hideDropdown('customer')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-300 dark:border-slate-700 bg-gray-100 dark:bg-slate-900 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingCustomers()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n </div>\n @if (showCustomerDropdown() && customerOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto\">\n @for (cust of customerOptions(); track cust.customer_id) {\n <div \n (mousedown)=\"addRouteForm.patchValue({customer_name: cust.customer_name}); addRouteForm.markAsDirty()\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white\">\n {{ cust.customer_name }}\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"grid grid-cols-1 mb-[1rem]\">\n <div class=\"location-flow rounded-lg\">\n @if (config.repository === 'coolmap') {\n <div class=\"flex gap-2 mb-2\">\n <div class=\"radio w-100 md:w-auto\">\n <input\n type=\"radio\"\n formControlName=\"pickUpSearchOption\"\n value=\"system\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"\n />\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\"\n >\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">System Search</div>\n </div>\n </label>\n </div>\n <div class=\"radio w-100 md:w-auto ml-2\">\n <input\n type=\"radio\"\n formControlName=\"pickUpSearchOption\"\n value=\"google\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"\n />\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\"\n >\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">Google Search</div>\n </div>\n </label>\n </div>\n </div>\n }\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Pickup Location</label>\n <input\n #filterPickup\n type=\"text\"\n formControlName=\"pickup_location\"\n placeholder=\"Pickup\"\n (input)=\"!isSystemPickup ? onInputChange($event, 'pickup') : null\"\n (focus)=\"onFocus('pickup')\"\n (blur)=\"isSystemPickup ? hideDropdown('pickup') : null\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingLocations()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n \n <!-- System Suggestions -->\n @if (isSystemPickup && showPickupDropdown() && pickupOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto pickup-system-dropdown\">\n @for (loc of pickupOptions(); track loc.formatted_address) {\n <div \n (mousedown)=\"patchAddressValue(loc, 'pickup')\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white border-b border-gray-50 dark:border-slate-700 last:border-0\">\n {{ loc.formatted_address }}\n </div>\n }\n </div>\n }\n\n <!-- Google Suggestions -->\n @if (!isSystemPickup && showPickupSuggestions() && pickupSuggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto pickup-suggestions\">\n @for (suggestion of pickupSuggestions(); track suggestion.placePrediction?.text?.toString() || $index) {\n <div \n (click)=\"onSuggestionClick(suggestion, 'pickup')\"\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\">\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n @if ((saveAttempted() || addRouteForm.get('pickup_location')?.dirty) && !pickupSelected() && addRouteForm.get('pickup_location')?.value) {\n <div class=\"text-red-500 text-[10px] mt-1 font-medium italic flex items-center gap-1\">\n Please select a valid pickup location from suggestions\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-1 mb-[1rem]\">\n <div class=\"location-flow rounded-lg\">\n @if (config.repository === 'coolmap') {\n <div class=\"flex gap-2 mb-2\">\n <div class=\"radio w-100 md:w-auto\">\n <input\n type=\"radio\"\n formControlName=\"deliverySearchOtption\"\n value=\"system\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"/>\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full\">\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">System Search</div>\n </div>\n </label>\n </div>\n <div class=\"radio w-100 md:w-auto ml-2\">\n <input\n type=\"radio\"\n formControlName=\"deliverySearchOtption\"\n value=\"google\"\n class=\"shrink-0 size-4 bg-transparent border-line-3 rounded-full shadow-2xs text-primary focus:ring-0 focus:ring-offset-0 checked:bg-primary-checked checked:border-primary-checked\"/>\n <label\n class=\"border-solid border-1 border-grey dark:border-slate-400 block shadow-md rounded-lg lg:whitespace-nowrap w-full ml-2\">\n <div class=\"flex justify-between items-center px-4 py-2 text-xs lg:text-base\">\n <div class=\"tracking-wide text-xs\">Google Search</div>\n </div>\n </label>\n </div>\n </div>\n }\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Delivery Location</label>\n <input\n #filterDelivery\n type=\"text\"\n formControlName=\"delivery_location\"\n placeholder=\"Delivery\"\n (input)=\"!isSystemDelivery ? onInputChange($event, 'delivery') : null\"\n (focus)=\"onFocus('delivery')\"\n (blur)=\"isSystemDelivery ? hideDropdown('delivery') : null\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm pr-10\"\n />\n @if (loadingLocations()) {\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2\">\n <lucide-icon [img]=\"icons.LoaderCircle\" [size]=\"18\" class=\"animate-spin text-blue-500\"></lucide-icon>\n </div>\n }\n\n <!-- System Suggestions -->\n @if (isSystemDelivery && showDeliveryDropdown() && deliveryOptions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto delivery-system-dropdown\">\n @for (loc of deliveryOptions(); track loc.formatted_address) {\n <div \n (mousedown)=\"patchAddressValue(loc, 'delivery')\"\n class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-sm text-gray-900 dark:text-white border-b border-gray-50 dark:border-slate-700 last:border-0\">\n {{ loc.formatted_address }}\n </div>\n }\n </div>\n }\n\n <!-- Google Suggestions -->\n @if (!isSystemDelivery && showDeliverySuggestions() && deliverySuggestions().length > 0) {\n <div class=\"absolute z-50 w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-lg max-h-48 overflow-y-auto delivery-suggestions\">\n @for (suggestion of deliverySuggestions(); track suggestion.placePrediction?.text?.toString() || $index) {\n <div \n (click)=\"onSuggestionClick(suggestion, 'delivery')\"\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\">\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n @if ((saveAttempted() || addRouteForm.get('delivery_location')?.dirty) && !deliverySelected() && addRouteForm.get('delivery_location')?.value) {\n <div class=\"text-red-500 text-[10px] mt-1 font-medium italic flex items-center gap-1\">\n Please select a valid delivery location from suggestions\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"flex gap-4 flex-col md:flex-row\">\n <div class=\"w-full md:w-[70%]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Notes</label\n >\n <textarea\n formControlName=\"note\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm h-[46px]\"\n ></textarea>\n </div>\n <div class=\"w-full md:w-[30%]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit Type</label\n >\n <div #unitDropdownWrapper class=\"relative w-full\">\n <button\n type=\"button\"\n (click)=\"toggleDropdown(); $event.stopPropagation()\"\n class=\"w-full flex justify-between items-center px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm text-left\"\n >\n <span>{{ selectedUnitName }}</span>\n <lucide-icon [img]=\"icons.ChevronDown\" [size]=\"16\" class=\"text-gray-400\"></lucide-icon>\n </button>\n @if (dropdownOpen()) {\n <div \n [class.mt-1]=\"dropdownDirection() === 'down'\"\n [class.bottom-full]=\"dropdownDirection() === 'up'\"\n [class.mb-1]=\"dropdownDirection() === 'up'\"\n class=\"absolute z-10 w-full bg-white dark:bg-slate-800 rounded-lg shadow-lg border border-gray-200 dark:border-slate-700 py-1 max-h-60 overflow-auto\"\n >\n @for (opt of unitsList(); track opt.id) {\n <button\n type=\"button\"\n (click)=\"addRouteForm.patchValue({unit_id: opt.id}); addRouteForm.markAsDirty(); checkAndFetchRouteInformation(); dropdownOpen.set(false)\"\n class=\"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-slate-700 transition\"\n >\n <span>{{ opt.type }}</span>\n @if (addRouteForm.value.unit_id === opt.id) {\n <lucide-icon [img]=\"icons.Check\" [size]=\"16\" class=\"text-blue-500\"></lucide-icon>\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-2 mt-2 gap-4\">\n <div class=\"flex flex-col lg:flex-row gap-2\">\n @if(addRouteForm.value.estimated_distance){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Estimation of miles - <b>{{ addRouteForm.value.estimated_distance }}</b>\n </span>\n }\n\n @if(addRouteForm.value.estimated_time){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Estimation of time - <b>{{ addRouteForm.value.estimated_time }}</b>\n </span>\n }\n </div>\n <div class=\"flex flex-col lg:flex-row gap-2 justify-end\">\n @if (config.repository !== 'customer' && addRouteForm.value.trucker_pay_estimate) {\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Trucker Pay Estimate - <b>{{ addRouteForm.value.trucker_pay_estimate | currency }}</b>\n </span>\n }\n @if(addRouteForm.value.customer_price_estimate){\n <span\n class=\"text-[10px] text-gray-500 dark:text-slate-400 mb-1 whitespace-nowrap italic\">\n Customer Price Estimate - <b>{{ addRouteForm.value.customer_price_estimate | currency }}</b>\n </span>\n }\n </div>\n </div>\n </div>\n </form>\n </div>\n\n @if (showDeleteModal()) {\n <div class=\"fixed inset-0 z-[120] flex items-center justify-center bg-black/60 backdrop-blur-sm animate-fade-in pointer-events-auto\">\n <div class=\"bg-white dark:bg-slate-900 rounded-xl shadow-2xl p-6 max-w-sm w-full mx-4 border border-gray-200 dark:border-slate-800\" (click)=\"$event.stopPropagation()\">\n <h3 class=\"text-lg font-bold text-gray-900 dark:text-white mb-2 text-center\">Delete Route?</h3>\n <p class=\"text-gray-600 dark:text-gray-400 text-sm mb-6 text-center\">\n Are you sure you want to delete this route?\n </p>\n <div class=\"flex justify-center gap-3\">\n <button\n type=\"button\"\n (click)=\"showDeleteModal.set(false)\"\n class=\"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 dark:text-gray-300 dark:bg-slate-800 dark:hover:bg-slate-700 rounded-lg transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n (click)=\"confirmDelete()\"\n class=\"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg shadow-sm transition-colors\"\n >\n Delete\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n}\n","import { Component, EventEmitter, HostListener, Output, signal, inject, effect, ElementRef, ViewChild, input, AfterViewInit, CUSTOM_ELEMENTS_SCHEMA, computed } from '@angular/core';\nimport { FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';\nimport { LucideAngularModule, X, Share2, Calendar, MapPin, Hash, User, Phone, Mail, DollarSign, Info, LoaderCircle, Check, ChevronDown } from 'lucide-angular';\nimport { NgClass, CurrencyPipe } from '@angular/common';\nimport { UtilsService, COOLMAP_CONFIG } from '@aggdirect/coolmap-services';\n\ninterface AutocompleteSuggestion {\n placePrediction?: {\n text: { toString(): string };\n toPlace(): {\n fetchFields(options: { fields: string[] }): Promise<void>;\n toJSON(): any;\n };\n };\n}\n\ninterface AutocompleteRequest {\n input: string;\n includedPrimaryTypes?: string[];\n includedRegionCodes?: string[];\n sessionToken?: any;\n language?: string;\n region?: string;\n}\n\ninterface GoogleMapsPlacesLibrary {\n AutocompleteSuggestion: {\n fetchAutocompleteSuggestions(request: AutocompleteRequest): Promise<{ suggestions: AutocompleteSuggestion[] }>;\n };\n AutocompleteSessionToken: new () => any;\n}\n\n@Component({\n selector: 'lib-share-route',\n standalone: true,\n imports: [LucideAngularModule, ReactiveFormsModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './share-route.component.html',\n styleUrl: './share-route.component.scss',\n})\nexport class ShareRouteComponent implements AfterViewInit {\n config = inject(COOLMAP_CONFIG);\n utils = inject(UtilsService);\n\n openShareRouteDetails = input<any>(null);\n userDetails = input<any>(null);\n @Output() closePopupEmit = new EventEmitter<void>();\n\n shareRouteForm: FormGroup;\n pickupDeliveryLatLongObject = signal<any>({ pickup_lat_lng: '', delivery_lat_lng: '' });\n unitsList = signal<any[]>([]);\n showLoader = signal(false);\n \n dragX = signal(0);\n dragY = signal(0);\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragInitialX = 0;\n private dragInitialY = 0;\n \n @ViewChild('filterPickup') filterPickup!: ElementRef;\n @ViewChild('filterDelivery') filterDelivery!: ElementRef;\n @ViewChild('unitDropdownWrapper') unitDropdownWrapper!: ElementRef;\n\n pickupSuggestions = signal<AutocompleteSuggestion[]>([]);\n deliverySuggestions = signal<AutocompleteSuggestion[]>([]);\n showPickupSuggestions = signal(false);\n showDeliverySuggestions = signal(false);\n pickupSelected = signal(false);\n deliverySelected = signal(false);\n saveAttempted = signal(false);\n \n private placesLibrary: GoogleMapsPlacesLibrary | null = null;\n private sessionToken: any = null;\n private debounceTimer: any = null;\n\n dateValue = signal('');\n displayDate = computed(() => {\n const val = this.dateValue();\n if (!val) return '';\n const parts = val.split('-');\n if (parts.length !== 3) return val;\n const [y, m, d] = parts;\n return `${m}/${d}/${y}`;\n });\n\n icons = {\n X,\n Share2,\n Calendar,\n MapPin,\n Hash,\n User,\n Phone,\n Mail,\n DollarSign,\n Info,\n LoaderCircle,\n Check,\n ChevronDown\n };\n \n dropdownOpen = signal(false);\n dropdownDirection = signal<'down' | 'up'>('down');\n\n get selectedUnitName() {\n const unitValue = this.shareRouteForm.get('units')?.value;\n if (!unitValue) return 'Select Unit';\n return unitValue;\n }\n\n toggleDropdown() {\n this.dropdownOpen.update(v => {\n if (!v) {\n this.updateDropdownDirection();\n }\n return !v;\n });\n }\n\n private updateDropdownDirection() {\n const el = this.unitDropdownWrapper?.nativeElement;\n if (el) {\n const rect = el.getBoundingClientRect();\n const spaceBelow = window.innerHeight - rect.bottom;\n this.dropdownDirection.set(spaceBelow < 250 ? 'up' : 'down');\n }\n }\n\n constructor() {\n this.shareRouteForm = new FormGroup({\n uuid: new FormControl('', [Validators.required]),\n routeName: new FormControl('', [Validators.required]),\n customerName: new FormControl('', [Validators.required]),\n customerId: new FormControl('', [Validators.required]),\n special_price: new FormControl(false),\n pickupLocation: new FormControl('', [Validators.required]),\n deliveryLocation: new FormControl('', [Validators.required]),\n routeNotes: new FormControl('', [Validators.maxLength(2048)]),\n distance: new FormControl('', [Validators.required]),\n time: new FormControl('', [Validators.required]),\n date: new FormControl(''),\n quantity: new FormControl(''),\n units: new FormControl('', [Validators.required]),\n contactName: new FormControl('', [Validators.required]),\n contactPhone: new FormControl(null, [Validators.required]),\n contactEmail: new FormControl(null, [Validators.required]),\n price: new FormControl(0, [Validators.required]),\n customerEstimatedPrice: new FormControl(0),\n });\n\n // Handle input changes via effect\n effect(() => {\n const details = this.openShareRouteDetails();\n if (details) {\n this.patchData(details);\n }\n });\n\n effect(() => {\n const user = this.userDetails();\n if (user) {\n this.patchUserData(user);\n }\n });\n\n this.utils.fetchUnitsList().then((res: any) => {\n this.unitsList.set(res || []);\n });\n }\n\n ngAfterViewInit() {\n this.initializePlacesLibrary();\n }\n\n async initializePlacesLibrary() {\n try {\n // Assuming google script is already loaded by the app\n this.placesLibrary = await (window as any).google?.maps?.importLibrary('places') as GoogleMapsPlacesLibrary;\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error loading Google Maps Places library:', error);\n }\n }\n\n onInputChange(event: Event, type: 'pickup' | 'delivery') {\n const value = (event.target as HTMLInputElement).value;\n const formKey = type === 'pickup' ? 'pickupLocation' : 'deliveryLocation';\n this.shareRouteForm.patchValue({ [formKey]: value });\n \n if (type === 'pickup') this.pickupSelected.set(false);\n else this.deliverySelected.set(false);\n\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => {\n if (value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n } else {\n this.hideSuggestions(type);\n }\n }, 300);\n }\n\n onFocus(type: 'pickup' | 'delivery') {\n const value = type === 'pickup' ? \n this.shareRouteForm.get('pickupLocation')?.value : \n this.shareRouteForm.get('deliveryLocation')?.value;\n \n if (value && value.trim()) {\n this.fetchAutocompleteSuggestions(value, type);\n }\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n \n const isPickupArea = target === this.filterPickup.nativeElement || target.closest('.pickup-suggestions');\n const isDeliveryArea = target === this.filterDelivery.nativeElement || target.closest('.delivery-suggestions');\n\n if (!isPickupArea) {\n this.showPickupSuggestions.set(false);\n }\n if (!isDeliveryArea) {\n this.showDeliverySuggestions.set(false);\n }\n\n if (!target.closest('.relative')) {\n this.dropdownOpen.set(false);\n }\n }\n\n async fetchAutocompleteSuggestions(input: string, type: 'pickup' | 'delivery') {\n if (!this.placesLibrary || !input.trim() || !this.sessionToken) return;\n\n try {\n const request: AutocompleteRequest = {\n input: input.trim(),\n sessionToken: this.sessionToken,\n includedRegionCodes: ['US']\n };\n\n const { suggestions } = await this.placesLibrary.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n \n if (type === 'pickup') {\n this.pickupSuggestions.set(suggestions || []);\n this.showPickupSuggestions.set(this.pickupSuggestions().length > 0);\n } else {\n this.deliverySuggestions.set(suggestions || []);\n this.showDeliverySuggestions.set(this.deliverySuggestions().length > 0);\n }\n } catch (error) {\n console.error('Autocomplete error:', error);\n }\n }\n\n async onSuggestionClick(suggestion: AutocompleteSuggestion, type: 'pickup' | 'delivery') {\n if (!suggestion.placePrediction) return;\n\n try {\n const place = suggestion.placePrediction.toPlace();\n await place.fetchFields({ fields: ['displayName', 'formattedAddress', 'location'] });\n const placeData = place.toJSON();\n\n const res = {\n lat: placeData.location.lat,\n lng: placeData.location.lng,\n formatted_address: placeData.formattedAddress || placeData.displayName\n };\n\n this.patchAddressValue(res, type);\n if (type === 'pickup') this.pickupSelected.set(true);\n else this.deliverySelected.set(true);\n this.hideSuggestions(type);\n \n // Refresh session token for next search\n if (this.placesLibrary) {\n this.sessionToken = new this.placesLibrary.AutocompleteSessionToken();\n }\n } catch (error) {\n console.error('Error selecting suggestion:', error);\n }\n }\n\n hideSuggestions(type: 'pickup' | 'delivery') {\n if (type === 'pickup') {\n this.showPickupSuggestions.set(false);\n this.pickupSuggestions.set([]);\n } else {\n this.showDeliverySuggestions.set(false);\n this.deliverySuggestions.set([]);\n }\n }\n\n patchAddressValue(data: any, type: 'pickup' | 'delivery') {\n this.shareRouteForm.patchValue({\n [type + 'Location']: data.formatted_address\n });\n this.pickupDeliveryLatLongObject.update(prev => ({\n ...prev,\n [type + '_lat_lng']: `${data.lat},${data.lng}`\n }));\n this.checkAndFetchRouteInformation();\n }\n\n patchData(details: any) {\n this.shareRouteForm.patchValue({\n uuid: details.route_id,\n routeName: details.route_name,\n customerName: details.customer_name,\n pickupLocation: details.pickup_location,\n deliveryLocation: details.delivery_location,\n routeNotes: details.notes || null,\n distance: details.estimated_distance?.split(' ')[0],\n time: details.estimated_time?.split(' ')[0],\n units: details.unit,\n price: details.customer_price_estimate,\n customerEstimatedPrice: details.customer_price_estimate\n });\n this.pickupDeliveryLatLongObject.set({\n pickup_lat_lng: details.pickup_lat_lng,\n delivery_lat_lng: details.delivery_lat_lng\n });\n if (details.date) {\n this.dateValue.set(details.date);\n }\n this.pickupSelected.set(!!details.pickup_location);\n this.deliverySelected.set(!!details.delivery_location);\n this.saveAttempted.set(false);\n }\n\n patchUserData(user: any) {\n this.shareRouteForm.patchValue({\n contactName: user.firstname + ' ' + user.lastname,\n contactPhone: user.phone,\n contactEmail: user.email,\n customerId: user.customerId\n });\n }\n\n checkAndFetchRouteInformation() {\n const latLongs = this.pickupDeliveryLatLongObject();\n if (latLongs.delivery_lat_lng?.length > 0 && latLongs.pickup_lat_lng?.length > 0) {\n this.showLoader.set(true);\n const param = {\n delivery_lat_lng: latLongs.delivery_lat_lng,\n pickup_lat_lng: latLongs.pickup_lat_lng,\n unit: this.shareRouteForm.value?.units\n };\n this.utils.postdata('calculate/routes/estimation', param).subscribe({\n next: (res: any) => {\n if (res && res['path']) {\n this.shareRouteForm.patchValue({\n distance: res['dist']?.split(' ')[0],\n time: res['time']?.split(' ')[0],\n price: res['customer_price_estimate'],\n customerEstimatedPrice: res['customer_price_estimate']\n });\n } else {\n this.utils.openSnackBar(res['status'] || 'Estimation failed', 'error');\n }\n this.showLoader.set(false);\n },\n error: () => {\n this.showLoader.set(false);\n }\n });\n }\n }\n\n onDateChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (target && target.value) {\n this.dateValue.set(target.value);\n this.shareRouteForm.patchValue({ date: target.value });\n }\n }\n\n saveShareRoute() {\n this.saveAttempted.set(true);\n if (!this.pickupSelected()) {\n this.utils.openSnackBar('Please select a valid pickup location from suggestions', 'error');\n return;\n }\n if (!this.deliverySelected()) {\n this.utils.openSnackBar('Please select a valid delivery location from suggestions', 'error');\n return;\n }\n\n if (this.shareRouteForm.valid) {\n this.showLoader.set(true);\n const formData = { ...this.shareRouteForm.value };\n if (formData.date) {\n const d = new Date(formData.date);\n formData.date = `${(d.getMonth() + 1).toString().padStart(2, '0')}/${d.getDate().toString().padStart(2, '0')}/${d.getFullYear()}`;\n } else {\n formData.date = 'N/A';\n }\n formData.quantity = formData.quantity || 0;\n \n this.utils.postdata('share/routes', formData).subscribe({\n next: (res: any) => {\n if (res.data?.success) {\n this.utils.openSnackBar(res.data.message, 'success');\n this.closePopup();\n } else {\n this.utils.openSnackBar(res.data?.message || 'Failed to share route', 'error');\n }\n this.showLoader.set(false);\n },\n error: () => {\n this.showLoader.set(false);\n }\n });\n } else {\n this.shareRouteForm.markAllAsTouched();\n }\n }\n\n setValidators(checked: boolean) {\n const priceControl = this.shareRouteForm.get('customerEstimatedPrice');\n if (checked) {\n priceControl?.setValidators(Validators.required);\n } else {\n priceControl?.clearValidators();\n }\n priceControl?.updateValueAndValidity();\n }\n\n closePopup() {\n this.closePopupEmit.emit();\n }\n\n startDrag(event: MouseEvent): void {\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n this.dragInitialX = this.dragX();\n this.dragInitialY = this.dragY();\n event.preventDefault();\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging) return;\n this.dragX.set(this.dragInitialX + (event.clientX - this.dragStartX));\n this.dragY.set(this.dragInitialY + (event.clientY - this.dragStartY));\n \n if (this.dropdownOpen()) {\n this.updateDropdownDirection();\n }\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n}\n","<div\n class=\"fixed inset-0 z-[120] flex items-end justify-center p-4 w-full pointer-events-none\"\n \n>\n <div class=\"flex lg:items-start lg:justify-start items-center justify-center p-3\">\n <form\n [formGroup]=\"shareRouteForm\"\n (ngSubmit)=\"saveShareRoute()\"\n class=\"relative bg-white dark:bg-slate-800 rounded-lg shadow-xl w-[1000px] pointer-events-auto\"\n [style.transform]=\"'translate(' + dragX() + 'px, ' + dragY() + 'px)'\"\n [style.will-change]=\"'transform'\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between p-4 border-b border-gray-200 dark:border-slate-700 cursor-move\"\n (mousedown)=\"startDrag($event)\"\n >\n <h3 class=\"flex items-center gap-1 text-lg font-semibold text-gray-900 dark:text-white\">\n Share Route\n </h3>\n <div class=\"flex items-center gap-4\">\n <button\n type=\"submit\"\n [disabled]=\"shareRouteForm.invalid || showLoader()\"\n class=\"flex items-center gap-2 px-4 py-2.5 rounded-lg bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold text-sm shadow-lg shadow-amber-500/20 transition-all active:scale-95\"\n >\n @if (showLoader()) {\n <lucide-icon [img]=\"icons.LoaderCircle\" class=\"animate-spin\" [size]=\"18\"></lucide-icon> } @else { Send }\n </button>\n <button\n type=\"button\"\n class=\"inline-flex items-center gap-2 px-4 py-2.5 bg-gray-600 text-white hover:bg-gray-700 font-medium rounded-lg transition-colors text-sm\"\n (click)=\"closePopup()\"\n >\n Close\n </button>\n </div>\n </div>\n\n <div class=\"p-4 overflow-y-auto max-h-[50vh]\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Route Name -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Route Name\n </label>\n <input\n formControlName=\"routeName\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Enter route name\"\n />\n </div>\n\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit Type\n </label>\n <div #unitDropdownWrapper class=\"relative w-full\">\n <button\n type=\"button\"\n (click)=\"toggleDropdown(); $event.stopPropagation()\"\n class=\"w-full flex justify-between items-center px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm text-left\"\n >\n <span>{{ selectedUnitName }}</span>\n <lucide-icon [img]=\"icons.ChevronDown\" [size]=\"16\" class=\"text-gray-400\"></lucide-icon>\n </button>\n @if (dropdownOpen()) {\n <div \n [class.mt-1]=\"dropdownDirection() === 'down'\"\n [class.bottom-full]=\"dropdownDirection() === 'up'\"\n [class.mb-1]=\"dropdownDirection() === 'up'\"\n class=\"absolute z-50 w-full bg-white dark:bg-slate-800 rounded-lg shadow-lg border border-gray-200 dark:border-slate-700 py-1 max-h-60 overflow-auto\"\n >\n @for (unit of unitsList(); track unit.type) {\n <button\n type=\"button\"\n (click)=\"shareRouteForm.patchValue({units: unit.type}); shareRouteForm.markAsDirty(); checkAndFetchRouteInformation(); dropdownOpen.set(false)\"\n class=\"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-slate-700 transition\"\n >\n <span>{{ unit.type }}</span>\n @if (shareRouteForm.value.units === unit.type) {\n <lucide-icon [img]=\"icons.Check\" [size]=\"16\" class=\"text-blue-500\"></lucide-icon>\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Pickup Location -->\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Pickup\n </label>\n <input\n formControlName=\"pickupLocation\"\n #filterPickup\n (input)=\"onInputChange($event, 'pickup')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Search pickup location...\"\n autocomplete=\"off\"\n />\n @if (showPickupSuggestions() && pickupSuggestions().length > 0) {\n <div\n class=\"absolute z-[110] w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-xl max-h-48 overflow-y-auto\"\n >\n @for (suggestion of pickupSuggestions(); track\n suggestion.placePrediction?.text?.toString() || $index) {\n <div\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\"\n (click)=\"onSuggestionClick(suggestion, 'pickup')\"\n >\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Delivery Location -->\n <div class=\"relative autocomplete-field\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Delivery\n </label>\n <input\n formControlName=\"deliveryLocation\"\n #filterDelivery\n (input)=\"onInputChange($event, 'delivery')\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"Search delivery location...\"\n autocomplete=\"off\"\n />\n @if (showDeliverySuggestions() && deliverySuggestions().length > 0) {\n <div\n class=\"absolute z-[110] w-full mt-1 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg shadow-xl max-h-48 overflow-y-auto\"\n >\n @for (suggestion of deliverySuggestions(); track\n suggestion.placePrediction?.text?.toString() || $index) {\n <div\n class=\"px-4 py-2.5 hover:bg-amber-50 dark:hover:bg-amber-900/20 cursor-pointer text-sm text-gray-700 dark:text-gray-300 border-b border-gray-100 dark:border-slate-700 last:border-0 transition-colors\"\n (click)=\"onSuggestionClick(suggestion, 'delivery')\"\n >\n {{ suggestion.placePrediction?.text?.toString() }}\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"grid grid-cols-1 md:grid-cols-1 gap-4 mb-[1rem] mt-[1rem]\">\n <!-- Notes -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\"\n >Notes</label\n >\n <textarea\n formControlName=\"routeNotes\"\n rows=\"2\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm resize-none\"\n placeholder=\"List Material and Details\"\n ></textarea>\n </div>\n </div>\n\n <div class=\"grid grid-cols-2 gap-4 mb-[1rem]\">\n <!-- Date Requested -->\n <div class=\"relative\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Date Requested\n </label>\n <div class=\"relative group\">\n <input\n type=\"text\"\n readonly\n [value]=\"displayDate()\"\n (click)=\"dateInput.showPicker()\"\n placeholder=\"MM/DD/YYYY\"\n class=\"w-full pl-3 pr-10 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm cursor-pointer\"\n />\n <lucide-icon\n [img]=\"icons.Calendar\" \n [size]=\"18\" \n (click)=\"dateInput.showPicker()\"\n class=\"absolute right-3 top-[7px] text-gray-400 group-hover:text-brand-blue transition-colors cursor-pointer\"\n ></lucide-icon>\n <input\n #dateInput\n type=\"date\"\n [value]=\"dateValue()\"\n (change)=\"onDateChange($event)\"\n class=\"absolute inset-0 w-0 h-0 opacity-0 pointer-events-none\"\n />\n </div>\n </div>\n\n <!-- Quantity Requested -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Quantity Requested\n </label>\n <input\n type=\"number\"\n formControlName=\"quantity\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n placeholder=\"0\"\n />\n </div>\n\n <!-- Price -->\n <div class=\"relative -top-[20px]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Customer Haul Price\n </label>\n <div class=\"relative\">\n <input\n formControlName=\"price\"\n readonly\n class=\"w-full px-3 py-3 pl-[47px] rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n <lucide-icon\n [img]=\"icons.DollarSign\"\n class=\"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400\"\n [size]=\"16\"\n ></lucide-icon>\n </div>\n </div>\n\n <!-- Unit Type Display -->\n <div class=\"relative -top-[20px]\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit type\n </label>\n <div\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n >\n {{ shareRouteForm.value.units || 'N/A' }}\n </div>\n </div>\n\n <!-- Contact Info Section Title -->\n <div class=\"md:col-span-2 border-t border-gray-100 dark:border-slate-800\">\n <h3 class=\"flex items-center gap-1 text-md font-semibold text-gray-900 dark:text-white\">\n Customer Information\n </h3>\n </div>\n\n <!-- Contact Name -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Name\n </label>\n <input\n formControlName=\"contactName\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Contact Phone -->\n <div>\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Phone\n </label>\n <input\n formControlName=\"contactPhone\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Contact Email -->\n <div class=\"space-y-1.5 md:col-span-2\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Contact Email\n </label>\n <input\n formControlName=\"contactEmail\"\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n </div>\n\n <!-- Special Pricing Checkbox -->\n <div class=\"md:col-span-2 pt-2 flex items-center gap-3\">\n <label class=\"relative flex h-5 w-5 cursor-pointer\">\n <input\n type=\"checkbox\"\n formControlName=\"special_price\"\n (change)=\"setValidators(shareRouteForm.value.special_price)\"\n class=\"h-full w-full appearance-none rounded-md border border-gray-300 dark:border-slate-700 transition-all checked:bg-amber-500 checked:border-amber-500 outline-none cursor-pointer\"\n />\n <lucide-icon\n [img]=\"icons.Check\"\n [size]=\"14\"\n [class.opacity-100]=\"shareRouteForm.get('special_price')?.value\"\n [class.opacity-0]=\"!shareRouteForm.get('special_price')?.value\"\n class=\"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-white transition-opacity pointer-events-none\"\n ></lucide-icon>\n </label>\n <span class=\"text-sm font-medium text-gray-700 dark:text-gray-300\"\n >Request special pricing</span\n >\n </div>\n\n <!-- Special Price Input (Conditional) -->\n @if (shareRouteForm.value.special_price) {\n <div class=\"space-y-1.5 animate-fade-in md:col-span-1\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Requested Price\n </label>\n <div class=\"relative\">\n <input\n formControlName=\"customerEstimatedPrice\"\n class=\"w-full px-3 py-3 pl-[47px] rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n />\n <lucide-icon\n [img]=\"icons.DollarSign\"\n class=\"absolute left-3 top-1/2 -translate-y-1/2 text-amber-500\"\n [size]=\"16\"\n ></lucide-icon>\n </div>\n </div>\n <div class=\"relative\">\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Unit type\n </label>\n <div\n class=\"w-full px-3 py-3 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm\"\n >\n {{ shareRouteForm.value.units || 'N/A' }}\n </div>\n </div>\n }\n </div>\n </div>\n </form>\n </div>\n</div>\n","import { AfterViewInit, Component, ElementRef, Input, ViewChild, inject, signal, computed, OnInit, OnChanges, SimpleChanges, input, effect, HostListener } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\nimport { AgToastContainerComponent } from '../ag-toast-container/ag-toast-container.component';\nimport { CommonModule } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MapboxService, COOLMAP_CONFIG, UtilsService, CoolmapService, CoolmapRoute } from '@aggdirect/coolmap-services';\nimport { JobCodeComponent } from '../job-code/job-code.component';\nimport { JobRouteListComponent } from '../job-route-list/job-route-list.component';\nimport { ViewRouteListComponent } from '../view-route-list/view-route-list.component';\nimport { AddRouteComponent } from '../add-route/add-route.component';\nimport { ShareRouteComponent } from '../share-route/share-route.component';\nimport { LucideAngularModule, Search, X, Route, LoaderCircle, Calendar } from 'lucide-angular';\n\n@Component({\n selector: 'lib-coolmap',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n CommonModule,\n LucideAngularModule,\n JobCodeComponent,\n ViewRouteListComponent,\n JobRouteListComponent,\n AddRouteComponent,\n ShareRouteComponent,\n AgToastContainerComponent,\n ],\n templateUrl: './coolmap.component.html',\n styleUrl: './coolmap.component.scss',\n})\nexport class CoolmapComponent implements OnInit, AfterViewInit, OnChanges {\n @Input() mobileMode: boolean = false;\n activeSection = input<'Jobcode' | 'ViewRoute'>('Jobcode');\n @Input() customerRepoDetails?: { customer: { id?: string, name?: string }, projectId: string };\n @Input() userDetails?: any;\n darkMode = input<boolean>(false);\n @ViewChild('mapContainer') mapContainer!: ElementRef;\n @ViewChild('searchContainer') searchContainer!: ElementRef;\n public coolmapService = inject(CoolmapService);\n utils = inject(UtilsService);\n config = inject(COOLMAP_CONFIG);\n mapService = inject(MapboxService);\n elRef = inject(ElementRef);\n \n showRouteList = false;\n addRouteModal = false;\n showShareModal = signal(false);\n shareRouteData = signal<any>(null);\n \n // Filtering Signals (Lifted from JobCode)\n routesList = signal<CoolmapRoute[]>([]);\n viewRoutesList = signal<CoolmapRoute[]>([]);\n filters = signal<any[]>([]);\n filteredOptions = signal<any[]>([]);\n dropdownOpen = signal(false);\n dateValue = signal(this.utils.getDateFormat(new Date()));\n displayDate = computed(() => {\n const val = this.dateValue();\n if (!val) return '';\n const parts = val.split('-');\n if (parts.length !== 3) return val;\n const [y, m, d] = parts;\n return `${m}/${d}/${y}`;\n });\n selectedRouteIds = signal<string[]>([]);\n modalPlottedIds = signal<string[]>([]);\n modalPlottedRoutes = signal<CoolmapRoute[]>([]);\n selectedRouteForEdit = signal<CoolmapRoute | null>(null);\n unitList = signal<any[]>([]);\n materialsList = signal<any[]>([]);\n private skipNextRefresh = false;\n private mapOpQueue: Promise<void> = Promise.resolve();\n\n activeFilteredRoutes = computed(() => {\n const list = this.activeSection() === 'Jobcode' ? this.routesList() : this.viewRoutesList();\n const filtersArray = this.filters();\n if (filtersArray.length === 0) return list;\n return this.utils.getSearchResults(list, filtersArray) || [];\n });\n\n filterForm = new FormGroup({\n search: new FormControl('')\n });\n\n allSelected = computed(() => {\n const active = this.activeFilteredRoutes();\n const selected = this.selectedRouteIds();\n if (active.length === 0) return false;\n return active.every(r => selected.includes(this.getRouteId(r)));\n });\n\n modalAllSelected = computed(() => {\n return false;\n });\n\n masterStats = computed(() => {\n const routes = this.activeFilteredRoutes();\n const stats = { Done: 0, Incomplete: 0, Ongoing: 0, Open: 0 };\n \n routes.forEach(route => {\n const v = route?.values || {};\n stats.Done += (v.Done || 0);\n stats.Incomplete += (v.Incomplete || 0);\n stats.Ongoing += (v.Ongoing || 0);\n stats.Open += (v.Open || 0);\n });\n \n // Fallback default: if no routes, but we expect at least 1 \"Open\" slot behavior\n if (routes.length > 0 && stats.Done === 0 && stats.Ongoing === 0 && stats.Open === 0 && stats.Incomplete === 0) {\n stats.Open = routes.length;\n }\n \n return stats;\n });\n\n masterToggle() {\n if (this.allSelected()) {\n this.selectedRouteIds.set([]);\n } else {\n const ids = this.activeFilteredRoutes().map(r => this.getRouteId(r));\n this.selectedRouteIds.set(ids);\n }\n }\n\n modalMasterToggle(modalRoutes: CoolmapRoute[]) {\n const currentPlotted = this.modalPlottedRoutes();\n const isAllPlotted = modalRoutes.every(r => currentPlotted.some(p => this.getRouteId(p) === this.getRouteId(r)));\n\n if (isAllPlotted) {\n // Unplot all routes in this modal's view\n const modalIdsInView = modalRoutes.map(r => this.getRouteId(r));\n this.modalPlottedRoutes.update(curr => curr.filter(r => !modalIdsInView.includes(this.getRouteId(r))));\n } else {\n // Plot all routes in this modal's view (prevent duplicates)\n this.modalPlottedRoutes.update(curr => {\n const newRoutes = modalRoutes.filter(mr => !curr.some(c => this.getRouteId(c) === this.getRouteId(mr)));\n return [...curr, ...newRoutes];\n });\n }\n \n this.modalPlottedIds.set(this.modalPlottedRoutes().map(r => this.getRouteId(r)));\n }\n icons = {\n Route,\n Search,\n X,\n LoaderCircle,\n Calendar\n };\n\n private dataSubscription?: Subscription;\n \n constructor() {\n this.filterForm.get('search')?.valueChanges.pipe(\n takeUntilDestroyed()\n ).subscribe(value => {\n if (value && typeof value === 'string') {\n let options = this.utils.filter(value, this.filters());\n if (this.activeSection() === 'ViewRoute') {\n options = options.filter((opt: any) => opt.type !== 'material');\n }\n this.filteredOptions.set(options);\n this.dropdownOpen.set(options.length > 0);\n } else {\n this.filteredOptions.set([]);\n this.dropdownOpen.set(false);\n }\n });\n\n effect(() => {\n const isDark = this.darkMode();\n this.mapService.updateTheme(isDark);\n });\n\n // Effect 1: Manage Floating List (JobCode)\n effect(async () => {\n if (this.activeSection() === 'Jobcode') {\n const routes = this.routesList();\n const selectedIds = this.selectedRouteIds();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobcode', routes, selectedIds)\n );\n } else {\n // Clear jobcode prefix if not in the section\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobcode', [], [])\n );\n }\n });\n\n // Effect 2: Manage Modal List (JobRouteList)\n effect(async () => {\n const modalRoutes = this.modalPlottedRoutes();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('jobrouteList', modalRoutes, modalRoutes.map(r => this.getRouteId(r)))\n );\n });\n\n // Effect 3: Manage View Route Section\n effect(async () => {\n if (this.activeSection() === 'ViewRoute') {\n const routes = this.viewRoutesList();\n const selectedIds = this.selectedRouteIds();\n \n // Queue the sync operation\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('viewroute', routes, selectedIds)\n );\n } else {\n // Clear viewroute prefix if not in the section\n this.mapOpQueue = this.mapOpQueue.then(() => \n this.syncSpecificPrefix('viewroute', [], [])\n );\n }\n });\n }\n\n @HostListener('document:click', ['$event'])\n onClick(event: MouseEvent) {\n if (this.searchContainer && !this.searchContainer.nativeElement.contains(event.target)) {\n this.dropdownOpen.set(false);\n }\n }\n\n ngOnInit() {\n this.coolmapService.isLoading.set(true);\n this.loadData(this.dateValue());\n }\n\n getUnitList() {\n this.utils.getData('unit/all').subscribe((res: any) => {\n if (res && res.data) {\n this.unitList.set(res.data);\n }\n });\n }\n\n getMaterialsList() {\n this.utils.getData('material/all').subscribe((res: any) => {\n if (res && res.data) {\n this.materialsList.set(res.data);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['customerRepoDetails'] && !changes['customerRepoDetails'].firstChange) {\n if (this.config.repository === 'customer') {\n if (this.activeSection() === 'Jobcode') {\n this.loadData(this.dateValue());\n } else {\n this.loadViewRoutes();\n }\n }\n }\n if (changes['activeSection'] && !changes['activeSection'].firstChange) {\n this.selectedRouteIds.set([]);\n this.modalPlottedIds.set([]);\n this.modalPlottedRoutes.set([]);\n this.filters.set([]);\n this.addRouteModal = false;\n this.showRouteList = false;\n this.showShareModal.set(false);\n this.selectedRouteForEdit.set(null);\n if (this.activeSection() === 'Jobcode') {\n this.loadData(this.dateValue());\n } else {\n this.loadViewRoutes();\n }\n }\n }\n\n loadData(value: string, isRefresh = false) {\n this.dataSubscription?.unsubscribe();\n this.dateValue.set(value);\n this.coolmapService.isLoading.set(true);\n if (!isRefresh) {\n this.coolmapService.isDataFetched.set(false);\n }\n \n // Clear selection when the base list changes (date/repo switch)\n if (!isRefresh) {\n this.selectedRouteIds.set([]);\n this.filters.set([]);\n this.filterForm.controls['search'].setValue('');\n }\n\n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((unitsRes: any) => {\n this.unitList.set(unitsRes);\n this.utils.fetchMaterialsListForCustomer().then((matRes: any) => {\n this.materialsList.set(matRes);\n this.executeJobReportFetch(value);\n });\n });\n } else {\n this.executeJobReportFetch(value);\n }\n }\n\n private executeJobReportFetch(value: string) {\n let dataSet: any;\n if (this.config.repository === 'customer') {\n const custId = this.customerRepoDetails?.customer?.id || '';\n const projId = this.customerRepoDetails?.projectId || '';\n dataSet = { date: value, customer_id: custId, project_id: projId };\n } else {\n dataSet = { date: value };\n }\n\n this.dataSubscription = this.utils.postdata('jobs_report_v2', dataSet).subscribe({\n next: (res: any) => {\n if (res && res.data && typeof res.data !== 'string') {\n const list = res.data.map((ele: CoolmapRoute) => {\n (ele as any).date = value;\n if (this.config.repository === 'customer') {\n ele.unit = this.getUnitName(ele);\n (ele as any).material = this.getMaterialName(ele).split('|')[0].trim();\n }\n this.utils.makeOptions(ele);\n return ele;\n });\n this.routesList.set(list);\n } else {\n this.routesList.set([]);\n }\n this.coolmapService.isLoading.set(false);\n this.coolmapService.isDataFetched.set(true);\n },\n error: () => {\n this.routesList.set([]);\n this.coolmapService.isLoading.set(false);\n this.coolmapService.isDataFetched.set(true);\n }\n });\n }\n\n loadViewRoutes(isRefresh = false) {\n this.dataSubscription?.unsubscribe();\n this.coolmapService.isLoading.set(true);\n if (!isRefresh) {\n this.coolmapService.isDataFetched.set(false);\n this.selectedRouteIds.set([]);\n this.filters.set([]);\n this.filterForm.controls['search'].setValue('');\n }\n \n if (this.config.repository === 'customer') {\n this.utils.fetchUnitsList().then((unitsRes: any) => {\n this.unitList.set(unitsRes);\n this.utils.fetchMaterialsListForCustomer().then((matRes: any) => {\n this.materialsList.set(matRes);\n this.executeViewRoutesFetch();\n });\n });\n } else {\n this.executeViewRoutesFetch();\n }\n }\n\n private executeViewRoutesFetch() {\n if (this.config.repository === 'customer') {\n const dataSet = { customer_id: this.customerRepoDetails?.customer?.id || '' };\n this.dataSubscription = this.utils.postdata('routes/all', dataSet).subscribe({\n next: (res: any) => {\n this.handleViewRoutesResponse(res);\n },\n error: () => {\n this.viewRoutesList.set([]);\n this.coolmapService.isLoading.set(false);\n }\n });\n } else {\n this.dataSubscription = this.utils.getData('routes/all').subscribe({\n next: (res: any) => {\n this.handleViewRoutesResponse(res);\n },\n error: () => {\n this.viewRoutesList.set([]);\n this.coolmapService.isLoading.set(false);\n }\n });\n }\n }\n\n private handleViewRoutesResponse(res: any) {\n if (res && res.data && Array.isArray(res.data)) {\n const list = res.data.map((ele: CoolmapRoute) => {\n if (this.config.repository === 'customer') {\n ele.unit = this.getUnitName(ele);\n (ele as any).material = this.getMaterialName(ele).split('|')[0].trim();\n }\n this.utils.makeOptions(ele);\n return ele;\n });\n this.viewRoutesList.set(list);\n } else {\n this.viewRoutesList.set([]);\n }\n this.coolmapService.isLoading.set(false);\n this.coolmapService.isDataFetched.set(true);\n }\n\n getUnitName(data: any): string {\n let unitName = '';\n this.unitList().forEach((res) => {\n if (res.id === data.unit_id) {\n unitName = res.type;\n }\n });\n return unitName || data.unit;\n }\n\n getMaterialName(data: any): string {\n let materialName = '';\n this.materialsList().forEach((res) => {\n if (res.id === data.material_id) {\n materialName = res.name;\n }\n });\n return materialName || data.material || '';\n }\n\n onDateChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (target && target.value) {\n this.coolmapService.resetModals.update(v => v + 1);\n this.loadData(target.value);\n }\n }\n\n onSearchFocus() {\n const value = this.filterForm.get('search')?.value;\n if (value && this.filteredOptions().length > 0) {\n this.dropdownOpen.set(true);\n }\n }\n\n selectFilter(option: any) {\n this.filterForm.controls['search'].setValue('');\n this.selectedRouteIds.set([]); // Clear selection when switching filters\n this.filters.set([\n { name: option.label, type: option.type, value: option }\n ]);\n this.dropdownOpen.set(false);\n }\n\n removeFilter(filter: any) {\n this.filters.update(curr => curr.filter(f => f !== filter));\n }\n\n /**\n * Performs an isolated, diff-based synchronization for a specific route type.\n * This ensures that 'jobcode' and 'jobrouteList' updates never interfere.\n */\n async syncSpecificPrefix(prefix: string, sourceRoutes: CoolmapRoute[], selectedIds: string[]) { \n // 1. Identify desired state for THIS prefix only\n const desiredIds = new Set(sourceRoutes.map(r => `${prefix}-${this.getRouteId(r)}`));\n \n // 2. Get current state for THIS prefix only from map service\n const currentPlottedIds = this.mapService.getRegistryKeys().filter(k => k.startsWith(`${prefix}-`));\n\n // 3. Diff: Identify what to remove and what to add for THIS prefix\n const toRemove = currentPlottedIds.filter(id => !desiredIds.has(id));\n const toAdd = Array.from(desiredIds).filter(id => !currentPlottedIds.includes(id));\n \n // 4. Perform removals for THIS prefix\n for (const regId of toRemove) {\n const id = regId.substring(prefix.length + 1);\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.add(regId);\n return n;\n });\n try {\n await this.mapService.removeRouteAndMarker(id, prefix);\n } finally {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.delete(regId);\n return n;\n });\n }\n }\n\n // 5. Perform additions for THIS prefix\n if (toAdd.length > 0) {\n this.coolmapService.isLoading.set(true);\n for (const regId of toAdd) {\n const id = regId.substring(prefix.length + 1);\n const routeObj = sourceRoutes.find(r => this.getRouteId(r) === id);\n if (routeObj) {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.add(regId);\n return n;\n });\n try {\n await this.mapService.plotRoute(routeObj, id, prefix, false, false);\n } finally {\n this.coolmapService.plottingIds.update(set => {\n const n = new Set(set);\n n.delete(regId);\n return n;\n });\n }\n }\n }\n }\n\n // 6. Update Visibility for THIS prefix only\n // This allows jobcode and jobrouteList to have independent visibility states.\n const compositeVisible = selectedIds.map(id => `${prefix}-${id}`);\n const showAllForThisPrefix = (['jobcode', 'viewroute'].includes(prefix) && selectedIds.length === 0);\n \n this.mapService.setRoutesVisibility(compositeVisible, showAllForThisPrefix, prefix);\n this.coolmapService.isLoading.set(false);\n }\n\n toggleSelection(id: string) {\n this.selectedRouteIds.update(ids => {\n if (ids.includes(id)) {\n return ids.filter(i => i !== id);\n } else {\n return [...ids, id];\n }\n });\n }\n\n toggleModalRoute(route: CoolmapRoute) {\n const id = this.getRouteId(route);\n if (!id) return;\n\n this.modalPlottedRoutes.update(routes => {\n const isPlotted = routes.some(r => this.getRouteId(r) === id);\n if (isPlotted) {\n return routes.filter(r => this.getRouteId(r) !== id);\n } else {\n return [...routes, route];\n }\n });\n \n // Also update IDs for UI checkboxes\n this.modalPlottedIds.set(this.modalPlottedRoutes().map(r => this.getRouteId(r)));\n }\n\n async onAddRouteModalChange(isOpen: boolean) {\n this.addRouteModal = isOpen;\n if (!isOpen) {\n if (this.skipNextRefresh) {\n this.skipNextRefresh = false;\n return;\n }\n // Modal closed - restore map state and refresh data\n await this.refreshMapState();\n }\n }\n\n async refreshMapState() {\n if (this.activeSection() === 'Jobcode') {\n await this.loadData(this.dateValue(), true);\n } else {\n await this.loadViewRoutes(true);\n }\n }\n\n onRouteSaved(data: any) {\n if (data.id) {\n if (data.unit_id) {\n data.unit = this.getUnitName(data);\n }\n\n this.skipNextRefresh = true;\n const updater = (list: CoolmapRoute[]) => list.map(r => this.getRouteId(r) === data.id ? { ...r, ...data } : r);\n this.routesList.update(updater);\n this.viewRoutesList.update(updater);\n } else {\n // It was an add - need a re-fetch to get new ID from server\n this.skipNextRefresh = false; // explicitly allow refresh on add to get new ID\n }\n }\n\n onRouteDeleted(id: string) {\n this.skipNextRefresh = true;\n \n // 1. Remove from local signals\n this.routesList.update(list => list.filter(r => this.getRouteId(r) !== id));\n this.viewRoutesList.update(list => list.filter(r => this.getRouteId(r) !== id));\n \n // 2. Clear from selections\n this.selectedRouteIds.update(ids => ids.filter(i => i !== id));\n this.modalPlottedIds.update(ids => ids.filter(i => i !== id));\n this.modalPlottedRoutes.update(routes => routes.filter(r => this.getRouteId(r) !== id));\n\n // 3. Cleanup Map\n this.mapService.removeRouteAndMarker(id, 'jobcode');\n this.mapService.removeRouteAndMarker(id, 'jobrouteList');\n this.mapService.removeRouteAndMarker(id, 'viewroute');\n\n // 4. Update Filter Pills\n this.filters.update(curr => curr.filter(f => {\n if (f.type === 'job') {\n return f.value.job_id !== id;\n }\n return true;\n }));\n\n // 5. Refresh Search Suggestions (Options list in Utils)\n this.utils.clearOptions();\n [...this.routesList(), ...this.viewRoutesList()].forEach(r => this.utils.makeOptions(r));\n }\n\n openAddRouteModal() {\n this.selectedRouteForEdit.set(null);\n this.addRouteModal = true;\n }\n\n openEditModal(route: CoolmapRoute) {\n this.selectedRouteForEdit.set(route);\n this.addRouteModal = true;\n }\n\n getRouteId(route: CoolmapRoute): string {\n return route.job_id || route.route_id || (route as any).route_details_id || '';\n }\n\n clearSelection() {\n this.selectedRouteIds.set([]);\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this.mapService.initializeMap(this.mapContainer.nativeElement, this.darkMode());\n\n setTimeout(() => {\n this.mapService.resize();\n }, 200);\n }, 0);\n }\n\n handleShareRoute(data: any) {\n this.shareRouteData.set(data);\n this.showShareModal.set(true);\n }\n}\n","<div class=\"center-area\">\n <div [formGroup]=\"filterForm\" class=\"toolbar flex flex-col sm:flex-row md:h-[55px] h-auto py-2 px-2 gap-3 items-center\">\n <div class=\"toolbar-left flex items-center gap-3 flex-1\">\n @if (activeSection() === 'Jobcode') {\n <div class=\"relative w-full sm:w-auto group mt-[25px]\">\n <input\n type=\"text\"\n [value]=\"displayDate()\"\n readonly\n [disabled]=\"coolmapService.isLoading()\"\n (click)=\"dateInput.showPicker()\"\n class=\"w-full pl-3 pr-10 py-2 rounded-lg border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-brand-blue focus:border-transparent text-sm disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer\"\n />\n <lucide-icon \n [img]=\"icons.Calendar\" \n [size]=\"18\" \n (click)=\"!coolmapService.isLoading() && dateInput.showPicker()\"\n [class.pointer-events-none]=\"coolmapService.isLoading()\"\n [class.opacity-50]=\"coolmapService.isLoading()\"\n class=\"absolute right-[6px] top-[5px] text-white-400 group-hover:text-brand-blue transition-colors cursor-pointer\"\n ></lucide-icon>\n <input\n #dateInput\n type=\"date\"\n [value]=\"dateValue()\"\n (change)=\"onDateChange($event)\"\n [disabled]=\"coolmapService.isLoading()\"\n class=\"absolute inset-0 w-0 h-0 opacity-0 pointer-events-none\"\n />\n </div>\n <span class=\"toolbar-divider hidden sm:flex h-6 w-[1px] bg-gray-200 dark:bg-slate-700\"></span>\n }\n @if (filters() && filters().length > 0) {\n <div class=\"flex flex-wrap gap-2 ml-2\">\n @for (filter of filters(); track filter.value + filter.type) {\n <div class=\"inline-flex items-center gap-1 px-2 py-2.5 rounded-xl bg-slate-200 dark:bg-slate-700 text-gray-800 dark:text-gray-200 text-xs font-medium border border-gray-300 dark:border-slate-600\">\n <span class=\"capitalize opacity-80\">{{ filter.type }}:</span> {{ filter.name }}\n <button type=\"button\" (click)=\"removeFilter(filter)\" class=\"hover:opacity-75 transition-opacity ml-1\">\n <lucide-icon [img]=\"icons.X\" [size]=\"12\"></lucide-icon>\n </button>\n </div>\n }\n </div>\n }\n <div #searchContainer class=\"relative items-center flex-1\">\n <lucide-icon [img]=\"icons.Search\" [size]=\"18\" class=\"absolute left-[0.55rem] top-[50%] -translate-y-1/2 text-gray-400\"></lucide-icon>\n <input\n type=\"text\"\n formControlName=\"search\"\n [attr.disabled]=\"coolmapService.isLoading() ? true : null\"\n placeholder=\"Search routes...\"\n class=\"w-full pl-10 pr-10 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 focus:ring-2 focus:ring-amber-500 focus:border-transparent text-sm disabled:opacity-50 disabled:cursor-not-allowed\"\n (focus)=\"onSearchFocus()\"\n />\n\n @if (filterForm.value.search) {\n <button (click)=\"filterForm.controls.search.setValue('')\" class=\"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600\">\n <lucide-icon [img]=\"icons.X\" [size]=\"16\"></lucide-icon>\n </button>\n }\n\n <!-- Autocomplete Dropdown -->\n @if (dropdownOpen() && filteredOptions().length > 0) {\n <div class=\"absolute z-70 left-0 right-0 top-full mt-1 max-h-60 overflow-y-auto bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-600 rounded shadow-lg\">\n @for (option of filteredOptions(); track option.value + option.type) {\n <div (click)=\"selectFilter(option)\" class=\"px-4 py-2 hover:bg-gray-100 dark:hover:bg-slate-700 cursor-pointer text-xs font-normal border-b border-gray-100 dark:border-slate-700 last:border-0 dark:text-white\">\n <span class=\"capitalize\">{{ option.type }}:</span>\n {{ option.label }}\n </div>\n }\n </div>\n } @else if (!coolmapService.isLoading() && (!filteredOptions() || filteredOptions().length === 0) && filterForm.value.search) {\n <div class=\"absolute z-70 left-0 right-0 top-full mt-1 p-4 text-center text-gray-400 text-sm bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-600 rounded shadow-lg\">\n No results found.\n </div>\n }\n\n \n </div>\n </div>\n <div class=\"toolbar-right\">\n @if (selectedRouteIds().length > 0) {\n <button\n type=\"button\"\n (click)=\"clearSelection()\"\n [disabled]=\"coolmapService.isLoading()\"\n class=\"inline-flex items-center justify-center gap-2 px-5 sm:px-6 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors text-xs md:text-sm\"\n >\n Show all routes ({{ selectedRouteIds().length }})\n </button>\n }\n @if (activeSection() === 'ViewRoute') {\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 px-4 py-2 bg-amber-500 hover:bg-amber-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors text-xs md:text-sm\"\n [disabled]=\"coolmapService.isLoading()\"\n (click)=\"openAddRouteModal()\">\n <svg class=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 4v16m8-8H4\"\n />\n </svg>\n Add Route\n </button>\n }\n\n @if(activeSection() === 'Jobcode'){\n <button\n class=\"inline-flex items-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed relative group\"\n (click)=\"showRouteList = true\"\n [disabled]=\"coolmapService.isLoading()\">\n <lucide-icon [img]=\"icons.Route\" [size]=\"20\"></lucide-icon>\n <div\n class=\"absolute top-full right-0 mt-2 group-hover:block hidden bg-gray-800 dark:bg-white text-white dark:text-black text-[10px] rounded py-1 px-2 whitespace-nowrap\">\n Show Route List\n <div\n class=\"absolute -top-[8px] left-[60px] border-4 border-transparent border-b-gray-800 dark:border-b-white\">\n </div>\n </div>\n </button>}\n </div>\n </div>\n <div class=\"view-content\">\n <div class=\"full-view\">\n <div class=\"map-container\">\n <div class=\"mapbox-container\" #mapContainer></div>\n </div>\n </div>\n\n <!-- FOR JOBCODE -->\n @if (activeSection() === 'Jobcode') {\n <lib-job-code \n listMode=\"floating\" \n [routes]=\"activeFilteredRoutes()\"\n [selectedRouteIds]=\"selectedRouteIds()\"\n [isLoading]=\"coolmapService.isLoading()\"\n (routeSelect)=\"toggleSelection($event)\">\n </lib-job-code>\n }\n\n <!-- FOR VIEWROUTE -->\n @if (activeSection() === 'ViewRoute') {\n <lib-view-route-list \n listMode=\"floating\" \n [routes]=\"activeFilteredRoutes()\"\n [selectedRouteIds]=\"selectedRouteIds()\"\n [isLoading]=\"coolmapService.isLoading()\"\n (routeSelect)=\"toggleSelection($event)\"\n (editRoute)=\"openEditModal($event)\"\n ></lib-view-route-list>\n }\n </div>\n @if (config.repository === 'coolmap') {\n <div class=\"status-bar\">\n <div class=\"stats-row\">\n <div class=\"stat-item active\" title=\"Active routes (assigned + in progress)\">\n <span class=\"stat-count\">{{ masterStats().Done }}</span>\n <span class=\"stat-label\">Done</span>\n </div>\n\n <div class=\"stat-item completed\" title=\"Completed tasks\">\n <span class=\"stat-count\">{{ masterStats().Incomplete }}</span>\n <span class=\"stat-label\">Incomplete</span>\n </div>\n\n <div class=\"stat-item declined\" title=\"Declined routes - needs attention\">\n <span class=\"stat-count\">{{ masterStats().Ongoing }}</span>\n <span class=\"stat-label\">Ongoing</span>\n </div>\n\n <div class=\"stat-item scheduled\" title=\"Scheduled jobs for today\">\n <span class=\"stat-count\">{{ masterStats().Open }}</span>\n <span class=\"stat-label\">Open</span>\n </div>\n </div>\n </div>\n }\n</div>\n<lib-job-route-list \n [initialRoutes]=\"viewRoutesList()\"\n [(modalOpen)]=\"showRouteList\"\n [selectedRouteIds]=\"modalPlottedIds()\"\n (routeSelect)=\"toggleModalRoute($event)\"\n (masterToggleEvent)=\"modalMasterToggle($event)\"\n [customerRepoDetails]=\"customerRepoDetails\"\n (shareRoute)=\"handleShareRoute($event)\"\n></lib-job-route-list>\n<lib-add-route \n [modalOpen]=\"addRouteModal\"\n (modalOpenChange)=\"onAddRouteModalChange($event)\"\n (routeSaved)=\"onRouteSaved($event)\"\n (routeDeleted)=\"onRouteDeleted($event)\"\n [customerRepoDetails]=\"customerRepoDetails\"\n [routeData]=\"selectedRouteForEdit()\"\n></lib-add-route>\n\n@if (showShareModal()) {\n <lib-share-route\n [openShareRouteDetails]=\"shareRouteData()\"\n [userDetails]=\"userDetails\"\n (closePopupEmit)=\"showShareModal.set(false)\" class=\"relative\"\n ></lib-share-route>\n}\n\n<ag-toast-container></ag-toast-container>\n","/*\n * Public API Surface of coolmap\n */\n\nexport * from './lib/coolmap';\nexport * from './lib/components/coolmap/coolmap.component';\nexport * from './lib/components/ag-toast-container/ag-toast-container.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i1"],"mappings":";;;;;;;;;;;;;;MAQa,OAAO,CAAA;wGAAP,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,uEAHR,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGD,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;+BACE,aAAa,EAAA,OAAA,EACd,EAAE,EAAA,QAAA,EACD,CAAA,CAAE,EAAA;;;MCgOD,yBAAyB,CAAA;AACpC,IAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;IAErC,WAAW,GAAQ,WAAW;IAC9B,SAAS,GAAQ,OAAO;IACxB,WAAW,GAAQ,aAAa;IAChC,QAAQ,GAAQ,IAAI;IACpB,SAAS,GAAQ,CAAC;AAElB,IAAA,IAAI,gBAAgB,GAAA;QAClB,OAAO,CAAA,gBAAA,EAAmB,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE;IAC/D;AAEA,IAAA,eAAe,CAAC,KAAY,EAAA;AAC1B,QAAA,OAAO,CAAA,MAAA,EAAS,KAAK,CAAC,OAAO,EAAE;IACjC;AAEA,IAAA,cAAc,CAAC,KAAY,EAAA;AACzB,QAAA,OAAO,CAAA,WAAA,EAAc,KAAK,CAAC,OAAO,EAAE;IACtC;AAEA,IAAA,OAAO,CAAC,KAAY,EAAA;QAClB,IAAI,CAAC,YAAY,CAAC,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