Produced by Araxis Merge on 12/7/2018 11:36:22 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\VATS 2.3.0\var-utility-web-2.3.0@19406cb7810\app\src\modules\var-utility\pages\custom-messages | custom-messages_controller.js | Thu Sep 13 18:55:48 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VATS 2.3.0\var-utility-web-2.3.0@19406cb7810\app\src\modules\var-utility\pages\custom-messages | custom-messages_controller.js | Fri Dec 7 13:49:54 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 8 | 172 |
| Changed | 7 | 20 |
| 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(['a ngular', ' app', 'Cus tomMessage sService'] , function (angular, app) { | |
| 2 | 'u se strict' ; | |
| 3 | ap p.controll er('Custom MessagesCo ntroller', function ($scope, $ http, $q, CustomMess agesServic e, focusSe rvice, | |
| 4 | modalSe rvice, con nectionErr orService, activeIns titution) { | |
| 5 | focu sService.f ocusMain() ; | |
| 6 | ||
| 7 | $sco pe.institu tion = act iveInstitu tion.divis ionName; | |
| 8 | $sco pe.site = activeInst itution.ch ildName; | |
| 9 | $sco pe.customM essages = {customMes sages:[{}] }; | |
| 10 | $sco pe.message DisplayArr ay = [ | |
| 11 | { | |
| 12 | messageI d:'appoint mentNoPref erredDateP opup', | |
| 13 | maxLengt h:250, | |
| 14 | page:"Ne w Appointm ent/Reques t", | |
| 15 | field:"S elect Date /Time – Do n’t see a date or ti me that wo rks for yo u (Pop-Up Content)" | |
| 16 | }, | |
| 17 | { | |
| 18 | messageI d:'noClini cRadioButt ons', | |
| 19 | maxLengt h:250, | |
| 20 | page:"Ne w Appointm ent/Reques t", | |
| 21 | field:"C linic" | |
| 22 | } | |
| 23 | ]; | |
| 24 | ||
| 25 | $sco pe.grouped MessageDis playArray = _.groupB y($scope.m essageDisp layArray,' page'); | |
| 26 | ||
| 27 | Custom MessagesSe rvice.fetc h(activeIn stitution. childName) .then(func tion(respo nse) { | |
| 28 | if (response .status != = 200) { | |
| 29 | re turn conne ctionError Service.sh owServerEr rorMsg(res ponse); | |
| 30 | } | |
| 31 | //re turn the c urrentMess age status | |
| 32 | $sco pe.customM essages = response.d ata; | |
| 33 | if ($s cope.custo mMessages. userFriend lyText === '' || !$s cope.custo mMessages. userFriend lyText){ | |
| 34 | $scope.u serFriendl yText = ac tiveInstit ution.divi sionName; | |
| 35 | $scope.c ustomLocat ion = acti veInstitut ion.divisi onName; | |
| 36 | } else { | |
| 37 | $scope.u serFriendl yText = $s cope.custo mMessages. userFriend lyText; | |
| 38 | $scope.c ustomLocat ion = $sco pe.customM essages.us erFriendly Text; | |
| 39 | } | |
| 40 | ||
| 41 | if ($s cope.custo mMessages. customMess ages.lengt h <= 0) { | |
| 42 | $scope.c ustomMessa ges.custom Messages = [{ messag eId : 'app ointmentNo PreferredD atePopup', messageTe xt : ''}]; | |
| 43 | } | |
| 44 | ||
| 45 | }); | |
| 46 | ||
| 47 | var modalOptio ns = { | |
| 48 | action ButtonText : 'OK', | |
| 49 | header Text: 'Con firmation' , | |
| 50 | bodyTe xt: 'Your text has b een saved. ' | |
| 51 | }; | |
| 52 | ||
| 53 | $sco pe.findMes sage = fun ction(mess ageId) { | |
| 54 | //pass in the me ssage ID, return the message f rom the co llection. | |
| 55 | var me ssageIndex = _.findI ndex($scop e.customMe ssages.cus tomMessage s, functio n(customMe ssage){ | |
| 56 | re turn custo mMessage.m essageId = = messageI d; | |
| 57 | }); | |
| 58 | return $scope.cu stomMessag es.customM essages[me ssageIndex ]; | |
| 59 | }; | |
| 60 | ||
| 61 | $scope .save = fu nction(e) { | |
| 62 | var f DNS troller = this.custo mMessagesF orm; | |
| 63 | f DNS troller.$s etSubmitte d(); | |
| 64 | f DNS troller.va lidationSu mmary.vali date().the n(function () { | |
| 65 | var http RequestPro mise; | |
| 66 | $scope.c ustomMessa ges.userFr iendlyText = $scope. userFriend lyText; | |
| 67 | CustomMe ssagesServ ice.save($ scope.cust omMessages ,activeIns titution.c hildName). then(funct ion(respon se) { | |
| 68 | $scope.cus tomMessage s = respon se.data; | |
| 69 | // update form state | |
| 70 | f DNS troller.$s etPristine (); | |
| 71 | f DNS troller.va lidationSu mmary.clea r(); | |
| 72 | ||
| 73 | modalS ervice.sho wModal({}, modalOpti ons).then( function() { | |
| 74 | fo cusService .focusPrim ary(); | |
| 75 | }); | |
| 76 | }); | |
| 77 | f DNS troller.va lidationSu mmary.summ arizeAsync ([httpRequ estPromise ]); | |
| 78 | }); | |
| 79 | }; | |
| 80 | ||
| 81 | $sco pe.friendl yRestoreDe fault = fu nction(e) { | |
| 82 | var f DNS troller = this.custo mMessagesF orm; | |
| 83 | $scope .userFrien dlyText = activeInst itution.di visionName ; | |
| 84 | f DNS troller.$s etDirty(); | |
| 85 | }; | |
| 86 | ||
| 87 | $sco pe.restore Default = function(e , messageI d) { | |
| 88 | var f DNS troller = this.custo mMessagesF orm; | |
| 89 | var me ssage = $s cope.findM essage(mes sageId); | |
| 90 | Custom MessagesSe rvice.fetc hDefault(m essageId). then(funct ion(respon se) { | |
| 91 | angular.co py(respons e.data, me ssage); | |
| 92 | f DNS troller.$s etDirty(); | |
| 93 | }); | |
| 94 | }; | |
| 95 | }) ; | |
| 96 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.