{ "version": 3, "sources": ["src/app/shared/table/services/filter-save.service.ts", "src/app/core/pages/holidays/holidays.component.ts", "src/app/core/pages/holidays/holidays.component.html"], "sourcesContent": ["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class FilterSaveService {\r\n\t\r\n\tconstructor() { }\r\n\r\n\t/**\r\n\t * A place to centralize how we determine the scope name in session storage\r\n\t * @param scopeName The name of the session variable. If null, automatically generate from URL.\r\n\t */\r\n\tprivate getScopeName(scopeName: string) {\r\n\t\tif (scopeName !== null) { return scopeName; }\r\n\t\treturn window.location.href + ':filters';\r\n\t}\r\n\r\n\t/**\r\n\t * Save filters into sessionStorage.\r\n\t * @param filters The filters to save.\r\n\t * @param scopeName The name of the session variable. If null, automatically generate from URL.\r\n\t */\r\n\tsaveFilters(filters: object, scopeName: string = null) { sessionStorage.setItem(this.getScopeName(scopeName), JSON.stringify(filters)); }\r\n\r\n\t/**\r\n\t * Remove filters from sessionStorage.\r\n\t * @param scopeName The name of the session variable. If null, automatically generate from URL.\r\n\t */\r\n\tremoveFilters(scopeName: string = null) { sessionStorage.removeItem(this.getScopeName(scopeName)); }\r\n\r\n\t/**\r\n\t * Retrieve filters from sessionStorage.\r\n\t * @param scopeName The name of the session variable. If null, automatically generate from URL.\r\n\t */\r\n\tgetFilters(scopeName: string = null) { return JSON.parse(sessionStorage.getItem(this.getScopeName(scopeName))); }\r\n\t\r\n\t/**\r\n\t * Retrieve filters from sessionStorage with addtional protection for date ranges.\r\n\t * @param filters The filter object from the component used to validate property types.\r\n\t * @param scopeName The name of the session variable. If null, automatically generate from URL.\r\n\t */\r\n\t getFiltersFromSession(filters: any = null, scopeName: string = null) {\t\t\r\n\t\tfilters = { ...filters, ...this.getFilters(scopeName) };\r\n\t\t\r\n\t\tObject.keys(filters).forEach(key => {\r\n\t\t\t// Set these to date range objects because date-fns doesn't accept strings as date arguments. \r\n\t\t\tif (filters[key]?.dateBegin != null) { filters[key].dateBegin = new Date(filters[key].dateBegin); }\r\n\t\t\tif (filters[key]?.dateEnd != null) { filters[key].dateEnd = new Date(filters[key].dateEnd); }\r\n\t\t});\r\n\t\t\r\n\t\treturn filters;\r\n\t}\r\n}\r\n", "import { Component, OnInit } from '@angular/core';\r\nimport { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';\r\nimport { Subscription } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\nimport { HolidaysVm } from 'app/shared/generated/Models/HolidaysVm';\r\n\r\n@Component({\r\n selector: 'pcg-holidays',\r\n templateUrl: './holidays.component.html',\r\n styleUrls: ['./holidays.component.scss'],\r\n standalone: false\r\n})\r\nexport class HolidaysComponent implements OnInit {\r\n\r\n\tsubscriptions = new Subscription();\r\n\tholidays: HolidaysVm[] = [];\r\n\r\n\tcurrentYear: number = new Date().getFullYear();\r\n\r\n\tconstructor(private modalService: NgbModal, public modal: NgbActiveModal, private httpClient: HttpClient) { }\r\n\r\n\tngOnInit() {\r\n\t\tthis.subscriptions.add(this.httpClient.get(`api/Home/GetHolidaysByYear/?year=${this.currentYear}`)\r\n\t\t\t.subscribe((list: HolidaysVm[]) => {\r\n\t\t\t\tthis.holidays = list;\r\n\t\t\t}));\r\n\t}\r\n}\r\n", "
The following dates are US Public Holidays (Observed) and are not included in calculations for Daily Avg Usage, Cycle Count Reconciliation Scheduling, etc...
\r\n\t\tHoliday | \r\n\t\t\t\t\tDate | \r\n\t\t\t\t
---|---|
{{ h.holidayName }} | \r\n\t\t\t\t\t{{ h.holidayDate }} | \r\n\t\t\t\t