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AC1C,CACEP,GAAU,EACV,KACJ,CAER,CACA,OAAOA,GAGf,iDA9BSN,EAAuB,sCAAvBA,EAAuBhD,QAAvBgD,EAAuB/C,UAAAC,WAFpB,QAAM,SAET8C,CAAuB","names":["ProjectionService","constructor","_http","this","serverUrl","window","location","host","version","_url","replace","getBranchProjectionOpenCloseDates","get","setOpenClosedDates","dates","post","saveBranchProjection","data","getBranchProjection","hierarchyIdentifier","year","HierarchyIdentifier","Year","toString","pipe","catchError","throwError","getBranchYTD","getEmployeeYTDProjHelper","clientProjectionBranchKey","ClientProjectionBranchKey","mostRecentYearWithProjectionData","hierarchyKey","params","getYearsOfInterest","Identifier","i0","i1","factory","ɵfac","providedIn","RankingsService","BehaviorSubject","http","super","getWeightedScoreByPosition","parameters","headers","HttpHeaders","getPartnersRank","getPartnerList","displayLORankings","PositionDdlComponent","_reUsableFunctions","positionSelection","EventEmitter","ngOnInit","positionInfo","getPosition","positionList","positionListSettings","singleSelection","text","enableSearchFilter","showCheckbox","labelKey","primaryKey","enableFilterSelectAll","selectedPosition","onSelectionChange","event","localStorage","setItem","JSON","stringify","emit","onDeselect","selectors","outputs","decls","vars","consts","template","rf","ctx","$event","CommonKendoTableService","searchHandler","columnProperties","searchTerm","filter","row","hasData","i","length","col","allowSearch","dataType","fieldId","toLowerCase","search"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/app/modules/performance/services/projection.service.ts","./src/app/modules/performance/services/rankings.service.ts","./src/app/modules/shared/components/position-ddl/position-ddl.component.ts","./src/app/modules/shared/components/position-ddl/position-ddl.component.html","./src/app/modules/shared/services/common-kendo-table.service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport {\n BranchProjectionOpenCloseDates,\n BranchProjectionDataComplete,\n BranchYTD,\n EmployeeYTD,\n Branch,\n BranchProjectionServerData,\n} from '../components/performance-projections-config/performance-projection.data';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProjectionService {\n private serverUrl = 'https://' + window.location.host;\n private version = '0.5';\n private _url = (this.serverUrl + '/api/v{version}/projection').replace(\n '{version}',\n this.version\n );\n\n constructor(private _http: HttpClient) {}\n\n getBranchProjectionOpenCloseDates() {\n return this._http.get(`${this._url}/getOpenClosedDates`);\n }\n\n setOpenClosedDates(dates: BranchProjectionOpenCloseDates[]) {\n return this._http.post(`${this._url}/setOpenClosedDates`, dates);\n }\n\n public saveBranchProjection(data: BranchProjectionDataComplete) {\n return this._http.post(`${this._url}/branch`, data);\n }\n\n public getBranchProjection(\n hierarchyIdentifier: string,\n year: number\n ): Observable {\n return this._http\n .post(`${this._url}/branch/get`, {\n HierarchyIdentifier: hierarchyIdentifier,\n Year: year.toString(),\n })\n .pipe(\n catchError(() => {\n return throwError(\n 'getBranchProjection: This branch does not have any projections for ' +\n year.toString()\n );\n })\n );\n }\n\n public getBranchYTD(hierarchyIdentifier: string, year: number): Observable {\n return this._http\n .post(`${this._url}/branch/ytd`, {\n HierarchyIdentifier: hierarchyIdentifier,\n Year: year.toString(),\n })\n .pipe(\n catchError(() => {\n return throwError('getBranchYTD: This branch does not have any YTD stats.');\n })\n );\n }\n\n public getEmployeeYTDProjHelper(\n hierarchyIdentifier: string,\n year: number,\n clientProjectionBranchKey?: number\n ): Observable {\n return this._http\n .post(`${this._url}/employee/ytd`, {\n HierarchyIdentifier: hierarchyIdentifier,\n Year: year.toString(),\n ClientProjectionBranchKey: clientProjectionBranchKey,\n })\n .pipe(\n catchError(() => {\n return throwError(\n 'getEmployeeYTDProjHelper: This branch does not have any employee YTD stats for ' +\n year.toString()\n );\n })\n );\n }\n\n mostRecentYearWithProjectionData(hierarchyKey: number): Observable {\n let params = {\n hierarchyKey: hierarchyKey.toString(),\n };\n\n return this._http.get(`${this._url}/mostRecentYearWithProjectionData`, {\n params: params,\n });\n }\n\n getYearsOfInterest(hierarchyIdentifier: string): Observable {\n return this._http.post(`${this._url}/ClientBranchProjectionGetYears`, {\n Identifier: hierarchyIdentifier,\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';\nimport {\n IRankings,\n IRankingEntityProperty,\n IRanksParameters,\n LORankingsData,\n LORankingsParameters,\n IRankingsData,\n} from '../interfaces/performance-rankings';\nimport { IWeightedScoreData } from 'app/modules/performance/interfaces/performance-entity-data';\n@Injectable({\n providedIn: 'root',\n})\nexport class RankingsService extends BehaviorSubject {\n private serverUrl = 'https://' + window.location.host;\n private version = '0.5';\n private _url = (this.serverUrl + '/api/v{version}/rankings/').replace(\n '{version}',\n this.version\n );\n\n constructor(private http: HttpClient) {\n super([]);\n }\n\n getWeightedScoreByPosition(parameters: IRanksParameters): Observable {\n return this.http.post(\n this._url + 'GetWeightedScoreByPosition',\n parameters,\n {\n headers: new HttpHeaders({ 'Content-Type': 'application/json' }),\n }\n );\n }\n\n getPartnersRank(parameters: IRanksParameters): Observable {\n return this.http.post(this._url + 'GetPartnersRank', parameters, {\n headers: new HttpHeaders({ 'Content-Type': 'application/json' }),\n });\n }\n\n getPartnerList(parameters: IRanksParameters): Observable {\n return this.http.post(this._url + 'GetPartnerList', parameters, {\n headers: new HttpHeaders({ 'Content-Type': 'application/json' }),\n });\n }\n\n displayLORankings(parameters: LORankingsParameters): Observable {\n return this.http.post(this._url + 'displayLORankings', parameters, {\n headers: new HttpHeaders({ 'Content-Type': 'application/json' }),\n });\n }\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { IPosition } from '../../../production/interfaces/production-turn-times/production-turn-times';\nimport { ReusableFunctions } from '../../classes/reusable-functions';\n\n@Component({\n selector: 'position-ddl',\n templateUrl: './position-ddl.component.html',\n styleUrls: ['./position-ddl.component.css'],\n})\nexport class PositionDdlComponent implements OnInit {\n positionList: IPosition[];\n selectedPosition: IPosition[];\n positionListSettings: any;\n @Output() positionSelection: EventEmitter = new EventEmitter();\n\n constructor(private _reUsableFunctions: ReusableFunctions) {}\n\n ngOnInit(): void {\n let positionInfo = this._reUsableFunctions.getPosition(0);\n this.positionList = positionInfo.positionList;\n\n this.positionListSettings = {\n singleSelection: true,\n text: 'Select Position',\n enableSearchFilter: false,\n showCheckbox: false,\n labelKey: 'position',\n primaryKey: 'positionIdentifier',\n enableFilterSelectAll: false,\n };\n\n this.selectedPosition = [positionInfo.selectedPosition];\n }\n onSelectionChange(event) {\n let selectedPosition = this.selectedPosition[0];\n localStorage.setItem('selected-position', JSON.stringify(selectedPosition));\n this.positionSelection.emit(selectedPosition);\n }\n\n onDeselect(event: IPosition) {\n this.selectedPosition = [event];\n }\n}\n","
\n \n \n
\n","import { Injectable } from '@angular/core';\nimport { ITableColumns } from '../../reports/interfaces/reporting-data';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommonKendoTableService {\n searchHandler(data: Array, columnProperties: ITableColumns[], searchTerm: string) {\n data = data.filter((row) => {\n let hasData = false;\n for (let i = 0; i < columnProperties.length; i++) {\n let col = columnProperties[i];\n if (\n col.allowSearch &&\n //TODO: smplfy this logic and make the data type dynamic\n (col.dataType === 'string' ||\n col.dataType === 'money' ||\n col.dataType === 'input' ||\n col.dataType === 'date' ||\n col.dataType === 'percent' ||\n col.dataType === 'number')\n ) {\n if (\n row[col.fieldId]\n ?.toString()\n .toLowerCase()\n .search(searchTerm.toLowerCase()) > -1\n ) {\n hasData = true;\n break;\n }\n }\n }\n return hasData;\n });\n return data;\n }\n}\n"],"x_google_ignoreList":[]}