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\direct | 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\direct | layout-view.js | Fri Dec 7 13:07:40 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 438 |
| Changed | 2 | 4 |
| 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 | define([ | |
| 2 | 'under score', | |
| 3 | 'backb one', | |
| 4 | 'mario nette', | |
| 5 | 'modul es/new-app ointment-r equest/vie ws/direct/ clinics/la yout-view' , | |
| 6 | 'modul es/new-app ointment-r equest/vie ws/direct/ preferred- date/prefe rred-date- layout', | |
| 7 | 'modul es/form/qu estion-mod el', | |
| 8 | 'modul es/form/qu estion-vie w', | |
| 9 | 'text! modules/ne w-appointm ent-reques t/views/di rect/templ ate.html', | |
| 10 | 'modul es/new-app ointment-r equest/res ources/dir ect/custom -messages/ model', | |
| 11 | ], functio n( | |
| 12 | _, | |
| 13 | Backbo ne, | |
| 14 | Mn, | |
| 15 | Clinic sView, | |
| 16 | DateTi meView, | |
| 17 | Questi onModel, | |
| 18 | Questi onView, | |
| 19 | templa te, | |
| 20 | Custom Messages | |
| 21 | ) { | |
| 22 | 'use s trict'; | |
| 23 | ||
| 24 | ||
| 25 | var Da taModel = Backbone.M odel.exten d({ | |
| 26 | is Ready: fun ction() { | |
| 27 | return t his.isAppo intmentVal id() && | |
| 28 | this .isDateTim eValid(); | |
| 29 | }, | |
| 30 | is Appointmen tValid: fu nction() { | |
| 31 | return t his.get('a pptLength' ) > 0; | |
| 32 | }, | |
| 33 | ||
| 34 | is DateTimeVa lid: funct ion() { | |
| 35 | return ! _.isEmpty( this.get(' dateTime') ); | |
| 36 | }, | |
| 37 | }); | |
| 38 | ||
| 39 | return Mn.View.e xtend({ | |
| 40 | ta gName: 'fi eldset', | |
| 41 | ||
| 42 | cl assName: ' appointmen t-details- section', | |
| 43 | ||
| 44 | te mplate: _. template(t emplate), | |
| 45 | ||
| 46 | re gions: { | |
| 47 | clinics: '.appoint ment-detai ls-clinics -section', | |
| 48 | purpose: '.appoint ment-detai ls-purpose -section', | |
| 49 | dateTime : '.appoin tment-deta ils-date-t ime-sectio n', | |
| 50 | email: ' .appointme nt-details -email', | |
| 51 | }, | |
| 52 | ||
| 53 | mo delEvents: {'change: clinic': ' _onClinicS elect'}, | |
| 54 | ||
| 55 | pu rposeEvent s: { | |
| 56 | 'change:va lue': 'upd ateF DNS elPurpose' , | |
| 57 | 'change' : 'validat e', | |
| 58 | }, | |
| 59 | ||
| 60 | da taEvents: {'change': 'validate '}, | |
| 61 | ||
| 62 | ch ildViewEve nts: {'no: clinics:fo und': 'noC linicsFoun d'}, | |
| 63 | ||
| 64 | no ClinicsFou nd: functi on() { | |
| 65 | var faci lity = thi s.model.ge t('facilit y'); | |
| 66 | facility .set('dire ctScheduli ngSupporte d', false) ; | |
| 67 | this.mod el.trigger ('change:f acility'); | |
| 68 | ||
| 69 | ||
| 70 | // Stop trying to build the direct app ointments section | |
| 71 | this.des troy(); | |
| 72 | }, | |
| 73 | ||
| 74 | re setStaticR egions: fu nction() { | |
| 75 | if (this .data) { | |
| 76 | this .getRegion ('dateTime ').reset() ; | |
| 77 | this .data = ne w DataMode l(); | |
| 78 | this .bindEvent s(this.dat a, this.da taEvents); | |
| 79 | } | |
| 80 | }, | |
| 81 | ||
| 82 | in itialize: function() { | |
| 83 | this.pur poseModel = this.cre atePurpose Model(); | |
| 84 | this.dat a = new Da taModel(); | |
| 85 | this.cus tomMessage = new Cus tomMessage s(); | |
| 86 | this.cus tomMessage Xhr = this .customMes sage.fetch Appointmen tsMessage( this.model .getInstit utionCode( )); | |
| 87 | this.bin dEvents(th is.purpose Model, thi s.purposeE vents); | |
| 88 | this.bin dEvents(th is.data, t his.dataEv ents); | |
| 89 | }, | |
| 90 | ||
| 91 | on Render: fu nction() { | |
| 92 | var regi on = this. getRegion( 'clinics') ; | |
| 93 | var clin ics = this .options.c linicsColl ection; | |
| 94 | var opti ons = { | |
| 95 | mode l: this.mo del, | |
| 96 | cust omMessages : new Cust omMessages (), | |
| 97 | }; | |
| 98 | ||
| 99 | if (clin ics) { | |
| 100 | opti ons.clinic sCollectio n = clinic s; | |
| 101 | } | |
| 102 | this.mod el.unset(' clinic', { silent: tr ue}); | |
| 103 | region.s how(new Cl inicsView( options)); | |
| 104 | }, | |
| 105 | ||
| 106 | on BeforeDest roy: funct ion() { | |
| 107 | this.unb indEvents( this.purpo seModel, t his.purpos eEvents); | |
| 108 | this.unb indEvents( this.pdata , this.dat aEvents); | |
| 109 | }, | |
| 110 | ||
| 111 | updateF DNS elPurpose: function( model) { | |
| 112 | this.mod el.set('pu rpose', mo del.get('v alue')); | |
| 113 | }, | |
| 114 | ||
| 115 | /* * | |
| 116 | * Factory f unction fo r creating a purpose QuestionM odel for t he Questio nView | |
| 117 | * @param {* } [attribu tes] Addit ional data or Defaul t Override data | |
| 118 | * @param {* } [options ] | |
| 119 | * @return { Backbone.M odel} | |
| 120 | * / | |
| 121 | cr eatePurpos eModel: fu nction(att ributes, o ptions) { | |
| 122 | var defa ults = { | |
| 123 | id: 'purpose', | |
| 124 | clas s: 'form-n ative-cont rolgroup f orm-native -controlgr oup-vertic al', | |
| 125 | type : 'textare a', | |
| 126 | labe l: 'Reason for Appoi ntment:', | |
| 127 | maxl ength: 150 , | |
| 128 | requ ired: true , | |
| 129 | }; | |
| 130 | _.extend (defaults, attribute s); | |
| 131 | ||
| 132 | return n ew Questio nModel(def aults, opt ions || {} ); | |
| 133 | }, | |
| 134 | ||
| 135 | /* * | |
| 136 | * Called fr om a Backb one Model change:cli nic event. | |
| 137 | * @param {B ackbone.Mo del} model | |
| 138 | * @param {* } clinic | |
| 139 | * @param {O bject} opt ions | |
| 140 | * @return { void} | |
| 141 | * @private | |
| 142 | * / | |
| 143 | _o nClinicSel ect: funct ion(model, clinic, o ptions) { | |
| 144 | var clin icId; | |
| 145 | ||
| 146 | if (this .model.get ('clinic') ) { | |
| 147 | clin icId = thi s.model.ge tClinicId( ); | |
| 148 | this ._showPurp oseSection View(model , clinicId , options) ; | |
| 149 | this ._afterMes sageShowDa teTime(mod el, clinic Id, option s); | |
| 150 | retu rn; | |
| 151 | } | |
| 152 | this.res etStaticRe gions(); | |
| 153 | }, | |
| 154 | ||
| 155 | _a fterMessag eShowDateT ime: funct ion(model, clinicId) { | |
| 156 | var show WithArgs = _.partial (this._sho wDateTimeL ayoutView, model, cl inicId); | |
| 157 | var show = _.bind( showWithAr gs, this); | |
| 158 | ||
| 159 | $.when(t his.custom MessageXhr ).done(sho w); | |
| 160 | }, | |
| 161 | ||
| 162 | /* * | |
| 163 | * Called fr om a Backb one Model change:cli nic event | |
| 164 | * @param {B ackbone.Mo del} model | |
| 165 | * @param {s tring} cli nicId | |
| 166 | * @return { void} | |
| 167 | * @private | |
| 168 | * / | |
| 169 | _s howDateTim eLayoutVie w: functio n(model, c linicId) { | |
| 170 | var clin icName = t his.model. getClinicN ame(); | |
| 171 | var clin icsRegion = this.get Region('cl inics'); | |
| 172 | var date TimeRegion = this.ge tRegion('d ateTime'); | |
| 173 | ||
| 174 | var view = clinics Region.cur rentView; | |
| 175 | var slot sModel = v iew.getTim eSlots(cli nicId); | |
| 176 | var slot s = slotsM odel.get(' appointmen tTimeSlot' ); | |
| 177 | ||
| 178 | this.mod el.unset(' dateTime', {silent: true}); | |
| 179 | this.mod el.unset(' desiredDat e', {silen t: true}); | |
| 180 | ||
| 181 | if (!thi s.model.is ExpressCar e()) { | |
| 182 | date TimeRegion .show(new DateTimeVi ew({ | |
| 183 | model: thi s.data, | |
| 184 | collection : slots, | |
| 185 | customMess age: this. customMess age, | |
| 186 | })); | |
| 187 | } | |
| 188 | ||
| 189 | if (type of gas !== 'undefine d') { | |
| 190 | gas( 'send', 'e vent', 've teran-appo intment', 'clinic-se lected', c linicName) ; | |
| 191 | } | |
| 192 | ||
| 193 | }, | |
| 194 | ||
| 195 | /* * | |
| 196 | * Called fr om a Backb one Model change:cli nic event | |
| 197 | * @return { void} | |
| 198 | * @private | |
| 199 | * / | |
| 200 | _s howPurpose SectionVie w: functio n() { | |
| 201 | var regi on = this. getRegion( 'purpose') ; | |
| 202 | ||
| 203 | this.mod el.unset(' purpose', {silent: t rue}); | |
| 204 | region.s how(new Qu estionView ({model: t his.purpos eModel})); | |
| 205 | }, | |
| 206 | ||
| 207 | va lidate: fu nction() { | |
| 208 | var purp ose = this .purposeMo del.get('v alue'); | |
| 209 | var data ; | |
| 210 | ||
| 211 | if (!_.i sEmpty(pur pose) && t his.data.i sReady()) { | |
| 212 | data = this.da ta.toJSON( ); | |
| 213 | data .purpose = purpose; | |
| 214 | this .model.set ('direct', data); | |
| 215 | retu rn true; | |
| 216 | } | |
| 217 | this.mod el.unset(' direct'); | |
| 218 | return f alse; | |
| 219 | }, | |
| 220 | }); | |
| 221 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.