Produced by Araxis Merge on 12/7/2018 11:36:04 AM Central Standard 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:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\new-appointment-request\views\common\facility | layout-view.js | Mon Oct 22 23:25:20 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\new-appointment-request\views\common\facility | layout-view.js | Fri Dec 7 13:07:38 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 502 |
| Changed | 2 | 4 |
| Inserted | 1 | 1 |
| 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 | define([ | |||||
| 2 | /* Cor e */ | |||||
| 3 | 'under score', | |||||
| 4 | 'jquer y', | |||||
| 5 | 'backb one', | |||||
| 6 | 'mario nette', | |||||
| 7 | 'App', | |||||
| 8 | ||||||
| 9 | /* Res ources */ | |||||
| 10 | 'modul es/new-app ointment-r equest/res ources/com mon/facili ty/collect ion', | |||||
| 11 | 'modul es/new-app ointment-r equest/res ources/dir ect/clinic s/collecti on', | |||||
| 12 | ||||||
| 13 | /* Vie ws */ | |||||
| 14 | 'modul es/new-app ointment-r equest/vie ws/common/ scheduling -steps/hea ding-view' , | |||||
| 15 | 'modul es/new-app ointment-r equest/vie ws/common/ facility/s ection-vie w', | |||||
| 16 | 'modul es/new-app ointment-r equest/vie ws/common/ facility/s ingle-item -view', | |||||
| 17 | ||||||
| 18 | /* Tem plates */ | |||||
| 19 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-no- match.html ', | |||||
| 20 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-one -match.htm l', | |||||
| 21 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-def ault.html' , | |||||
| 22 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/sched uling-step s/template s/step-reg ion.html', | |||||
| 23 | ], functio n facility LayoutView ( | |||||
| 24 | /* Cor e */ | |||||
| 25 | _, | |||||
| 26 | $, | |||||
| 27 | Backbo ne, | |||||
| 28 | Mn, | |||||
| 29 | app, | |||||
| 30 | ||||||
| 31 | /* Res ources */ | |||||
| 32 | Collec tion, | |||||
| 33 | Clinic sCollectio n, | |||||
| 34 | ||||||
| 35 | /* Vie ws */ | |||||
| 36 | Headin gView, | |||||
| 37 | Sectio nView, | |||||
| 38 | Single ItemView, | |||||
| 39 | ||||||
| 40 | /* Tem plates */ | |||||
| 41 | noMatc hTemplate, | |||||
| 42 | oneMat chTemplate , | |||||
| 43 | defaul tMatchTemp late, | |||||
| 44 | templa te | |||||
| 45 | ) { | |||||
| 46 | 'use s trict'; | |||||
| 47 | ||||||
| 48 | var LINK = '<a href= "https://w ww. DOMAIN . EX /directory /guide/div ision.asp? dnum=1" cl ass="exter nal-link"> VA Facilit y Locator< /a>'; | |||||
| 49 | ||||||
| 50 | // esl int-disabl e-next-lin e max-len | |||||
| 51 | var HE LP_TEXT = 'If you ca nnot find the locati on you nee d, please visit the ' + LINK + ' to cont act the fa cility for assistanc e.'; | |||||
| 52 | var EX PRESS_CARE _ID = 'CR1 '; | |||||
| 53 | var PR IMARY_CARE _ID = '323 '; | |||||
| 54 | ||||||
| 55 | ||||||
| 56 | /** | |||||
| 57 | * @cl ass Facili tyLayoutVi ew | |||||
| 58 | * @ty pedef {Bac kbone.View <Backbone. Model>} | |||||
| 59 | */ | |||||
| 60 | var Vi ew = Mn.Vi ew.extend( { | |||||
| 61 | HE LP_TEXT: H ELP_TEXT, | |||||
| 62 | ||||||
| 63 | te mplate: _. template(t emplate), | |||||
| 64 | ||||||
| 65 | re gions: { | |||||
| 66 | heading: '.step-he ading', | |||||
| 67 | section: '.step-se ction', | |||||
| 68 | }, | |||||
| 69 | ||||||
| 70 | in itialize: function(o ptions) { | |||||
| 71 | var type OfCare = t his.model. getCareId( ); | |||||
| 72 | var city State = th is.model.g et('citySt ate'); | |||||
| 73 | var faci lityCode = cityState .get('root StationCod e'); | |||||
| 74 | var pare ntCode = c ityState.g et('instit utionCode' ); | |||||
| 75 | ||||||
| 76 | this.col lection = new Collec tion(); | |||||
| 77 | this.cli nicsCollec tion = new ClinicsCo llection() ; | |||||
| 78 | this.goo gleAnalyti csProvider = options .googleAna lyticsProv ider; | |||||
| 79 | this.lis tenTo(this .collectio n, 'fetch: success', this.showR egions); | |||||
| 80 | ||||||
| 81 | this.col lection.fe tchPatient Facilities (typeOfCar e, facilit yCode, par entCode); | |||||
| 82 | }, | |||||
| 83 | ||||||
| 84 | /* * | |||||
| 85 | * @return { function} | |||||
| 86 | * / | |||||
| 87 | ge tInstructi onsTemplat e: functio n() { | |||||
| 88 | var leng th = this. collection .length; | |||||
| 89 | if (leng th === 0) { | |||||
| 90 | retu rn _.templ ate(noMatc hTemplate) ; | |||||
| 91 | } else i f (length === 1) { | |||||
| 92 | retu rn _.templ ate(oneMat chTemplate ); | |||||
| 93 | } | |||||
| 94 | return _ .template( defaultMat chTemplate ); | |||||
| 95 | }, | |||||
| 96 | ||||||
| 97 | /* * | |||||
| 98 | * Finds the correct i nstruction s based on the numbe r of facil ities retu rn for the type of c are select ed | |||||
| 99 | * @return { string} ht ml | |||||
| 100 | * / | |||||
| 101 | ge tInstructi ons: funct ion() { | |||||
| 102 | var inst ructionTem plate = th is.getInst ructionsTe mplate(); | |||||
| 103 | var data = { | |||||
| 104 | type OfCareName : this.opt ions.typeO fCareName, | |||||
| 105 | help Text: HELP _TEXT, | |||||
| 106 | }; | |||||
| 107 | ||||||
| 108 | return i nstruction Template(d ata); | |||||
| 109 | }, | |||||
| 110 | ||||||
| 111 | /* * | |||||
| 112 | * @return { void} | |||||
| 113 | * / | |||||
| 114 | sh owRegions: function( ) { | |||||
| 115 | // eslin t-disable- next-line max-len | |||||
| 116 | if (_.is Undefined( app.disabl edFeatures .get('PACT _LOCATION_ FEATURE_SE T')) && th is.model.g etCareId() === PRIMA RY_CARE_ID ) { | |||||
| 117 | this .collateCl inicsForFa cilities() ; | |||||
| 118 | } | |||||
| 119 | ||||||
| 120 | this.sho wHeading() ; | |||||
| 121 | this.sho wBody(); | |||||
| 122 | }, | |||||
| 123 | ||||||
| 124 | /* * | |||||
| 125 | * @return { void} | |||||
| 126 | * / | |||||
| 127 | sh owHeading: function( ) { | |||||
| 128 | var regi on = this. getRegion( 'heading') ; | |||||
| 129 | var mode l = new Ba ckbone.Mod el({ | |||||
| 130 | titl e: View.TI TLE, | |||||
| 131 | numb er: View.S TEP_NUMBER , | |||||
| 132 | inst ructions: this.getIn structions (), | |||||
| 133 | }); | |||||
| 134 | ||||||
| 135 | region.s how(new He adingView( {model: mo del})); | |||||
| 136 | }, | |||||
| 137 | ||||||
| 138 | /* * | |||||
| 139 | * @return { void} | |||||
| 140 | * / | |||||
| 141 | sh owBody: fu nction() { | |||||
| 142 | var leng th = this. collection .length; | |||||
| 143 | var regi on; | |||||
| 144 | var view ; | |||||
| 145 | ||||||
| 146 | if (leng th === 0) { | |||||
| 147 | // T hey won't be able to continue onward no facilities are avail able | |||||
| 148 | retu rn; | |||||
| 149 | } | |||||
| 150 | ||||||
| 151 | region = this.getR egion('sec tion'); | |||||
| 152 | view = l ength === 1 ? this.g etSingleIt emView() : this.getS ectionView (); | |||||
| 153 | ||||||
| 154 | region.s how(view); | |||||
| 155 | }, | |||||
| 156 | ||||||
| 157 | /* * | |||||
| 158 | * Gets the express ca re message . | |||||
| 159 | * @param {s tring} typ eOfCare | |||||
| 160 | * @param {B ackbone.Mo del} facil ity | |||||
| 161 | * @return { string} | |||||
| 162 | * / | |||||
| 163 | ge tExpressMe ssage: fun ction(type OfCare, fa cility) { | |||||
| 164 | if (type OfCare === EXPRESS_C ARE_ID && facility.i sExpressSu pportedTod ay()) { | |||||
| 165 | retu rn facilit y.getExpre ssMessage( ); | |||||
| 166 | } | |||||
| 167 | return ' '; | |||||
| 168 | }, | |||||
| 169 | ||||||
| 170 | /* * | |||||
| 171 | * Creates a custom Vi ew for whe n there is only one facility a vailable | |||||
| 172 | * @return { Marionette } | |||||
| 173 | * / | |||||
| 174 | ge tSingleIte mView: fun ction() { | |||||
| 175 | var mode l = this.c ollection. first(); | |||||
| 176 | var clas sName = mo del.get('s upportsVAR ') ? '' : 'static-te xt-disable d'; | |||||
| 177 | var type OfCare = t his.model. getCareId( ); | |||||
| 178 | ||||||
| 179 | this.mod el.set('fa cility', m odel); | |||||
| 180 | ||||||
| 181 | return n ew SingleI temView({ | |||||
| 182 | clas sName: cla ssName, | |||||
| 183 | mode l: model, | |||||
| 184 | f DNS el: this.m odel, | |||||
| 185 | expr essMessage : this.get ExpressMes sage(typeO fCare, mod el), | |||||
| 186 | }); | |||||
| 187 | }, | |||||
| 188 | ||||||
| 189 | /* * | |||||
| 190 | * Creates t he section view | |||||
| 191 | * @return { Marionette } | |||||
| 192 | * / | |||||
| 193 | ge tSectionVi ew: functi on() { | |||||
| 194 | var clin icsInstitu tionCodes = this.mod el.getCare Id() === P RIMARY_CAR E_ID ? | |||||
| 195 | this .getClinic sInstituti onCodes() : | |||||
| 196 | []; | |||||
| 197 | ||||||
| 198 | return n ew Section View({ | |||||
| 199 | mode l: this.mo del, | |||||
| 200 | pati entEnrolle dFacilitie s: this.co llection, | |||||
| 201 | clin icsInstitu tionCodes: clinicsIn stitutionC odes, | |||||
| 202 | goog leAnalytic sProvider: this.goog leAnalytic sProvider, | |||||
| 203 | }); | |||||
| 204 | }, | |||||
| 205 | ||||||
| 206 | /* * | |||||
| 207 | * Collates all clinic s amongst all facili ties | |||||
| 208 | * @return { void} | |||||
| 209 | * / | |||||
| 210 | co llateClini csForFacil ities: fun ction() { | |||||
| 211 | var type OfCare = t his.model. getCareId( ); | |||||
| 212 | var city State = th is.model.g et('citySt ate'); | |||||
| 213 | var pare ntCode = c ityState.g et('instit utionCode' ); | |||||
| 214 | var view ; | |||||
| 215 | ||||||
| 216 | var inst itutionCod es = this. collection .map(funct ion(model) { | |||||
| 217 | retu rn model.g et('instit utionCode' ); | |||||
| 218 | }); | |||||
| 219 | ||||||
| 220 | var clin icsPromise = this.cl inicsColle ction.fetc hAllClinic s(parentCo de, instit utionCodes , typeOfCa re); | |||||
| 221 | var regi on = this. getRegion( 'section') ; | |||||
| 222 | clinicsP romise.the n(function (results) { | |||||
| 223 | this .clinicsCo llection.r eset(resul ts); | |||||
| 224 | ||||||
| 225 | view = institu tionCodes. length === 1 ? this. getSingleI temView() : this.get SectionVie w(); | |||||
| 226 | regi on.show(vi ew); | |||||
| 227 | ||||||
| 228 | view .injectPac Team(); | |||||
| 229 | }.bind(t his)); | |||||
| 230 | ||||||
| 231 | this.mod el.set('un filteredCl inics', th is.clinics Collection ); | |||||
| 232 | }, | |||||
| 233 | ||||||
| 234 | /* * | |||||
| 235 | * Gets all the instit ution code s for the unfiltered clinics | |||||
| 236 | * @return { array} cli nicsInstit utionCodes a list of all the i nstitution | |||||
| 237 | * codes for the clini cs | |||||
| 238 | * / | |||||
| 239 | ge tClinicsIn stitutionC odes: func tion() { | |||||
| 240 | var clin ics = this .model.get ('unfilter edClinics' ) || new C linicsColl ection(); | |||||
| 241 | var clin icsInstitu tionCodes = clinics. map(functi on(clinic) { | |||||
| 242 | retu rn clinic. get('insti tutionCode '); | |||||
| 243 | }); | |||||
| 244 | ||||||
| 245 | return c linicsInst itutionCod es; | |||||
| 246 | }, | |||||
| 247 | }); | |||||
| 248 | ||||||
| 249 | View.T ITLE = 'Lo cation'; | |||||
| 250 | View.S TEP_NUMBER = 3; | |||||
| 251 | ||||||
| 252 | return View; | |||||
| 253 | }); | |||||
| 254 | T |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.