Produced by Araxis Merge on 9/24/2019 1:37:43 PM Eastern 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 | PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_forms-development.zip\spp_mha_forms-development\Javascript\Java\src\main\formswebapp\src\components\LaunchInstrument | CssrsBtn.js | Thu Aug 1 16:20:45 2019 UTC |
| 2 | PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_forms-development.zip\spp_mha_forms-development\Javascript\Java\src\main\formswebapp\src\components\LaunchInstrument | CssrsBtn.js | Mon Sep 23 14:37:25 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 308 |
| Changed | 2 | 6 |
| 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 Rea ct, { useS tate } fro m "react"; | |
| 2 | import { g etData, po stData } f rom "../.. /utils/vis taSupport" ; | |
| 3 | import { B utton, Mod al, Spinne r } from " react-boot strap"; | |
| 4 | import Pro pTypes fro m "prop-ty pes"; | |
| 5 | import Css rsBtnModal from "./C ssrsBtnMod al"; | |
| 6 | import sty led from " styled-com ponents"; | |
| 7 | import Ifr ame from " react-ifra me"; | |
| 8 | ||
| 9 | import { l ibrary } f rom "@fort awesome/fo ntawesome- svg-core"; | |
| 10 | import { F ontAwesome Icon } fro m "@fortaw esome/reac t-fontawes ome"; | |
| 11 | import { f aSpinner } from "@fo rtawesome/ free-solid -svg-icons "; | |
| 12 | library.ad d(faSpinne r); | |
| 13 | ||
| 14 | const Cssr sBtn = pro ps => { | |
| 15 | const [c ssrsData, setcssrsDa ta] = useS tate([]); | |
| 16 | const [s howCssrsMo dal, setSh owCssrsMod al] = useS tate(false ); | |
| 17 | const [m haWebAdmin Id, setmha WebAdminId ] = useSta te(""); | |
| 18 | ||
| 19 | const bu ildAdminSe t = (staff OrPatient, selection , question Mode, cons ult) => { | |
| 20 | var se lectionLis t = []; | |
| 21 | for (l et i = 0; i < select ion.length ; i++) { | |
| 22 | sele ctionList. push({ | |
| 23 | na me: select ion[i], | |
| 24 | id : null, | |
| 25 | ad minId: nul l, | |
| 26 | co mplete: fa lse, | |
| 27 | re place: nul l | |
| 28 | }); | |
| 29 | } | |
| 30 | return { | |
| 31 | pati ent: { | |
| 32 | df n: 100850, | |
| 33 | na me: "Aviva patient, T en", | |
| 34 | ss n: "xxx-xx -0930", | |
| 35 | pi d: "xxx-xx -0930" | |
| 36 | }, | |
| 37 | orde redBy: 109 3, | |
| 38 | inte rview: 109 3, | |
| 39 | date : 3181010. 1032, | |
| 40 | loca tion: "17" , | |
| 41 | cons ult: consu lt, | |
| 42 | ques tionMode: questionMo de, | |
| 43 | entr yMode: sta ffOrPatien t, | |
| 44 | inst ruments: s electionLi st | |
| 45 | }; | |
| 46 | }; | |
| 47 | const ha ndleOnClic kCSSRS = ( ) => { | |
| 48 | // set ShowCssrsM odal(true) ; | |
| 49 | buildA dminSet("s taff", ["C -SSRS"], " all", "nul l"); | |
| 50 | postDa ta( | |
| 51 | "/ap i/mha/assi gnment", | |
| 52 | buil dAdminSet( "staff", [ "C-SSRS"], "all", "n ull") | |
| 53 | ).then (mhaWebAdm inId => { | |
| 54 | cons ole.log("m haWebAdmin Id", mhaWe bAdminId); | |
| 55 | setm haWebAdmin Id(mhaWebA dminId); | |
| 56 | // window. open(`http s:// URL /forms/${m haWebAdmin Id}/964`, "_blank"); | |
| 57 | window.ope n(`https:/ / URL /forms/${m haWebAdmin Id}/960`, "_blank"); | |
| 58 | //wi ndow check what tab is being v iewed. | |
| 59 | // https:/ / URL /EPMO/spp_ mha_web.gi t | |
| 60 | //an other opti on. Second button th at refresh es the dat a. | |
| 61 | ||
| 62 | // @ Value("${a dmin.porta l.role}") | |
| 63 | // request .getSessio n().setAtt ribute("fo rmsToken", "5qTFL4vN LY"); | |
| 64 | // respons e.sendRedi rect("http s://dev.go v.mha/form s/" + admi nId +"/" + divisionN um); | |
| 65 | }); | |
| 66 | }; | |
| 67 | ||
| 68 | const { | |
| 69 | data, | |
| 70 | tracke r, | |
| 71 | adjace ntItems, | |
| 72 | onUpda teValue, | |
| 73 | onUpda teState, | |
| 74 | onShow Contents | |
| 75 | } = prop s; | |
| 76 | const { | |
| 77 | id, | |
| 78 | level, | |
| 79 | formCi d, | |
| 80 | parent Id, | |
| 81 | value, | |
| 82 | requir ed, | |
| 83 | quesno , | |
| 84 | show, | |
| 85 | conten ts, | |
| 86 | text, | |
| 87 | type, | |
| 88 | displa yqno, | |
| 89 | always Show, | |
| 90 | valida teqno | |
| 91 | } = data ; | |
| 92 | const ha ndleUpdate Show = v = > { | |
| 93 | const current_up dated_item = onUpdat eValue(v, data); | |
| 94 | ||
| 95 | const disable_ad jacent_ite ms = | |
| 96 | type === "radi o" ? adjac entItems.m ap(i => on UpdateValu e(!v, i)) : []; | |
| 97 | ||
| 98 | const new_nested _data = tr acker.redu ceRight( | |
| 99 | (pre v, current ) => [{ fo rmCid: cur rent, cont ents: [... prev] }], | |
| 100 | [... disable_ad jacent_ite ms, curren t_updated_ item] | |
| 101 | ); | |
| 102 | ||
| 103 | onUpda teState(ne w_nested_d ata[0]); | |
| 104 | }; | |
| 105 | const in dent = { | |
| 106 | margin Left: 20 * parseInt( level), | |
| 107 | backgr oundColor: "#0000ff" , | |
| 108 | color: "white" | |
| 109 | }; | |
| 110 | ||
| 111 | var load ingStyle = { | |
| 112 | backgr ound: "whi te", | |
| 113 | displa y: "flex", | |
| 114 | justif yContent: "center", | |
| 115 | alignI tems: "cen ter" | |
| 116 | }; | |
| 117 | return ( | |
| 118 | <React .Fragment> | |
| 119 | {sho w && alway sShow && ( | |
| 120 | <> | |
| 121 | <Button on Click={() => handleO nClickCSSR S()} style ={indent}> | |
| 122 | Launch C -SSRS | |
| 123 | </Button> | |
| 124 | <Modal sho w={showCss rsModal} o nHide={() => setShow CssrsModal (false)}> | |
| 125 | <Modal.H eader clos eButton> | |
| 126 | <Modal .Title>C-S SRS</Modal .Title> | |
| 127 | </Modal. Header> | |
| 128 | <Modal.B ody> | |
| 129 | <Ifram e | |
| 130 | url= {`https:// localhost: 8443/forms /${mhaWebA dminId}`} | |
| 131 | widt h="450px" | |
| 132 | heig ht="450px" | |
| 133 | id=" myId" | |
| 134 | clas sName="myC lassname" | |
| 135 | disp lay="initi al" | |
| 136 | posi tion="rela tive" | |
| 137 | /> | |
| 138 | </Modal. Body> | |
| 139 | </Modal> | |
| 140 | </ > | |
| 141 | )} | |
| 142 | ||
| 143 | {onS howContent s(contents )} | |
| 144 | </Reac t.Fragment > | |
| 145 | ); | |
| 146 | }; | |
| 147 | ||
| 148 | CssrsBtn.p ropTypes = { | |
| 149 | data: Pr opTypes.ob ject.isReq uired, | |
| 150 | tracker: PropTypes .array.isR equired, | |
| 151 | adjacent Items: Pro pTypes.arr ay.isRequi red, | |
| 152 | onUpdate Value: Pro pTypes.fun c, | |
| 153 | onUpdate State: Pro pTypes.fun c.isRequir ed, | |
| 154 | onShowCo ntents: Pr opTypes.fu nc.isRequi red | |
| 155 | }; | |
| 156 | ||
| 157 | export def ault Cssrs Btn; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.