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MAAM1F,OAAO,GAAGqF,sEAAmB,CAACzG,2GAAmC,EAAE;IAAC8G;EAAQ,CAAC,CAAC;EACpFC,cAAc,CAACC,MAAM,CAAC,aAAa,EAAE5F,OAAO,CAAC;AACjD,CAAC,EAAC,CAAE;;;;;;;;;;ACdJ","sources":["./src/@platform/index.ts","./src/@platform/lib/mock-api/index.ts","./src/@platform/lib/mock-api/mock-api.constants.ts","./src/@platform/lib/mock-api/mock-api.interceptor.ts","./src/@platform/lib/mock-api/mock-api.request-handler.ts","./src/@platform/lib/mock-api/mock-api.service.ts","./src/@platform/lib/mock-api/mock-api.types.ts","./src/@platform/lib/mock-api/mock-api.utils.ts","./src/@platform/lib/mock-api/public-api.ts","./src/@platform/platform.provider.ts","./src/@platform/services/config/config.constants.ts","./src/@platform/services/config/config.service.ts","./src/@platform/services/config/config.types.ts","./src/@platform/services/config/index.ts","./src/@platform/services/config/public-api.ts","./src/@platform/services/confirmation/confirmation.service.ts","./src/@platform/services/confirmation/confirmation.types.ts","./src/@platform/services/confirmation/dialog/dialog.component.ts","./src/@platform/services/confirmation/dialog/dialog.component.html","./src/@platform/services/confirmation/index.ts","./src/@platform/services/confirmation/public-api.ts","./src/@platform/services/loading/index.ts","./src/@platform/services/loading/loading.interceptor.ts","./src/@platform/services/loading/loading.service.ts","./src/@platform/services/loading/public-api.ts","./src/@platform/services/media-watcher/index.ts","./src/@platform/services/media-watcher/media-watcher.service.ts","./src/@platform/services/media-watcher/public-api.ts","./src/@platform/services/platform/index.ts","./src/@platform/services/platform/platform.service.ts","./src/@platform/services/platform/public-api.ts","./src/@platform/services/splash-screen/index.ts","./src/@platform/services/splash-screen/public-api.ts","./src/@platform/services/splash-screen/splash-screen.service.ts","./src/@platform/services/utils/index.ts","./src/@platform/services/utils/public-api.ts","./src/@platform/services/utils/utils.service.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.config.ts","./src/app/core/auth/auth.interceptor.ts","./src/app/core/auth/auth.provider.ts","./src/app/core/auth/auth.service.ts","./src/app/core/auth/auth.utils.ts","./src/app/core/icons/icons.provider.ts","./src/app/core/icons/icons.service.ts","./src/app/core/models/metrics-history.model.ts","./src/app/core/models/recycler-metrics.model.ts","./src/app/core/services/date-time.service.ts","./src/app/core/services/oversight.service.ts","./src/app/core/services/recycler-location.service.ts","./src/app/core/transloco/transloco.http-loader.ts","./src/app/core/user/user.service.ts","./src/app/mock-api/common/auth/api.ts","./src/app/mock-api/common/navigation/api.ts","./src/app/mock-api/common/navigation/data.ts","./src/app/mock-api/common/user/data.ts","./src/app/mock-api/dashboards/recycling/api.ts","./src/app/mock-api/dashboards/recycling/data.ts","./src/app/mock-api/index.ts","./src/app/modules/dashboard/@core/components/custom-date-range-dialog/custom-date-range-dialog.component.ts","./src/app/modules/dashboard/@core/components/custom-date-range-dialog/custom-date-range-dialog.component.html","./src/app/modules/dashboard/@core/components/custom-date-range-dialog/custom-date-range-dialog.service.ts","./src/app/modules/dashboard/@core/components/location-breakdown-table/location-breakdown-table.component.ts","./src/app/modules/dashboard/@core/components/location-breakdown-table/location-breakdown-table.component.html","./src/app/modules/dashboard/@core/components/summary-metric-cards/summary-metric-cards.component.ts","./src/app/modules/dashboard/@core/components/summary-metric-cards/summary-metric-cards.component.html","./src/app/modules/dashboard/@core/pipes/recycle-rate.pipe.ts","./src/app/modules/dashboard/dashboard.component.ts","./src/app/modules/dashboard/dashboard.component.html","./src/app/modules/dashboard/dashboard.service.ts","./src/environments/environment.prod.ts","./src/main.ts","ignored|C:\\GIT\\cargo-recycle-customer-dashboard\\node_modules\\crypto-js|crypto"],"sourcesContent":["export * from './platform.provider';\r\n","export * from '@platform/lib/mock-api/public-api';\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport const PLATFORM_MOCK_API_DEFAULT_DELAY = new InjectionToken('PLATFORM_MOCK_API_DEFAULT_DELAY');\r\n","import { HttpErrorResponse, HttpEvent, HttpHandlerFn, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { inject } from '@angular/core';\r\nimport { PLATFORM_MOCK_API_DEFAULT_DELAY } from '@platform/lib/mock-api/mock-api.constants';\r\nimport { PlatformMockApiService } from '@platform/lib/mock-api/mock-api.service';\r\nimport { delay, Observable, of, switchMap, throwError } from 'rxjs';\r\n\r\nexport const mockApiInterceptor = (request: HttpRequest, next: HttpHandlerFn): Observable> =>\r\n{\r\n const defaultDelay = inject(PLATFORM_MOCK_API_DEFAULT_DELAY);\r\n const platformMockApiService = inject(PlatformMockApiService);\r\n\r\n // Try to get the request handler\r\n const {\r\n handler,\r\n urlParams,\r\n } = platformMockApiService.findHandler(request.method.toUpperCase(), request.url);\r\n\r\n // Pass through if the request handler does not exist\r\n if ( !handler )\r\n {\r\n return next(request);\r\n }\r\n\r\n // Set the intercepted request on the handler\r\n handler.request = request;\r\n\r\n // Set the url params on the handler\r\n handler.urlParams = urlParams;\r\n\r\n // Subscribe to the response function observable\r\n return handler.response.pipe(\r\n delay(handler.delay ?? defaultDelay ?? 0),\r\n switchMap((response) =>\r\n {\r\n // If there is no response data,\r\n // throw an error response\r\n if ( !response )\r\n {\r\n response = new HttpErrorResponse({\r\n error : 'NOT FOUND',\r\n status : 404,\r\n statusText: 'NOT FOUND',\r\n });\r\n\r\n return throwError(response);\r\n }\r\n\r\n // Parse the response data\r\n const data = {\r\n status: response[0],\r\n body : response[1],\r\n };\r\n\r\n // If the status code is in between 200 and 300,\r\n // return a success response\r\n if ( data.status >= 200 && data.status < 300 )\r\n {\r\n response = new HttpResponse({\r\n body : data.body,\r\n status : data.status,\r\n statusText: 'OK',\r\n });\r\n\r\n return of(response);\r\n }\r\n\r\n // For other status codes,\r\n // throw an error response\r\n response = new HttpErrorResponse({\r\n error : data.body.error,\r\n status : data.status,\r\n statusText: 'ERROR',\r\n });\r\n\r\n return throwError(response);\r\n }));\r\n};\r\n","import { HttpRequest } from '@angular/common/http';\r\nimport { PlatformMockApiReplyCallback } from '@platform/lib/mock-api/mock-api.types';\r\nimport { Observable, of, take, throwError } from 'rxjs';\r\n\r\nexport class PlatformMockApiHandler\r\n{\r\n request!: HttpRequest;\r\n urlParams!: { [key: string]: string };\r\n\r\n // Private\r\n private _reply: PlatformMockApiReplyCallback = undefined;\r\n private _replyCount = 0;\r\n private _replied = 0;\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(\r\n public url: string,\r\n public delay?: number,\r\n )\r\n {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Accessors\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Getter for response callback\r\n */\r\n get response(): Observable\r\n {\r\n // If the execution limit has been reached, throw an error\r\n if ( this._replyCount > 0 && this._replyCount <= this._replied )\r\n {\r\n return throwError('Execution limit has been reached!');\r\n }\r\n\r\n // If the response callback has not been set, throw an error\r\n if ( !this._reply )\r\n {\r\n return throwError('Response callback function does not exist!');\r\n }\r\n\r\n // If the request has not been set, throw an error\r\n if ( !this.request )\r\n {\r\n return throwError('Request does not exist!');\r\n }\r\n\r\n // Increase the replied count\r\n this._replied++;\r\n\r\n // Execute the reply callback\r\n const replyResult = this._reply({\r\n request : this.request,\r\n urlParams: this.urlParams,\r\n });\r\n\r\n // If the result of the reply callback is an observable...\r\n if ( replyResult instanceof Observable )\r\n {\r\n // Return the result as it is\r\n return replyResult.pipe(take(1));\r\n }\r\n\r\n // Otherwise, return the result as an observable\r\n return of(replyResult).pipe(take(1));\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Reply\r\n *\r\n * @param callback\r\n */\r\n reply(callback: PlatformMockApiReplyCallback): void\r\n {\r\n // Store the reply\r\n this._reply = callback;\r\n }\r\n\r\n /**\r\n * Reply count\r\n *\r\n * @param count\r\n */\r\n replyCount(count: number): void\r\n {\r\n // Store the reply count\r\n this._replyCount = count;\r\n }\r\n}\r\n\r\n\r\n","import {Injectable} from '@angular/core';\r\nimport {PlatformMockApiHandler} from '@platform/lib/mock-api/mock-api.request-handler';\r\nimport {PlatformMockApiMethods} from '@platform/lib/mock-api/mock-api.types';\r\nimport {compact, fromPairs} from 'lodash-es';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformMockApiService {\r\n private _handlers: { [key: string]: Map } = {\r\n 'get': new Map(),\r\n 'post': new Map(),\r\n 'patch': new Map(),\r\n 'delete': new Map(),\r\n 'put': new Map(),\r\n 'head': new Map(),\r\n 'jsonp': new Map(),\r\n 'options': new Map(),\r\n };\r\n\r\n constructor() {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Find the handler from the service\r\n * with the given method and url\r\n *\r\n * @param method\r\n * @param url\r\n */\r\n findHandler(method: string, url: string): {\r\n handler: PlatformMockApiHandler | undefined;\r\n urlParams: { [key: string]: string }\r\n } {\r\n // Prepare the return object\r\n const matchingHandler: { handler: PlatformMockApiHandler | undefined; urlParams: { [key: string]: string } } = {\r\n handler: undefined,\r\n urlParams: {},\r\n };\r\n\r\n // Split the url\r\n const urlParts = url.split('/');\r\n\r\n // Get all related request handlers\r\n const handlers = this._handlers[method.toLowerCase()];\r\n\r\n // Iterate through the handlers\r\n handlers.forEach((handler, handlerUrl) => {\r\n // Skip if there is already a matching handler\r\n if (matchingHandler.handler) {\r\n return;\r\n }\r\n\r\n // Split the handler url\r\n const handlerUrlParts = handlerUrl.split('/');\r\n\r\n // Skip if the lengths of the urls we are comparing are not the same\r\n if (urlParts.length !== handlerUrlParts.length) {\r\n return;\r\n }\r\n\r\n // Compare\r\n const matches = handlerUrlParts.every((handlerUrlPart, index) => handlerUrlPart === urlParts[index] || handlerUrlPart.startsWith(':'));\r\n\r\n // If there is a match...\r\n if (matches) {\r\n // Assign the matching handler\r\n matchingHandler.handler = handler;\r\n\r\n // Extract and assign the parameters\r\n matchingHandler.urlParams = fromPairs(compact(handlerUrlParts.map((handlerUrlPart, index) =>\r\n handlerUrlPart.startsWith(':') ? [handlerUrlPart.substring(1), urlParts[index]] : undefined,\r\n )));\r\n }\r\n });\r\n\r\n return matchingHandler;\r\n }\r\n\r\n /**\r\n * Register GET request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onGet(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('get', url, delay);\r\n }\r\n\r\n /**\r\n * Register POST request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onPost(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('post', url, delay);\r\n }\r\n\r\n /**\r\n * Register PATCH request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onPatch(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('patch', url, delay);\r\n }\r\n\r\n /**\r\n * Register DELETE request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onDelete(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('delete', url, delay);\r\n }\r\n\r\n /**\r\n * Register PUT request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onPut(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('put', url, delay);\r\n }\r\n\r\n /**\r\n * Register HEAD request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onHead(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('head', url, delay);\r\n }\r\n\r\n /**\r\n * Register JSONP request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onJsonp(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('jsonp', url, delay);\r\n }\r\n\r\n /**\r\n * Register OPTIONS request handler\r\n *\r\n * @param url - URL address of the mocked API endpoint\r\n * @param delay - Delay of the response in milliseconds\r\n */\r\n onOptions(url: string, delay?: number): PlatformMockApiHandler {\r\n return this._registerHandler('options', url, delay);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Private methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Register and return a new instance of the handler\r\n *\r\n * @param method\r\n * @param url\r\n * @param delay\r\n * @private\r\n */\r\n private _registerHandler(method: PlatformMockApiMethods, url: string, delay?: number): PlatformMockApiHandler {\r\n // Create a new instance of PlatformMockApiRequestHandler\r\n const platformMockHttp = new PlatformMockApiHandler(url, delay);\r\n\r\n // Store the handler to access it from the interceptor\r\n this._handlers[method].set(url, platformMockHttp);\r\n\r\n // Return the instance\r\n return platformMockHttp;\r\n }\r\n}\r\n","import { HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\n\r\nexport type PlatformMockApiReplyCallback =\r\n | ((data: { request: HttpRequest; urlParams: { [key: string]: string } }) => ([number, string | any]) | Observable)\r\n | undefined;\r\n\r\nexport type PlatformMockApiMethods =\r\n | 'get'\r\n | 'post'\r\n | 'patch'\r\n | 'delete'\r\n | 'put'\r\n | 'head'\r\n | 'jsonp'\r\n | 'options';\r\n","export class PlatformMockApiUtils\r\n{\r\n /**\r\n * Constructor\r\n */\r\n constructor()\r\n {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Generate a globally unique id\r\n */\r\n static guid(): string\r\n {\r\n /* eslint-disable */\r\n\r\n let d = new Date().getTime();\r\n\r\n // Use high-precision timer if available\r\n if ( typeof performance !== 'undefined' && typeof performance.now === 'function' )\r\n {\r\n d += performance.now();\r\n }\r\n\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) =>\r\n {\r\n const r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n\r\n /* eslint-enable */\r\n }\r\n}\r\n","export * from '@platform/lib/mock-api/mock-api.constants';\r\nexport * from '@platform/lib/mock-api/mock-api.interceptor';\r\nexport * from '@platform/lib/mock-api/mock-api.service';\r\nexport * from '@platform/lib/mock-api/mock-api.types';\r\nexport * from '@platform/lib/mock-api/mock-api.utils';\r\n","import {provideHttpClient, withInterceptors} from '@angular/common/http';\r\nimport {\r\n APP_INITIALIZER,\r\n ENVIRONMENT_INITIALIZER,\r\n EnvironmentProviders,\r\n importProvidersFrom,\r\n inject,\r\n Provider\r\n} from '@angular/core';\r\nimport {MATERIAL_SANITY_CHECKS} from '@angular/material/core';\r\nimport {MatDialogModule} from '@angular/material/dialog';\r\nimport {MAT_FORM_FIELD_DEFAULT_OPTIONS} from '@angular/material/form-field';\r\nimport {PLATFORM_MOCK_API_DEFAULT_DELAY, mockApiInterceptor} from '@platform/lib/mock-api';\r\nimport {PlatformConfig} from '@platform/services/config';\r\nimport {PLATFORM_CONFIG} from '@platform/services/config/config.constants';\r\nimport {PlatformConfirmationService} from '@platform/services/confirmation';\r\nimport {platformLoadingInterceptor, PlatformLoadingService} from '@platform/services/loading';\r\nimport {PlatformMediaWatcherService} from '@platform/services/media-watcher';\r\nimport {PlatformPlatformService} from '@platform/services/platform';\r\nimport {PlatformSplashScreenService} from '@platform/services/splash-screen';\r\nimport {PlatformUtilsService} from '@platform/services/utils';\r\n\r\nexport type PlatformProviderConfig = {\r\n mockApi?: {\r\n delay?: number;\r\n services?: any[];\r\n },\r\n platform?: PlatformConfig\r\n}\r\n\r\n/**\r\n * Platform provider\r\n */\r\nexport const providePlatform = (config: PlatformProviderConfig): Array => {\r\n // Base providers\r\n const providers: Array = [\r\n {\r\n // Disable 'theme' sanity check\r\n provide: MATERIAL_SANITY_CHECKS,\r\n useValue: {\r\n doctype: true,\r\n theme: false,\r\n version: true,\r\n },\r\n },\r\n {\r\n // Use the 'fill' appearance on Angular Material form fields by default\r\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\r\n useValue: {\r\n appearance: 'fill',\r\n },\r\n },\r\n {\r\n provide: PLATFORM_MOCK_API_DEFAULT_DELAY,\r\n useValue: config?.mockApi?.delay ?? 0,\r\n },\r\n {\r\n provide: PLATFORM_CONFIG,\r\n useValue: config?.platform ?? {},\r\n },\r\n\r\n importProvidersFrom(MatDialogModule),\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformConfirmationService),\r\n multi: true,\r\n },\r\n\r\n provideHttpClient(withInterceptors([platformLoadingInterceptor])),\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformLoadingService),\r\n multi: true,\r\n },\r\n\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformMediaWatcherService),\r\n multi: true,\r\n },\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformPlatformService),\r\n multi: true,\r\n },\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformSplashScreenService),\r\n multi: true,\r\n },\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(PlatformUtilsService),\r\n multi: true,\r\n },\r\n ];\r\n\r\n // Mock Api services\r\n if (config?.mockApi?.services) {\r\n providers.push(\r\n provideHttpClient(withInterceptors([mockApiInterceptor])),\r\n {\r\n provide: APP_INITIALIZER,\r\n deps: [...config.mockApi.services],\r\n useFactory: () => (): any => null,\r\n multi: true,\r\n },\r\n );\r\n }\r\n\r\n // Return the providers\r\n return providers;\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport const PLATFORM_CONFIG = new InjectionToken('PLATFORM_APP_CONFIG');\r\n","import { Inject, Injectable } from '@angular/core';\r\nimport { PLATFORM_CONFIG } from '@platform/services/config/config.constants';\r\nimport { merge } from 'lodash-es';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformConfigService\r\n{\r\n private _config: BehaviorSubject;\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(@Inject(PLATFORM_CONFIG) config: any)\r\n {\r\n // Private\r\n this._config = new BehaviorSubject(config);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Accessors\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Setter & getter for config\r\n */\r\n set config(value: any)\r\n {\r\n // Merge the new config over to the current config\r\n const config = merge({}, this._config.getValue(), value);\r\n\r\n // Execute the observable\r\n this._config.next(config);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get config$(): Observable\r\n {\r\n return this._config.asObservable();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Resets the config to the default\r\n */\r\n reset(): void\r\n {\r\n // Set the config\r\n this._config.next(this.config);\r\n }\r\n}\r\n","// Types\r\nexport type Scheme = 'auto' | 'dark' | 'light';\r\nexport type Screens = { [key: string]: string };\r\nexport type Theme = 'theme-default' | string;\r\nexport type Themes = { id: string; name: string }[];\r\n\r\n/**\r\n * AppConfig interface. Update this interface to strictly type your config\r\n * object.\r\n */\r\nexport interface PlatformConfig\r\n{\r\n layout: string;\r\n scheme: Scheme;\r\n screens: Screens;\r\n theme: Theme;\r\n themes: Themes;\r\n}\r\n","export * from '@platform/services/config/public-api';\r\n","export * from '@platform/services/config/config.service';\r\nexport * from '@platform/services/config/config.types';\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { PlatformConfirmationConfig } from '@platform/services/confirmation/confirmation.types';\r\nimport { PlatformConfirmationDialogComponent } from '@platform/services/confirmation/dialog/dialog.component';\r\nimport { merge } from 'lodash-es';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformConfirmationService\r\n{\r\n private _matDialog: MatDialog = inject(MatDialog);\r\n private _defaultConfig: PlatformConfirmationConfig = {\r\n title : 'Confirm action',\r\n message : 'Are you sure you want to confirm this action?',\r\n icon : {\r\n show : true,\r\n name : 'heroicons_outline:exclamation-triangle',\r\n color: 'warn',\r\n },\r\n actions : {\r\n confirm: {\r\n show : true,\r\n label: 'Confirm',\r\n color: 'warn',\r\n },\r\n cancel : {\r\n show : true,\r\n label: 'Cancel',\r\n },\r\n },\r\n dismissible: false,\r\n };\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor()\r\n {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n open(config: PlatformConfirmationConfig = {}): MatDialogRef\r\n {\r\n // Merge the user config with the default config\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n\r\n // Open the dialog\r\n return this._matDialog.open(PlatformConfirmationDialogComponent, {\r\n autoFocus : false,\r\n disableClose: !userConfig.dismissible,\r\n data : userConfig,\r\n panelClass : 'platform-confirmation-dialog-panel',\r\n });\r\n }\r\n}\r\n","export interface PlatformConfirmationConfig\r\n{\r\n title?: string;\r\n message?: string;\r\n icon?: {\r\n show?: boolean;\r\n name?: string;\r\n color?: 'primary' | 'accent' | 'warn' | 'basic' | 'info' | 'success' | 'warning' | 'error';\r\n };\r\n actions?: {\r\n confirm?: {\r\n show?: boolean;\r\n label?: string;\r\n color?: 'primary' | 'accent' | 'warn';\r\n };\r\n cancel?: {\r\n show?: boolean;\r\n label?: string;\r\n };\r\n };\r\n dismissible?: boolean;\r\n}\r\n","import { NgClass, NgIf } from '@angular/common';\r\nimport { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { PlatformConfirmationConfig } from '@platform/services/confirmation/confirmation.types';\r\n\r\n@Component({\r\n selector : 'platform-confirmation-dialog',\r\n templateUrl : './dialog.component.html',\r\n styles : [\r\n `\r\n .platform-confirmation-dialog-panel {\r\n\r\n @screen md {\r\n @apply w-128;\r\n }\r\n\r\n .mat-mdc-dialog-container {\r\n\r\n .mat-mdc-dialog-surface {\r\n padding: 0 !important;\r\n }\r\n }\r\n }\r\n `,\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone : true,\r\n imports : [NgIf, MatButtonModule, MatDialogModule, MatIconModule, NgClass],\r\n})\r\nexport class PlatformConfirmationDialogComponent\r\n{\r\n /**\r\n * Constructor\r\n */\r\n constructor(@Inject(MAT_DIALOG_DATA) public data: PlatformConfirmationConfig)\r\n {\r\n }\r\n\r\n}\r\n","
\r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n {{data.actions.cancel.label}}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {{data.actions.confirm.label}}\r\n \r\n \r\n\r\n
\r\n
\r\n\r\n\r\n","export * from '@platform/services/confirmation/public-api';\r\n","export * from '@platform/services/confirmation/confirmation.service';\r\nexport * from '@platform/services/confirmation/confirmation.types';\r\n","export * from '@platform/services/loading/public-api';\r\n","import { HttpEvent, HttpHandlerFn, HttpRequest } from '@angular/common/http';\r\nimport { inject } from '@angular/core';\r\nimport { PlatformLoadingService } from '@platform/services/loading/loading.service';\r\nimport { finalize, Observable, take } from 'rxjs';\r\n\r\nexport const platformLoadingInterceptor = (req: HttpRequest, next: HttpHandlerFn): Observable> =>\r\n{\r\n const platformLoadingService = inject(PlatformLoadingService);\r\n let handleRequestsAutomatically = false;\r\n\r\n platformLoadingService.auto$\r\n .pipe(take(1))\r\n .subscribe((value) =>\r\n {\r\n handleRequestsAutomatically = value;\r\n });\r\n\r\n // If the Auto mode is turned off, do nothing\r\n if ( !handleRequestsAutomatically )\r\n {\r\n return next(req);\r\n }\r\n\r\n // Set the loading status to true\r\n platformLoadingService._setLoadingStatus(true, req.url);\r\n\r\n return next(req).pipe(\r\n finalize(() =>\r\n {\r\n // Set the status to false if there are any errors or the request is completed\r\n platformLoadingService._setLoadingStatus(false, req.url);\r\n }));\r\n};\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformLoadingService\r\n{\r\n private _auto$: BehaviorSubject = new BehaviorSubject(true);\r\n private _mode$: BehaviorSubject<'determinate' | 'indeterminate'> = new BehaviorSubject<'determinate' | 'indeterminate'>('indeterminate');\r\n private _progress$: BehaviorSubject = new BehaviorSubject(0);\r\n private _show$: BehaviorSubject = new BehaviorSubject(false);\r\n private _urlMap: Map = new Map();\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(private _httpClient: HttpClient)\r\n {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Accessors\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Getter for auto mode\r\n */\r\n get auto$(): Observable\r\n {\r\n return this._auto$.asObservable();\r\n }\r\n\r\n /**\r\n * Getter for mode\r\n */\r\n get mode$(): Observable<'determinate' | 'indeterminate'>\r\n {\r\n return this._mode$.asObservable();\r\n }\r\n\r\n /**\r\n * Getter for progress\r\n */\r\n get progress$(): Observable\r\n {\r\n return this._progress$.asObservable();\r\n }\r\n\r\n /**\r\n * Getter for show\r\n */\r\n get show$(): Observable\r\n {\r\n return this._show$.asObservable();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Show the loading bar\r\n */\r\n show(): void\r\n {\r\n this._show$.next(true);\r\n }\r\n\r\n /**\r\n * Hide the loading bar\r\n */\r\n hide(): void\r\n {\r\n this._show$.next(false);\r\n }\r\n\r\n /**\r\n * Set the auto mode\r\n *\r\n * @param value\r\n */\r\n setAutoMode(value: boolean): void\r\n {\r\n this._auto$.next(value);\r\n }\r\n\r\n /**\r\n * Set the mode\r\n *\r\n * @param value\r\n */\r\n setMode(value: 'determinate' | 'indeterminate'): void\r\n {\r\n this._mode$.next(value);\r\n }\r\n\r\n /**\r\n * Set the progress of the bar manually\r\n *\r\n * @param value\r\n */\r\n setProgress(value: number): void\r\n {\r\n if ( value < 0 || value > 100 )\r\n {\r\n console.error('Progress value must be between 0 and 100!');\r\n return;\r\n }\r\n\r\n this._progress$.next(value);\r\n }\r\n\r\n /**\r\n * Sets the loading status on the given url\r\n *\r\n * @param status\r\n * @param url\r\n */\r\n _setLoadingStatus(status: boolean, url: string): void\r\n {\r\n // Return if the url was not provided\r\n if ( !url )\r\n {\r\n console.error('The request URL must be provided!');\r\n return;\r\n }\r\n\r\n if ( status === true )\r\n {\r\n this._urlMap.set(url, status);\r\n this._show$.next(true);\r\n }\r\n else if ( status === false && this._urlMap.has(url) )\r\n {\r\n this._urlMap.delete(url);\r\n }\r\n\r\n // Only set the status to 'false' if all outgoing requests are completed\r\n if ( this._urlMap.size === 0 )\r\n {\r\n this._show$.next(false);\r\n }\r\n }\r\n}\r\n","export * from '@platform/services/loading/loading.service';\r\nexport * from '@platform/services/loading/loading.interceptor';\r\n","export * from '@platform/services/media-watcher/public-api';\r\n","import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout';\r\nimport { Injectable } from '@angular/core';\r\nimport { PlatformConfigService } from '@platform/services/config';\r\nimport { fromPairs } from 'lodash-es';\r\nimport { map, Observable, ReplaySubject, switchMap } from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformMediaWatcherService\r\n{\r\n private _onMediaChange: ReplaySubject<{ matchingAliases: string[]; matchingQueries: any }> = new ReplaySubject<{ matchingAliases: string[]; matchingQueries: any }>(1);\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(\r\n private _breakpointObserver: BreakpointObserver,\r\n private _platformConfigService: PlatformConfigService,\r\n )\r\n {\r\n this._platformConfigService.config$.pipe(\r\n map(config => fromPairs(Object.entries(config.screens).map(([alias, screen]) => ([alias, `(min-width: ${screen})`])))),\r\n switchMap(screens => this._breakpointObserver.observe(Object.values(screens)).pipe(\r\n map((state) =>\r\n {\r\n // Prepare the observable values and set their defaults\r\n const matchingAliases: string[] = [];\r\n const matchingQueries: any = {};\r\n\r\n // Get the matching breakpoints and use them to fill the subject\r\n const matchingBreakpoints = Object.entries(state.breakpoints).filter(([query, matches]) => matches) ?? [];\r\n for ( const [query] of matchingBreakpoints )\r\n {\r\n // Find the alias of the matching query\r\n const matchingAlias = Object.entries(screens).find(([alias, q]) => q === query)[0];\r\n\r\n // Add the matching query to the observable values\r\n if ( matchingAlias )\r\n {\r\n matchingAliases.push(matchingAlias);\r\n matchingQueries[matchingAlias] = query;\r\n }\r\n }\r\n\r\n // Execute the observable\r\n this._onMediaChange.next({\r\n matchingAliases,\r\n matchingQueries,\r\n });\r\n }),\r\n )),\r\n ).subscribe();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Accessors\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Getter for _onMediaChange\r\n */\r\n get onMediaChange$(): Observable<{ matchingAliases: string[]; matchingQueries: any }>\r\n {\r\n return this._onMediaChange.asObservable();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * On media query change\r\n *\r\n * @param query\r\n */\r\n onMediaQueryChange$(query: string | string[]): Observable\r\n {\r\n return this._breakpointObserver.observe(query);\r\n }\r\n}\r\n","export * from '@platform/services/media-watcher/media-watcher.service';\r\n","export * from '@platform/services/platform/public-api';\r\n","import { Platform } from '@angular/cdk/platform';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformPlatformService\r\n{\r\n osName = 'os-unknown';\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(private _platform: Platform)\r\n {\r\n // If the platform is not a browser, return immediately\r\n if ( !this._platform.isBrowser )\r\n {\r\n return;\r\n }\r\n\r\n // Windows\r\n if ( navigator.userAgent.includes('Win') )\r\n {\r\n this.osName = 'os-windows';\r\n }\r\n\r\n // Mac OS\r\n if ( navigator.userAgent.includes('Mac') )\r\n {\r\n this.osName = 'os-mac';\r\n }\r\n\r\n // Unix\r\n if ( navigator.userAgent.includes('X11') )\r\n {\r\n this.osName = 'os-unix';\r\n }\r\n\r\n // Linux\r\n if ( navigator.userAgent.includes('Linux') )\r\n {\r\n this.osName = 'os-linux';\r\n }\r\n\r\n // iOS\r\n if ( this._platform.IOS )\r\n {\r\n this.osName = 'os-ios';\r\n }\r\n\r\n // Android\r\n if ( this._platform.ANDROID )\r\n {\r\n this.osName = 'os-android';\r\n }\r\n }\r\n\r\n}\r\n","export * from '@platform/services/platform/platform.service';\r\n","export * from '@platform/services/splash-screen/public-api';\r\n","export * from '@platform/services/splash-screen/splash-screen.service';\r\n","import { DOCUMENT } from '@angular/common';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { filter, take } from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformSplashScreenService\r\n{\r\n /**\r\n * Constructor\r\n */\r\n constructor(\r\n @Inject(DOCUMENT) private _document: any,\r\n private _router: Router,\r\n )\r\n {\r\n // Hide it on the first NavigationEnd event\r\n this._router.events\r\n .pipe(\r\n filter(event => event instanceof NavigationEnd),\r\n take(1),\r\n )\r\n .subscribe(() =>\r\n {\r\n this.hide();\r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Show the splash screen\r\n */\r\n show(): void\r\n {\r\n this._document.body.classList.remove('platform-splash-screen-hidden');\r\n }\r\n\r\n /**\r\n * Hide the splash screen\r\n */\r\n hide(): void\r\n {\r\n this._document.body.classList.add('platform-splash-screen-hidden');\r\n }\r\n}\r\n","export * from '@platform/services/utils/public-api';\r\n","export * from '@platform/services/utils/utils.service';\r\n","import { Injectable } from '@angular/core';\r\nimport { IsActiveMatchOptions } from '@angular/router';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class PlatformUtilsService\r\n{\r\n /**\r\n * Constructor\r\n */\r\n constructor()\r\n {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Accessors\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Get the equivalent \"IsActiveMatchOptions\" options for \"exact = true\".\r\n */\r\n get exactMatchOptions(): IsActiveMatchOptions\r\n {\r\n return {\r\n paths : 'exact',\r\n fragment : 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams : 'exact',\r\n };\r\n }\r\n\r\n /**\r\n * Get the equivalent \"IsActiveMatchOptions\" options for \"exact = false\".\r\n */\r\n get subsetMatchOptions(): IsActiveMatchOptions\r\n {\r\n return {\r\n paths : 'subset',\r\n fragment : 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams : 'subset',\r\n };\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Generates a random id\r\n *\r\n * @param length\r\n */\r\n randomId(length: number = 10): string\r\n {\r\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n let name = '';\r\n\r\n for ( let i = 0; i < 10; i++ )\r\n {\r\n name += chars.charAt(Math.floor(Math.random() * chars.length));\r\n }\r\n\r\n return name;\r\n }\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {RouterOutlet} from '@angular/router';\r\nimport {environment} from \"../environments/environment\";\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n})\r\nexport class AppComponent {\r\n constructor() {\r\n console.log(`Go GreenSense MFE - version: ${environment.appVersion}`);\r\n }\r\n}\r\n","\r\n","import {HttpClientModule, provideHttpClient} from '@angular/common/http';\r\nimport {ApplicationConfig, importProvidersFrom, isDevMode} from '@angular/core';\r\nimport {LuxonDateAdapter} from '@angular/material-luxon-adapter';\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\nimport {BrowserAnimationsModule, provideAnimations} from '@angular/platform-browser/animations';\r\nimport {provideAnimationsAsync} from \"@angular/platform-browser/animations/async\";\r\nimport {PreloadAllModules, provideRouter, withInMemoryScrolling, withPreloading} from '@angular/router';\r\nimport {BrowserModule} from \"@angular/platform-browser\";\r\nimport {provideTransloco} from \"@ngneat/transloco\";\r\nimport {provideToastr} from \"ngx-toastr\";\r\nimport {providePlatform} from '@platform';\r\nimport {TranslocoHttpLoader} from \"./core/transloco/transloco.http-loader\";\r\nimport {provideAuth} from 'app/core/auth/auth.provider';\r\nimport {provideIcons} from 'app/core/icons/icons.provider';\r\nimport {appRoutes} from 'app/app.routes';\r\nimport {mockApiServices} from 'app/mock-api';\r\nimport {NgxMaterialTimepickerModule} from \"ngx-material-timepicker\";\r\nimport {environment} from \"../environments/environment\";\r\nimport { BsModalService, ModalModule } from 'ngx-bootstrap/modal';\r\n\r\nexport const appConfig: ApplicationConfig = {\r\n providers: [\r\n importProvidersFrom(\r\n BrowserModule,\r\n BrowserAnimationsModule.withConfig({disableAnimations: false}),\r\n NgxMaterialTimepickerModule\r\n ),\r\n BsModalService,\r\n ModalModule,\r\n provideAnimations(),\r\n provideAnimationsAsync(),\r\n // provideRouter(appRoutes, withPreloading(PreloadAllModules), withInMemoryScrolling({scrollPositionRestoration: 'enabled'})),\r\n // Material Date Adapter\r\n {\r\n provide: DateAdapter,\r\n useClass: LuxonDateAdapter,\r\n },\r\n {\r\n provide: MAT_DATE_FORMATS,\r\n useValue: {\r\n parse: {\r\n dateInput: 'D',\r\n },\r\n display: {\r\n dateInput: 'DDD',\r\n monthYearLabel: 'LLL yyyy',\r\n dateA11yLabel: 'DD',\r\n monthYearA11yLabel: 'LLLL yyyy',\r\n },\r\n },\r\n },\r\n // Transloco Config\r\n provideTransloco({\r\n config: {\r\n availableLangs: ['en', 'es'],\r\n defaultLang: 'en',\r\n reRenderOnLangChange: true,\r\n prodMode: !isDevMode(),\r\n },\r\n loader: TranslocoHttpLoader\r\n }),\r\n // Platform\r\n provideAuth(),\r\n provideIcons(),\r\n providePlatform({\r\n mockApi: {\r\n delay: 0,\r\n services: mockApiServices,\r\n },\r\n platform: {\r\n layout: 'empty',\r\n scheme: 'light',\r\n screens: {\r\n sm: '600px',\r\n md: '960px',\r\n lg: '1280px',\r\n xl: '1440px',\r\n },\r\n theme: 'theme-default',\r\n themes: [\r\n {\r\n id: 'theme-default',\r\n name: 'Default',\r\n },\r\n {\r\n id: 'theme-brand',\r\n name: 'Brand',\r\n },\r\n {\r\n id: 'theme-teal',\r\n name: 'Teal',\r\n },\r\n {\r\n id: 'theme-rose',\r\n name: 'Rose',\r\n },\r\n {\r\n id: 'theme-purple',\r\n name: 'Purple',\r\n },\r\n {\r\n id: 'theme-amber',\r\n name: 'Amber',\r\n },\r\n ],\r\n },\r\n }),\r\n provideToastr(),\r\n provideAnimations()\r\n ]\r\n};\r\n","import {HttpErrorResponse, HttpEvent, HttpHandlerFn, HttpRequest} from '@angular/common/http';\r\nimport {inject} from '@angular/core';\r\nimport {AuthService} from 'app/core/auth/auth.service';\r\nimport {AuthUtils} from 'app/core/auth/auth.utils';\r\nimport {BehaviorSubject, catchError, filter, Observable, switchMap, take, throwError} from 'rxjs';\r\nimport {ToastrService} from \"ngx-toastr\";\r\n\r\n\r\nexport const authInterceptor = (req: HttpRequest, next: HttpHandlerFn): Observable> => {\r\n const _authService = inject(AuthService);\r\n const _toastService = inject(ToastrService);\r\n\r\n // Add a BehaviorSubject to handle token refresh\r\n const isRefreshing = new BehaviorSubject(false);\r\n\r\n // Check for the custom header\r\n const useCapitalBearer = req.headers.get('Use-Capital-Bearer') === 'true';\r\n req = req.clone({ headers: req.headers.delete('Use-Capital-Bearer') }); // Remove the custom header\r\n let authHeader = useCapitalBearer ? 'Bearer ' : 'bearer '; // Adjust based on the custom header\r\n let newReq = req.clone();\r\n if (_authService.authData.AccessToken && !AuthUtils.isTokenExpired(_authService.authData.AccessToken)) {\r\n newReq = req.clone({\r\n headers: req.headers.set('Authorization', authHeader + _authService.authData.AccessToken),\r\n });\r\n }\r\n\r\n // Response\r\n return next(newReq).pipe(\r\n catchError((error) => {\r\n\r\n // If the error contains 'api.net/recycle/v1/returner/' just ignore it\r\n if (error.url && error.url.includes('api.net/recycle/v1/returner/')) {\r\n return throwError(() => error);\r\n }\r\n\r\n if (error instanceof HttpErrorResponse && error.status === 401) {\r\n // Check if we are already refreshing the token\r\n if (!isRefreshing.value) {\r\n isRefreshing.next(true);\r\n return _authService.refreshToken().pipe(\r\n switchMap(() => {\r\n isRefreshing.next(false);\r\n // Use the new access token for the retry request\r\n const retryReq = req.clone({\r\n headers: req.headers.set('Authorization', 'Bearer ' + _authService.authData.AccessToken)\r\n });\r\n return next(retryReq);\r\n }),\r\n catchError((refreshError) => {\r\n\r\n let message = 'Session expired. Please log in again.';\r\n _toastService.error(message);\r\n return throwError(() => refreshError);\r\n })\r\n );\r\n } else {\r\n // Wait for the token refresh to complete, then retry the request\r\n return isRefreshing.pipe(filter(refreshing => !refreshing), take(1), switchMap(() => {\r\n // Use the new access token for the retry request\r\n const retryReq = req.clone({\r\n headers: req.headers.set('Authorization', 'Bearer ' + _authService.authData.AccessToken)\r\n });\r\n return next(retryReq);\r\n })\r\n );\r\n }\r\n } else {\r\n let message = extractErrorMessage(error) ?? 'An unknown error occurred';\r\n if (message !== undefined && error.status !== 401) {\r\n _toastService.error(message);\r\n }\r\n return throwError(() => error);\r\n }\r\n }),\r\n );\r\n\r\n\r\n function extractErrorMessage(error: any): string {\r\n // First, check if the 'error' field exists and contains any useful message\r\n if (error?.error && (typeof error?.error === 'string' || error?.error?.detail || error?.error?.ErrorMessage)) {\r\n return typeof error?.error === 'string' ? error?.error : (error?.error?.detail || error?.error?.ErrorMessage);\r\n }\r\n // If not, check the 'message' field\r\n if (error?.message && typeof error?.message === 'string') {\r\n return error?.message;\r\n }\r\n // Fallback to a generic message if none of the above is available\r\n return 'An unknown error occurred';\r\n }\r\n};\r\n","import {provideHttpClient, withInterceptors} from '@angular/common/http';\r\nimport {ENVIRONMENT_INITIALIZER, EnvironmentProviders, inject, Provider} from '@angular/core';\r\nimport {authInterceptor} from 'app/core/auth/auth.interceptor';\r\nimport {AuthService} from 'app/core/auth/auth.service';\r\n\r\nexport const provideAuth = (): Array => {\r\n return [\r\n provideHttpClient(withInterceptors([authInterceptor])),\r\n {\r\n provide: ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(AuthService),\r\n multi: true,\r\n },\r\n ];\r\n};\r\n","import {HttpClient, HttpHeaders} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {AuthUtils} from 'app/core/auth/auth.utils';\r\nimport {UserService} from 'app/core/user/user.service';\r\nimport {catchError, finalize, Observable, of, switchMap, throwError} from 'rxjs';\r\nimport {Router} from \"@angular/router\";\r\nimport {environment} from \"../../../environments/environment\";\r\nimport {UserSession} from \"./auth.types\";\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class AuthService {\r\n private _authenticated: boolean = false;\r\n\r\n constructor(private _httpClient: HttpClient,\r\n private _router: Router,\r\n private _userService: UserService) {\r\n }\r\n\r\n get authData(): UserSession {\r\n return JSON.parse(localStorage.getItem('emr-oversight-authData') || '{}');\r\n }\r\n\r\n set authData(token: UserSession) {\r\n localStorage.setItem('emr-oversight-authData', JSON.stringify(token));\r\n }\r\n\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Sign in after getting a token */\r\n // -----------------------------------------------------------------------------------------------------\r\n signIn(credentials: { username: string; password: string }): Observable {\r\n // Throw error, if the user is already logged in\r\n if (this._authenticated) {\r\n return throwError(() => new Error('User is already logged in.'));\r\n }\r\n\r\n // Prepare the headers\r\n const headers = new HttpHeaders({\r\n 'X-Lt-Apikey': environment.oversight_api_key\r\n });\r\n\r\n // Make the HTTP POST request with headers\r\n return this._httpClient.post(`${environment.oversight_endpoint}/api/oversight/login`, credentials, {headers: headers}).pipe(\r\n switchMap((response: UserSession) => {\r\n\r\n // If the error code is not 0, throw the error\r\n if (response.ErrorCode !== 0) {\r\n return throwError(() => new Error(response.ErrorDescription || 'An error occurred during sign in.'));\r\n }\r\n\r\n // Store the access token in the local storage\r\n this.authData = response;\r\n\r\n // Set the authenticated flag to true\r\n this._authenticated = true;\r\n\r\n // Store the user on the user service\r\n this._userService.user = {\r\n email: AuthUtils.getUniqueNameFromToken(response?.AccessToken)\r\n };\r\n\r\n // Return a new observable with the response\r\n return of(response);\r\n }),\r\n );\r\n }\r\n\r\n // Add a flag to indicate if a token refresh operation is in progress\r\n private _isRefreshingToken = false;\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Sign in using the access token */\r\n // -----------------------------------------------------------------------------------------------------\r\n refreshToken(): Observable {\r\n if (this._isRefreshingToken) {\r\n return throwError(() => new Error('Token refresh in progress'));\r\n }\r\n\r\n this._isRefreshingToken = true;\r\n\r\n return this._httpClient.get(`${environment.oversight_endpoint}/api/oversight/refreshToken`, {\r\n headers: new HttpHeaders({\r\n 'Authorization': 'Bearer ' + this.authData.AccessToken,\r\n 'X-Lt-Apikey': environment.oversight_api_key,\r\n 'X-Lt-Art': environment.oversight_x_lt_art\r\n }),\r\n }).pipe(switchMap((response: UserSession) => {\r\n if (response && response['AccessToken']) {\r\n this.authData = response;\r\n this._authenticated = true;\r\n this._userService.user = {\r\n email: AuthUtils.getUniqueNameFromToken(response?.AccessToken)\r\n };\r\n return of(true);\r\n } else {\r\n return throwError(() => new Error('Invalid refresh token response'));\r\n }\r\n }),\r\n catchError((error) => {\r\n this.signOut();\r\n return throwError(() => error);\r\n }),\r\n finalize(() => {\r\n this._isRefreshingToken = false;\r\n })\r\n );\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Sign out */\r\n // -----------------------------------------------------------------------------------------------------\r\n signOut(): Observable {\r\n // Remove the access token from the local storage\r\n localStorage.removeItem('accessToken');\r\n localStorage.removeItem('emr-oversight-authData');\r\n localStorage.removeItem('emr-oversight-customer');\r\n\r\n // Set the authenticated flag to false\r\n this._authenticated = false;\r\n\r\n // Route to sign-out\r\n this._router.navigate(['/sign-in']).then();\r\n\r\n // Return the observable\r\n return of(true);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Check the authentication status */\r\n // -----------------------------------------------------------------------------------------------------\r\n check(): Observable {\r\n // Check the access token availability\r\n if (!this.authData.AccessToken) {\r\n return of(false);\r\n }\r\n\r\n this._userService.user = {\r\n email: AuthUtils.getUniqueNameFromToken(this.authData.AccessToken)\r\n };\r\n\r\n // If the access token exists but is expired, try to refresh it\r\n if (AuthUtils.isTokenExpired(this.authData.AccessToken)) {\r\n return this.refreshToken().pipe(\r\n switchMap(success => {\r\n if (success) {\r\n return of(true);\r\n } else {\r\n // If the token refresh fails, sign out\r\n this.signOut();\r\n return of(false);\r\n }\r\n }),\r\n catchError(() => {\r\n this.signOut();\r\n return of(false);\r\n })\r\n );\r\n }\r\n\r\n // If the access token exists and it didn't expire, consider the user as authenticated\r\n this._authenticated = true;\r\n return of(true);\r\n }\r\n}\r\n","// -----------------------------------------------------------------------------------------------------\r\n// Methods are derivations of the Auth0 Angular-JWT helper service methods\r\n// https://github.com/auth0/angular2-jwt\r\n// -----------------------------------------------------------------------------------------------------\r\n\r\nexport class AuthUtils\r\n{\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Is token expired? */\r\n // -----------------------------------------------------------------------------------------------------\r\n static isTokenExpired(token: string, offsetSeconds?: number): boolean\r\n {\r\n // Return if there is no token\r\n if ( !token || token === '' )\r\n {\r\n return true;\r\n }\r\n\r\n // Get the expiration date\r\n const date = this._getTokenExpirationDate(token);\r\n\r\n offsetSeconds = offsetSeconds || 0;\r\n\r\n if ( date === null )\r\n {\r\n return true;\r\n }\r\n\r\n // Check if the token is expired\r\n return !(date.valueOf() > new Date().valueOf() + offsetSeconds * 1000);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Base64 decoder */\r\n // -----------------------------------------------------------------------------------------------------\r\n private static _b64decode(str: string): string\r\n {\r\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\r\n let output = '';\r\n\r\n str = String(str).replace(/=+$/, '');\r\n\r\n if ( str.length % 4 === 1 )\r\n {\r\n throw new Error(\r\n '\\'atob\\' failed: The string to be decoded is not correctly encoded.',\r\n );\r\n }\r\n\r\n /* eslint-disable */\r\n for (\r\n // initialize result and counters\r\n let bc = 0, bs: any, buffer: any, idx = 0;\r\n // get next character\r\n (buffer = str.charAt(idx++));\r\n // character found in table? initialize bit storage and add its ascii value;\r\n ~buffer &&\r\n (\r\n (bs = bc % 4 ? bs * 64 + buffer : buffer),\r\n // and if not first of each 4 characters,\r\n // convert the first 8 bits to one ascii character\r\n bc++ % 4\r\n )\r\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\r\n : 0\r\n )\r\n {\r\n // try to find character in table (0-63, not found => -1)\r\n buffer = chars.indexOf(buffer);\r\n }\r\n /* eslint-enable */\r\n\r\n return output;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Base64 unicode decoder */\r\n // -----------------------------------------------------------------------------------------------------\r\n private static _b64DecodeUnicode(str: any): string\r\n {\r\n return decodeURIComponent(\r\n Array.prototype.map\r\n .call(this._b64decode(str), (c: any) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\r\n .join(''),\r\n );\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** URL Base 64 decoder */\r\n // -----------------------------------------------------------------------------------------------------\r\n private static _urlBase64Decode(str: string): string\r\n {\r\n let output = str.replace(/-/g, '+').replace(/_/g, '/');\r\n switch ( output.length % 4 )\r\n {\r\n case 0:\r\n {\r\n break;\r\n }\r\n case 2:\r\n {\r\n output += '==';\r\n break;\r\n }\r\n case 3:\r\n {\r\n output += '=';\r\n break;\r\n }\r\n default:\r\n {\r\n throw Error('Illegal base64url string!');\r\n }\r\n }\r\n return this._b64DecodeUnicode(output);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Decode token */\r\n // -----------------------------------------------------------------------------------------------------\r\n private static _decodeToken(token: string): any\r\n {\r\n // Return if there is no token\r\n if ( !token )\r\n {\r\n return null;\r\n }\r\n\r\n // Split the token\r\n const parts = token.split('.');\r\n\r\n if ( parts.length !== 3 )\r\n {\r\n throw new Error('The inspected token doesn\\'t appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.');\r\n }\r\n\r\n // Decode the token using the Base64 decoder\r\n const decoded = this._urlBase64Decode(parts[1]);\r\n\r\n if ( !decoded )\r\n {\r\n throw new Error('Cannot decode the token.');\r\n }\r\n\r\n return JSON.parse(decoded);\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Get token expiration date */\r\n // -----------------------------------------------------------------------------------------------------\r\n private static _getTokenExpirationDate(token: string): Date | null\r\n {\r\n // Get the decoded token\r\n const decodedToken = this._decodeToken(token);\r\n\r\n // Return if the decodedToken doesn't have an 'exp' field\r\n if ( !decodedToken.hasOwnProperty('exp') )\r\n {\r\n return null;\r\n }\r\n\r\n // Convert the expiration date\r\n const date = new Date(0);\r\n date.setUTCSeconds(decodedToken.exp);\r\n\r\n return date;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Get unique name from token */\r\n // -----------------------------------------------------------------------------------------------------\r\n static getUniqueNameFromToken(token: string): string | null {\r\n // Decode the token\r\n const decodedToken = this._decodeToken(token);\r\n\r\n // Check if the decoded token has the 'unique_name' property\r\n if (decodedToken && decodedToken.hasOwnProperty('unique_name')) {\r\n return decodedToken.unique_name;\r\n }\r\n\r\n // Return null if 'unique_name' is not found\r\n return null;\r\n }\r\n}\r\n","import { ENVIRONMENT_INITIALIZER, EnvironmentProviders, inject, Provider } from '@angular/core';\r\nimport { IconsService } from 'app/core/icons/icons.service';\r\n\r\nexport const provideIcons = (): Array =>\r\n{\r\n return [\r\n {\r\n provide : ENVIRONMENT_INITIALIZER,\r\n useValue: () => inject(IconsService),\r\n multi : true,\r\n },\r\n ];\r\n};\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { MatIconRegistry } from '@angular/material/icon';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { environment } from \"../../../environments/environment\";\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class IconsService {\r\n private iconSets = [\r\n { namespace: 'custom', url: 'custom.svg' },\r\n { namespace: '', url: 'material-twotone.svg' }, // Default namespace\r\n { namespace: 'mat_outline', url: 'material-outline.svg' },\r\n { namespace: 'mat_solid', url: 'material-solid.svg' },\r\n { namespace: 'feather', url: 'feather.svg' },\r\n { namespace: 'heroicons_outline', url: 'heroicons-outline.svg' },\r\n { namespace: 'heroicons_solid', url: 'heroicons-solid.svg' },\r\n { namespace: 'heroicons_mini', url: 'heroicons-mini.svg' }\r\n ];\r\n\r\n constructor(private matIconRegistry: MatIconRegistry,\r\n private domSanitizer: DomSanitizer) {\r\n const baseUrl = environment.dashboard_app_url.replace(/\\/+$/, \"\"); // Remove trailing slashes if any\r\n this.registerIconSets(baseUrl);\r\n }\r\n\r\n private registerIconSets(baseUrl: string): void {\r\n this.iconSets.forEach(icon => {\r\n const iconUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(`${baseUrl}/assets/icons/${icon.url}`);\r\n if (icon.namespace) {\r\n this.matIconRegistry.addSvgIconSetInNamespace(icon.namespace, iconUrl);\r\n } else {\r\n this.matIconRegistry.addSvgIconSet(iconUrl);\r\n }\r\n });\r\n }\r\n}\r\n","export class MetricsHistoryContainer {\r\n metrics: MetricsHistory[];\r\n constructor(metrics: MetricsHistory[]) {\r\n this.metrics = metrics;\r\n }\r\n}\r\n\r\nexport class MetricsHistory {\r\n recycledCount: number;\r\n availableCount: number;\r\n damagedCount: number;\r\n ineligibleCount: number;\r\n recycleRate: number;\r\n timestampUTC: string;\r\n\r\n constructor(recycledCount: number, availableCount: number, damagedCount: number, ineligibleCount: number, recycleRate: number, timestampUTC: string) {\r\n this.recycledCount = recycledCount;\r\n this.availableCount = availableCount;\r\n this.damagedCount = damagedCount;\r\n this.ineligibleCount = ineligibleCount;\r\n this.recycleRate = recycleRate;\r\n this.timestampUTC = timestampUTC;\r\n }\r\n}\r\n","import {Metrics} from \"./metrics.model\";\r\n\r\nexport class RecyclerMetrics {\r\n customerId: number;\r\n name: string;\r\n isRecycleEnabled: boolean;\r\n metrics: Metrics;\r\n\r\n constructor(customerId: number, name: string, isRecycleEnabled: boolean, metrics: Metrics) {\r\n this.customerId = customerId;\r\n this.name = name;\r\n this.isRecycleEnabled = isRecycleEnabled;\r\n this.metrics = metrics;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DateTimeService {\r\n /**\r\n * Gets a date range relative to today.\r\n * @param daysBeforeStart Number of days before today to set as the start date.\r\n * @param daysAfterEnd Optional. Number of days from today to set as the end date. Defaults to 0 (today).\r\n * @returns An object containing the start and end dates as strings in 'YYYY-MM-DD' format.\r\n */\r\n public getDateRange(daysBeforeStart: number, daysAfterEnd: number = 0): { startDay: string; endDay: string } {\r\n const today = new Date();\r\n const startDate = new Date(today);\r\n startDate.setDate(today.getDate() - daysBeforeStart);\r\n\r\n const endDate = new Date(today);\r\n endDate.setDate(today.getDate() + daysAfterEnd);\r\n\r\n return {\r\n startDay: this.formatDate(startDate),\r\n endDay: this.formatDate(endDate)\r\n };\r\n }\r\n\r\n // ------------------------------------------------------------------------------------------\r\n /** Converts a 12-hour time to 24-hour time\r\n * @param time12h The 12-hour time to convert.\r\n * @returns The 24-hour time.\r\n * */\r\n // ------------------------------------------------------------------------------------------\r\n public convertTime12to24 = (time12h: string) => {\r\n const [time, modifier] = time12h.split(' ');\r\n let [hours, minutes] = time.split(':');\r\n if (hours === '12') {\r\n hours = '00';\r\n }\r\n if (modifier === 'PM') {\r\n hours = String(parseInt(hours, 10) + 12);\r\n }\r\n return `${hours}:${minutes}`;\r\n };\r\n\r\n // ------------------------------------------------------------------------------------------\r\n /** Formats a date to 'YYYY-MM-DD' for compatibility with input[type=date]\r\n * @param date\r\n * @private\r\n */\r\n // ------------------------------------------------------------------------------------------\r\n private formatDate(date: Date): string {\r\n const year = date.getFullYear();\r\n const month = ('0' + (date.getMonth() + 1)).slice(-2); // JS months are 0-based\r\n const day = ('0' + date.getDate()).slice(-2);\r\n return `${year}-${month}-${day}`;\r\n }\r\n\r\n //-------------------------------------------------\r\n /** Builds the time array for the time picker */\r\n //-------------------------------------------------\r\n public buildTime(increments: number = 5): string[] {\r\n const start = 0; // Start time in minutes from midnight\r\n const end = 24 * 60; // End time in minutes from midnight\r\n let times = []; // Array to store time values\r\n for (let i = start; i < end; i += increments) {\r\n const hh = Math.floor(i / 60);\r\n const mm = i % 60;\r\n const hour = hh === 0 || hh === 12 ? 12 : hh % 12; // We handle the case for 12 AM and PM\r\n const period = hh < 12 ? 'AM' : 'PM';\r\n times.push(`${hour}:${mm < 10 ? '0' : ''}${mm} ${period}`);\r\n }\r\n return times;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Converts a 24 hour time string to 12 hour format */\r\n // -----------------------------------------------------------------------------------------------------\r\n public convertTo12HourFormat(time: string): string {\r\n let [hours, minutes] = time.split(':').map(val => parseInt(val, 10));\r\n const AMorPM = hours < 12 ? 'AM' : 'PM';\r\n const hours12 = hours === 0 ? 12 : (hours > 12 ? hours - 12 : hours);\r\n return `${hours12}:${minutes.toString().padStart(2, '0')} ${AMorPM}`;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Converts a 12 hour time string to 24 hour format */\r\n // -----------------------------------------------------------------------------------------------------\r\n public convertTo24HourFormat(time: string): string {\r\n let [hours, minutes] = time.split(/[:\\s]/).map(val => parseInt(val, 10));\r\n const period = time.match(/AM|PM/i)[0];\r\n if (period.toUpperCase() === \"PM\" && hours !== 12) {\r\n hours += 12;\r\n } else if (period.toUpperCase() === \"AM\" && hours === 12) {\r\n hours = 0;\r\n }\r\n return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;\r\n }\r\n}\r\n","import {Injectable} from \"@angular/core\";\r\nimport {Observable, ReplaySubject, tap, catchError, of} from \"rxjs\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {environment} from \"environments/environment\";\r\nimport {RecyclerLocation} from \"../models/recycler-location.model\";\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class OversightService {\r\n\r\n constructor(private _httpClient: HttpClient) {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets and sets the recycling location's food service model flag\r\n // -----------------------------------------------------------------------------------------------------\r\n private _isFoodServiceModel: ReplaySubject = new ReplaySubject(1);\r\n get isFoodServiceModel$(): Observable {\r\n return this._isFoodServiceModel.asObservable();\r\n }\r\n\r\n set isFoodServiceModel(value:any) {\r\n this._isFoodServiceModel.next(value);\r\n }\r\n\r\n getFoodServiceModelFlag(oversightCustomerId: number): Observable {\r\n return this._httpClient.get(`${environment.recycling_api_endpoint}/recycle/v1/customer/${oversightCustomerId}/food-service-model`).pipe(\r\n tap((isFoodServiceModel: any) => {\r\n this._isFoodServiceModel.next(isFoodServiceModel);\r\n }),\r\n catchError(() => {\r\n this._isFoodServiceModel.next(false);\r\n return of(false);\r\n })\r\n );\r\n }\r\n}","import {Injectable} from \"@angular/core\";\r\nimport {Observable, ReplaySubject, tap, catchError, of, Subject, takeUntil} from \"rxjs\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {environment} from \"environments/environment\";\r\nimport {RecyclerLocation} from \"../models/recycler-location.model\";\r\nimport { MetricRequestDefaults } from \"../models/metric-request.model\";\r\nimport { OversightService } from \"./oversight.service\";\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class RecyclerLocationService {\r\n private metricRequestDefaults: MetricRequestDefaults;\r\n\r\n constructor(private _httpClient: HttpClient) {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets and sets the recycling locations\r\n // -----------------------------------------------------------------------------------------------------\r\n private _recycleLocations: ReplaySubject = new ReplaySubject(1);\r\n get recyclerLocations$(): Observable {\r\n return this._recycleLocations.asObservable();\r\n }\r\n\r\n set recyclerLocations(value: RecyclerLocation[]) {\r\n this._recycleLocations.next(value);\r\n }\r\n\r\n getRecyclerLocations(recyclerId: number): Observable {\r\n return this._httpClient.get(`${environment.recycling_api_endpoint}/recycle/v1/returner/${recyclerId}/location`).pipe(\r\n tap((response: any) => {\r\n this._recycleLocations.next(response);\r\n }),\r\n catchError(() => {\r\n this._recycleLocations.next([]);\r\n return of([]);\r\n })\r\n );\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets the recycling locations metrics\r\n // -----------------------------------------------------------------------------------------------------\r\n private _recyclerLocationMetrics: ReplaySubject = new ReplaySubject(1);\r\n get recyclerLocationMetrics$(): Observable {\r\n return this._recyclerLocationMetrics.asObservable();\r\n }\r\n\r\n set recyclerLocationMetrics(value: RecyclerLocation[]) {\r\n this._recyclerLocationMetrics.next(value);\r\n }\r\n\r\n getRecyclerLocationMetrics(isFoodServiceModel: boolean, recyclerId: number, startDate?: string, endDate?: string): Observable {\r\n const defaults = this.handleDefaults(recyclerId, startDate, endDate);\r\n const url = `${environment.recycling_api_endpoint}/recycle/v1/returner/${defaults.oversightCustomerId}/location/metrics?startDate=${defaults.startDate}&endDate=${defaults.endDate}&isFoodServiceModel=${isFoodServiceModel}`;\r\n return this._httpClient.get(url).pipe(\r\n tap((response: any) => {\r\n this._recycleLocations.next(response['locations']);\r\n }),\r\n catchError(() => {\r\n this._recyclerLocationMetrics.next([]);\r\n return of([]);\r\n })\r\n );\r\n }\r\n\r\n // Private method to handle the default values\r\n private handleDefaults(oversightCustomerId: number, startDate?: string, endDate?: string): MetricRequestDefaults {\r\n const today = new Date();\r\n return {\r\n oversightCustomerId: oversightCustomerId,\r\n startDate: startDate ?? new Date(today.getFullYear(), 0, 1).toISOString(),\r\n endDate: endDate ?? new Date(today.getFullYear(), today.getMonth(), today.getDate() + 2).toISOString(),\r\n isFoodServiceModel: false\r\n };\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Translation, TranslocoLoader} from '@ngneat/transloco';\r\nimport {Observable} from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class TranslocoHttpLoader implements TranslocoLoader {\r\n constructor(private _httpClient: HttpClient) {\r\n }\r\n\r\n getTranslation(lang: string): Observable {\r\n return this._httpClient.get(`./assets/i18n/${lang}.json`);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { User } from 'app/core/user/user.types';\r\nimport { map, Observable, ReplaySubject, tap } from 'rxjs';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class UserService\r\n{\r\n private _user: ReplaySubject = new ReplaySubject(1);\r\n\r\n constructor(private _httpClient: HttpClient)\r\n {\r\n }\r\n\r\n set user(value: User)\r\n {\r\n this._user.next(value);\r\n }\r\n\r\n get user$(): Observable\r\n {\r\n return this._user.asObservable();\r\n }\r\n\r\n\r\n get(): Observable\r\n {\r\n return this._httpClient.get('api/common/user').pipe(\r\n tap((user) =>\r\n {\r\n this._user.next(user);\r\n }),\r\n );\r\n }\r\n\r\n update(user: User): Observable\r\n {\r\n return this._httpClient.patch('api/common/user', {user}).pipe(\r\n map((response) =>\r\n {\r\n this._user.next(response);\r\n }),\r\n );\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {PlatformMockApiService} from '@platform/lib/mock-api';\r\nimport {user as userData} from 'app/mock-api/common/user/data';\r\nimport Base64 from 'crypto-js/enc-base64';\r\nimport Utf8 from 'crypto-js/enc-utf8';\r\nimport HmacSHA256 from 'crypto-js/hmac-sha256';\r\nimport {cloneDeep} from 'lodash-es';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class AuthMockApi {\r\n private readonly _secret: any;\r\n private _user: any = userData;\r\n\r\n constructor(private _platformMockApiService: PlatformMockApiService) {\r\n this._secret = 'YOUR_VERY_CONFIDENTIAL_SECRET_FOR_SIGNING_JWT_TOKENS!!!';\r\n this.registerHandlers();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Register Mock API handlers */\r\n // -----------------------------------------------------------------------------------------------------\r\n registerHandlers(): void {\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Sign in - POST\r\n // -----------------------------------------------------------------------------------------------------\r\n this._platformMockApiService\r\n .onPost('api/auth/sign-in', 1500)\r\n .reply(({request}) => {\r\n // Sign in successful\r\n if (request.body.email === 'cargo@copeland.com' && request.body.password === 'admin') {\r\n return [\r\n 200,\r\n {\r\n user: cloneDeep(this._user),\r\n accessToken: this._generateJWTToken(),\r\n tokenType: 'bearer',\r\n },\r\n ];\r\n }\r\n\r\n // Invalid credentials\r\n return [\r\n 404,\r\n false,\r\n ];\r\n });\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Sign in using the access token - POST\r\n // -----------------------------------------------------------------------------------------------------\r\n this._platformMockApiService\r\n .onPost('api/auth/sign-in-with-token')\r\n .reply(({request}) => {\r\n // Get the access token\r\n const accessToken = request.body.accessToken;\r\n\r\n // Verify the token\r\n if (this._verifyJWTToken(accessToken)) {\r\n return [\r\n 200,\r\n {\r\n user: cloneDeep(this._user),\r\n accessToken: this._generateJWTToken(),\r\n tokenType: 'bearer',\r\n },\r\n ];\r\n }\r\n\r\n // Invalid token\r\n return [\r\n 401,\r\n {\r\n error: 'Invalid token',\r\n },\r\n ];\r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Return base64 encoded version of the given string */\r\n // -----------------------------------------------------------------------------------------------------\r\n private _base64url(source: any): string {\r\n // Encode in classical base64\r\n let encodedSource = Base64.stringify(source);\r\n // Remove padding equal characters\r\n encodedSource = encodedSource.replace(/=+$/, '');\r\n // Replace characters according to base64url specifications\r\n encodedSource = encodedSource.replace(/\\+/g, '-');\r\n encodedSource = encodedSource.replace(/\\//g, '_');\r\n // Return the base64 encoded string\r\n return encodedSource;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Generates a JWT token using CryptoJS library.\r\n * This generator is for mocking purposes only */\r\n // -----------------------------------------------------------------------------------------------------\r\n private _generateJWTToken(): string {\r\n // Define token header\r\n const header = {\r\n alg: 'HS256',\r\n typ: 'JWT',\r\n };\r\n\r\n // Calculate the issued at and expiration dates\r\n const date = new Date();\r\n const iat = Math.floor(date.getTime() / 1000);\r\n const exp = Math.floor((date.setDate(date.getDate() + 7)) / 1000);\r\n\r\n // Define token payload\r\n const payload = {\r\n iat: iat,\r\n iss: 'Platform',\r\n exp: exp,\r\n };\r\n\r\n // Stringify and encode the header\r\n const stringifiedHeader = Utf8.parse(JSON.stringify(header));\r\n const encodedHeader = this._base64url(stringifiedHeader);\r\n\r\n // Stringify and encode the payload\r\n const stringifiedPayload = Utf8.parse(JSON.stringify(payload));\r\n const encodedPayload = this._base64url(stringifiedPayload);\r\n\r\n // Sign the encoded header and mock-api\r\n let signature: any = encodedHeader + '.' + encodedPayload;\r\n signature = HmacSHA256(signature, this._secret);\r\n signature = this._base64url(signature);\r\n\r\n // Build and return the token\r\n return encodedHeader + '.' + encodedPayload + '.' + signature;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Verify the given token */\r\n // -----------------------------------------------------------------------------------------------------\r\n private _verifyJWTToken(token: string): boolean {\r\n // Split the token into parts\r\n const parts = token.split('.');\r\n const header = parts[0];\r\n const payload = parts[1];\r\n const signature = parts[2];\r\n // Re-sign and encode the header and payload using the secret\r\n const signatureCheck = this._base64url(HmacSHA256(header + '.' + payload, this._secret));\r\n // Verify that the resulting signature is valid\r\n return (signature === signatureCheck);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { PlatformNavigationItem } from '@platform/components/navigation';\r\nimport { PlatformMockApiService } from '@platform/lib/mock-api';\r\nimport { compactNavigation, defaultNavigation, futuristicNavigation, horizontalNavigation } from 'app/mock-api/common/navigation/data';\r\nimport { cloneDeep } from 'lodash-es';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class NavigationMockApi\r\n{\r\n private readonly _compactNavigation: PlatformNavigationItem[] = compactNavigation;\r\n private readonly _defaultNavigation: PlatformNavigationItem[] = defaultNavigation;\r\n private readonly _futuristicNavigation: PlatformNavigationItem[] = futuristicNavigation;\r\n private readonly _horizontalNavigation: PlatformNavigationItem[] = horizontalNavigation;\r\n\r\n /**\r\n * Constructor\r\n */\r\n constructor(private _platformMockApiService: PlatformMockApiService)\r\n {\r\n // Register Mock API handlers\r\n this.registerHandlers();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Register Mock API handlers\r\n */\r\n registerHandlers(): void\r\n {\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Navigation - GET\r\n // -----------------------------------------------------------------------------------------------------\r\n this._platformMockApiService\r\n .onGet('api/common/navigation')\r\n .reply(() =>\r\n {\r\n // Fill compact navigation children using the default navigation\r\n this._compactNavigation.forEach((compactNavItem) =>\r\n {\r\n this._defaultNavigation.forEach((defaultNavItem) =>\r\n {\r\n if ( defaultNavItem.id === compactNavItem.id )\r\n {\r\n compactNavItem.children = cloneDeep(defaultNavItem.children);\r\n }\r\n });\r\n });\r\n\r\n // Fill futuristic navigation children using the default navigation\r\n this._futuristicNavigation.forEach((futuristicNavItem) =>\r\n {\r\n this._defaultNavigation.forEach((defaultNavItem) =>\r\n {\r\n if ( defaultNavItem.id === futuristicNavItem.id )\r\n {\r\n futuristicNavItem.children = cloneDeep(defaultNavItem.children);\r\n }\r\n });\r\n });\r\n\r\n // Fill horizontal navigation children using the default navigation\r\n this._horizontalNavigation.forEach((horizontalNavItem) =>\r\n {\r\n this._defaultNavigation.forEach((defaultNavItem) =>\r\n {\r\n if ( defaultNavItem.id === horizontalNavItem.id )\r\n {\r\n horizontalNavItem.children = cloneDeep(defaultNavItem.children);\r\n }\r\n });\r\n });\r\n\r\n // Return the response\r\n return [\r\n 200,\r\n {\r\n compact : cloneDeep(this._compactNavigation),\r\n default : cloneDeep(this._defaultNavigation),\r\n futuristic: cloneDeep(this._futuristicNavigation),\r\n horizontal: cloneDeep(this._horizontalNavigation),\r\n },\r\n ];\r\n });\r\n }\r\n}\r\n","/* eslint-disable */\r\nimport {PlatformNavigationItem} from '@platform/components/navigation';\r\n\r\nconst nav: PlatformNavigationItem[] = [\r\n {\r\n id: 'customer-dashboard',\r\n title: 'Dashboard',\r\n type: 'basic',\r\n icon: 'heroicons_outline:chart-pie',\r\n link: '/customer/recycling/dashboard'\r\n }\r\n];\r\n\r\nexport const defaultNavigation = nav;\r\nexport const compactNavigation = nav;\r\nexport const futuristicNavigation = nav;\r\nexport const horizontalNavigation = nav;\r\n","/* eslint-disable */\r\nexport const user = {\r\n id: 'cfaad35d-07a3-4447-a6c3-d8c3d54fd5df',\r\n name: 'Copeland Cargo',\r\n email: 'cargo@copeland.com',\r\n avatar: 'assets/images/avatars/copeland-cargo.jpg',\r\n status: 'online',\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { PlatformMockApiService } from '@platform/lib/mock-api';\r\nimport { recyclingData } from 'app/mock-api/dashboards/recycling/data';\r\nimport { cloneDeep } from 'lodash-es';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class RecyclingMockApi\r\n{\r\n private _recyclingData: any = recyclingData;\r\n\r\n constructor(private _platformMockApiService: PlatformMockApiService)\r\n {\r\n // Register Mock API handlers\r\n this.registerHandlers();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // Register Mock API handlers\r\n // -----------------------------------------------------------------------------------------------------\r\n registerHandlers(): void\r\n {\r\n this._platformMockApiService.onGet('api/dashboards/recycling').reply(() => [200, cloneDeep(this._recyclingData)]);\r\n }\r\n}\r\n","/* eslint-disable */\r\nimport {DateTime} from 'luxon';\r\n\r\n/* Get the current instant */\r\nconst now = DateTime.now();\r\n\r\nexport const recyclingData = {\r\n recycling_breakdown: {\r\n customer_name: 'Chick-Fil-A',\r\n total: 349,\r\n recycled: 304,\r\n on_hand: 45,\r\n recycle_rate: 84.68,\r\n details: [\r\n {\r\n type: 'distribution_center',\r\n code: 'Distribution Center',\r\n name: 'RiverEdge Supply Center',\r\n recycled: 229,\r\n on_hand: 23,\r\n recycle_rate: 90.87,\r\n suppliers: [\r\n {\r\n type: 'supplier',\r\n code: 'supplier',\r\n name: 'Blue Spring Farms',\r\n recycled: 107,\r\n on_hand: 10,\r\n recycle_rate: 91.45\r\n },\r\n {\r\n type: 'supplier',\r\n code: 'supplier',\r\n name: 'Lucky Day Produce',\r\n recycled: 122,\r\n on_hand: 13,\r\n recycle_rate: 90.37\r\n }\r\n ]\r\n },\r\n {\r\n type: 'distribution_center',\r\n code: 'Distribution Center',\r\n name: 'MapleHub Center',\r\n recycled: 120,\r\n on_hand: 22,\r\n recycle_rate: 84.51,\r\n suppliers: [\r\n {\r\n type: 'supplier',\r\n code: 'supplier',\r\n name: 'Hillside Dairy Farms',\r\n recycled: 41,\r\n on_hand: 2,\r\n recycle_rate: 95.35\r\n },\r\n {\r\n type: 'supplier',\r\n code: 'supplier',\r\n name: 'GoldenGrain Mills',\r\n recycled: 24,\r\n on_hand: 8,\r\n recycle_rate: 75.00\r\n },\r\n {\r\n type: 'supplier',\r\n code: 'supplier',\r\n name: 'RedLeaf Fresh Produce',\r\n recycled: 55,\r\n on_hand: 12,\r\n recycle_rate: 82.09\r\n },\r\n ]\r\n },\r\n ]\r\n }\r\n};\r\n","import { AuthMockApi } from 'app/mock-api/common/auth/api';\r\nimport { NavigationMockApi } from 'app/mock-api/common/navigation/api';\r\nimport { RecyclingMockApi } from 'app/mock-api/dashboards/recycling/api';\r\n\r\nexport const mockApiServices = [\r\n AuthMockApi,\r\n RecyclingMockApi,\r\n NavigationMockApi,\r\n];\r\n","import {NgClass, NgForOf, NgIf} from '@angular/common';\r\nimport {ChangeDetectorRef, Component, EventEmitter, Inject, OnDestroy, OnInit, Output, ViewEncapsulation} from '@angular/core';\r\nimport {MatButtonModule} from '@angular/material/button';\r\n//import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {FormBuilder, FormsModule, FormGroup, ReactiveFormsModule, UntypedFormGroup, Validators} from \"@angular/forms\";\r\nimport {MatInputModule} from \"@angular/material/input\";\r\nimport {MatSlideToggleModule} from \"@angular/material/slide-toggle\";\r\nimport {MatDatepickerModule} from \"@angular/material/datepicker\";\r\nimport {Subject, takeUntil} from \"rxjs\";\r\nimport {NgxMaterialTimepickerModule, NgxMaterialTimepickerTheme} from \"ngx-material-timepicker\";\r\nimport {CustomDateRangeDialogService} from \"./custom-date-range-dialog.service\";\r\nimport {DateTimeService} from \"../../../../../core/services/date-time.service\";\r\nimport {MatSelectModule} from \"@angular/material/select\";\r\nimport { BsModalRef } from 'ngx-bootstrap/modal';\r\nimport { BsDatepickerConfig, BsDatepickerModule } from 'ngx-bootstrap/datepicker';\r\n\r\nexport class ReportRequest {\r\n startDateTimeISO: string;\r\n endDateTimeISO: string;\r\n}\r\n\r\n@Component({\r\n selector: 'custom-date-range-dialog',\r\n templateUrl: './custom-date-range-dialog.component.html',\r\n styleUrls: ['./custom-date-range-dialog.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n imports: [NgIf, FormsModule, BsDatepickerModule, MatButtonModule, MatIconModule, NgClass, ReactiveFormsModule, NgForOf, MatInputModule, MatSlideToggleModule, MatDatepickerModule, NgxMaterialTimepickerModule, MatSelectModule],\r\n\r\n })\r\nexport class CustomDateRangeDialogComponent implements OnInit, OnDestroy {\r\n public form: UntypedFormGroup;\r\n public startTime: string;\r\n public endTime: string;\r\n public primaryTheme: NgxMaterialTimepickerTheme = {\r\n container: {\r\n bodyBackgroundColor: '#f1f5f9',\r\n buttonColor: '#564de6'\r\n },\r\n dial: {\r\n dialBackgroundColor: '#f1f5f9',\r\n dialActiveColor: '#564de6',\r\n dialInactiveColor: '#564de6',\r\n },\r\n clockFace: {\r\n clockFaceBackgroundColor: '#FFFFFF',\r\n clockHandColor: '#564de6',\r\n clockFaceTimeInactiveColor: '#564de6',\r\n clockFaceInnerTimeInactiveColor: '#564de6',\r\n clockFaceTimeDisabledColor: '#FFFFFF',\r\n clockFaceTimeActiveColor: '#FFFFFF',\r\n }\r\n };\r\n public times: string[] = [];\r\n public isDialogHidden: boolean = false;\r\n private _unsubscribeAll: Subject = new Subject();\r\n dateRange: { startDate: Date, endDate: Date } = { startDate: null, endDate: null };\r\n modalRef?: BsModalRef;\r\n colorTheme = 'theme-dark-blue';\r\n bsConfig?: Partial;\r\n @Output() dateRangeSelected: EventEmitter = new EventEmitter();\r\n \r\n constructor(public bsModalRef: BsModalRef,\r\n private _customDateRangeDialogService: CustomDateRangeDialogService,\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n private _dateTimeService: DateTimeService,\r\n private _formBuilder: FormBuilder\r\n ) {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** ngOnInit */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnInit(): void {\r\n this.times = this._dateTimeService.buildTime(60);\r\n this.bsConfig = Object.assign({}, { containerClass: this.colorTheme });\r\n // listen for reset form event\r\n this._customDateRangeDialogService.resetForm$.pipe(takeUntil(this._unsubscribeAll)).subscribe((resetForm: boolean) => {\r\n if (resetForm && this.form) {\r\n this.form.enable();\r\n // set the form back to the default values\r\n const {startDay, endDay} = this._dateTimeService.getDateRange(7); // For last 7 days\r\n this.form.patchValue({\r\n startDay,\r\n startTime: '12:00 AM',\r\n endDay,\r\n endTime: '11:59 PM'\r\n });\r\n\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n });\r\n\r\n // set form values\r\n const {startDay, endDay} = this._dateTimeService.getDateRange(7); // For last 7 days\r\n // set form values\r\n \r\n this.form = this._formBuilder.group({\r\n dateRange: [{startDay, endDay}], \r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Unsubscribe from all subscriptions */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(null);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n\r\n onDateRangeChange(value: any): void {\r\n this.dateRange = value;\r\n }\r\n \r\n // -----------------------------------------------------------------------------------------------------\r\n /** onConfirm */\r\n // -----------------------------------------------------------------------------------------------------\r\n onSubmit(): void {\r\n Object.keys(this.form.controls).forEach((key) => {\r\n this.form.controls[key].markAsTouched();\r\n });\r\n\r\n // Return if the form is invalid\r\n if (this.form.invalid) {\r\n return;\r\n }\r\n\r\n // Disable the form\r\n this.form.disable();\r\n this.dateRangeSelected.emit(this.dateRange);\r\n this.bsModalRef.hide(); \r\n const startDateISO = this.dateRange[0].toISOString();\r\n const endDateISO = this.dateRange[1].toISOString();\r\n\r\n //this.activeModal.close({startDateISO, endDateISO});\r\n // close the dialog and pass the form's value\r\n \r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** onCancel */\r\n // -----------------------------------------------------------------------------------------------------\r\n onCancel(): void {\r\n this.bsModalRef.hide(); \r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** On date change */\r\n // -----------------------------------------------------------------------------------------------------\r\n getDates(event: any) {\r\n const date = new Date(event?.ts ?? event);\r\n const year = date.getFullYear();\r\n const month = ('0' + (date.getMonth() + 1)).slice(-2);\r\n const day = ('0' + date.getDate()).slice(-2);\r\n return `${year}-${month}-${day}`;\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n Custom Date Range\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
","import {inject, Injectable} from '@angular/core';\r\n//import {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {CustomDateRangeDialogComponent} from \"./custom-date-range-dialog.component\";\r\nimport {BehaviorSubject, Observable} from \"rxjs\";\r\nimport { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';\r\n\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class CustomDateRangeDialogService {\r\n private _resetForm: BehaviorSubject = new BehaviorSubject(false);\r\n //private _matDialog: MatDialog = inject(MatDialog);\r\n modalRef?: BsModalRef;\r\n private modalIsOpen: boolean = false; \r\n get resetForm$(): Observable {\r\n return this._resetForm.asObservable();\r\n }\r\n\r\n set resetForm(value: boolean) {\r\n this._resetForm.next(value);\r\n }\r\n\r\n constructor(private modalService: BsModalService) {}\r\n\r\n\r\n open(): BsModalRef {\r\n this.modalIsOpen = true; // Set flag to true when modal opens\r\n this.modalRef = this.modalService.show(CustomDateRangeDialogComponent, {\r\n \r\n //class: 'max-width: 500px; max-height:400px', // Optional: Set modal size\r\n //backdrop: 'static', // Optional: Prevent closing on backdrop click\r\n });\r\n\r\n // Optionally, reset the flag when the modal is closed\r\n this.modalRef?.onHidden.subscribe(() => {\r\n this.modalIsOpen = false;\r\n });\r\n\r\n return this.modalRef;\r\n }\r\n\r\n isOpened(): boolean {\r\n return true;\r\n }\r\n\r\n}\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport {MatButtonModule} from \"@angular/material/button\";\r\nimport {MatIconModule} from \"@angular/material/icon\";\r\nimport {MatMenuModule} from \"@angular/material/menu\";\r\nimport {MatTableDataSource, MatTableModule} from \"@angular/material/table\";\r\nimport {MatSort, MatSortModule} from \"@angular/material/sort\";\r\nimport {CurrencyPipe, DatePipe, DecimalPipe, NgClass, NgIf} from \"@angular/common\";\r\nimport {MatProgressBarModule} from \"@angular/material/progress-bar\";\r\nimport {MatDividerModule} from \"@angular/material/divider\";\r\nimport {map, Observable, of, Subject, takeUntil} from \"rxjs\";\r\nimport {RecyclerLocationService} from \"../../../../../core/services/recycler-location.service\";\r\nimport {RecyclerLocation} from \"../../../../../core/models/recycler-location.model\";\r\nimport { OversightService } from \"app/core/services/oversight.service\";\r\nimport {DashboardTable} from \"../../interfaces/dashboard-table.interface\";\r\nimport {RecycleRatePipe} from \"../../pipes/recycle-rate.pipe\";\r\n\r\n@Component({\r\n selector: 'location-breakdown-table',\r\n standalone: true,\r\n templateUrl: './location-breakdown-table.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [MatButtonModule, MatIconModule, MatMenuModule, MatDividerModule, MatTableModule, MatSortModule, NgClass,\r\n MatProgressBarModule, CurrencyPipe, DatePipe, NgIf, DecimalPipe, RecycleRatePipe\r\n ]\r\n})\r\nexport class LocationBreakdownTableComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @ViewChild('recentTransactionsTable', {read: MatSort}) batchedCommandsTableMatSort: MatSort;\r\n public batchedCommandsDataSource: MatTableDataSource = new MatTableDataSource();\r\n public recentTransactionsTableColumns: string[] = ['name', 'recycledCount', 'damagedCount', 'ineligibleCount'];\r\n public recentFoodserviceTransactionsTableColumns: string[] = ['name', 'recycledCount', 'damagedCount', 'ineligibleCount'];\r\n public recyclerLocations: RecyclerLocation[];\r\n public isFoodServiceModel: boolean;\r\n public hasPerformedSearch: boolean = false;\r\n public loadingCompleted: boolean = false;\r\n\r\n private _unsubscribeAll: Subject = new Subject();\r\n\r\n\r\n constructor(private _changeDetectorRef: ChangeDetectorRef,\r\n private _recyclerLocationService: RecyclerLocationService,\r\n private _oversightService: OversightService) {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** On init */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnInit(): void {\r\n this._recyclerLocationService.recyclerLocations$.pipe(takeUntil(this._unsubscribeAll)).subscribe((recyclerLocations: RecyclerLocation[]) => {\r\n this.recyclerLocations = recyclerLocations;\r\n this.recyclerLocations.sort((a, b) => b.metrics.recycleRate - a.metrics.recycleRate);\r\n this.batchedCommandsDataSource.data = this.normalizeRecyclerLocations(this.recyclerLocations);\r\n\r\n // Make sure to reassign the sort after data is updated\r\n this.batchedCommandsDataSource.sort = this.batchedCommandsTableMatSort;\r\n this.loadingCompleted = true;\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n\r\n this._oversightService.isFoodServiceModel$.pipe(takeUntil(this._unsubscribeAll)).subscribe((isFoodServiceModel: boolean) => {\r\n this.isFoodServiceModel = isFoodServiceModel;\r\n if(!isFoodServiceModel)\r\n {\r\n if (!this.recentTransactionsTableColumns.includes('availableCount')) {\r\n this.recentTransactionsTableColumns.push('availableCount');\r\n }\r\n if (!this.recentTransactionsTableColumns.includes('recycleRate')) {\r\n this.recentTransactionsTableColumns.push('recycleRate');\r\n }\r\n }\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n\r\n normalizeRecyclerLocations(locations: RecyclerLocation[]): DashboardTable[] {\r\n return locations.map(location => {\r\n return {\r\n name: location.name,\r\n recycledCount: location.metrics.recycledCount,\r\n availableCount: location.metrics.availableCount,\r\n damagedCount: location.metrics.damagedCount,\r\n ineligibleCount: location.metrics.ineligibleCount,\r\n recycleRate: Math.ceil(location.metrics.recycleRate),\r\n };\r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** After view init */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngAfterViewInit(): void {\r\n this.batchedCommandsDataSource.sort = this.batchedCommandsTableMatSort;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** On destroy */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(null);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Track by function */\r\n // -----------------------------------------------------------------------------------------------------\r\n trackByFn(index: number, item: DashboardTable): any {\r\n return item.name || index; // Use a unique property or fallback to index\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
Return Breakdown
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
Name\r\n \r\n {{ data?.name }}\r\n \r\n Returned\r\n \r\n {{ data?.recycledCount ?? 0 | number : '1.0-0' }}\r\n \r\n Damaged\r\n \r\n {{ data?.damagedCount ?? 0 | number : '1.0-0' }}\r\n \r\n Ineligible\r\n \r\n {{ data?.ineligibleCount ?? 0 | number : '1.0-0' }}\r\n \r\n Available\r\n \r\n {{ data?.availableCount ?? 0 | number : '1.0-0' }}\r\n \r\n Return Rate\r\n \r\n \r\n {{ data?.recycleRate ?? 0 }}%\r\n \r\n
\r\n
\r\n
\r\n\r\n
0 }\">\r\n \r\n
\r\n
\r\n No location metrics to display\r\n
\r\n
\r\n

\r\n When there are location metrics available, they will be displayed here.\r\n

\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Loading...\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Loading...\r\n
\r\n
\r\n
\r\n\r\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from '@angular/core';\r\nimport {CurrencyPipe, NgClass, NgIf} from '@angular/common';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {DashboardStatCard} from \"../../interfaces/dashboard-stat-card.interface\";\r\nimport {DashboardService} from \"../../../dashboard.service\";\r\nimport {Subject, takeUntil} from \"rxjs\";\r\nimport {PlatformMediaWatcherService} from \"../../../../../../@platform/services/media-watcher\";\r\nimport {RecyclerMetrics} from \"../../../../../core/models/recycler-metrics.model\";\r\nimport { OversightService } from 'app/core/services/oversight.service';\r\n\r\n@Component({\r\n selector: 'summary-metric-cards',\r\n templateUrl: './summary-metric-cards.component.html',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CurrencyPipe, MatIconModule, NgClass, NgIf],\r\n})\r\nexport class SummaryMetricCards implements OnInit {\r\n public isScreenSmall: boolean = false;\r\n public recyclerMetrics: RecyclerMetrics\r\n public dashboardStatCards: DashboardStatCard[] = [];\r\n private _unsubscribeAll: Subject = new Subject();\r\n public isFoodServiceModel: boolean = false;\r\n\r\n constructor(private _changeDetectorRef: ChangeDetectorRef,\r\n private _dashboardService: DashboardService,\r\n private _platformMediaWatcherService: PlatformMediaWatcherService,\r\n private _oversightService: OversightService) {\r\n\r\n }\r\n\r\n ngOnInit() {\r\n this._platformMediaWatcherService.onMediaChange$.pipe(takeUntil(this._unsubscribeAll)).subscribe(({matchingAliases}) => {\r\n this.isScreenSmall = !matchingAliases.includes('md');\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n this._oversightService.isFoodServiceModel$.pipe(takeUntil(this._unsubscribeAll)).subscribe((isFoodServiceModel: boolean) => {\r\n this.isFoodServiceModel = isFoodServiceModel;\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n this._dashboardService.recyclerMetrics$.pipe(takeUntil(this._unsubscribeAll)).subscribe((recyclerMetrics: RecyclerMetrics) => {\r\n this.recyclerMetrics = recyclerMetrics;\r\n if(this.isFoodServiceModel){\r\n this.buildMetricCardsForFoodServiceModel();\r\n }else{\r\n this.buildMetricCardsForNonFoodServiceModel();\r\n }\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** build metric cards for non FoodService Model*/\r\n // -----------------------------------------------------------------------------------------------------\r\n buildMetricCardsForNonFoodServiceModel(): void {\r\n this.dashboardStatCards = [\r\n {\r\n icon: 'mat_solid:recycling', // best fit for returned/recycling\r\n iconColor: 'primary',\r\n title: `Returned`,\r\n description: `The total number of items returned for recycling across all distribution centers.`,\r\n value: `${(this.recyclerMetrics.metrics.recycledCount).toLocaleString('en-US')}`,\r\n },\r\n {\r\n icon: 'mat_solid:report_problem', // indicating issues or damage\r\n iconColor: 'primary',\r\n title: `Damaged`,\r\n description: `The total number of devices that arrived damaged prior to recycling.`,\r\n value: `${this.recyclerMetrics.metrics.damagedCount.toLocaleString('en-US')}`,\r\n },\r\n {\r\n icon: 'mat_solid:block', // indicates something is restricted or not allowed\r\n iconColor: 'primary',\r\n title: `Ineligible`,\r\n description: `The total number of devices that are not eligible for recycling.`,\r\n value: `${this.recyclerMetrics.metrics.ineligibleCount.toLocaleString('en-US')}`,\r\n\r\n },\r\n {\r\n icon: 'mat_solid:check_circle', // shows something is available or ready\r\n iconColor: 'primary',\r\n title: `Available`,\r\n description: `The total number of devices available for recycling.`,\r\n value: `${this.recyclerMetrics.metrics.availableCount.toLocaleString('en-US')}`,\r\n },\r\n {\r\n icon: 'mat_solid:autorenew', // recycling or refresh symbol\r\n iconColor: 'primary',\r\n title: `Return Rate`,\r\n description: `The percentage of items returned for recycling across all distribution centers.`,\r\n value: `${Math.ceil(this.recyclerMetrics.metrics.recycleRate)}%`,\r\n }\r\n ]\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** build metric cards for FoodService Model*/\r\n // -----------------------------------------------------------------------------------------------------\r\n buildMetricCardsForFoodServiceModel(): void {\r\n this.dashboardStatCards = [\r\n {\r\n icon: 'mat_solid:recycling', // best fit for returned/recycling\r\n iconColor: 'primary',\r\n title: `Returned`,\r\n description: `The total number of items returned for recycling across all distribution centers.`,\r\n value: `${(this.recyclerMetrics.metrics.recycledCount).toLocaleString('en-US')}`,\r\n },\r\n {\r\n icon: 'mat_solid:report_problem', // indicating issues or damage\r\n iconColor: 'primary',\r\n title: `Damaged`,\r\n description: `The total number of devices that arrived damaged prior to recycling.`,\r\n value: `${this.recyclerMetrics.metrics.damagedCount.toLocaleString('en-US')}`,\r\n },\r\n {\r\n icon: 'mat_solid:block', // indicates something is restricted or not allowed\r\n iconColor: 'primary',\r\n title: `Ineligible`,\r\n description: `The total number of devices that are not eligible for recycling.`,\r\n value: `${this.recyclerMetrics.metrics.ineligibleCount.toLocaleString('en-US')}`,\r\n },\r\n ];\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** On destroy */\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(null);\r\n this._unsubscribeAll.complete();\r\n this.dashboardStatCards = [];\r\n }\r\n\r\n}\r\n","\r\n
0\">\r\n \r\n
\r\n @for (dashboardStatCard of dashboardStatCards; track dashboardStatCard) {\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
{{ dashboardStatCard.title }}
\r\n
{{ dashboardStatCard.description }}
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n }\r\n
\r\n\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'recycleRate',\r\n standalone: true,\r\n})\r\nexport class RecycleRatePipe implements PipeTransform {\r\n transform(recycleRate: number | null | undefined): string {\r\n if (recycleRate === null || recycleRate === undefined) return `---`;\r\n\r\n if (recycleRate < 30) {\r\n return `\r\n \r\n \r\n\r\n \r\n `;\r\n } else if (recycleRate >= 30 && recycleRate < 80) {\r\n return `\r\n \r\n `;\r\n } else {\r\n return `\r\n \r\n `;\r\n }\r\n }\r\n}\r\n","import {CurrencyPipe, DatePipe, DecimalPipe, NgClass, NgFor, NgIf, NgStyle} from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy, ChangeDetectorRef,\r\n Component,\r\n Input,\r\n OnDestroy,\r\n OnInit, TemplateRef, ViewChild, ViewEncapsulation\r\n} from '@angular/core';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatMenuModule} from '@angular/material/menu';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {Router} from '@angular/router';\r\nimport {\r\n NgApexchartsModule,\r\n ApexAxisChartSeries,\r\n ApexChart,\r\n ChartComponent,\r\n ApexDataLabels,\r\n ApexPlotOptions,\r\n ApexYAxis,\r\n ApexLegend,\r\n ApexStroke,\r\n ApexXAxis,\r\n ApexFill,\r\n ApexTooltip\r\n} from \"ng-apexcharts\";\r\nimport {forkJoin, of, Subject, takeUntil} from 'rxjs';\r\nimport {DashboardService} from \"./dashboard.service\";\r\nimport {MatTableModule} from \"@angular/material/table\";\r\nimport {MetricsHistoryContainer} from \"../../core/models/metrics-history.model\";\r\nimport {RecyclerMetrics} from \"../../core/models/recycler-metrics.model\";\r\nimport {MatProgressBarModule} from \"@angular/material/progress-bar\";\r\nimport {MatProgressSpinnerModule} from \"@angular/material/progress-spinner\";\r\nimport {\r\n LocationBreakdownTableComponent\r\n} from \"./@core/components/location-breakdown-table/location-breakdown-table.component\";\r\nimport {environment} from \"../../../environments/environment\";\r\nimport {RecyclerLocation} from \"../../core/models/recycler-location.model\";\r\nimport {RecyclerLocationService} from \"../../core/services/recycler-location.service\";\r\nimport {MatInputModule} from \"@angular/material/input\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatSelectModule} from \"@angular/material/select\";\r\nimport {PlatformMediaWatcherService} from \"../../../@platform/services/media-watcher\";\r\nimport {\r\n CustomDateRangeDialogService\r\n} from \"./@core/components/custom-date-range-dialog/custom-date-range-dialog.service\";\r\nimport {OversightService} from \"../../core/services/oversight.service\";\r\nimport {SummaryMetricCards} from \"./@core/components/summary-metric-cards/summary-metric-cards.component\";\r\nimport { BsModalRef } from 'ngx-bootstrap/modal';\r\nimport { NgbModule, NgbModal } from '@ng-bootstrap/ng-bootstrap';\r\n\r\nexport interface reportPeriod {\r\n id: number;\r\n period: string;\r\n}\r\n\r\nexport type ChartOptions = {\r\n series: ApexAxisChartSeries;\r\n chart: ApexChart;\r\n dataLabels: ApexDataLabels;\r\n plotOptions: ApexPlotOptions;\r\n yaxis: ApexYAxis;\r\n xaxis: ApexXAxis;\r\n fill: ApexFill;\r\n tooltip: ApexTooltip;\r\n stroke: ApexStroke;\r\n legend: ApexLegend;\r\n};\r\n\r\n@Component({\r\n selector: 'customer-recycling-dashboard',\r\n templateUrl: './dashboard.component.html',\r\n styleUrls: ['./dashboard.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n encapsulation: ViewEncapsulation.ShadowDom,\r\n imports: [MatButtonModule, MatIconModule, MatMenuModule, MatButtonToggleModule, NgApexchartsModule,\r\n MatTooltipModule, NgFor, DecimalPipe, MatTableModule, NgClass, CurrencyPipe, NgIf, NgStyle, MatProgressBarModule, MatProgressSpinnerModule\r\n , MatInputModule, FormsModule, MatSelectModule, DatePipe, SummaryMetricCards, LocationBreakdownTableComponent, NgbModule ]\r\n})\r\nexport class CustomerRecyclingDashboardComponent implements OnInit, OnDestroy {\r\n @Input() customerId: string;\r\n @Input() title: string;\r\n @Input() showMatSelect: boolean = false;\r\n @ViewChild(\"chart\") chart: ChartComponent;\r\n public chartOptions: Partial;\r\n public isLoading: boolean = false;\r\n public isScreenSmall: boolean;\r\n public isFoodServiceModel: boolean;\r\n public recyclerMetrics: RecyclerMetrics\r\n public recyclerLocations: RecyclerLocation[] = [];\r\n\r\n public recyclerLocationSupplierMetricsTableData: any;\r\n public selectedReportPeriodId: number = 1;\r\n public reportPeriod: reportPeriod = {id: 1, period: 'Year to Date'};\r\n public reportPeriods: reportPeriod[] = [\r\n {id: 1, period: 'Year to Date'},\r\n {id: 2, period: 'Last 30 Days'},\r\n {id: 3, period: 'Last 3 Months'},\r\n {id: 4, period: 'Last 9 Months'},\r\n {id: 5, period: 'Custom Range'}];\r\n public startDate: string;\r\n public endDate: string;\r\n public appVersion: string = environment.appVersion;\r\n public metricsList: any[] = [];\r\n private _unsubscribeAll: Subject = new Subject();\r\n modalRef?: NgbModule;\r\n\r\n constructor(private _changeDetectorRef: ChangeDetectorRef,\r\n private _customDateRangeDialogService: CustomDateRangeDialogService,\r\n private _dashboardService: DashboardService,\r\n private _platformMediaWatcherService: PlatformMediaWatcherService,\r\n private _recyclerLocationService: RecyclerLocationService,\r\n private _oversightService: OversightService,\r\n private _router: Router) {\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // On initialization of the component, this function will:\r\n // 1. Listen for data updates from the '_dashboardService'.\r\n // 2. When data is updated, it assigns the new data to the 'this.data' property and then prepares the chart data.\r\n // 3. It also attaches SVG fill fixes to all ApexCharts to address color issues.\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnInit(): void {\r\n // Subscribe to media changes\r\n this._platformMediaWatcherService.onMediaChange$.pipe(takeUntil(this._unsubscribeAll)).subscribe(({matchingAliases}) => {\r\n this.isScreenSmall = !matchingAliases.includes('md');\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n\r\n // Get the oversight customer id from local storage\r\n const oversightCustomerId = localStorage.getItem('emr-oversight-customer');\r\n if (!oversightCustomerId) {\r\n this._router.navigate(['/customer']).then();\r\n return;\r\n }\r\n\r\n // Get the food service model flag first then pass it to the metrics history and recycler metrics\r\n this._oversightService.getFoodServiceModelFlag(+oversightCustomerId).subscribe((isFoodServiceModel: boolean) => {\r\n this.isFoodServiceModel = isFoodServiceModel;\r\n // Get the metrics history, recycler metrics, and recycler location metrics\r\n this._dashboardService.getMetricsHistory(isFoodServiceModel, +oversightCustomerId).subscribe();\r\n this._dashboardService.getRecyclerMetrics(isFoodServiceModel, +oversightCustomerId).subscribe();\r\n this._recyclerLocationService.getRecyclerLocationMetrics(isFoodServiceModel, +oversightCustomerId).subscribe();\r\n });\r\n\r\n // Subscribe to the metrics history and recycler metrics\r\n this._dashboardService.metricsHistory$.pipe(takeUntil(this._unsubscribeAll)).subscribe((metricsHistory: MetricsHistoryContainer) => {\r\n this._prepareChartData(metricsHistory);\r\n this._changeDetectorRef.markForCheck();\r\n this.isLoading = false;\r\n });\r\n\r\n // Subscribe to the recycler metrics\r\n this._dashboardService.recyclerMetrics$.pipe(takeUntil(this._unsubscribeAll)).subscribe((recyclerMetrics: RecyclerMetrics) => {\r\n this.recyclerMetrics = recyclerMetrics;\r\n this._changeDetectorRef.markForCheck();\r\n this.isLoading = false;\r\n });\r\n\r\n // Load ApexCharts\r\n this.loadApexCharts();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Attach SVG fill fixer to all ApexCharts */\r\n // -----------------------------------------------------------------------------------------------------\r\n loadApexCharts() {\r\n window['Apex'] = {\r\n chart: {\r\n events: {\r\n mounted: (chart: any, options?: any): void => {\r\n this._fixSvgFill(chart.el);\r\n },\r\n updated: (chart: any, options?: any): void => {\r\n this._fixSvgFill(chart.el);\r\n },\r\n },\r\n },\r\n };\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** When the report period is clicked */\r\n // -----------------------------------------------------------------------------------------------------\r\n onReportPeriodClicked(reportPeriod: reportPeriod): void {\r\n // If the custom range is selected, do nothing\r\n if (reportPeriod.id === 5) {\r\n this.creatCustomDateRange();\r\n }\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Applies the report period */\r\n // -----------------------------------------------------------------------------------------------------\r\n applyReportPeriod(): void {\r\n this.startDate = null;\r\n this.endDate = null;\r\n this.reportPeriod = this.reportPeriods.find(period => period.id === +this.selectedReportPeriodId);\r\n\r\n // If the custom range is selected, do nothing\r\n if (+this.selectedReportPeriodId === 5) {\r\n this.creatCustomDateRange();\r\n return;\r\n }\r\n\r\n const today = new Date();\r\n\r\n // Determine the start and end dates based on the selected report period\r\n switch (+this.selectedReportPeriodId) {\r\n case 1:\r\n this.startDate = new Date(today.getFullYear(), 0, 1).toISOString();\r\n break;\r\n case 2:\r\n this.startDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 30).toISOString();\r\n break;\r\n case 3:\r\n this.startDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 90).toISOString();\r\n break;\r\n case 4:\r\n this.startDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 270).toISOString();\r\n break;\r\n }\r\n\r\n // end is always today plus one day\r\n this.endDate = new Date(today.getFullYear(), today.getMonth(), today.getDate()).toISOString();\r\n\r\n // Prepare the observables for the forkJoin\r\n this.filterDateRange(this.startDate, this.endDate);\r\n }\r\n\r\n openModal(template: TemplateRef) {\r\n \r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Creates a custom date range */\r\n // -----------------------------------------------------------------------------------------------------\r\n creatCustomDateRange() {\r\n const modalRef = this._customDateRangeDialogService.open();\r\n modalRef.content.dateRangeSelected.subscribe((dateRange: any) => {\r\n //this.dateRange = dateRange;\r\n console.log('Selected Date Range:', dateRange);\r\n if (dateRange) {\r\n this.isLoading = true;\r\n this._changeDetectorRef.markForCheck();\r\n this.startDate = dateRange[0].toISOString();\r\n this.endDate = dateRange[1].toISOString();\r\n this.filterDateRange(this.startDate, this.endDate);\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Refresh the metrics */\r\n // -----------------------------------------------------------------------------------------------------\r\n refreshMetrics(): void {\r\n if (this.reportPeriod.id !== 5) {\r\n this.filterDateRange(this.startDate, this.endDate);\r\n return;\r\n }\r\n\r\n this.creatCustomDateRange();\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n /** Filter the date range */\r\n // -----------------------------------------------------------------------------------------------------\r\n filterDateRange(startDate: string, endDate: string) {\r\n this.isLoading = true;\r\n // Prepare the observables for the forkJoin\r\n const observables = [\r\n this._dashboardService.getMetricsHistory(this.isFoodServiceModel, this.recyclerMetrics.customerId, startDate, endDate),\r\n this._dashboardService.getRecyclerMetrics(this.isFoodServiceModel, this.recyclerMetrics.customerId, startDate, endDate),\r\n this._recyclerLocationService.getRecyclerLocationMetrics(this.isFoodServiceModel, +this.recyclerMetrics.customerId, startDate, endDate)\r\n ];\r\n\r\n // Execute all requests concurrently and handle the results\r\n forkJoin(observables).subscribe({\r\n next: ([metricsHistory, recyclerMetrics]) => {\r\n // Handle the results from all the observables\r\n console.log('Metrics History:', metricsHistory);\r\n console.log('Recycler Metrics:', recyclerMetrics);\r\n },\r\n error: (error) => {\r\n this.isLoading = false;\r\n }\r\n });\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // Before destroying the component, this function ensures that:\r\n // 1. All active subscriptions related to '_unsubscribeAll' are terminated to prevent memory leaks.\r\n // -----------------------------------------------------------------------------------------------------\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(null);\r\n this._unsubscribeAll.complete();\r\n this._dashboardService.metricsHistory = null;\r\n this._recyclerLocationService.recyclerLocationMetrics = [];\r\n this._recyclerLocationService.recyclerLocations = [];\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // Fix the SVG fill references. This fix must be applied to all ApexCharts\r\n // charts in order to fix 'black color on gradient fills on certain browsers'\r\n // issue caused by the '' tag.\r\n // -----------------------------------------------------------------------------------------------------\r\n private _fixSvgFill(element: Element): void {\r\n // Current URL\r\n const currentURL = this._router.url;\r\n\r\n // 1. Select elements with a 'fill' attribute within the target element\r\n // 2. Retain only those with cross-references using 'url(#id)' syntax\r\n // 3. Prepend the 'currentURL' to the 'fill' attribute value\r\n Array.from(element.querySelectorAll('*[fill]'))\r\n .filter(el => el.getAttribute('fill').includes('url('))\r\n .forEach((el) => {\r\n const attrVal = el.getAttribute('fill');\r\n el.setAttribute('fill', `url(${currentURL}${attrVal.slice(attrVal.indexOf('#'))}`);\r\n });\r\n }\r\n\r\n // Grouping by month and year\r\n groupByMonthAndYear(metricsHistory: MetricsHistoryContainer): Record {\r\n return metricsHistory.metrics.reduce((grouped, metric) => {\r\n // Extract year and month from timestampUTC\r\n const date = new Date(metric.timestampUTC);\r\n const yearMonthKey = `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, '0')}`; // YYYY-MM\r\n\r\n if (!grouped[yearMonthKey]) {\r\n grouped[yearMonthKey] = {recycledCount: 0, availableCount: 0, damagedCount: 0, ineligibleCount: 0};\r\n }\r\n\r\n // Sum recycledCount and availableCount\r\n grouped[yearMonthKey].recycledCount += metric.recycledCount;\r\n grouped[yearMonthKey].availableCount += metric.availableCount;\r\n grouped[yearMonthKey].damagedCount += metric.damagedCount;\r\n grouped[yearMonthKey].ineligibleCount += metric.ineligibleCount;\r\n\r\n return grouped;\r\n }, {} as Record);\r\n }\r\n\r\n // Helper function to get abbreviated month name\r\n getMonthNameFromDate(date: Date): string {\r\n return date.toLocaleString('default', {month: 'short'}); // 'short' gives the abbreviated month name (e.g., \"Nov\")\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // This function prepares the data that will be used to render three different charts:\r\n // 1. Recycled Devices Trend\r\n // It formats and structures the data, so it aligns with the ApexChart requirements.\r\n // -----------------------------------------------------------------------------------------------------\r\n private _prepareChartData(metricsHistory: MetricsHistoryContainer): void {\r\n const groupedByMonthAndYear = this.groupByMonthAndYear(metricsHistory);\r\n this.chartOptions = {\r\n series: this.addChartSeries(groupedByMonthAndYear),\r\n chart: {\r\n type: \"bar\",\r\n height: '100%',\r\n width: '100%',\r\n toolbar: {\r\n show: false,\r\n },\r\n background: '#ffffff',\r\n },\r\n plotOptions: {\r\n bar: {\r\n horizontal: false,\r\n columnWidth: \"55%\",\r\n borderRadius: 2\r\n }\r\n },\r\n dataLabels: {\r\n enabled: false\r\n },\r\n xaxis: {\r\n categories: Object.entries(groupedByMonthAndYear)\r\n .map(([yearMonthKey, counts]) => {\r\n const [year, month] = yearMonthKey.split('-');\r\n const monthName = this.getMonthNameFromDate(new Date(parseInt(year), parseInt(month) - 1));\r\n return `${monthName} ${year}`\r\n }),\r\n labels: {\r\n style: {\r\n colors: '#333', // Darker label color\r\n }\r\n }\r\n },\r\n yaxis: {\r\n labels: {\r\n style: {\r\n colors: '#333', // Darker label color\r\n }\r\n }\r\n },\r\n fill: {\r\n opacity: 1\r\n },\r\n\r\n tooltip: {\r\n enabled: true,\r\n enabledOnSeries: undefined,\r\n shared: true,\r\n followCursor: false,\r\n intersect: false,\r\n inverseOrder: false,\r\n custom: undefined,\r\n fillSeriesColor: false,\r\n style: {\r\n fontSize: '12px',\r\n fontFamily: undefined\r\n },\r\n onDatasetHover: {\r\n highlightDataSeries: false,\r\n },\r\n x: {\r\n show: true,\r\n format: 'dd MMM',\r\n formatter: undefined,\r\n },\r\n y: {\r\n formatter: function (value: number) {\r\n return value.toLocaleString('en-US'); // Format the value with commas\r\n },\r\n title: {\r\n formatter: (seriesName) => seriesName,\r\n },\r\n },\r\n z: {\r\n formatter: undefined,\r\n title: 'Size: '\r\n },\r\n marker: {\r\n show: true,\r\n },\r\n fixed: {\r\n enabled: false,\r\n position: 'topRight',\r\n offsetX: 0,\r\n offsetY: 0,\r\n },\r\n }\r\n };\r\n }\r\n\r\n\r\n private addChartSeries(groupedByMonthAndYear: Record) {\r\n const seriesData = [\r\n {\r\n name: \"Returned\",\r\n data: Object.entries(groupedByMonthAndYear)\r\n .map(([yearMonthKey, counts]) => counts.recycledCount)\r\n },\r\n {\r\n name: \"Damaged\",\r\n data: Object.entries(groupedByMonthAndYear)\r\n .map(([yearMonthKey, counts]) => counts.damagedCount)\r\n },\r\n {\r\n name: \"Ineligible\",\r\n data: Object.entries(groupedByMonthAndYear)\r\n .map(([yearMonthKey, counts]) => counts.ineligibleCount)\r\n }\r\n ];\r\n\r\n // Conditionally add the \"Available Count\" series only if isFoodServiceModel is false\r\n if (!this.isFoodServiceModel) {\r\n if (!seriesData.some(series => series.name === \"Available\")) {\r\n seriesData.push({\r\n name: \"Available\",\r\n data: Object.entries(groupedByMonthAndYear)\r\n .map(([yearMonthKey, counts]) => counts.availableCount)\r\n });\r\n }\r\n }\r\n return seriesData;\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // Determines the recycling state based on the provided rate.\r\n // Returns: 'poor' (0-40%), 'good' (41-70%), 'excellent' (71-100%), or 'unknown' (outliers).\r\n // -----------------------------------------------------------------------------------------------------\r\n getRecyclingState(rate: number): 'poor' | 'good' | 'excellent' | 'unknown' {\r\n if (rate >= 0 && rate <= 40) {\r\n return 'poor';\r\n } else if (rate > 40 && rate <= 70) {\r\n return 'good';\r\n } else if (rate > 70 && rate <= 100) {\r\n return 'excellent';\r\n } else {\r\n return 'unknown';\r\n }\r\n }\r\n}\r\n","@if (chartOptions) {\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
{{ title ?? 'Return Dashboard' }}
\r\n
Monitor Recycling Tracker Metrics & Evaluate\r\n Performance\r\n
\r\n
v{{ appVersion }}
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Return\r\n Overview\r\n
\r\n
\r\n
{{ reportPeriod?.period }}
\r\n
\r\n
\r\n {{ startDate | date: 'shortDate' }}, {{ startDate | date: 'shortTime' }}\r\n
\r\n
-
\r\n
\r\n {{ endDate | date: 'shortDate' }}, {{ endDate | date: 'shortTime' }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n} @else {\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Loading...

\r\n
\r\n
\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {catchError, Observable, of, ReplaySubject, Subject, takeUntil, tap} from 'rxjs';\r\nimport {MetricsHistoryContainer} from \"../../core/models/metrics-history.model\";\r\nimport {RecyclerMetrics} from \"../../core/models/recycler-metrics.model\";\r\nimport {\r\n RecyclerLocationAndSupplierMetrics\r\n} from \"../../core/view-models/recycler-location-and-supplier-metrics-view.model\";\r\nimport {environment} from \"../../../environments/environment\";\r\nimport { MetricRequestDefaults } from 'app/core/models/metric-request.model';\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class DashboardService {\r\n private metricRequestDefaults: MetricRequestDefaults;\r\n\r\n constructor(private _httpClient: HttpClient) {\r\n }\r\n\r\n // Private method to handle the default values\r\n private handleDefaults(oversightCustomerId: number, startDate?: string, endDate?: string): MetricRequestDefaults {\r\n const today = new Date();\r\n return {\r\n oversightCustomerId: oversightCustomerId,\r\n startDate: startDate ?? new Date(today.getFullYear(), 0, 1).toISOString(),\r\n endDate: endDate ?? new Date(today.getFullYear(), today.getMonth(), today.getDate() + 2).toISOString(),\r\n isFoodServiceModel: false\r\n };\r\n }\r\n\r\n // Default values for error handling\r\n private defaultMetricsHistoryContainer: MetricsHistoryContainer = new MetricsHistoryContainer([]);\r\n private defaultRecyclerMetrics: RecyclerMetrics = new RecyclerMetrics(0, '', false, {availableCount: 0, recycledCount: 0, damagedCount:0, ineligibleCount:0, recycleRate: 0}); // Adjust to your Metrics structure\r\n private defaultRecyclerLocationAndSupplierMetrics: RecyclerLocationAndSupplierMetrics[] = [];\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets the recycling metrics history for the current user.\r\n // -----------------------------------------------------------------------------------------------------\r\n private _metricsHistory: ReplaySubject = new ReplaySubject(1);\r\n\r\n get metricsHistory$(): Observable {\r\n return this._metricsHistory.asObservable();\r\n }\r\n set metricsHistory(value: MetricsHistoryContainer) {\r\n this._metricsHistory.next(value);\r\n }\r\n\r\n getMetricsHistory(isFoodServiceModel: boolean, oversightCustomerId?: number, startDate?: string, endDate?: string): Observable {\r\n const defaults = this.handleDefaults(oversightCustomerId, startDate, endDate);\r\n const url = `${environment.recycling_api_endpoint}/recycle/v1/returner/${defaults.oversightCustomerId}/metrics/history?startDate=${defaults.startDate}&endDate=${defaults.endDate}&isFoodServiceModel=${isFoodServiceModel}`;\r\n return this._httpClient.get(url).pipe(\r\n tap((response) => {\r\n this._metricsHistory.next(response);\r\n }),\r\n catchError(() => {\r\n this._metricsHistory.next(this.defaultMetricsHistoryContainer);\r\n return of(this.defaultMetricsHistoryContainer);\r\n })\r\n );\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets the recycling metrics for the current user.\r\n // -----------------------------------------------------------------------------------------------------\r\n private _recyclerMetrics: ReplaySubject = new ReplaySubject(1);\r\n\r\n get recyclerMetrics$(): Observable {\r\n return this._recyclerMetrics.asObservable();\r\n }\r\n\r\n getRecyclerMetrics(isFoodServiceModel: boolean, oversightCustomerId?: number, startDate?: string, endDate?: string): Observable {\r\n const defaults = this.handleDefaults(oversightCustomerId, startDate, endDate);\r\n const url = `${environment.recycling_api_endpoint}/recycle/v1/returner/${defaults.oversightCustomerId}/metrics?startDate=${defaults.startDate}&endDate=${defaults.endDate}&isFoodServiceModel=${isFoodServiceModel}`;\r\n return this._httpClient.get(url).pipe(\r\n tap((response) => {\r\n this._recyclerMetrics.next(response);\r\n }),\r\n catchError(() => {\r\n this._recyclerMetrics.next(this.defaultRecyclerMetrics);\r\n return of(this.defaultRecyclerMetrics);\r\n })\r\n );\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n //* Gets the recycling metrics for the current user.\r\n // -----------------------------------------------------------------------------------------------------\r\n private _recyclerLocationAndSupplierMetrics: ReplaySubject = new ReplaySubject(1);\r\n\r\n get recyclerLocationAndSupplierMetrics$(): Observable {\r\n return this._recyclerLocationAndSupplierMetrics.asObservable();\r\n }\r\n}\r\n","export const environment = {\r\n appVersion: require('../../package.json').version,\r\n dashboard_app_url: 'https://recycle-customer-dashboard.dctcargo.com/',\r\n includeRoutes: true,\r\n oversight_api_key: '3A20A540-A777-4C6A-9311-C4AEA0922A3C',\r\n oversight_x_lt_art: 'f523615a-7666-42af-ad3d-aa326eec6532',\r\n oversight_endpoint: 'https://oversightapi.locustraxx.com',\r\n production: true,\r\n recycling_api_endpoint: 'https://api.dctcargo.com'\r\n};\r\n","import {Injector} from \"@angular/core\";\r\nimport {bootstrapApplication, createApplication} from '@angular/platform-browser';\r\nimport {createCustomElement} from \"@angular/elements\";\r\nimport {CustomerRecyclingDashboardComponent} from \"./app/modules/dashboard/dashboard.component\";\r\nimport {AppComponent} from 'app/app.component';\r\nimport {appConfig} from 'app/app.config';\r\n\r\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));\r\n\r\n(async () => {\r\n const app = await createApplication(appConfig);\r\n const injector: Injector = app.injector;\r\n const element = createCustomElement(CustomerRecyclingDashboardComponent, {injector});\r\n customElements.define('recycle-mfe', element);\r\n})();\r\n\r\n","/* (ignored) */"],"names":["InjectionToken","PLATFORM_MOCK_API_DEFAULT_DELAY","HttpErrorResponse","HttpResponse","inject","PlatformMockApiService","delay","of","switchMap","throwError","mockApiInterceptor","request","next","defaultDelay","platformMockApiService","handler","urlParams","findHandler","method","toUpperCase","url","response","pipe","error","status","statusText","data","body","Observable","take","PlatformMockApiHandler","constructor","_reply","undefined","_replyCount","_replied","replyResult","reply","callback","replyCount","count","compact","fromPairs","_handlers","Map","matchingHandler","urlParts","split","handlers","toLowerCase","forEach","handlerUrl","handlerUrlParts","length","matches","every","handlerUrlPart","index","startsWith","map","substring","onGet","_registerHandler","onPost","onPatch","onDelete","onPut","onHead","onJsonp","onOptions","platformMockHttp","set","_","_2","factory","ɵfac","providedIn","PlatformMockApiUtils","guid","d","Date","getTime","performance","now","replace","c","r","Math","random","floor","toString","provideHttpClient","withInterceptors","APP_INITIALIZER","ENVIRONMENT_INITIALIZER","importProvidersFrom","MATERIAL_SANITY_CHECKS","MatDialogModule","MAT_FORM_FIELD_DEFAULT_OPTIONS","PLATFORM_CONFIG","PlatformConfirmationService","platformLoadingInterceptor","PlatformLoadingService","PlatformMediaWatcherService","PlatformPlatformService","PlatformSplashScreenService","PlatformUtilsService","providePlatform","config","providers","provide","useValue","doctype","theme","version","appearance","mockApi","platform","multi","services","push","deps","useFactory","merge","BehaviorSubject","PlatformConfigService","_config","value","getValue","config$","asObservable","reset","i0","ɵɵinject","MatDialog","PlatformConfirmationDialogComponent","_matDialog","_defaultConfig","title","message","icon","show","name","color","actions","confirm","label","cancel","dismissible","open","userConfig","autoFocus","disableClose","panelClass","NgClass","NgIf","MatButtonModule","MAT_DIALOG_DATA","MatIconModule","ɵɵelementContainerStart","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵelementContainerEnd","ɵɵadvance","ɵɵproperty","ɵɵpureFunction8","_c0","ctx_r1","ctx_r4","ɵɵsanitizeHtml","ctx_r5","ɵɵtemplate","PlatformConfirmationDialogComponent_ng_container_4_ng_container_2_Template","PlatformConfirmationDialogComponent_ng_container_4_ng_container_3_Template","ctx_r2","ɵɵtext","ɵɵtextInterpolate1","ctx_r6","ctx_r7","PlatformConfirmationDialogComponent_ng_container_5_ng_container_2_Template","PlatformConfirmationDialogComponent_ng_container_5_ng_container_3_Template","ctx_r3","ɵɵdirectiveInject","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","PlatformConfirmationDialogComponent_Template","rf","ctx","PlatformConfirmationDialogComponent_ng_container_1_Template","PlatformConfirmationDialogComponent_ng_container_3_Template","PlatformConfirmationDialogComponent_ng_container_4_Template","PlatformConfirmationDialogComponent_ng_container_5_Template","i1","MatButton","MatIconButton","i2","MatDialogClose","i3","MatIcon","styles","encapsulation","finalize","req","platformLoadingService","handleRequestsAutomatically","auto$","subscribe","_setLoadingStatus","_httpClient","_auto$","_mode$","_progress$","_show$","_urlMap","mode$","progress$","show$","hide","setAutoMode","setMode","setProgress","console","has","delete","size","HttpClient","ReplaySubject","_breakpointObserver","_platformConfigService","_onMediaChange","Object","entries","screens","alias","screen","observe","values","state","matchingAliases","matchingQueries","matchingBreakpoints","breakpoints","filter","query","matchingAlias","find","q","onMediaChange$","onMediaQueryChange$","BreakpointObserver","_platform","osName","isBrowser","navigator","userAgent","includes","IOS","ANDROID","Platform","DOCUMENT","NavigationEnd","_document","_router","events","event","classList","remove","add","Router","exactMatchOptions","paths","fragment","matrixParams","queryParams","subsetMatchOptions","randomId","chars","i","charAt","RouterOutlet","environment","AppComponent","log","appVersion","AppComponent_Template","isDevMode","LuxonDateAdapter","DateAdapter","MAT_DATE_FORMATS","BrowserAnimationsModule","provideAnimations","provideAnimationsAsync","BrowserModule","provideTransloco","provideToastr","TranslocoHttpLoader","provideAuth","provideIcons","mockApiServices","NgxMaterialTimepickerModule","BsModalService","ModalModule","appConfig","withConfig","disableAnimations","useClass","parse","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","availableLangs","defaultLang","reRenderOnLangChange","prodMode","loader","layout","scheme","sm","md","lg","xl","themes","id","AuthService","AuthUtils","catchError","ToastrService","authInterceptor","_authService","_toastService","isRefreshing","useCapitalBearer","headers","get","clone","authHeader","newReq","authData","AccessToken","isTokenExpired","refreshToken","retryReq","refreshError","refreshing","extractErrorMessage","detail","ErrorMessage","HttpHeaders","_userService","_authenticated","_isRefreshingToken","JSON","localStorage","getItem","token","setItem","stringify","signIn","credentials","Error","oversight_api_key","post","oversight_endpoint","ErrorCode","ErrorDescription","user","email","getUniqueNameFromToken","oversight_x_lt_art","signOut","removeItem","navigate","then","check","success","UserService","offsetSeconds","date","_getTokenExpirationDate","valueOf","_b64decode","str","output","String","bc","bs","buffer","idx","fromCharCode","indexOf","_b64DecodeUnicode","decodeURIComponent","Array","prototype","call","charCodeAt","slice","join","_urlBase64Decode","_decodeToken","parts","decoded","decodedToken","hasOwnProperty","setUTCSeconds","exp","unique_name","IconsService","matIconRegistry","domSanitizer","iconSets","namespace","baseUrl","dashboard_app_url","registerIconSets","iconUrl","bypassSecurityTrustResourceUrl","addSvgIconSetInNamespace","addSvgIconSet","MatIconRegistry","DomSanitizer","MetricsHistoryContainer","metrics","MetricsHistory","recycledCount","availableCount","damagedCount","ineligibleCount","recycleRate","timestampUTC","RecyclerMetrics","customerId","isRecycleEnabled","DateTimeService","convertTime12to24","time12h","time","modifier","hours","minutes","parseInt","getDateRange","daysBeforeStart","daysAfterEnd","today","startDate","setDate","getDate","endDate","startDay","formatDate","endDay","year","getFullYear","month","getMonth","day","buildTime","increments","start","end","times","hh","mm","hour","period","convertTo12HourFormat","val","AMorPM","hours12","padStart","convertTo24HourFormat","match","tap","OversightService","_isFoodServiceModel","isFoodServiceModel$","isFoodServiceModel","getFoodServiceModelFlag","oversightCustomerId","recycling_api_endpoint","RecyclerLocationService","_recycleLocations","_recyclerLocationMetrics","recyclerLocations$","recyclerLocations","getRecyclerLocations","recyclerId","recyclerLocationMetrics$","recyclerLocationMetrics","getRecyclerLocationMetrics","defaults","handleDefaults","toISOString","getTranslation","lang","_user","user$","update","patch","userData","Base64","Utf8","HmacSHA256","cloneDeep","AuthMockApi","_platformMockApiService","_secret","registerHandlers","password","accessToken","_generateJWTToken","tokenType","_verifyJWTToken","_base64url","source","encodedSource","header","alg","typ","iat","payload","iss","stringifiedHeader","encodedHeader","stringifiedPayload","encodedPayload","signature","signatureCheck","compactNavigation","defaultNavigation","futuristicNavigation","horizontalNavigation","NavigationMockApi","_compactNavigation","_defaultNavigation","_futuristicNavigation","_horizontalNavigation","compactNavItem","defaultNavItem","children","futuristicNavItem","horizontalNavItem","default","futuristic","horizontal","nav","type","link","avatar","recyclingData","RecyclingMockApi","_recyclingData","DateTime","recycling_breakdown","customer_name","total","recycled","on_hand","recycle_rate","details","code","suppliers","EventEmitter","FormsModule","ReactiveFormsModule","MatInputModule","MatSlideToggleModule","MatDatepickerModule","Subject","takeUntil","MatSelectModule","BsDatepickerModule","ReportRequest","CustomDateRangeDialogComponent","bsModalRef","_customDateRangeDialogService","_changeDetectorRef","_dateTimeService","_formBuilder","primaryTheme","container","bodyBackgroundColor","buttonColor","dial","dialBackgroundColor","dialActiveColor","dialInactiveColor","clockFace","clockFaceBackgroundColor","clockHandColor","clockFaceTimeInactiveColor","clockFaceInnerTimeInactiveColor","clockFaceTimeDisabledColor","clockFaceTimeActiveColor","isDialogHidden","_unsubscribeAll","dateRange","colorTheme","dateRangeSelected","ngOnInit","bsConfig","assign","containerClass","resetForm$","resetForm","form","enable","patchValue","startTime","endTime","detectChanges","group","ngOnDestroy","complete","onDateRangeChange","onSubmit","keys","controls","key","markAsTouched","invalid","disable","emit","startDateISO","endDateISO","onCancel","getDates","ts","BsModalRef","CustomDateRangeDialogService","ChangeDetectorRef","i4","FormBuilder","outputs","CustomDateRangeDialogComponent_Template","ɵɵlistener","CustomDateRangeDialogComponent_Template_form_ngSubmit_5_listener","CustomDateRangeDialogComponent_Template_input_ngModelChange_10_listener","$event","CustomDateRangeDialogComponent_Template_button_click_15_listener","ɵɵrestoreView","_r3","_r0","ɵɵreference","ɵɵresetView","toggle","CustomDateRangeDialogComponent_Template_button_click_18_listener","ɵɵpureFunction1","ɵNgNoValidate","DefaultValueAccessor","NgControlStatus","NgControlStatusGroup","NgModel","NgForm","i5","BsDaterangepickerDirective","BsDaterangepickerInputDirective","_resetForm","modalService","modalIsOpen","modalRef","onHidden","isOpened","MatMenuModule","MatTableDataSource","MatTableModule","MatSort","MatSortModule","DecimalPipe","MatProgressBarModule","MatDividerModule","RecycleRatePipe","data_r13","ɵɵpipeBind2","tmp_0_0","data_r14","data_r15","data_r16","data_r19","LocationBreakdownTableComponent_ng_container_21_th_1_Template","LocationBreakdownTableComponent_ng_container_21_td_2_Template","data_r22","LocationBreakdownTableComponent_ng_container_22_td_2_span_4_Template","ɵɵpipeBind1","LocationBreakdownTableComponent_ng_container_22_th_1_Template","LocationBreakdownTableComponent_ng_container_22_td_2_Template","LocationBreakdownTableComponent","_recyclerLocationService","_oversightService","batchedCommandsDataSource","recentTransactionsTableColumns","recentFoodserviceTransactionsTableColumns","hasPerformedSearch","loadingCompleted","sort","a","b","normalizeRecyclerLocations","batchedCommandsTableMatSort","markForCheck","locations","location","ceil","ngAfterViewInit","trackByFn","item","viewQuery","LocationBreakdownTableComponent_Query","LocationBreakdownTableComponent_th_10_Template","LocationBreakdownTableComponent_td_11_Template","LocationBreakdownTableComponent_th_13_Template","LocationBreakdownTableComponent_td_14_Template","LocationBreakdownTableComponent_th_16_Template","LocationBreakdownTableComponent_td_17_Template","LocationBreakdownTableComponent_th_19_Template","LocationBreakdownTableComponent_td_20_Template","LocationBreakdownTableComponent_ng_container_21_Template","LocationBreakdownTableComponent_ng_container_22_Template","LocationBreakdownTableComponent_tr_23_Template","LocationBreakdownTableComponent_tr_24_Template","ɵɵnamespaceSVG","ɵɵnamespaceHTML","_c1","MatTable","MatHeaderCellDef","MatHeaderRowDef","MatColumnDef","MatCellDef","MatRowDef","MatHeaderCell","MatCell","MatHeaderRow","MatRow","MatSortHeader","changeDetection","ɵɵclassMapInterpolate3","dashboardStatCard_r2","iconColor","ɵɵtextInterpolate","description","ɵɵrepeaterCreate","SummaryMetricCards_div_0_For_3_Template","ɵɵrepeaterTrackByIdentity","ɵɵpureFunction3","ctx_r0","isScreenSmall","ɵɵrepeater","dashboardStatCards","SummaryMetricCards","_dashboardService","_platformMediaWatcherService","recyclerMetrics$","recyclerMetrics","buildMetricCardsForFoodServiceModel","buildMetricCardsForNonFoodServiceModel","toLocaleString","DashboardService","SummaryMetricCards_Template","SummaryMetricCards_div_0_Template","transform","pure","DatePipe","NgFor","MatButtonToggleModule","MatTooltipModule","NgApexchartsModule","forkJoin","MatProgressSpinnerModule","NgbModule","CustomerRecyclingDashboardComponent_Conditional_0_option_17_Template_option_click_0_listener","restoredCtx","_r7","reportPeriod_r5","$implicit","ɵɵnextContext","onReportPeriodClicked","ɵɵtextInterpolate2","CustomerRecyclingDashboardComponent_Conditional_0_div_2_Template","CustomerRecyclingDashboardComponent_Conditional_0_Template_div_click_13_listener","_r9","ctx_r8","refreshMetrics","CustomerRecyclingDashboardComponent_Conditional_0_Template_select_ngModelChange_16_listener","ctx_r10","selectedReportPeriodId","CustomerRecyclingDashboardComponent_Conditional_0_Template_select_change_16_listener","ctx_r11","applyReportPeriod","CustomerRecyclingDashboardComponent_Conditional_0_option_17_Template","CustomerRecyclingDashboardComponent_Conditional_0_div_27_Template","isLoading","ɵɵpureFunction2","tmp_2_0","_c2","reportPeriod","reportPeriods","chartOptions","chart","dataLabels","fill","series","stroke","tooltip","xaxis","yaxis","CustomerRecyclingDashboardComponent","showMatSelect","metricsList","getMetricsHistory","getRecyclerMetrics","metricsHistory$","metricsHistory","_prepareChartData","loadApexCharts","window","mounted","options","_fixSvgFill","el","updated","creatCustomDateRange","filterDateRange","openModal","content","observables","element","currentURL","from","querySelectorAll","getAttribute","attrVal","setAttribute","groupByMonthAndYear","reduce","grouped","metric","yearMonthKey","getUTCFullYear","getUTCMonth","getMonthNameFromDate","groupedByMonthAndYear","addChartSeries","height","width","toolbar","background","plotOptions","bar","columnWidth","borderRadius","enabled","categories","counts","monthName","labels","style","colors","opacity","enabledOnSeries","shared","followCursor","intersect","inverseOrder","custom","fillSeriesColor","fontSize","fontFamily","onDatasetHover","highlightDataSeries","x","format","formatter","y","seriesName","z","marker","fixed","position","offsetX","offsetY","seriesData","some","getRecyclingState","rate","i6","CustomerRecyclingDashboardComponent_Query","CustomerRecyclingDashboardComponent_Conditional_0_Template","CustomerRecyclingDashboardComponent_Conditional_1_Template","ɵɵconditional","i7","i8","ChartComponent","i9","MatInput","i10","NgSelectOption","ɵNgSelectMultipleOption","SelectControlValueAccessor","defaultMetricsHistoryContainer","defaultRecyclerMetrics","defaultRecyclerLocationAndSupplierMetrics","_metricsHistory","_recyclerMetrics","_recyclerLocationAndSupplierMetrics","recyclerLocationAndSupplierMetrics$","require","includeRoutes","production","bootstrapApplication","createApplication","createCustomElement","catch","err","_asyncToGenerator","app","injector","customElements","define"],"sourceRoot":"webpack:///","x_google_ignoreList":[]}