Produced by Araxis Merge on 4/2/2019 1:08:01 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Frontend\ars-app\src\app\fpps\home | home.component.ts | Wed Mar 27 19:18:32 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Frontend\ars-app\src\app\fpps\home | home.component.ts | Fri Mar 29 18:15:22 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 588 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | import { C omponent, OnInit, In put } from '@angular /core'; | |
2 | import 'rx js/add/ope rator/swit chMap'; | |
3 | ||
4 | import { A ppSettings Service } from './.. /../shared /app-setti ngs/app-se ttings.ser vice'; | |
5 | import { M enuModel } from './. ./../share d/menu/men u.componen t.model'; | |
6 | import { H omeService } from '. /home.serv ice'; | |
7 | import { U serFacilit yData, Cla imCountDet ails } fro m './home. model'; | |
8 | import { U serInfoMod el } from './user.in fo.model'; | |
9 | import { A uthenticat ionService } from '. /../../aut h/auth.ser vice'; | |
10 | ||
11 | // import { Station } from './ model/Stat ion'; | |
12 | // import { VisnClai ms } from './model/V isnClaims' ; | |
13 | // import { TotalCla ims } from './model/ TotalClaim s'; | |
14 | // import { UserStat ions } fro m './model /UserStati ons'; | |
15 | // import { FormsMod ule } from '@angular /forms'; | |
16 | // import { UserInfo } from '. ./shared/m odels/User Info'; | |
17 | // import { ClaimCou ntDetails } from '.. /shared/mo dels/Claim CountDetai ls'; | |
18 | // import { UserFaci lityData } from '../ shared/mod els/UserFa cilityData '; | |
19 | // import { HomeServ ice } from './home.s ervice'; | |
20 | ||
21 | @Component ({ | |
22 | selector : 'app-hom e', | |
23 | template Url: './ho me.compone nt.html', | |
24 | styleUrl s: ['./hom e.componen t.scss'] | |
25 | }) | |
26 | export cla ss HomeCom ponent imp lements On Init { | |
27 | construc tor( | |
28 | privat e appSetti ngsService : AppSetti ngsService , | |
29 | privat e homeServ ice: HomeS ervice, | |
30 | privat e authenti cationServ ice: Authe nticationS ervice | |
31 | ) {} | |
32 | menu: Me nuModel; | |
33 | ||
34 | visnClai mCounts: C laimCountD etails; | |
35 | stations ClaimCount s: ClaimCo untDetails [] = []; | |
36 | userFaci lityData: UserFacili tyData; | |
37 | totalCla imsAssigne d = 0; | |
38 | totalCla imsAwaitin g = ''; | |
39 | totalCla imsInProce ss = ''; | |
40 | totalCla imsRejecte d = ''; | |
41 | userName = ' AI '; | |
42 | searchSt ation = '' ; | |
43 | userInfo : UserInfo Model; | |
44 | selectAl lStations = false; | |
45 | title = 'Fee Payme nt Process ing'; | |
46 | // allSt ationsActi veCheckMar ked = fals e; | |
47 | // check MarkedStat ionsShownI nAssignSta tionsTable : String[] ; | |
48 | // userN ame: Strin g; | |
49 | // lastL ogin: Stri ng; | |
50 | // roles : String = ''; | |
51 | // userR oles: any; | |
52 | // userI nfo: UserI nfo; | |
53 | // activ eStations: string[] = []; | |
54 | // publi c updatedA ctiveStati onsList: S tring; | |
55 | // publi c visnClai ms: VisnCl aims; | |
56 | // priva te totalCl aims: Tota lClaims; | |
57 | // userS tations: U serStation s; | |
58 | // total ClaimsInEr ror = 0; | |
59 | // homeP ermission; | |
60 | // const ructor(pri vate homeS ervice: Ho meService) {} | |
61 | ngOnInit () { | |
62 | this.u serName = this.authe nticationS ervice.get DecodedUse rInfo().us erName; | |
63 | this.a ppSettings Service | |
64 | .get Menu('FPPS _MENU') | |
65 | .sub scribe(men u => (this .menu = me nu)); | |
66 | ||
67 | this.h omeService .getUserIn fo(this.us erName).su bscribe( | |
68 | data => { | |
69 | th is.userInf o = data; | |
70 | }, | |
71 | err => { | |
72 | wi ndow.alert ('User una uthorized' ); | |
73 | }, | |
74 | () = > { | |
75 | th is.getFaci lities(); | |
76 | } | |
77 | ); | |
78 | } | |
79 | getFacil ities() { | |
80 | this.h omeService .getUserFa cilities(t his.userNa me).subscr ibe( | |
81 | data => { | |
82 | th is.userFac ilityData = data['us erFacility Data']; | |
83 | th is.visnCla imCounts = this.user FacilityDa ta[ | |
84 | 'claimCoun tDetails' | |
85 | ]. filter(sta tion => st ation.stat ionNumber === 'VISN' )[0]; | |
86 | th is.station sClaimCoun ts = data[ 'userFacil ityData'][ | |
87 | 'claimCoun tDetails' | |
88 | ]. filter(sta tion => st ation.stat ionNumber !== 'VISN' ); | |
89 | th is.totalCl aimsAwaiti ng = this. userFacili tyData[ | |
90 | 'totalNumb erOfClaims Awaiting' | |
91 | ]; | |
92 | th is.totalCl aimsInProc ess = this .userFacil ityData[ | |
93 | 'totalNumb erOfClaims InProcess' | |
94 | ]; | |
95 | th is.totalCl aimsReject ed = this. userFacili tyData[ | |
96 | 'totalNumb erOfClaims Rejected' | |
97 | ]; | |
98 | }, | |
99 | err => { | |
100 | co nsole.log( err); | |
101 | }, | |
102 | () = > { | |
103 | co nst statio ns = this. homeServic e.getActiv eStaions() ; | |
104 | if (stations && statio ns.length > 0) { | |
105 | stations.f orEach(sel ectedStati on => { | |
106 | this.sta tionsClaim Counts.for Each(stati on => { | |
107 | if (st ation.stat ionNumber === select edStation) { | |
108 | stat ion.checke d = true; | |
109 | } | |
110 | }); | |
111 | }); | |
112 | } | |
113 | } | |
114 | ); | |
115 | } | |
116 | ||
117 | setActiv eStations( ) { | |
118 | const selectedSt ations = t his.statio nsClaimCou nts | |
119 | .fil ter(statio n => stati on.checked ) | |
120 | .map (stationIn fo => stat ionInfo.st ationNumbe r); | |
121 | ||
122 | sessio nStorage.s etItem('ac tiveStatio ns', JSON. stringify( selectedSt ations)); | |
123 | const selected = sessionSt orage.getI tem('activ eStations' ); | |
124 | this.h omeService .setActive Stations(s electedSta tions); | |
125 | } | |
126 | ||
127 | toggleSe lectAllSta tions() { | |
128 | this.s tationsCla imCounts.f orEach( | |
129 | stat ion => (st ation.chec ked = this .selectAll Stations) | |
130 | ); | |
131 | } | |
132 | ||
133 | isAllSta tionsCheck ed() { | |
134 | this.s electAllSt ations = t his.statio nsClaimCou nts.every( | |
135 | stat ion => sta tion.check ed | |
136 | ); | |
137 | } | |
138 | ||
139 | // se tDataTable () { | |
140 | // this .setUserIn fo(); | |
141 | // this .setRoles( ); | |
142 | // this .populate( ); | |
143 | // } | |
144 | ||
145 | // // Gets the permission from the session, I t is used in the htm l to show and hide t hings | |
146 | // ge tUserPermi ssions() { | |
147 | // this .homePermi ssion = JS ON.parse(s essionStor age.getIte m('userInf o'))[ | |
148 | // 'permi ssions' | |
149 | // ]['h ome']; | |
150 | // } | |
151 | ||
152 | // se tRoles() { | |
153 | // for (let i = 0 ; i < this .userRoles .length; i ++) { | |
154 | // if (i !== this.u serRoles.l ength - 1) { | |
155 | // this.rol es = this. roles + th is.userRol es[i] + ', '; | |
156 | // } else { | |
157 | // this.rol es = this. roles + th is.userRol es[i]; | |
158 | // } | |
159 | // } | |
160 | // } | |
161 | ||
162 | // se tUserInfo( ) { | |
163 | // if ( this.userI nfo === un defined) { | |
164 | // this.u serInfo = JSON.parse (sessionSt orage.getI tem('userI nfo')); | |
165 | // this.u serFacilit yData = JS ON.parse( | |
166 | // sessionS torage.get Item('user FacilityDa ta') | |
167 | // ); | |
168 | // this.u serName = this.userI nfo.userNa me; | |
169 | // this.l astLogin = this.user Info.lastL ogin; | |
170 | // this.u serRoles = this.user Info.userR oles; | |
171 | // sessio nStorage.s etItem('ro le', this. userRoles) ; | |
172 | // } | |
173 | // } | |
174 | // // populate the data t able | |
175 | // po pulate() { | |
176 | // if ( | |
177 | // sessio nStorage.g etItem('ac tiveStatio ns') && | |
178 | // sessio nStorage.g etItem('ac tiveStatio ns').trim( ).length > 0 | |
179 | // ) { | |
180 | // const temp: stri ng[] = ses sionStorag e | |
181 | // .getItem ('activeSt ations') | |
182 | // .trim() | |
183 | // .split(' ,'); | |
184 | // this.a ctiveStati ons = temp ; | |
185 | ||
186 | // let it erator = 0 ; | |
187 | // for ( | |
188 | // let i = 0; | |
189 | // i < this .userFacil ityData.cl aimCountDe tails.leng th; | |
190 | // i++ | |
191 | // ) { | |
192 | // if ( | |
193 | // this.userF acilityDat a.claimCou ntDetails[ i].station Number === | |
194 | // 'VISN' | |
195 | // ) { | |
196 | // this.visnC laimCounts = this.us erFacility Data.claim CountDetai ls[ | |
197 | // i | |
198 | // ]; | |
199 | // } else { | |
200 | // this.stati onsClaimCo unts[ | |
201 | // it erator | |
202 | // ] = this.u serFacilit yData.clai mCountDeta ils[i]; | |
203 | // if ( | |
204 | // th is.activeS tations.in dexOf( | |
205 | // this .stationsC laimCounts [iterator] .stationNu mber | |
206 | // ) > -1 | |
207 | // ) { | |
208 | // th is.station sClaimCoun ts[ | |
209 | // iter ator | |
210 | // ]. activedChe cked = tru e; | |
211 | // } | |
212 | // iterator++ ; | |
213 | // } | |
214 | // } | |
215 | // } el se { | |
216 | // let it erator = 0 ; | |
217 | // for ( | |
218 | // let i = 0; | |
219 | // i < this .userFacil ityData.cl aimCountDe tails.leng th; | |
220 | // i++ | |
221 | // ) { | |
222 | // if ( | |
223 | // this.userF acilityDat a.claimCou ntDetails[ i].station Number === | |
224 | // 'VISN' | |
225 | // ) { | |
226 | // this.visnC laimCounts = this.us erFacility Data.claim CountDetai ls[ | |
227 | // i | |
228 | // ]; | |
229 | // } else { | |
230 | // this.stati onsClaimCo unts[ | |
231 | // it erator | |
232 | // ] = this.u serFacilit yData.clai mCountDeta ils[i]; | |
233 | // this.activ eStations[ | |
234 | // it erator | |
235 | // ] = this.u serFacilit yData.clai mCountDeta ils[ | |
236 | // i | |
237 | // ].stationN umber; | |
238 | // this.stati onsClaimCo unts[itera tor].activ edChecked = true; | |
239 | // iterator++ ; | |
240 | // } | |
241 | // } | |
242 | // } | |
243 | ||
244 | // this .totalClai msAwaiting = this.us erFacility Data.total NumberOfCl aimsAwaiti ng; | |
245 | // this .totalClai msInProces s = this.u serFacilit yData.tota lNumberOfC laimsInPro cess; | |
246 | // this .totalClai msRejected = this.us erFacility Data.total NumberOfCl aimsReject ed; | |
247 | // // t slint:disa ble-next-l ine:max-li ne-length | |
248 | // (thi s.checkMar kedStation sShownInAs signStatio nsTable = this.getAc tiveChecke dStations( ).map( | |
249 | // assign edStationN umber => S tring(assi gnedStatio nNumber) | |
250 | // )), | |
251 | // sessio nStorage.s etItem( | |
252 | // 'activeS tations', | |
253 | // this.act iveStation s.join(',' ) | |
254 | // ); | |
255 | // } | |
256 | ||
257 | // ge tActiveChe ckedStatio ns(): stri ng[] { | |
258 | // retu rn this.st ationsClai mCounts | |
259 | // .filte r(assigned Station => assignedS tation.act ivedChecke d) | |
260 | // .map(a ssignedSta tion => as signedStat ion.statio nNumber); | |
261 | // } | |
262 | ||
263 | // on SetActiveC licked(): void { | |
264 | // this .activeSta tions = th is.getActi veCheckedS tations(); | |
265 | // sess ionStorage .setItem(' activeStat ions', thi s.activeSt ations.joi n(',')); | |
266 | // } | |
267 | ||
268 | // on RefreshSta tsClicked( message: S tring): vo id { | |
269 | // this .homeServi ce.refresh Stats(this .userName) .subscribe ( | |
270 | // data = > { | |
271 | // sessionS torage.set Item( | |
272 | // 'userFacil ityData', | |
273 | // JSON.strin gify(data) | |
274 | // ); | |
275 | // this.use rFacilityD ata = data ; | |
276 | // this.pop ulate(); | |
277 | // }, | |
278 | // error => alert(e rror) | |
279 | // ); | |
280 | // } | |
281 | ||
282 | // is AllChecked (): boolea n { | |
283 | // retu rn this.st ationsClai mCounts.ev ery(_ => _ .activedCh ecked); | |
284 | // } | |
285 | ||
286 | // on ClickSelec tAll() { | |
287 | // cons t element = <HTMLInp utElement> document.g etElementB yId( | |
288 | // 'IPT_a ssignStati ons_select AllCheckBo x_home_1' | |
289 | // ); | |
290 | // cons t isChecke d = elemen t.checked; | |
291 | // for (const ass ignedStati on of this .stationsC laimCounts ) { | |
292 | // assign edStation. activedChe cked = isC hecked; | |
293 | // } | |
294 | // } | |
295 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.