206. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/7/2018 11:36:01 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.

206.1 Files compared

# Location File Last Modified
1 C:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\appointments\booked cancellation-confirm-popup-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\appointments\booked cancellation-confirm-popup-view.js Fri Dec 7 13:07:12 2018 UTC

206.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 300
Changed 2 4
Inserted 0 0
Removed 0 0

206.3 Comparison options

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

206.4 Active regular expressions

No regular expressions were active.

206.5 Comparison detail

  1   define([
  2       'jquer y',
  3       'backb one',
  4       'under score',
  5       'modul es/page/po pup/popup- layout-vie w',
  6       'text! modules/ap pointments /booked/ca ncellation -confirm.h tml',
  7       'modul es/appoint ments/book ed/appoint ment-cance l-reason-s ection-vie w',
  8       'modul es/appoint ments/canc ellation/c ancellatio n-success- popup-view ',
  9       'modul es/appoint ments/appo intments-m odule',
  10       'User' ,
  11       'model s/resource s-collecti on',
  12       'modul es/form/fo rm-view-mi xin',
  13   ],
  14   function(
  15       $,
  16       Backbo ne,
  17       _,
  18       PopupV iew,
  19       templa te,
  20       Appoin tmentCance lReasonSec tionView,
  21       Cancel lationSucc essPopup,
  22       module ,
  23       User,
  24       Resour ces,
  25       Mixin)  {
  26       'use s trict';
  27  
  28       /**
  29        * @cl ass Cancel ConfirmMod el
  30        * @ty pedef {Bac kbone.View <Backbone. Model>}
  31        */
  32       return  PopupView .extend(Mi xin.form({
  33           id : 'cancel- confirmati on',
  34           te mplate: _. template(t emplate),
  35           ev ents: {
  36                'popupbe forepositi on': 'styl eMaxHeight ',
  37                'popupaf teropen':  'focusOnHe ader',
  38                'popupaf terclose':  'destroy' ,
  39                'click # cancel-app ointment-b tn': 'canc elAppointm ent',
  40                'click # cancel-ret urn-btn':  'returnToD etails',
  41                'change  form': 're setFormVal idation',
  42           },
  43           re gions: {
  44                cancelRe asonRegion : '.cancel -reason-se ction',
  45           },
  46           in itialize:  function(o ptions) {
  47                this.can celReasonL ist = opti ons.cancel ReasonList ;
  48                this.mod el = optio ns.model;
  49                this._mo delType =  options.mo delType;
  50                this._in itializeEl AfterClose (options);
  51           },
  52           re turnToDeta ils: funct ion() {
  53                  this.reset F DNS     el();
  54                this.clo sePopup();
  55           },
  56           ca ncelAppoin tment: fun ction() {
  57                this.res etFormVali dation();
  58                if (this .$el.find( 'form').va lid()) {
  59                    if ( typeof gas  !== 'unde fined') {
  60                         gas('send' , 'event',  'veteran- appointmen t', 'user- cancelled- appointmen t-requeste d');
  61                    }
  62                    this ._initiali zeElAfterC lose({elAf terClose:  '.ui-title '});
  63                    this .closePopu p();
  64                    this .saveCance lledAppoin tment();
  65                } else {
  66                    this .showError Section();
  67                }
  68           },
  69           re setFormVal idation: f unction()  {
  70                this.hid eErrorSect ion();
  71                this.val idator.res etForm();
  72           },
  73           sa veCancelle dAppointme nt: functi on() {
  74                var defe rred = new  $.Deferre d();
  75                var link s = new Re sources(th is.model.g et('link') );
  76                var canc ellationMo del = this .getCancel lationMode l();
  77                var self  = this;
  78                cancella tionModel. save({}, {
  79                    url:  links.get ('cancel-a ppointment ').get('hr ef'),
  80                    meth od: 'PUT',
  81                    cont entType: ' applicatio n/json',
  82                    data Type: 'jso n',
  83                    stat usCode: {
  84                         // returns  nothing o n 200, che cking stat usCode ins tead of do ne()
  85                         200: funct ion() {
  86                             self.m odel.set(c ancellatio nModel.att ributes);
  87                             self.m odel.set(' currentSta tus', 'CAN CELLED BY  PATIENT');
  88                             module .appointme nts.remove (self.mode l);
  89                             self.o nSaveCance lledAppoin tment();
  90                             deferr ed.resolve ();
  91                         },
  92                    },
  93                });
  94           },
  95           on SaveCancel ledAppoint ment: func tion() {
  96                var canc ellationSu ccessPopup ;
  97                cancella tionSucces sPopup = n ew Cancell ationSucce ssPopup({
  98                    id:  this._mode lType + '- success',
  99                    mode lType: thi s._modelTy pe,
  100                    elAf terClose:  '.primary- header h2' ,
  101                });
  102                             
  103                cancella tionSucces sPopup.ope nPopup();
  104           },
  105           ge tCancellat ionModel:  function()  {
  106                return n ew Backbon e.Model({
  107                    appo intmentTim e: this.mo del.get('a ppointment Time'),
  108                    clin icId: this .model.get ('clinic') .id || thi s.model.ge t('clinicI d'),
  109                    canc elReason:  this.model .get('canc elReason') ,
  110                    canc elCode: 'P C',
  111                    rema rks: '',
  112                    clin icName: th is.model.g et('clinic ').name,
  113                    pati entIdentif ier: {
  114                         uniqueId:  User.get(' id'),
  115                         assigningA uthority:  User.get(' idType'),
  116                    },
  117                });
  118           },
  119           on Render: fu nction() {
  120                this.$el .popup({di smissible:  false});
  121                this.add AriaRole() ;
  122  
  123                this.ini tializeFor mValidatio n({errorLa belContain er: '.erro r-list'});
  124                this.sho wChildView ('cancelRe asonRegion ', new App ointmentCa ncelReason SectionVie w({
  125                    mode l: this.mo del,
  126                    mode lType: 'ap pointment' ,
  127                    canc elReasonLi st: this.c ancelReaso nList,
  128                }));
  129  
  130                this.hid eErrorSect ion();
  131           },
  132             resetF DNS     el: functi on(e) {
  133                this.mod el.unset(' cancelReas on', {sile nt: true}) ;
  134                this.mod el.unset(' cancelAppo intment',  {silent: t rue});
  135                this.res etFormVali dation();
  136           },
  137           sh owErrorSec tion: func tion() {
  138                if (!thi s.isDestro yed()) {
  139                    $('# cancel-con firmation- popup').sh ow();
  140                    this .$el.find( '.error-se ction').re moveClass( 'hidden');
  141                    this .$el.find( '#error-li st-heading ').html('T he followi ng errors  were found :');
  142                    this .$el.find( '#error-li st-heading ').focus() ;
  143                }
  144           },
  145           hi deErrorSec tion: func tion() {
  146                if (!thi s.isDestro yed()) {
  147                    this .$el.find( '.error-se ction').ad dClass('hi dden');
  148                    this .$el.find( '#error-li st-heading ').html('' );
  149                }
  150           },
  151       }));
  152   });