1(function(){var t={46700:function(t,e,n){var i={"./af":63906,"./af.js":63906,"./ar":40902,"./ar-dz":3853,"./ar-dz.js":3853,"./ar-kw":20299,"./ar-kw.js":20299,"./ar-ly":96825,"./ar-ly.js":96825,"./ar-ma":66379,"./ar-ma.js":66379,"./ar-sa":87700,"./ar-sa.js":87700,"./ar-tn":2059,"./ar-tn.js":2059,"./ar.js":40902,"./az":76043,"./az.js":76043,"./be":7936,"./be.js":7936,"./bg":34078,"./bg.js":34078,"./bm":14014,"./bm.js":14014,"./bn":29554,"./bn-bd":17114,"./bn-bd.js":17114,"./bn.js":29554,"./bo":6529,"./bo.js":6529,"./br":65437,"./br.js":65437,"./bs":19647,"./bs.js":19647,"./ca":59951,"./ca.js":59951,"./cs":26113,"./cs.js":26113,"./cv":37965,"./cv.js":37965,"./cy":35858,"./cy.js":35858,"./da":33515,"./da.js":33515,"./de":62831,"./de-at":6263,"./de-at.js":6263,"./de-ch":51127,"./de-ch.js":51127,"./de.js":62831,"./dv":4510,"./dv.js":4510,"./el":68616,"./el.js":68616,"./en-au":24595,"./en-au.js":24595,"./en-ca":73545,"./en-ca.js":73545,"./en-gb":79609,"./en-gb.js":79609,"./en-ie":43727,"./en-ie.js":43727,"./en-il":93302,"./en-il.js":93302,"./en-in":46305,"./en-in.js":46305,"./en-nz":39128,"./en-nz.js":39128,"./en-sg":84569,"./en-sg.js":84569,"./eo":50650,"./eo.js":50650,"./es":26358,"./es-do":64214,"./es-do.js":64214,"./es-mx":38639,"./es-mx.js":38639,"./es-us":30232,"./es-us.js":30232,"./es.js":26358,"./et":47279,"./et.js":47279,"./eu":15515,"./eu.js":15515,"./fa":27981,"./fa.js":27981,"./fi":37090,"./fi.js":37090,"./fil":79208,"./fil.js":79208,"./fo":2799,"./fo.js":2799,"./fr":23463,"./fr-ca":2213,"./fr-ca.js":2213,"./fr-ch":52848,"./fr-ch.js":52848,"./fr.js":23463,"./fy":41468,"./fy.js":41468,"./ga":88163,"./ga.js":88163,"./gd":2898,"./gd.js":2898,"./gl":76312,"./gl.js":76312,"./gom-deva":20682,"./gom-deva.js":20682,"./gom-latn":49178,"./gom-latn.js":49178,"./gu":31400,"./gu.js":31400,"./he":52795,"./he.js":52795,"./hi":17009,"./hi.js":17009,"./hr":46506,"./hr.js":46506,"./hu":69565,"./hu.js":69565,"./hy-am":93864,"./hy-am.js":93864,"./id":5626,"./id.js":5626,"./is":36649,"./is.js":36649,"./it":90151,"./it-ch":95348,"./it-ch.js":95348,"./it.js":90151,"./ja":79830,"./ja.js":79830,"./jv":33751,"./jv.js":33751,"./ka":63365,"./ka.js":63365,"./kk":85980,"./kk.js":85980,"./km":99571,"./km.js":99571,"./kn":25880,"./kn.js":25880,"./ko":16809,"./ko.js":16809,"./ku":96773,"./ku.js":96773,"./ky":65505,"./ky.js":65505,"./lb":50553,"./lb.js":50553,"./lo":51237,"./lo.js":51237,"./lt":91563,"./lt.js":91563,"./lv":61057,"./lv.js":61057,"./me":96495,"./me.js":96495,"./mi":83096,"./mi.js":83096,"./mk":43874,"./mk.js":43874,"./ml":46055,"./ml.js":46055,"./mn":87747,"./mn.js":87747,"./mr":17113,"./mr.js":17113,"./ms":8687,"./ms-my":7948,"./ms-my.js":7948,"./ms.js":8687,"./mt":14532,"./mt.js":14532,"./my":4655,"./my.js":4655,"./nb":56961,"./nb.js":56961,"./ne":2512,"./ne.js":2512,"./nl":48448,"./nl-be":72936,"./nl-be.js":72936,"./nl.js":48448,"./nn":49031,"./nn.js":49031,"./oc-lnc":5174,"./oc-lnc.js":5174,"./pa-in":30118,"./pa-in.js":30118,"./pl":93448,"./pl.js":93448,"./pt":33518,"./pt-br":62447,"./pt-br.js":62447,"./pt.js":33518,"./ro":70817,"./ro.js":70817,"./ru":10262,"./ru.js":10262,"./sd":58990,"./sd.js":58990,"./se":43842,"./se.js":43842,"./si":37711,"./si.js":37711,"./sk":80756,"./sk.js":80756,"./sl":3772,"./sl.js":3772,"./sq":6187,"./sq.js":6187,"./sr":40732,"./sr-cyrl":75713,"./sr-cyrl.js":75713,"./sr.js":40732,"./ss":99455,"./ss.js":99455,"./sv":69770,"./sv.js":69770,"./sw":80959,"./sw.js":80959,"./ta":36459,"./ta.js":36459,"./te":25302,"./te.js":25302,"./tet":67975,"./tet.js":67975,"./tg":71294,"./tg.js":71294,"./th":2385,"./th.js":2385,"./tk":24613,"./tk.js":24613,"./tl-ph":58668,"./tl-ph.js":58668,"./tlh":58190,"./tlh.js":58190,"./tr":74506,"./tr.js":74506,"./tzl":63440,"./tzl.js":63440,"./tzm":69852,"./tzm-latn":42350,"./tzm-latn.js":42350,"./tzm.js":69852,"./ug-cn":70730,"./ug-cn.js":70730,"./uk":40099,"./uk.js":40099,"./ur":72100,"./ur.js":72100,"./uz":96002,"./uz-latn":26322,"./uz-latn.js":26322,"./uz.js":96002,"./vi":14207,"./vi.js":14207,"./x-pseudo":24674,"./x-pseudo.js":24674,"./yo":10570,"./yo.js":10570,"./zh-cn":73644,"./zh-cn.js":73644,"./zh-hk":22591,"./zh-hk.js":22591,"./zh-mo":89503,"./zh-mo.js":89503,"./zh-tw":88080,"./zh-tw.js":88080};function a(t){var e=s(t);return n(e)}function s(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}a.keys=function(){return Object.keys(i)}
1,a.resolve=s,t.exports=a,a.id=46700},42880:function(t,e,n){"use strict";n(66992),n(88674),n(19601),n(17727);var i,a,s=n(36369),r=(n(92287),n(90707)),o=n.n(r),l=(n(8556),n(4021)),c=n.n(l),u=(n(57327),n(41539),n(9653),function(){var t=this,e=t._self._c;return e("v-layout",{attrs:{row:"",wrap:""}},[e("v-checkbox",{attrs:{"input-value":t.value,label:t.label,hint:t.hint,"persistent-hint":"",color:"primary"},on:{change:function(e){return t.save(e)}}})],1)}),d=[],p={props:["field","update"],computed:{value:function(){return this.field.ContentBool},label:function(){return this.field.Name},hint:function(){return this.field.Description}},methods:{save:function(t){this.$emit("update",{id:this.field.Id,property:{name:"ContentBool",value:t,notificationName:this.field.Name}})}}},m=p,f=n(1001),v=(0,f.Z)(m,u,d,!1,null,"db1114c0",null),h=v.exports,g=function(){var t=this,e=t._self._c;return e("v-flex",{attrs:{xs6:""}},[e("v-menu",{attrs:{"content-class":"v-menu__content__min-width-fix","close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-text-field",t._g({attrs:{value:t.value,label:t.label,"append-icon":"date_range",mask:"####-##-##",box:"","error-messages":t.errors,color:"primary"},on:{change:function(e){t.valueField=e,t.save()}}},i))]}}]),model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[e("v-date-picker",{attrs:{color:"primary"},on:{input:function(e){t.menu=!1}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)],1)},_=[],I=n(36797),A=n.n(I),b={props:["field","update","errors"],data:function(){return{menu:!1,valueField:null,data:{value:null}}},computed:{value:{get:function(){var t=this.field.ContentDate;return t?A()(t).format("YYYY-MM-DD"):""},set:function(t){this.data.value=new Date(t).toISOString()}},label:function(){return this.field.Name}},methods:{save:function(){this.$emit("update",{id:this.field.Id,property:{name:"ContentDate",value:this.data.value,
1notificationName:this.field.Name}})}},watch:{data:{handler:function(t,e){this.save()},deep:!0},valueField:function(t){this.data.value=t?A()(t).format("YYYY-MM-DD"):""}}},x=b,C=(0,f.Z)(x,g,_,!1,null,null,null),y=C.exports,w=function(){var t=this,e=t._self._c;return e("v-text-field",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors},on:{change:function(e){return t.save(e)}}})},T=[],N={props:["field","update","errors"],computed:{value:function(){return this.field.ContentNumber},label:function(){return this.field.Name},hint:function(){return this.field.Description}},methods:{save:function(t){var e=t;isNaN(t)&&(e=""),this.$emit("update",{id:this.field.Id,property:{name:"ContentNumber",value:e,notificationName:this.field.Name}})}}},E=N,P=(0,f.Z)(E,w,T,!1,null,null,null),S=P.exports,R=function(){var t=this,e=t._self._c;return e("v-text-field",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors},on:{change:function(e){return t.save(e)}}})},D=[],L={props:["field","update","errors"],computed:{value:function(){return this.field.ContentNumber},label:function(){return this.field.Name},hint:function(){return this.field.Description}},methods:{save:function(t){this.$emit("update",{id:this.field.Id,property:{name:"ContentNumber",value:t,notificationName:this.field.Name}})}}},M=L,k=(0,f.Z)(M,R,D,!1,null,null,null),O=k.exports,F=function(){var t=this,e=t._self._c;return e("v-select",{attrs:{value:t.value,items:t.items,"item-value":"id","item-text":"text",label:t.label,box:"","error-messages":t.errors},on:{change:function(e){return t.save(e)}}})},$=[],Z=n(3336),G=(n(21249),n(47941),n(74916),n(77601),n(73210),n(75505),n(87714),n(82801),n(1174),n(18264),n(39575),n(82472),n(48675),n(92990),n(18927),n(33105),n(35035),n(74345),n(7174),n(63408),n(14590),n(32846),n(44731),n(77209),n(96319),n(58867),n(37789),n(33739),n(29368),n(14483),n(12056),n(3462),n(30678),n(27462),n(33824),n(55021),n(12974),n(15016),n(15306),n(26699),function(t){return Object.keys(t).map((function(e){return{id:Number(e),text:t[e]}}))}),B=function(t){return"object"===(0,Z.Z)(t)&&null!==t?G(t):[]},U=function(t){var e;switch(t){case 1:e="text";break;case 2:e="rich-text";break;case 3:e="date";break;case 4:e="number";break;case 5:e="float";break;case 6:e="checkbox";break;case 7:e="select";break}return e+"-field"},W=function(t){return t.split(" ").length<3?t.toLowerCase():""},V=function(t){var e=t.Type,n=1===e||2===e?t.ContentText:t.ContentAsText;return n?4===e?parseInt(n):n:""},z=function(t){if(t){var e=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;return e.test(t.trim())||"E-mail must be valid"}return""},j=function(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(e.length),a=new Uint8Array(i),s=0;s<e.length;s++)a[s]=e.charCodeAt(s);var r=new Blob([i],{type:n});return r},Y=function(t,e){return null==t?0:(t=t.replace(/\r|\n/g,""),e?q(t).length:t.length)},q=function(t){return t.replace(/<br \/>/g,"").replace(/<\/?[^>]+>/g,"").replace(/&\w+;/g,"|")},H=function(t){var e=["a","e","i","o","u","y","æ","ø","å"];return t&&0!==t.length?(t=t.toLowerCase(),e.includes(t[0])?"an":"a"):""},K={props:["field","update","errors"],computed:{items:function(){return G(this.field.SelectionTypeContent)},value:function(){return this.field.ContentSelection},label:function(){return this.field.Name}},methods:{save:function(t){this.$emit("update",{id:this.field.Id,property:{name:"ContentSelection",value:t,notificationName:this.field.Name}})}}},Q=K,J=(0,f.Z)(Q,F,$,!1,null,null,null),X=J.exports,tt=function(){var t=this,e=t._self._c;return e("v-flex",[1==t.field.FieldHeight?e("v-text-field",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors,counter:t.counter},on:{change:function(e){return t.save(e)}}}):e("v-textarea",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors,rows:t.field.FieldHeight,counter:t.counter},on:{change:function(e){return t.save(e)}}})],1)},et=[],nt={props:["field","update","errors"],computed:{value:function(){return this.field.ContentText},label:function(){return this.field.Name},hint:function(){return this.field.Description},counter:function(){return this.field.MaxSize}},methods:{save:function(t){this.$emit("update",{id:this.field.Id,property:{name:"ContentText",value:t,notificationName:this.field.Name}})}}},it=nt,at=(0,f.Z)(it,tt,et,!1,null,null,null),st=at.exports,rt=function(){var t=this,e=t._self._c;return t.field?e("v-layout",{attrs:{column:""}},[e("v-flex",{attrs:{shrink:"","pa-1":"","pr-5":""}},[e("p",{staticClass:"fz-md",class:t.errors||t.error?"error--text":"",domProps:{innerHTML:t._s(t.label)}})]),e("v-flex",{attrs:{grow:"","pa-1":""}},[e("app-r-t-e",{attrs:{height:t.fieldHeight,"max-img-size":1,"basic-formatting":"","header-formatting":""},on:{focusOut:function(e){return t.save()},input:function(e){t.setValue(e),t.saveOnIdle()}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}}),t.errors?e("div",{staticClass:"v-messages error--text",domProps:{innerHTML:t._s(t.errors)}}):t._e(),t.error?e("div",{staticClass:"v-messages error--text mb-3",domProps:{innerHTML:t._s(t.error)}}):t._e()],1),e("v-layout",{attrs:{row:"",wrap:"","pl-1":""}}
1,[t.hint&&!t.error?e("div",{staticClass:"v-messages mb-3",class:t.errors?"error--text":"theme--light",domProps:{innerHTML:t._s(t.hint)}}):t._e(),e("div",{staticClass:"v-messages theme--light mb-3 text-right mr-2",class:{"error--text":t.strippedStringLength(t.value)>t.counter}},[t._v(" "+t._s(t.strippedStringLength(t.content))+" / "+t._s(t.counter)+" ")])])],1):t._e()},ot=[],lt=function(){var t=this,e=t._self._c;return e("div",{key:t.key},[e("div",{class:t.imgError?"border-color-red pb-3":"pb-3",on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;e.stopPropagation()}}},[e("error-dialog",{attrs:{errors:t.errors},on:{errorClosed:function(e){return t.handleErrorClose()}}}),e("DxHtmlEditor",{ref:"myHtmlEditor",attrs:{height:t.height,value:t.value,"read-only":t.readOnly,disabled:t.disabled,placeholder:t.placeholder},on:{"value-changed":function(e){return t.getValue(e)},"focus-out":function(e){t.$emit("focusOut"),t.resetTabindexToolbar()},initialized:function(e){return t.onInitialized(e)}}},[t.readOnly?t._e():[e("DxMediaResizing",{attrs:{enabled:!0}}),e("DxImageUpload"),e("DxToolbar",{attrs:{multiline:!0}},[t.basicFormatting?[e("DxItem",{attrs:{name:"undo"}}),e("DxItem",{attrs:{name:"redo"}})]:t._e(),t.headerFormatting?[t.basicFormatting?e("DxItem",{attrs:{name:"separator"}}):t._e(),e("DxItem",{attrs:{name:"size","accepted-values":t.sizeValues,options:t.fontSizeOptions,size:"8px"}}),e("DxItem",{attrs:{name:"font","accepted-values":t.fontValues,options:t.fontFamilyOptions}}),e("DxItem",{attrs:{name:"header","accepted-values":t.headerValues,options:t.headerOptions}})]:t._e(),t.basicFormatting?[t.headerFormatting?e("DxItem",{attrs:{name:"separator"}}):t._e(),e("DxItem",{attrs:{name:"bold"}}),e("DxItem",{attrs:{name:"italic"}}),e("DxItem",{attrs:{name:"strike"}}),e("DxItem",{attrs:{name:"subscript"}}),e("DxItem",{attrs:{name:"superscript"}}),e("DxItem",{attrs:{name:"underline"}})]:t._e(),t.alignFormatting?[t.headerFormatting||t.basicFormatting?e("DxItem",{attrs:{name:"separator"}}):t._e(),e("DxItem",{attrs:{name:"alignLeft"}}),e("DxItem",{attrs:{name:"alignCenter"}}),e("DxItem",{attrs:{name:"alignRight"}}),e("DxItem",{attrs:{name:"alignJustify"}})]:t._e(),t.extensiveFormatting?[t.headerFormatting||t.basicFormatting||t.alignFormatting?e("DxItem",{attrs:{name:"separator"}}):t._e(),e("DxItem",{attrs:{name:"color"}}),e("DxItem",{attrs:{name:"background"}}),e("DxItem",{attrs:{name:"separator"}}),e("DxItem",{attrs:{name:"link"}}),t.disableImagePasting?t._e():e("DxItem",{attrs:{name:"image"}}),e("DxItem",{attrs:{name:"separator"}}),e("DxItem",{attrs:{name:"clear"}}),e("DxItem",{attrs:{name:"codeBlock"}}),e("DxItem",{attrs:{name:"blockquote"}})]:t._e()],2)]],2),t.readOnly?t._e():e("div",{staticClass:"dx-htmleditor text-right pr-3 sans"},[t.showWordCount?e("span",[t._v(t._s(this.wordCounter)+" WORDS")]):t._e(),t.showCharCount?e("span",[e("span",[t._v(t._s(this.charCounter)+" CHARACTERS ")]),e("span",{class:this.charCounter>this.maxCharacterCount?"error--text":"text-dark-gray"},[t._v(" "+t._s(t.maxCharacterCountText)+" ")])]):t._e()])],1),e("div",{staticClass:"error--text"},[t._v(" "+t._s(this.imgError)+" ")])])},ct=[],ut=n(66347),dt=(n(4723),n(95497)),pt=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.$emit("errorClosed"),t.dialog=!1}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",t._l(t.errors,(function(n){return e("div",{key:n.Id,staticClass:"error--text"},[t._v(" "+t._s(n.Message)+" ")])})),0)],1)],1)},mt=[],ft={name:"ErrorDialog",props:{errors:{type:Array,default:function(){return[]}}},data:function(){return{dialog:!1}},watch:{errors:function(){this.errors&&this.errors.length>0&&(this.dialog=!0)},dialog:{handler:function(){!1===this.dialog&&this.$emit("errorClosed")}}}},vt=ft,ht=(0,f.Z)(vt,pt,mt,!1,null,null,null),gt=ht.exports,_t="myHtmlEditor",It=new DOMParser,At={props:{value:String,height:String,disabled:Boolean,headerFormatting:Boolean,basicFormatting:Boolean,alignFormatting:Boolean,extensiveFormatting:Boolean,showWordCount:Boolean,showCharCount:Boolean,readOnly:Boolean,disableImagePasting:Boolean,placeholder:String,maxImgSize:Number,maxCharacterCount:Number},components:{DxHtmlEditor:dt.DxHtmlEditor,DxToolbar:dt.DxToolbar,DxMediaResizing:dt.DxMediaResizing,DxItem:dt.DxItem,DxImageUpload:dt.DxImageUpload,ErrorDialog:gt},data:function(){return{sizeValues:["8pt","10pt","11pt","12pt","14pt","18pt","24pt","36pt"],fontValues:["Arial","Courier New","Georgia","Impact","Lucida Console","Tahoma","Times New Roman","Verdana"],headerValues:[!1,1,2,3,4,5],fontSizeOptions:{inputAttr:{"aria-label":"Font size"}},fontFamilyOptions:{inputAttr:{"aria-label":"Font family"}},headerOptions:{inputAttr:{"aria-label":"Font family"}},wordCounter:null,charCounter:null,imgError:null,localValue:"",key:0}},computed:{htmlEditor:function(){return this.$refs[_t].instance}
1,errors:function(){return this.imgError?[{Message:this.imgError}]:null},maxCharacterCountText:function(){return this.maxCharacterCount?"(MAX ".concat(this.maxCharacterCount," CHARACTERS)"):""}},methods:{handleErrorClose:function(){this.imgError=null,this.key+=1},correctImgSizeRule:function(t){var e,n=It.parseFromString(t,"text/html"),i=n.getElementsByTagName("img"),a=(0,ut.Z)(i);try{for(a.s();!(e=a.n()).done;){var s=e.value,r=s.getAttribute("src");r=r.substring(r.indexOf(",")+1,r.length);var o=atob(r).length;if(o>1e6*this.maxImgSize)return"The image is too big - it can be at most 1MB. The changes were not saved."}}catch(l){a.e(l)}finally{a.f()}return null},focusOut:function(){this.imageError||this.$emit("focusOut")},getValue:function(t){this.wordCounter=this.wordCount(),this.charCounter=this.charCount(),(t.value.length>this.localValue.length+20||t.value.length<this.localValue.length-20)&&(this.imgError=this.correctImgSizeRule(t.value)),null===this.imgError&&(this.localValue=t.value,this.$emit("input",t.value))},charCount:function(){var t=this.htmlEditor.getText(0,this.htmlEditor.getLength());return t?t.length-1:0},wordCount:function(){var t=this.htmlEditor.getText(0,this.htmlEditor.getLength());return 1===t.length?0:t.match(/\S+/g).length},resetTabindexToolbar:function(){var t,e=document.getElementsByClassName("dx-button"),n=document.getElementsByClassName("dx-texteditor-input"),i=(0,ut.Z)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;a.tabIndex=-1}}catch(l){i.e(l)}finally{i.f()}var s,r=(0,ut.Z)(n);try{for(r.s();!(s=r.n()).done;){var o=s.value;o.tabIndex=-1}}catch(l){r.e(l)}finally{r.f()}},onInitialized:function(t){var e=t.component.get("modules/uploader");this.disableImagePasting?(e.DEFAULTS.mimetypes=[],t.component.register({"modules/uploader":e})):(e.DEFAULTS.mimetypes=["image/png","image/jpeg","image/pjpeg","image/gif","image/webp","image/bmp","image/svg+xml","image/vnd.microsoft.icon"],t.component.register({"modules/uploader":e}))}},mounted:function(){this.wordCounter=this.wordCount(),this.charCounter=this.charCount(),this.imgError=this.correctImgSizeRule(this.value),this.$emit("initialized"),this.resetTabindexToolbar()}},bt=At,xt=(0,f.Z)(bt,lt,ct,!1,null,"09f7eb13",null),Ct=xt.exports,yt={components:{AppRTE:Ct},props:["field","update","errors"],computed:{value:{set:function(t){this.content=t,this.error=null},get:function(){return this.field.ContentText}},label:function(){return this.field.Name},hint:function(){return this.field.Description},fieldHeight:function(){return this.field.FieldHeight?38*this.field.FieldHeight+110+"px":"380px"},counter:function(){return this.field.MaxSize}},data:function(){return{content:null,error:null,idletimer:null}},methods:{strippedStringLength:function(t){return Y(t,!0)},save:function(){null!==this.content&&this.content!==this.value&&this.$emit("update",{id:this.field.Id,property:{name:"ContentText",value:this.content,notificationName:this.field.Name}})},saveWithTimeout:function(t){var e=this;setTimeout((function(){return e.save()}),t)},saveOnIdle:function(){var t=this;this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout((function(){t.save()}),1e3)},setValue:function(t){this.content=t,this.error=null}},mounted:function(){this.setValue(this.value)}},wt=yt,Tt=(0,f.Z)(wt,rt,ot,!1,null,null,null),Nt=Tt.exports,Et=function(){var t=this,e=t._self._c;return e("div",[t.files.length<t.currentMaxNumber||-1==t.currentMaxNumber?e("v-toolbar",{attrs:{flat:"",color:"white"}},[e("v-btn",{staticClass:"mb-2",attrs:{color:"primary",disabled:t.disabled,dark:""},on:{click:t.add}},[t._v(t._s(t.addLabel))])],1):t._e(),t.files.length>0||t.currentMaxNumber>0?e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.nominees.length>0?t.nomineesHeaders:t.headers,items:t.files,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.FileName))]),n.item.NominationNomineeId?e("td",[n.item.NominationNomineeName?e("span",[t._v(t._s(n.item.NominationNomineeName))]):e("span",[t._v(t._s(n.item.NominationNomineeId))])]):t._e(),e("td",[t._v(t._s(n.item.Header))]),e("td",{staticClass:"justify-center layout px-0"},[e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.edit(n.item)}}},[t._v("edit")]),e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.download(n.item.Id)}}},[t._v("cloud_download")]),e("v-icon",{attrs:{small:""},on:{click:function(e){return t.remove(n.item.Id)}}},[t._v("delete")])],1)]}}],null,!1,2871278815)}):t._e(),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-modal",{attrs:{file:t.editItem,nominees:t.nominees,nomineeFiles:t.nomineeFiles,maxNumber:t.maxNumber,accept:t.accept},on:{close:t.closeEditModal,update:t.doUpdate,add:t.doAdd}}
1)],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.removeDialog,callback:function(e){t.removeDialog=e},expression:"removeDialog"}},[e("remove-modal",{attrs:{close:t.closeRemoveModal}})],1)],1)},Pt=[],St=(n(82526),n(41817),function(){var t=this,e=t._self._c;return e("v-card",[e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.close.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1),e("v-card-title",[e("span",{staticClass:"headline"},[t._v("FILE")])]),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[t.nominees.length>0?e("v-select",{staticClass:"disabledInput",attrs:{items:t.nominees,label:"Nominee","item-value":"id","item-text":"text",rules:t.nomineeRules,"error-messages":t.error,box:"",disabled:t.nomineeSelectDisabled},model:{value:t.nominee,callback:function(e){t.nominee=e},expression:"nominee"}}):t._e(),e("v-text-field",{staticClass:"disabledInput",attrs:{label:"Select file","append-icon":"attach_file",box:"",rules:t.rules,"error-messages":t.error,disabled:t.isEditing},on:{click:t.pickFile},model:{value:t.fileName,callback:function(e){t.fileName=e},expression:"fileName"}}),e("v-text-field",{attrs:{label:"Headline",rules:t.rules,box:""},model:{value:t.headline,callback:function(e){t.headline=e},expression:"headline"}}),e("v-text-field",{attrs:{label:"Description",box:""},model:{value:t.description,callback:function(e){t.description=e},expression:"description"}}),t.accept?e("input",{ref:"file",staticStyle:{display:"none"},attrs:{type:"file",accept:t.acceptFileTypes},on:{change:t.onFilePicked}}):e("input",{ref:"file",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:t.onFilePicked}})],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary",dark:""},on:{click:function(e){return t.save()}}},[t._v("Save")])],1)],1)}),Rt=[],Dt=n(95082),Lt=(n(68309),n(82481),n(63822)),Mt={props:{file:Object,accept:String,nominees:{type:Array,default:function(){return[]}},maxNumber:{type:Number},nomineeFiles:{type:Object}},data:function(){var t=this;return{id:null,valid:!1,nominee:null,headline:"",description:"",fileName:"",fileData:"",rules:[function(t){return!!t||"This field is required"}],nomineeRules:[function(t){return!!t||"This field is required"},function(e){return e&&(t.nomineeFiles[e]||0)<t.maxNumber||"Only ".concat(t.maxNumber," file(s) are allowed per nominee")}],error:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["fileById"])),{},{nomineeSelectDisabled:function(){return this.isEditing||this.nominees.length<=1},isEditing:function(){return null!=this.file},acceptFileTypes:function(){if(this.accept){if("jpg"===this.accept)return"image/jpeg";if("documents"===this.accept)return".xls,.xlsx,.doc,.docx,.pdf"}return""}}),methods:{pickFile:function(){this.$refs.file.click()},onFilePicked:function(t){var e=this,n=t.target.files;if(void 0!==n[0]){if(this.fileName=n[0].name,this.fileName.lastIndexOf(".")<=0)return;if(this.accept){if("jpg"===this.accept&&"image/jpeg"!==n[0].type)return void(this.error="File format is not appropriate. Please select a JPG");if("documents"===this.accept&&"application/pdf"!==n[0].type&&"application/vnd.ms-excel"!==n[0].type&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!==n[0].type&&"application/msword"!==n[0].type&&"application/vnd.openxmlformats-officedocument.wordprocessingml.document"!==n[0].type)return void(this.error="File format is not appropriate. Please select a PDF/XLS/XLSX/DOC/DOCX");this.error=""}var i=new FileReader;i.readAsDataURL(n[0]),i.addEventListener("load",(function(){var t=i.result.replace(/^data:(.*;base64,)?/,"");t.length%4>0&&(t+="=".repeat(4-t.length%4)),e.fileData=t}))}else this.fileName="",this.fileData=""},save:function(){if(this.$refs.form.validate()&&!this.error){if(this.isEditing){var t={Filename:this.fileName,Header:this.headline,Text:this.description,Id:this.id,NomineeId:this.nominee};this.$emit("update",{fileId:this.id,fileContent:t})}else{var e={Filename:this.fileName,Header:this.headline,Text:this.description,FileContent:this.fileData};this.$emit("add",{nomineeId:this.nominee,fileContent:e})}this.close()}},close:function(){this.$emit("close")}},created:function(){this.file?(this.fileName=this.file.FileName,this.headline=this.file.Header,this.description=this.file.Text,this.nominee=this.file.NominationNomineeId,this.id=this.file.Id):(this.fileName="",this.headline="",this.description="",this.nominee="",this.id=null,1===this.nominees.length&&(this.nominee=this.nominees[0].id))}},kt=Mt,Ot=(0,f.Z)(kt,St,Rt,!1,null,null,null),Ft=Ot.exports,$t=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete the file?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},Zt=[],Gt={props:["close"],methods:{closeModal:function(){this.$emit("close")}}},Bt=Gt,Ut=(0,f.Z)(Bt,$t,Zt,!1,null,null,null),Wt=Ut.exports,Vt={components:{editModal:Ft,removeModal:Wt},props:{files:Array,nominees:{type:Array,default:function(){return[]}},addLabel:{type:String,default:"Add File"},accept:{type:String},maxNumber:{type:Number},disabled:{type:Boolean,default:!1}},data:function(){return{editDialog:!1,removeDialog:!1,removeId:-1,editItem:null,headers:[{text:"Name",value:"FileName",sortable:!1},{text:"",value:"headline",sortable:!1},{text:"Actions",value:"name",sortable:!1,width:"15%",align:"center"}],nomineesHeaders:[{text:"Name",value:"FileName",sortable:!1},{text:"Nominee",value:"FileName",sortable:!1},{text:"",value:"headline",sortable:!1},{text:"Actions",value:"name",sortable:!1,width:"15%",align:"center"}]}},computed:{currentMaxNumber:function(){return this.maxNumber&&this.nominees&&this.nominees.length>0?this.nominees.length*this.maxNumber:this.maxNumber||0},nomineeFiles:function(){var t={};if(this.nominees&&this.nominees.length){var e,n=(0,ut.Z)(this.files);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.NominationNomineeId in t||(t[i.NominationNomineeId]=0),t[i.NominationNomineeId]++}}catch(a){n.e(a)}finally{n.f()}}return t}},methods:{closeEditModal:function(){this.editDialog=!1},closeRemoveModal:function(t){this.removeDialog=!1,t&&this.$emit("remove",this.removeId)},remove:function(t){this.removeId=t,this.removeDialog=!0},edit:function(t){this.editItem=t,this.editDialog=!0},add:function(){this.editItem=null,this.editDialog=!0},download:function(t){this.$emit("download",t)},doAdd:function(t){this.$emit("add",t)},doUpdate:function(t){this.$emit("update",t)}}},zt=Vt,jt=(0,f.Z)(zt,Et,Pt,!1,null,null,null),Yt=jt.exports,qt=function(){var t=this,e=t._self._c;return e("div",[e("v-toolbar",{attrs:{height:"16px",flat:"",color:"white"}},[e("v-spacer"),e("button",{on:{click:function(e){return t.openAll()}}},[e("v-icon",[t._v("keyboard_arrow_down")])],1),e("button",{on:{click:function(e){return t.closeAll()}}},[e("v-icon",[t._v("keyboard_arrow_up")])],1)],1),t.budgetlines&&t.budgetlines.length>0?e("v-expansion-panel",{attrs:{expand:""},model:{value:t.ratePanel,callback:function(e){t.ratePanel=e},expression:"ratePanel"}},[t._l(t.budgetYearList,(function(n){return e("v-expansion-panel-content",{key:n,scopedSlots:t._u([t.getBudgetItems(n).length>0?{key:"header",fn:function(){return[e("v-flex",{attrs:{xs9:""}},[t.budgetYearList.length>1?e("h3",{staticClass:"cardTitle mt-3",attrs:{"align-center":""}},[t._v("Installment "+t._s(n))]):t._e()]),e("v-flex",{attrs:{xs3:""}},[e("h3",{staticClass:"cardTitle mt-3 no-wrap text-right"},[t._v("Total: "+t._s(t._f("currency")(t.getTotalAmount(n))))])])]},proxy:!0}:null],null,!0)},[t.getBudgetItems(n).length>0?e("v-card",[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.getBudgetItems(n),"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(t.getBudgetPostType(n.item)))]),e("td",{staticClass:"no-wrap text-right pr-5"},[t._v(t._s(t._f("currency")(n.item.Amount)))]),e("td",[t._v(t._s(n.item.AmountComment))]),t.readOnly||null!=n.item.AmountUsed?e("td",{staticClass:"no-wrap text-right pr-5"},[null!=n.item.AmountUsed?e("span",{attrs:{title:"Reported spenditure"}},[t._v(t._s(t._f("currency")(n.item.AmountUsed)))]):e("em",[t._v("--")])]):e("td",{staticClass:"layout"},[e("v-icon",{staticClass:"mr-2",attrs:{title:"Edit",small:""},on:{click:function(e){return t.openEditModal(n.item)}}},[t._v("edit")]),e("v-icon",{staticClass:"mr-2",attrs:{title:"Delete",small:""},on:{click:function(e){return t.openRemoveModal(n.item.Id)}}},[t._v("delete")]),e("v-icon",{attrs:{title:"Copy",small:""},on:{click:function(e){return t.duplicate(n.item)}}},[t._v("file_copy")])],1)]}}],null,!0)})],1):t._e()],1)})),e("v-expansion-panel-content",{attrs:{disabled:""},scopedSlots:t._u([{key:"header",fn:function(){return[e("v-flex",{attrs:{xs9:""}}),e("v-flex",{attrs:{xs3:""}},[e("h3",{staticClass:"cardTitle mt-3 pr-4 no-wrap text-right"},[t._v("Total: "+t._s(t._f("currency")(t.getTotalAmount())))])])]},proxy:!0}],null,!1,753747741)})],2):t._e(),e("v-toolbar",{attrs:{flat:"",color:"white"}},[t.readOnly?t._e():e("v-btn",{staticClass:"v-btn",attrs:{color:"primary"},on:{click:function(e){return t.add()}}},[t._v(" Create entry ")])],1),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-budget-modal",{on:{close:t.closeEditModal,update:t.update}})],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.removeDialog,callback:function(e){t.removeDialog=e},expression:"removeDialog"}},[e("remove-budget-modal",{attrs:{close:t.closeRemoveModal}})],1)],1)},Ht=[],Kt=n(89584),Qt=n(50124),Jt=n(48534),Xt=n(64509),te="LOGIN",ee="LOGOUT",ne="S
1IGNUP",ie="RESEND_TOKEN",ae="VERIFY_EMAIL_TOKEN",se="GET_NOMINATION",re="GET_NOMINATION_PDF",oe="GET_NOMINATION_PDF_DATA",le="ADD_NOMINEE",ce="REMOVE_NOMINEE",ue="UPDATE_NOMINEE",de="UPDATE_DYNAMIC_FIELD",pe="UPDATE_NOMINEE_DYNAMIC_FIELD",me="SUBMIT_NOMINATION",fe="VALIDATE_NOMINATION",ve="REFETCH_NOMINATION",he="GET_ROUNDS",ge="GET_PRIVACY_NOTICE",_e="GET_DATA_AGREEMENT",Ie="ACCEPT_NOMINATION",Ae="REOPEN_NOMINATION",be="ADD_FILE",xe="GET_FILES",Ce="REMOVE_FILE",ye="UPDATE_FILE",we="DOWNLOAD_FILE",Te="GET_NOMINATION_LIST",Ne="ADD_NOMINATION",Ee="REMOVE_NOMINATION",Pe="GET_PROFILE",Se="UPDATE_PROFILE",Re="CHANGE_PASSWORD",De="RESET_PASSWORD_EMAIL",Le="RESET_PASSWORD",Me="FETCH_CITY",ke="GET_PENDING_PAYMENT",Oe="GET_PENDING_PAYMENT_INFO",Fe="UPDATE_PENDING_PAYMENT",$e="GET_REVIEW_ROUNDS",Ze="GET_REVIEW_DATA_AGREEMENT",Ge="ACCEPT_REVIEW_DATA_AGREEMENT",Be="GET_REVIEW_NOMINATIONS",Ue="GET_REVIEW",We="CHOOSE_REVIEW_ROUND",Ve="DOWNLOAD_REVIEW_FILE",ze="DOWNLOAD_REVIEW_ATTACHMENT",je="UPDATE_REVIEW_SCORE",Ye="UPDATE_REVIEW_COMMENT",qe="REVIEW_MARK_CONFLICT",He="REVIEW_MARK_FINISHED",Ke="GET_REVIEW_NOMINEES",Qe="RESET_REVIEW_NOMINATION",Je="GET_APPLICATION_PRIVACY_NOTICE",Xe="GET_APPLICATION_DATA_AGREEMENT",tn="GET_APPLICATIONS",en="GET_APPLICATION_ROUNDS",nn="GET_APPLICATION_COPY_ROUNDS",an="ADD_APPLICATION",sn="GET_APPLICATION",rn="GET_APPLICATION_PDF",on="GET_APPLICATION_PDF_DATA",ln="UPDATE_APPLICATION",cn="COPY_APPLICATION",un="APPLICATION_UPDATE_DYNAMIC_FIELD",dn="VALIDATE_APPLICATION",pn="SUBMIT_APPLICATION",mn="DELETE_APPLICATION",fn="WITHDRAW_APPLICATION",vn="REOPEN_APPLICATION",hn="APPLICATION_CREATE_INSTITUTION",gn="APPLICATION_ADD_FILE",_n="APPLICATION_ADD_IMAGE_FILE",In="APPLICATION_ADD_DOCUMENT_FILE",An="APPLICATION_GET_FILES",bn="APPLICATION_GET_IMAGE_FILES",xn="APPLICATION_GET_DOCUMENT_FILES",Cn="APPLICATION_REMOVE_FILE",yn="APPLICATION_UPDATE_FILE",wn="APPLICATION_DOWNLOAD_FILE",Tn="APPLICATION_GET_BUDGET_ITEM",Nn="APPLICATION_GET_BUDGET_ITEMS",En="APPLICATION_GET_LATEST_BUDGET_ITEMS",Pn="APPLICATION_ADD_BUDGET",Sn="APPLICATION_COPY_BUDGET",Rn="APPLICATION_REMOVE_BUDGET",Dn="APPLICATION_UPDATE_BUDGET",Ln="APPLICATION_ADD_APPLICANT",Mn="APPLICATION_GET_APPLICANT",kn="APPLICATION_REMOVE_APPLICANT",On="APPLICATION_UPDATE_APPLICANT",Fn="APPLICATION_GET_APPLICANTS",$n="APPLICATION_FETCH_CITY",Zn="ACCEPT_COAPPLICANT",Gn="APPLICATION_CREATE_BUDGETCR",Bn="APPLICATION_CREATEANDSUBMIT_BUDGETCR",Un="APPLICATION_SUBMIT_BUDGETCR",Wn="APPLICATION_DELETE_BUDGETCR",Vn="APPLICATION_UPDATE_BUDGETCR",zn="APPLICATION_STATUSREPORT_ADD_IMAGE_FILE",jn="APPLICATION_STATUSREPORT_GET_IMAGE_FILES",Yn="APPLICATION_STATUSREPORT_GET_DOCUMENT_FILES",qn="APPLICATION_STATUSREPORT_UPDATE_FILE",Hn="STATUSREPORT_REMOVE_FILE",Kn="STATUSREPORT_DOWNLOAD_FILE",Qn="STATUSREPORT_ADD_DOCUMENT_FILE",Jn="GET_STATUS_REPORT_PDF_DATA",Xn="GET_APPLICATION_GRANT_ACCOUNTING",ti="SUBMIT_APPLICATION_GRANT_ACCOUNTING",ei="GET_REVIEW_APPLICATION_ROUNDS",ni="GET_REVIEW_APPLICATION_DATA_AGREEMENT",ii="ACCEPT_REVIEW_APPLICATION_DATA_AGREEMENT",ai="CHOOSE_REVIEW_APPLICATION_ROUND",si="GET_REVIEW_APPLICATIONS_PREFERENCES",ri="GET_REVIEW_APPLICATIONS",oi="GET_REVIEW_APPLICATION_SCORES",li="GET_REVIEW_APPLICATION",ci="UPDATE__REVIEW_APPLICATION_PREFERENCE",ui="GET_REVIEW_APPLICATION_FILE",di="GET_REVIEW_APPLICATION_PDF",pi="UPDATE_REVIEW_APPLICATION_SCORE",mi="UPDATE_REVIEW_APPLICATION_COMMENT",fi="UPDATE_REVIEW_APPLICATION_MESSAGE",vi="APPLICATION_REVIEW_MARK_CONFLICT",hi="APPLICATION_REVIEW_MARK_FINISHED",gi="REVIEW_APPLICATIONS_MARK_ALL_FINISHED",_i="RESET_REVIEW_APPLICATION",Ii="RESET_REVIEW_APPLICATIONS",Ai="GET_REVIEW_APPLICATIONS_SCORESTATISTIC",bi="GET_REVIEW_APPLICATION_NDA_AGREEMENT",xi="ACCEPT_REVIEW_APPLICATION_NDA_AGREEMENT",Ci="GET_APPLICATION_GRANT",yi="ACCEPT_GRANT_CONDITIONS",wi="GET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR",Ti="UPDATE_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR",Ni="ADD_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR",Ei="REMOVE_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR",Pi="GET_APPLICATION_GRANT_STATUS_REPORT",Si="GET_APPLICATION_GRANT_STATUS_REPORT_PDF",Ri="APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD",Di="ADD_APPLICATION_GRANT_STATUS_REPORT",Li="SUBMIT_APPLICATION_GRANT_STATUS_REPORT",Mi="SUBMIT_APPLICATION_GRANT_STATUS_REPORT_WITHOUT_ACCOUNTING",ki="REMOVE_APPLICATION_GRANT_STATUS_REPORT",Oi="UPDATE_APPLICATION_GRANT_STATUS_REPORT_AMOUNT",Fi="UPDATE_APPLICATION_GRANT_STATUS_REPORT_DESCRIPTION",$i="UPDATE_APPLICATION_GRANT_STATUS_REPORT_RESEARCHFISH",Zi="GET_APPLICATION_GRANT_PAYMENT_DETAILS",Gi="UPDATE_APPLICATION_GRANT_PAYMENT_DETAILS",Bi="ADD_APPLICATION_GRANT_PAYMENT_REQUEST",Ui="GET_APPLICATION_GRANT_PAYMENT_REQUEST",Wi="UPDATE_APPLICATION_GRANT_PAYMENT_REQUEST",Vi="DELETE_APPLICATION_GRANT_PAYMENT_REQUEST",zi="SUBMIT_APPLICATION_GRANT_PAYMENT_REQUEST",ji="CANCEL_APPLICATION_GRANT_PAYMENT_REQUEST",Yi="GET_INSTALLMENT_WIZARD_STATUS",qi="GET_INSTALLMENT_WIZARD_STATUS_RATE",Hi="CREATE_INSTALLMENT_WIZARD",Ki="SUBMIT_INSTALLMENT_WIZARD",Qi="GET_MESSAGES",Ji="GET_APPLICATION_MESSAGES",Xi="ADD_APPLICATION_MESSAGE",ta="GET_NOMINATION_MESSAGES",ea="ADD_NOMINATION_MESSAGE",na="ADD_THREAD_MESSAGE",ia="SEND_MESSAGE_DRAFT",aa="MARK_MESSAGE_READ",sa="UPDATE_MESSAGE_SUBJECT",ra="UPDATE_MESSAGE",oa="GET_MESSAGE_DRAFT",la="DELETE_MESSAGE_DRAFT",ca="GET_MESSAGE_FILE",ua="DELETE_MESSAGE_FILE",da="ADD_MESSAGE_FILE",pa="GET_MESSAGE_FILES",ma="SET_ACTIVE_MESSAGES_THREAD",fa="GET_NOMINEE_MESSAGES",va="ADD_NOMINEE_MESSAGE",ha="GET_POSITION_LIST",ga="GET_POSITION_LIST",_a="GET_GENDER_LIST",Ia="NOTIFY",Aa=function(){var t=this,e=t._self._c;return e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(" Budget entry ")]),e("v-layout",{attrs:{"justify-end":""}},[e("v-btn",{attrs:{icon:""},on:{click:t.close}},[e("v-icon",[t._v("close")])],1)],1)],1),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}}
1,[e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[t.budgetYearList.length>1?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.budgetYearList,label:"Budget year",box:""},model:{value:t.entry.Year,callback:function(e){t.$set(t.entry,"Year",e)},expression:"entry.Year"}})],1):t._e(),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.budgetPostTypeArray,"item-value":"id","item-text":"text",label:"Entry kind",required:"",box:""},model:{value:t.entry.BudgetPostTypeId,callback:function(e){t.$set(t.entry,"BudgetPostTypeId",e)},expression:"entry.BudgetPostTypeId"}})],1),0===t.entry.BudgetPostTypeId?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Entry name",rules:t.entryNameRules,autocomplete:"none",box:"",type:"text",required:""},model:{value:t.entry.Name,callback:function(e){t.$set(t.entry,"Name",e)},expression:"entry.Name"}})],1):t._e(),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Amount (kr.)",autocomplete:"none",box:"",type:"number",required:""},model:{value:t.entry.Amount,callback:function(e){t.$set(t.entry,"Amount",e)},expression:"entry.Amount"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Description",rules:t.descriptionRules,autocomplete:"none",box:"",required:""},model:{value:t.entry.AmountComment,callback:function(e){t.$set(t.entry,"AmountComment",e)},expression:"entry.AmountComment"}})],1)],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary"},on:{click:t.save}},[t._v(" Save ")])],1)],1)},ba=[],xa={name:"EditBudgetModal",data:function(){return{valid:!1,entryNameRules:[function(t){return!!t||"Entry name is required"}],descriptionRules:[function(t){return!!t||"Description is required"}]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)({entry:"application.budgetItem"})),(0,Lt.Se)(["appId","budgetPostTypeList","budgetPostTypeArray","budgetYearList"])),methods:{save:function(){this.$refs.form.validate()&&(0===this.entry.BudgetPostTypeId&&(this.entry.BudgetPostTypeId=null),this.close(),this.$emit("update",this.entry))},close:function(){this.$emit("close")}},created:function(){this.entry.ApplicationId=this.appId,null===this.entry.BudgetPostTypeId&&(this.entry.BudgetPostTypeId=0)}},Ca=xa,ya=(0,f.Z)(Ca,Aa,ba,!1,null,null,null),wa=ya.exports,Ta=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this entry?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},Na=[],Ea={name:"RemoveBudgetModal",props:["close"]},Pa=Ea,Sa=(0,f.Z)(Pa,Ta,Na,!1,null,null,null),Ra=Sa.exports,Da={name:"BudgetList",props:{getLatest:Boolean,readOnly:Boolean},components:{editBudgetModal:wa,removeBudgetModal:Ra},data:function(){return{editDialog:null,removeId:null,removeDialog:null,headersDefault:[{text:"Entry",value:"entry",sortable:!1,width:"30%"},{text:"Budget amount",value:"amount",sortable:!1,width:"15%",align:"right",class:"pr-5"},{text:"Description",value:"description",sortable:!1,width:"40%"},{text:"",value:"actions",sortable:!1,width:"15%"}],headersReadOnly:[{text:"Entry",value:"entry",sortable:!1,width:"30%"},{text:"Budget amount",value:"amount",sortable:!1,width:"15%",align:"right",class:"pr-5"},{text:"Description",value:"description",sortable:!1,width:"40%"},{text:"Amount used",value:"actions",sortable:!1,width:"15%",align:"right",class:"pr-5"}],ratePanel:[!0,!0,!0]}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["budgetYearList"])),(0,Xt.vn)(["application.application","application.budgetItems","application.budgetItemsLatest"])),{},{headers:function(){return this.readOnly?this.headersReadOnly:this.headersDefault},budgetlines:function(){return this.getLatest?this.budgetItemsLatest:this.budgetItems}}),mounted:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.budgetItems||0!==t.budgetItems.length){e.next=3;break}return e.next=3,t.$store.dispatch(Nn);case 3:t.openAll();case 4:case"end":return e.stop()}}),e)})))()},methods:{getBudgetItems:function(t){return this.budgetlines.filter((function(e){return e.Year===t}))},getBudgetPostType:function(t){return 0===t.BudgetPostTypeId||null===t.BudgetPostTypeId?t.Name:t.BudgetPostType?t.BudgetPostType:t.BudgetPostTypeList&&t.BudgetPostTypeId?t.BudgetPostTypeList[t.BudgetPostTypeId]:""},openEditModal:function(t){var e=this;this.$store.dispatch(Tn,t.Id).then((function(){e.editDialog=!0}))},closeEditModal:function(){this.editDialog=!1},openRemoveModal:function(t){this.removeId=t,this.removeDialog=!0},closeRemoveModal:function(t){this.removeDialog=!1,t&&this.remove(this.removeId)},add:function(t){var e=this;this.$store.dispatch(Pn).then((function(){e.editDialog=!0}))},update:function(t){var e=this;console.log("update: "+t),this.$store.dispatch(Dn,t).then((function(){e.openYear(t.Year)}))},duplicate:function(t){var e=this;this.$store.dispatch(Sn,t).then((function(){e.editDialog=!0}))},remove:function(t){this.$store.dispatch(Rn,t)},getTotalAmount:function(t){return t?this.getBudgetItems(t).reduce((function(t,e){return t+(null!=e.AmountUsed?Number(e.AmountUsed):Number(e.Amount))}),0):this.budgetlines.reduce((function(t,e){return t+(null!=e.AmountUsed?Number(e.AmountUsed):Number(e.Amount))}),0)},openAll:function(){var t=this;this.ratePanel=this.budgetYearList.map((function(e){return t.getBudgetItems(e).length>0}))},openYear:function(t){var e=(0,Kt.Z)(this.ratePanel);e[t-1]=!0,this.ratePanel=e},closeAll:function(){this.ratePanel=[]}}},La=Da,Ma=(0,f.Z)(La,qt,Ht,!1,null,null,null),ka=Ma.exports,Oa=function(){var t=this,e=t._self._c;return e("div",[e("h3",{staticClass:"cardTitle mb-2",attrs:{"align-center":""}},[t._v("Co-applicants and Institute Administrators")]),e("div",[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.items,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(t.getName(n.item)))]),e("td",[t._v(t._s(n.item.Email))]),e("td",[n.item.Approved?e("span",[t._v("â")]):t._e()]),e("td",[t._v(t._s(n.item.Role))]),e("td",{staticClass:"justify-center layout px-0"},[e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.editModal(n.item)}}},[t._v("edit")]),e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.removeModal(n.item.Id)}}},[t._v("delete")])],1)]}}])})],1),t.initEditDialog?e("v-dialog",{directives:[{name:"show",rawName:"v-show",value:t.editDialog,expression:"editDialog"}],attrs:{"max-width":"800px",persistent:""},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-modal",{ref:"editModal",attrs:{applicant:t.editItem,errors:t.errors,isLoading:t.isLoading,roles:t.roles},on:{close:t.closeEditModal,update:t.updateModal,add:t.addModal}})],1):t._e(),e("v-dialog",{attrs:{"max-width":"800px"},model:{value:t.removeDialog,callback:function(e){t.removeDialog=e},expression:"removeDialog"}},[e("remove-modal",{attrs:{close:t.closeRemoveModal}})],1),e("v-toolbar",{attrs:{flat:"",color:"white"}},[e("v-btn",{staticClass:"v-btn",attrs:{color:"primary"},on:{click:function(e){return t.openAddModal()}}},[t._v(" Add ")])],1)],1)},Fa=[],$a=(n(57658),function(){var t=this,e=t._self._c;return e("v-card",[e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.close.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1),e("v-card-title",[e("span",{staticClass:"headline pl-3"},[t.applicant?e("span",[t._v("Edit")]):e("span",[t._v("Add")]),t._v(" person")])]),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("p",[t._v(" Added persons, except institute administrators, will be asked to confirm their participation by email. Please note that an application cannot be submitted until such confirmations have taken place ")]),e("p",[e("strong",[t._v(" Please note that your application canât be submitted until such confirmations have taken place. ")])])]),e("v-container",{attrs:{"px-0":""}},[e("v-layout",{attrs:{column:"",wrap:""}},[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding",attrs:{xs6:"","pr-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{disabled:t.isEdit,label:"First name",box:"",required:"",tabindex:"1"},model:{value:t.item.FirstName,callback:function(e){t.$set(t.item,"FirstName",e)},expression:"item.FirstName"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{disabled:t.isEdit,label:"Email",box:"",required:"",tabindex:"3"},model:{value:t.item.Email,callback:function(e){t.$set(t.item,"Email",e)},expression:"item.Email"}})],1),t.profile?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{staticClass:"w-100",attrs:{items:t.positionList,disabled:t.isEdit,label:"Position","item-value":"id","item-text":"text",attach:"",box:"",tabindex:"5"},model:{value:t.item.Position,callback:function(e){t.$set(t.item,"Position",e)},expression:"item.Position"}})],1):t._e(),e("v-layout",{attrs:{row:"",column:""}},[e("p",{staticClass:"fz-md mb-0"},[t._v("Role")]),e("v-radio-group",{staticClass:"mt-2",model:{value:t.item.RoleId,callback:function(e){t.$set(t.item,"RoleId",e)},expression:"item.RoleId"}},t._l(t.roles,(function(t){return e("v-radio",{key:t.value,attrs:{label:t.name,value:t.value,tabindex:"7"}})})),1)],1)],1),e("v-flex",{staticClass:"removePadding",attrs:{xs6:"","pl-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{disabled:t.isEdit,label:"Last name",box:"",required:"",tabindex:"2"},model:{value:t.item.LastName,callback:function(e){t.$set(t.item,"LastName",e)},expression:"item.LastName"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{disabled:t.isEdit,label:"Phone",box:"",tabindex:"4",type:"number"},model:{value:t.item.Phone,callback:function(e){t.$set(t.item,"Phone",e)},expression:"item.Phone"}})],1),t.profile?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{staticClass:"w-100",attrs:{items:t.degreeList,disabled:t.isEdit,label:"Academic degree","item-value":"id","item-text":"text",attach:"",box:"",tabindex:"6"},model:{value:t.item.AcademicDegree,callback:function(e){t.$set(t.item,"A
1cademicDegree",e)},expression:"item.AcademicDegree"}})],1):t._e(),t.profile?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.genderList,disabled:t.isEdit,label:"Gender","item-value":"id","item-text":"text",attach:"",box:""},model:{value:t.item.Gender,callback:function(e){t.$set(t.item,"Gender",e)},expression:"item.Gender"}})],1):t._e()],1)],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.item.RoleId&&3!==t.item.RoleId,expression:"item.RoleId && item.RoleId !== 3"}]},[e("v-layout",{attrs:{row:"",wrap:""}},[e("p",{staticClass:"fz-md"},[t._v("CV")]),t.initRTE?e("app-r-t-e",{attrs:{height:"200px","max-img-size":1,showCharCount:"","basic-formatting":"","header-formatting":"","max-character-count":3e3},model:{value:t.item.CV,callback:function(e){t.$set(t.item,"CV",e)},expression:"item.CV"}}):t._e()],1),e("br"),e("v-layout",{attrs:{row:"",wrap:""}},[e("p",{staticClass:"fz-md"},[t._v("Publications")]),t.initRTE?e("app-r-t-e",{attrs:{height:"200px","max-img-size":1,showCharCount:"","basic-formatting":"","header-formatting":"","max-character-count":3e3},model:{value:t.item.Publications,callback:function(e){t.$set(t.item,"Publications",e)},expression:"item.Publications"}}):t._e()],1)],1),t.isLoading?e("div",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)]):t._e(),t.errors.length?e("div",[e("br"),t._l(t.errors,(function(n){return e("p",{key:n.Message,staticClass:"error--text"},[t._v(" "+t._s(n.Message)+" ")])}))],2):t._e()],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary",dark:""},on:{click:function(e){return t.add()}}},[t._v("Save")])],1)],1)}),Za=[],Ga=(n(2707),{components:{AppRTE:Ct},props:{applicant:[Object],errors:Array,isLoading:{default:!1},allowHost:{default:!1},allowCoApplicant:{default:!1},allowInstituteAdmin:{default:!1},allowMentor:{default:!1},roles:null},data:function(){return{items:["Transport","Fees","Benefits","Accommodation","Other"],isEdit:null,menu:!1,item:{Email:null,FirstName:null,LastName:null,Phone:null,Gender:null,AcademicDegree:null,Position:null,CV:null,Publications:null,RoleId:null,Role:null,Approved:null},initRTE:!1}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["user.profile","application"])),{},{genderList:function(){return B(this.profile.GenderList)},degreeList:function(){return B(this.profile.DegreeList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},positionList:function(){return B(this.profile.TitleList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))}}),watch:{applicant:function(){var t=this;this.applicant?(this.isEdit=!0,this.selectedRole=B(this.applicant.RoleIdList).filter((function(e){return e.id===t.applicant.RoleId})),this.item={Id:this.applicant.Id,Email:this.applicant.Email,FirstName:this.applicant.FirstName,LastName:this.applicant.LastName,Phone:this.applicant.Phone,Gender:this.applicant.Gender,AcademicDegree:this.applicant.AcademicDegree,Position:this.applicant.Position,CV:this.applicant.CV,Publications:this.applicant.Publications,RoleId:this.selectedRole[0].id,Role:this.selectedRole[0].text,Approved:this.applicant.Approved}):(this.isEdit=!1,this.item={Email:null,FirstName:null,LastName:null,Phone:null,Gender:null,AcademicDegree:null,Position:null,CV:null,Publications:null,RoleId:null,Role:null})}},mounted:function(){this.initRTE=!0},methods:{add:function(){this.isEdit?this.$emit("update",{item:this.item}):this.$emit("add",{item:this.item})},close:function(){this.$emit("close")}}}),Ba=Ga,Ua=(0,f.Z)(Ba,$a,Za,!1,null,null,null),Wa=Ua.exports,Va=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this entry?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},za=[],ja={props:["close"],methods:{closeModal:function(){this.$emit("close")}}},Ya=ja,qa=(0,f.Z)(Ya,Va,za,!1,null,null,null),Ha=qa.exports,Ka={props:{items:[Array
1],add:Function,update:Function,remove:Function,allowCoApplicant:{default:!1},allowMentor:{default:!1},allowInstituteAdmin:{default:!1},allowHost:{default:!0},allowCollaborator:{default:!0}},components:{editModal:Wa,removeModal:Ha},data:function(){return{initEditDialog:!1,editItem:null,editDialog:null,removeDialog:null,removeId:null,isLoading:!1,roles:[],headers:[{text:"Name",value:"name",sortable:!1,width:"20%"},{text:"E-mail",value:"email",sortable:!1},{text:"Approved",value:"approved",sortable:!1},{text:"Role",value:"role",sortable:!1},{text:"Actions",value:"actions",sortable:!1}],errors:[]}},methods:{setRoles:function(){this.roles=[],this.allowCoApplicant&&this.roles.push({value:2,name:"Co Applicant"}),this.allowMentor&&this.roles.push({value:4,name:"Mentor"}),this.allowInstituteAdmin&&this.roles.push({value:3,name:"Institute Administrator"}),this.allowHost&&this.roles.push({value:5,name:"Host"}),this.allowCollaborator&&this.roles.push({value:6,name:"Collaborator"})},openAddModal:function(){var t=this;this.errors=[],this.reloadEditDialog().then((function(){t.editItem=null,t.editDialog=!0,t.isDuplicate=!1}))},closeEditModal:function(){this.editDialog=!1},closeRemoveModal:function(t){this.removeDialog=!1,t&&this.remove(this.removeId)},addModal:function(t){var e=this;this.isLoading=!0,this.errors=[],this.add(t).then((function(t){e.isLoading=!1,t.Success?e.closeEditModal():e.errors=t.Messages}))},updateModal:function(t){var e=this;this.isLoading=!0,this.errors=[],this.update(t).then((function(t){e.isLoading=!1,t.Success?e.closeEditModal():e.errors=t.Messages}))},editModal:function(t){var e=this;this.errors=[],this.reloadEditDialog().then((function(){e.$store.dispatch(Mn,t.Id).then((function(t){e.editItem=t,e.editDialog=!0}))}))},removeModal:function(t){this.removeId=t,this.removeDialog=!0},reloadEditDialog:function(){var t=this;return this.setRoles(),new Promise((function(e,n){t.initEditDialog=!1,t.$nextTick((function(){t.initEditDialog=!0,e()}))}))},getName:function(t){return t.FirstName?(t.FirstName||"")+" "+(t.LastName||""):t.Name}},created:function(){this.reloadEditDialog(),this.errors=[]}},Qa=Ka,Ja=(0,f.Z)(Qa,Oa,Fa,!1,null,null,null),Xa=Ja.exports,ts={install:function(t){t.component("checkboxField",h),t.component("dateField",y),t.component("numberField",S),t.component("floatField",O),t.component("selectField",X),t.component("textField",st),t.component("fileList",Yt),t.component("budgetList",ka),t.component("applicantList",Xa),t.component("richTextField",Nt),t.filter("currency",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number(t).toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e})+" kr."}))}},es=ts,ns=function(){var t=this,e=t._self._c;return e("v-app",[e("layout",[e("router-view")],1)],1)},is=[],as=function(){var t=this,e=t._self._c;return e("div",{staticClass:"appWrapper"},[e("appheader"),e("v-content",{staticClass:"no-padding-on-print"},[t._t("default")],2),e("appfooter")],1)},ss=[],rs=function(){var t=this,e=t._self._c;return e("div",[e("v-navigation-drawer",{staticClass:"navigationDrawerStyle",attrs:{fixed:"",app:"","hide-overlay":"","disable-route-watcher":"","mobile-break-point":"1904"},model:{value:t.drawer,callback:function(e){t.drawer=e},expression:"drawer"}},[e("v-list",{attrs:{"two-line":""}},[e("router-link",{staticClass:"link removeHoverStyle",attrs:{to:{name:"Home"}}},[e("v-list-tile",{staticClass:"listTileStyleHeight",on:{click:t.closeMenu}},[e("img",{staticClass:"logo logo-nav",attrs:{src:n(34970)}})])],1),e("v-divider"),t.profile?e("div",[e("router-link",{staticClass:"link",attrs:{to:{name:"Profile"}}},[e("v-list-tile",{on:{click:t.closeMenu}},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("account_box")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle"},[t._v("Profile")])],1)],1)],1),e("v-list-tile",{staticClass:"hoverStyle"},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("power_settings_new")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle",on:{click:function(e){t.logout(),t.closeMenu()}}},[t._v("Logout")])],1)],1),e("v-divider"),t.profile.IsApplicant?e("router-link",{staticClass:"link",attrs:{to:{name:"ApplicationList"}}},[e("v-list-tile",{on:{click:t.closeMenu}},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("view_list")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle"},[t._v("Apply")])],1)],1)],1):t._e(),e("v-divider"),t.profile.IsApplicationReviewer?e("router-link",{staticClass:"link",attrs:{to:{name:"ApplicationReviewWizard"}}},[e("v-list-tile",{on:{click:t.closeMenu}},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("rate_review")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle"},[t._v("Review Application")])],1)],1)],1):t._e(),e("v-divider"),t.profile.IsNominator?e("router-link",{staticClass:"link",attrs:{to:{name:"NominationList"}}},[e("v-list-tile",{on:{click:t.closeMenu}},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("view_list")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle"},[t._v("Nominate")])],1)],1)],1):t._e(),e("v-divider"),t.profile.IsReviewer?e("router-link",{staticClass:"link",attrs:{to:{name:"ReviewWizard"}}},[e("v-list-tile",{on:{click:t.closeMenu}},[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("rate_review")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle"},[t._v("Review Nomination")])],1)],1)],1):t._e(),e("v-divider")],1):e("router-link",{staticClass:"link",attrs:{to:{name:"Login"}}},[e("v-list-tile",[e("v-list-tile-action",[e("v-icon",{attrs:{color:"primary"}},[t._v("account_box")])],1),e("v-list-tile-content",[e("v-list-tile-title",{staticClass:"listTitleStyle",on:{click:t.closeMenu}},[t._v("Login")])],1)],1)],1)],1),e("p",{staticClass:"version"},[t._v("v "+t._s(t.appVersion)+" ")])],1),e("v-toolbar",{staticClass:"toolbarHeight justify-end",attrs:{color:"primary",dar
1k:"",fixed:"",app:"",flat:""}},[e("v-toolbar-side-icon",{staticClass:"sideIcon",on:{click:function(e){e.stopPropagation(),t.drawer=!t.drawer}}}),e("router-link",{staticClass:"link",attrs:{to:{name:"Home"}}},[e("img",{staticClass:"logo",staticStyle:{width:"160px"},attrs:{src:n(5939)}})]),t.profile?e("v-toolbar-items",{staticClass:"headline"},[t.reviewing&&t.profile.IsReviewer&&!t.reviewingApplications?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"ReviewWizard"},flat:""}},[t._v("Review Nomination")]):t._e(),t.applying&&t.profile.IsApplicant&&!t.viewingGrants&&!t.viewingAplicationMessages?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"ApplicationList"},flat:""}},[t._v("Apply")]):t._e(),t.nominating&&t.profile.IsNominator&&!t.viewingNominationMessages?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"NominationList"},flat:""}},[t._v("Nominate")]):t._e(),t.reviewingApplications&&t.profile.IsApplicationReviewer?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"ApplicationReviewWizard"},flat:""}},[t._v("Review Application")]):t._e(),t.viewingGrants?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"ApplicationGrantsFunding"},flat:""}},[t._v("Grant Management")]):t._e(),t.viewingAplicationMessages?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"ApplicationList"},flat:""}},[t._v("Messages")]):t._e(),t.viewingNominationMessages?e("v-btn",{staticClass:"btn-toolbar",attrs:{to:{name:"NominationList"},flat:""}},[t._v("Messages")]):t._e()],1):t._e(),e("v-spacer"),t.reviewing&&t.roundsList&&!t.reviewingApplications?e("div",{staticClass:"review-round"},[e("v-select",{ref:"roundSelector",attrs:{items:t.roundsList,"item-value":"RoundId","item-text":"RoundName",label:"Nomination round",disabled:t.roundsList.length<=1,box:""},on:{change:t.changeReviewRound},model:{value:t.selectedRound,callback:function(e){t.selectedRound=e},expression:"selectedRound"}})],1):t._e(),t.reviewingApplications&&t.appRoundsList?e("div",{staticClass:"review-round"},[e("v-select",{ref:"applicationRoundSelector",attrs:{items:t.appRoundsList,"item-value":"RoundId","item-text":"RoundName",label:"Call",disabled:t.appRoundsList.length<=1,box:""},on:{change:t.changeAppReviewRound},model:{value:t.selectedAppReviewRound,callback:function(e){t.selectedAppReviewRound=e},expression:"selectedAppReviewRound"}})],1):t._e(),t.profile&&t.messages&&t.messages.MessagesCount>0?e("v-menu",{attrs:{"offset-x":"","offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-list-tile-action",t._g({staticClass:"iconPosition messagesIcon cursor-pointer"},i),[e("v-badge",{attrs:{bottom:"",right:"",color:"white"},scopedSlots:t._u([{key:"badge",fn:function(){return[t.messages.UnreadMessagesCount?e("span",[t._v(t._s(t.messages.UnreadMessagesCount))]):t._e()]},proxy:!0}],null,!0)},[e("v-icon",[t._v("mail")])],1)],1)]}}],null,!1,177154937)},[e("v-list",t._l(t.messages.MessageAssociationList,(function(n){return e("v-list-tile",{key:n.EntityId,on:{click:function(e){return t.openMessages(n)}}},[e("v-list-tile-title",[1===n.MessageRefType?e("span",[t._v("Nomination")]):t._e(),3===n.MessageRefType?e("span",[t._v("Application")]):t._e(),t._v(" "+t._s(n.EntityReference)+" ("+t._s(n.MessageCount)+") ")])],1)})),1)],1):t._e(),e("v-list-tile-action",{staticClass:"iconPosition"},[e("router-link",{staticClass:"link",attrs:{to:{name:"Profile"}}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.profile,expression:"profile"}],staticClass:"icon"},[t._v(t._s(t.initials))])])],1)],1),t.profile?e("add-nomination"):t._e(),t.profile?e("add-application"):t._e(),t.profile?e("payment-info-dialog"):t._e()],1)},os=[],ls=(n(47042),n(69600),n(23157),n(32023),function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"content-class":"xlmodalWidth"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("h1",{staticClass:"text-xs-center headline"},[t._v("Please provide payment details")]),e("h3",{staticClass:"mb-5"},[t._v(t._s(t.description))]),t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),!t.isLoading&&t.payment?e("v-form",{ref:"form",staticClass:"form",attrs:{"lazy-vali
1dation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs12:""}},[e("payment-details-fields",t._b({},"payment-details-fields",t.payment,!1,!0)),e("v-toolbar",{attrs:{flat:"",color:"white"}},[e("v-btn",{staticClass:"v-btn",attrs:{color:"primary",disabled:!t.valid},on:{click:t.update}},[t._v(" Save payment information ")])],1)],1)],1)],1)],1):t._e()],1)],1)],1)}),cs=[],us=function(){var t=this,e=t._self._c;return e("span",[t.PaymentMethodList?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{value:t.PaymentMethodId,items:t.PaymentMethodList,label:"Standard payment method","item-value":"Id","item-text":"Name",attach:"",box:""},on:{change:function(e){return t.$emit("update:PaymentMethodId",e)}}})],1):t._e(),t.paymentMethod?[t.paymentMethod.ShowRegistrationNumber?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.registrationNumberRules,value:t.RegistrationNumber,label:"Registration number",box:""},on:{input:function(e){return t.$emit("update:RegistrationNumber",e)}}})],1):t._e(),t.paymentMethod.ShowAccountNumber?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.accountNumberRules,value:t.AccountNumber,label:"Account number",box:""},on:{input:function(e){return t.$emit("update:AccountNumber",e)}}})],1):t._e(),t.paymentMethod.ShowSwiftBic?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.genericRules,value:t.SwiftBic,label:"Swift/Bic",box:""},on:{input:function(e){return t.$emit("update:SwiftBic",e)}}})],1):t._e(),t.paymentMethod.ShowIban?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.genericNoSpaceRules,value:t.Iban,label:"IBAN",box:""},on:{input:function(e){return t.$emit("update:Iban",e)}}})],1):t._e(),t.paymentMethod.ShowAbaFw?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.genericNoSpaceRules,value:t.AbaFw,label:"ABA/FW/IBAN/Other",box:""},on:{input:function(e){return t.$emit("update:AbaFw",e)}}})],1):t._e()]:t._e()],2)},ds=[],ps=(n(69826),{name:"PaymentDetailsFields",props:["PaymentMethodList","PaymentMethodId","RegistrationNumber","AccountNumber","SwiftBic","Iban","AbaFw"],data:function(){return{registrationNumberRules:[function(t){return!!t||"Registration number is required"},function(t){return/^\d+$/.test(t)||"Only numbers are allowed"}],accountNumberRules:[function(t){return!!t||"Account number is required"},function(t){return/^\d+$/.test(t)||"Only numbers are allowed"}],genericRules:[function(t){return!!t||"This field is required"}],genericNoSpaceRules:[function(t){return!!t||"This field is required"},function(t){return null==t||-1===t.indexOf(" ")||"Spaces are not allowed"}]}},computed:{paymentMethod:function(){var t=this;return null==this.PaymentMethodList?null:this.PaymentMethodList.find((function(e){return e.Id===t.PaymentMethodId}))}},methods:{},created:function(){}}),ms=ps,fs=(0,f.Z)(ms,us,ds,!1,null,null,null),vs=fs.exports,hs={name:"PaymentInfoDialog",components:{paymentDetailsFields:vs},data:function(){return{dialog:!1,isLoading:!1,paymentMethods:[],payment:{PaymentMethodId:null,CivilRegistrationNumber:null,BusinessId:null,ReferenceNumber:null,RegistrationNumber:null,PaymentMethodList:null,AccountNumber:null,AbaFw:null,Iban:null,SwiftBic:null,AcceptPaymentDetails:!1},valid:!1}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)({paymentDetails:"nominees.payment"})),(0,Lt.Se)({description:"pendingPaymentDescription"})),watch:{paymentDetails:function(){this.paymentDetails?(this.payment.CivilRegistrationNumber=this.paymentDetails.CivilRegistrationNumber,this.payment.BusinessId=this.paymentDetails.BusinessId,this.payment.ReferenceNumber=this.paymentDetails.ReferenceNumber,this.payment.AccountNumber=this.paymentDetails.AccountNumber,this.payment.RegistrationNumber=this.paymentDetails.RegistrationNumber,this.payment.AbaFw=this.paymentDetails.AbaFw,this.payment.Iban=this.paymentDetails.Iban,this.payment.SwiftBic=this.paymentDetails.SwiftBic,this.payment.PaymentMethodId=this.paymentDetails.PaymentMethodId,this.payment.PaymentMethodList=this.paymentDetails.PaymentMethodList,this.dialog=!0):this.dialog=!1}},methods:{update:function(){var t=this;this.$refs.form.validate()&&(this.isLoading=!0,this.$store.dispatch(Fe,this.payment).then((function(e){t.$store.dispatch(ke),t.isLoading=!1})))}}},gs=hs,_s=(0,f.Z)(gs,ls,cs,!1,null,null,null),Is=_s.exports,As=function(){var t=this,e=t._self._c;return e("div",{on:{click:t.addNomination}},[t._t("default"),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Please select type of prize nomination")])]),e("v-card-actions",[e("v-spacer"),t.rounds?e("div",[e("v-select",{attrs:{items:t.rounds,"no-data-text":"No open calls","item-value":"RoundId","item-text":"RoundName",label:"Call",box:""},model:{value:t.roundId,callback:function(e){t.roundId=e},expression:"roundId"}})],1):t._e()],1)],1)],1),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.privacyModal,callback:function(e){t.privacyModal=e},expression:"privacyModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[e("iframe",{ref:"privacyFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closePrivacyModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closePrivacyModal(!0)}}},[t._v(" Accept ")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.dataAgreementModal,callback:function(e){t.dataAgreementModal=e},expression:"dataAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[e("iframe",{ref:"dataAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeDataAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeDataAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1)],2)},bs=[],xs={data:function(){return{modal:!1,round:null,roundId:null,privacyModal:!1,dataAgreementModal:!1,DataTransferAgreementAccepted:!1,PrivacyNoticeAccepted:!1}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["nominationList.privacyNotice","nominationList.dataAgreement"])),(0,Xt.vn)({rounds:"nominationList.rounds"})),watch:{roundId:function(t){t&&(this.round=this.rounds.find((function(e){return e.RoundId===t})),this.DataTransferAgreementAccepted=!1,this.PrivacyNoticeAccepted=!1,this.addNominationWithRound(t))},modal:function(t){t&&(this.roundId=null)}},mounted:function(){var t=this;this.roundId=null,this.$store.dispatch(he),this.$store.dispatch(ge).then((function(){t.$refs.privacyFrame.contentWindow.document.open(),t.$refs.privacyFrame.contentWindow.document.write(t.privacyNotice),t.$refs.privacyFrame.contentWindow.document.close()})),this.$store.dispatch(_e).then((function(){t.$refs.dataAgreementFrame.contentWindow.document.open(),t.$refs.dataAgreementFrame.contentWindow.document.write(t.dataAgreement),t.$refs.dataAgreementFrame.contentWindow.document.close()})),this.$events.$on("addNomination",(function(){t.modal=!0}))},methods:{addNomination:function(){1===this.rounds.length?this.addNominationWithRound(this.rounds[0].RoundId):this.modal=!0},addNominationWithRound:function(t){var e=this;if(this.modal=!1,this.round.PrivacyNoticeAcceptanceNeeded&&!this.PrivacyNoticeAccepted)this.privacyModal=!0;else if(this.round.DataTransferAgreementAcceptanceNeeded&&!this.DataTransferAgreementAccepted)this.dataAgreementModal=!0;else{var n={RoundId:this.round.RoundId,DataTransferAgreementAccepted:this.DataTransferAgreementAccepted,PrivacyNoticeAccepted:this.PrivacyNoticeAccepted};this.$store.dispatch(Ne,n).then((function(t){e.$router.push({name:"WizardNominee",params:{id:t.Value.Id}})}))}},closePrivacyModal:function(t){this.PrivacyNoticeAccepted=t,this.privacyModal=!1,t&&this.addNominationWithRound(this.round)},closeDataAgreementModal:function(t){this.DataTransferAgreementAccepted=t,this.dataAgreementModal=!1,t&&this.addNominationWithRound(this.round)}}},Cs=xs,ys=(0,f.Z)(Cs,As,bs,!1,null,null,null),ws=ys.exports,Ts=function(){var t=this,e=t._self._c;return e("div",{on:{click:t.add}},[t._t("default"),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.modal=!1}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",[e("span",[t._v("Please select")])]),e("v-card-actions",[e("v-spacer"),t.rounds.Value?e("div",[e("v-select",{attrs:{items:t.rounds.Value,"item-value":"RoundId","item-text":"RoundName",label:"Call",box:""},model:{value:t.roundId,callback:function(e){t.roundId=e},expression:"roundId"}})],1):t._e()],1)],1)],1),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.privacyModal,callback:function(e){t.privacyModal=e},expression:"privacyModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[e("iframe",{ref:"privacyFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closePrivacyModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closePrivacyModal(!0)}}},[t._v(" Accept ")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.dataAgreementModal,callback:function(e){t.dataAgreementModal=e},expression:"dataAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[e("iframe",{ref:"dataAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeDataAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeDataAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1)],2)},Ns=[],Es={data:function(){return{modal:!1,roundId:null,round:null,privacyModal:!1,dataAgreementModal:!1}},computed:(0,Dt.Z)({},(0,Xt.vn)(["application.privacyNotice","application.dataAgreement","application.rounds"])),watch:{roundId:function(t){this.round=this.rounds.
1Value.find((function(e){return e.RoundId===t})),this.add()},modal:function(){this.modal&&(this.roundId=null)}},created:function(){this.$store.dispatch(en)},mounted:function(){var t=this;this.$store.dispatch(Je).then((function(){t.$refs.privacyFrame.contentWindow.document.open(),t.$refs.privacyFrame.contentWindow.document.write(t.privacyNotice),t.$refs.privacyFrame.contentWindow.document.close()})),this.$store.dispatch(Xe).then((function(){t.$refs.dataAgreementFrame.contentWindow.document.open(),t.$refs.dataAgreementFrame.contentWindow.document.write(t.dataAgreement),t.$refs.dataAgreementFrame.contentWindow.document.close()})),this.$events.$on("addApplication",(function(){1===t.rounds.Value.length?(t.round=t.rounds.Value[0],t.add()):t.modal=!0}))},methods:{add:function(){var t=this;if(this.modal=!1,this.round)if(this.round.PrivacyNoticeAcceptNeeded&&!this.PrivacyNoticeAccepted)this.privacyModal=!0;else if(this.round.DataTransferAcceptNeeded&&!this.DataTransferAgreementAccepted)this.dataAgreementModal=!0;else{var e={RoundId:this.round.RoundId,DataTransferAgreementAccepted:this.DataTransferAgreementAccepted,PrivacyNoticeAccepted:this.PrivacyNoticeAccepted};this.$store.dispatch(an,e).then((function(e){t.$router.push({name:"ApplicationWizard",params:{id:e.Value.Id}})}))}else this.modal=!0},closePrivacyModal:function(t){this.PrivacyNoticeAccepted=t,this.privacyModal=!1,t&&this.add(this.round)},closeDataAgreementModal:function(t){this.DataTransferAgreementAccepted=t,this.dataAgreementModal=!1,t&&this.add(this.round)}}},Ps=Es,Ss=(0,f.Z)(Ps,Ts,Ns,!1,null,null,null),Rs=Ss.exports,Ds={components:{paymentInfoDialog:Is,addNomination:ws,addApplication:Rs},data:function(){return{drawer:!1,selectedRound:null,selectedAppReviewRound:null,messagesTimer:null}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["isAuthenticated"])),(0,Xt.vn)(["user.profile","review.roundsList","review.round","messages.messages"])),(0,Xt.vn)({appRoundsList:"reviewApplications.roundsList",appRound:"reviewApplications.round"})),{},{initials:function(){var t=this.profile;if(!t)return"";var e=t.FirstName.slice(0,1)+" "+t.LastName.slice(0,1);return e.match(/\b\w/g).join("").replace(/[^a-zÃÃÆÆÆÆÄ²ÅÅáºÃÇ·ÈæðÇÉÉɣijÅÅĸſÃþƿÈÄÆÃÄÆÄĦĮÆÅÃÆ ÅÈÅ¢ÈŦŲƯY̨ƳÄ
ÉçÄÉÄħįÆÅøơÅÈÅ£Èŧųưy̨ƴÃÃÃÃÇÄÄÃÃ
ǺÄÃǼǢÆÄÄÄÄÃÄá¸ÄÆÃÃÃÄÃÃÄÄÄÄáº¸ÆÆÆÄ ÄǦÄÄ¢ÆÃ¡Ã âäÇÄÄãåǻÄ
æǽǣÉÄÄÄÄçÄá¸ÄÉðéèÄêëÄÄÄÄẹÇÉÉÄ¡ÄǧÄģɣĤḤĦIÃÃİÃÃÇĬĪĨĮá»Ä²Ä´Ä¶ÆÄ¹Ä»ÅĽĿʼNÅNÌÅÃÅ
ÅÃÃÃÃÇÅÅÃÅá»ÃÇ¾Æ ÅĥḥħıÃìiîïÇÄīĩįá»Ä³ÄµÄ·ÆÄ¸ÄºÄ¼ÅľÅÅÅnÌÅñÅÅóòôöÇÅÅõÅá»Ã¸Ç¿Æ¡ÅÅÅÅÅÅÅ ÅÈá¹¢áºÅ¤Å¢á¹¬Å¦ÃÃÃÃÃÇŬŪŨŰŮŲỤƯáºáºÅ´áºÇ·ÃỲŶŸȲỸƳŹŻŽáºÅÅÅÅ¿ÅÅÅ¡ÅÈá¹£Ãťţá¹Å§Ã¾ÃºÃ¹Ã»Ã¼ÇÅūũűůųụưáºáºÅµáº
ƿýỳŷÿȳỹƴźżžáº]/gi,"").slice(0,2).toUpperCase()},name:function(){var t=this.profile;return t?t.FirstName+" "+t.LastName:""},appVersion:function(){return"1.10.10-new"},reviewing:function(){return this.$route.path.startsWith("/review")},applying:function(){return this.$route.path.startsWith("/applications")},nominating:function(){return this.$route.path.startsWith("/nominations")},reviewingApplications:function(){return this.$route.path.startsWith("/review-applications")},viewingGrants:function(){return this.$route.path.includes("grant-management")},viewingAplicationMessages:function(){return this.$route.path.startsWith("/applications")&&this.$route.path.includes("messages")},viewingNominationMessages:function(){return this.$route.path.startsWith("/nominations")&&this.$route.path.includes("messages")}}),watch:{profile:function(){this.isAuthenticated&&this.init()},round:function(){this.selectedRound=this.round},appRound:function(){this.selectedAppReviewRound=this.appRound}},mounted:function(){var t=this;this.isAuthenticated&&this.init(),this.$events.$on("openRoundSelector",(function(){t.$nextTick((function(){t.$refs.roundSelector.$el.querySelector("input").click()}))})),this.$events.$on("openAppRoundSelector",(function(){t.$nextTick((function(){t.$refs.applicationRoundSelector.$el.querySelector("input").click()}))}))},methods:{init:function(){var t=this;this.$store.dispatch($e).then((function(){t.selectedRound=t.round})),this.$store.dispatch(ei).then((function(){t.selectedAppReviewRound=t.appRound}
1)),this.messagesLoop()},messagesLoop:function(){var t=this;this.messagesTimer&&clearTimeout(this.messagesTimer),this.$store.dispatch(Qi),this.messagesTimer=setTimeout((function(){t.profile&&t.messagesLoop()}),1e4)},changeReviewRound:function(){var t=this;this.$store.dispatch(We,this.selectedRound).then((function(){t.$router.push({name:"ReviewWizard"})}))},changeAppReviewRound:function(){var t=this;this.$store.dispatch(ai,this.selectedAppReviewRound).then((function(){t.$router.push({name:"ApplicationReviewWizard"})}))},logout:function(){this.$store.dispatch(ee),this.$router.push("/login")},closeMenu:function(){return this.drawer=!1},openMessages:function(t){1===t.MessageRefType&&this.$router.push({name:"NominationMessages",params:{id:t.EntityId}}),2===t.MessageRefType&&this.$router.push({name:"NomineeMessages",params:{id:t.EntityId}}),3===t.MessageRefType&&this.$router.push({name:"ApplicationMessages",params:{id:t.EntityId}})}}},Ls=Ds,Ms=(0,f.Z)(Ls,rs,os,!1,null,null,null),ks=Ms.exports,Os=function(){var t=this,e=t._self._c;return e("v-footer",{staticClass:"footer",attrs:{color:"primary",inset:"",absolute:""}},[e("v-flex",{staticClass:"fz-md",attrs:{"py-3":"","text-xs-center":"","white--text":"",xs12:""}},[t._v("©2020 â Lanas")])],1)},Fs=[],$s={},Zs=(0,f.Z)($s,Os,Fs,!1,null,null,null),Gs=Zs.exports,Bs={components:{appheader:ks,appfooter:Gs}},Us=Bs,Ws=(0,f.Z)(Us,as,ss,!1,null,null,null),Vs=Ws.exports,zs={name:"app",components:{layout:Vs}},js=zs,Ys=(0,f.Z)(js,ns,is,!1,null,null,null),qs=Ys.exports,Hs=n(42415),Ks=n(82482),Qs="SET_TOKEN",Js="SET_PASSWORD_EMAIL",Xs="ADD_NOMINEE",tr="REMOVE_NOMINEE",er="UPDATE_NOMINEE",nr="UPDATE_DYNAMIC_FIELD",ir="UPDATE_NOMINEE_DYNAMIC_FIELD",ar="SET_NOMINATION",sr="ADD_VALIDATION_ERRORS",rr="REMOVE_VALIDATION_ERROR",or="CLEAR_VALIDATION_ERRORS",lr="SUBMIT_SUCCESS",cr="SET_NOMINATION_PDF",ur="SET_ADDING_NOMINEE_ERROR",dr="SET_FILES",pr="SET_NOMINATION_LIST",mr="ADD_NOMINATION",fr="REMOVE_NOMINATION",vr="SET_NOMINATION_ROUND_LIST",hr="SET_PRIVACY_NOTICE",gr="SET_DATA_AGREEMENT",_r="SET_NOMINATION_ERROR_MESSAGE",Ir="GET_PROFILE_REQUEST",Ar="GET_PROFILE_SUCCESS",br="GET_PROFILE_ERROR",xr="CLEAR_PROFILE",Cr="UPDATE_PROFILE",yr="CHANGE_PASSWORD_SUCCESS",wr="CHANGE_PASSWORD_ERROR",Tr="CHANGE_PASSWORD_REQUEST",Nr="CHANGE_PASSWORD_RESET",Er="SET_PENDING_PAYMENT",Pr="SET_PENDING_PAYMENT_ID",Sr="SET_PENDING_PAYMENT_LIST",Rr="SET_REVIEW_ROUND_LIST",Dr="SET_REVIEW_DATA_AGREEMENT",Lr="SET_REVIEW_ROUND",Mr="SET_REVIEW_NOMINATIONS",kr="SET_REVIEW_NOMINATIONS_ORDER",Or="SET_REVIEW",Fr="SET_REVIEW_NOMINEES",$r="SET_APPLICATION_PRIVACY_NOTICE",Zr="SET_APPLICATION_DATA_AGREEMENT",Gr="SET_APPLICATIONS",Br="SET_APPLICATIONS_ORDER",Ur="SET_APPLICATION_ROUNDS",Wr="SET_APPLICATION_COPY_ROUNDS",Vr="SET_APPLICATION",zr="SET_APPLICATION_VALIDATION_ERRORS",jr="ADD_APPLICATION_VALIDATION_ERRORS",Yr="REMOVE_APPLICATION_VALIDATION_ERROR",qr="ADD_APPLICATION",Hr="APPLICATION_UPDATE_DYNAMIC_FIELD",Kr="DELETE_APPLICATION",Qr="APPLICATION_ADD_INSTITUTION",Jr="APPLICATION_ADD_FILE",Xr="APPLICATION_ADD_IMAGE_FILE",to="APPLICATION_ADD_DOCUMENT_FILE",eo="APPLICATION_REMOVE_FILE",no="APPLICATION_SET_FILES",io="APPLICATION_SET_IMAGE_FILES",ao="APPLICATION_SET_DOCUMENT_FILES",so="APPLICATION_ADD_BUDGET",ro="APPLICATION_REMOVE_BUDGET",oo="APPLICATION_UPDATE_BUDGET",lo="APPLICATION_SET_BUDGET_ITEM",co="APPLICATION_SET_BUDGET_ITEMS",uo="APPLICATION_SET_LATEST_BUDGET_ITEMS",po="APPLICATION_ADD_APPLICANT",mo="APPLICATION_SET_APPLICANT",fo="APPLICATION_REMOVE_APPLICANT",vo="APPLICATION_UPDATE_APPLICANT",ho="APPLICATION_SET_APPLICANTS",go="STATUSREPORT_ADD_IMAGE_FILE",_o="STATUSREPORT_ADD_DOCUMENT_FILE",Io="STATUSREPORT_SET_IMAGE_FILES",Ao="STATUSREPORT_SET_DOCUMENT_FILES",bo="STATUSREPORT_REMOVE_FILE",xo="SET_APPLICATION_GRANT_ACCOUNTING",Co="SET_POSITION_LIST",yo="SET_POSITION_LIST",wo="SET_GENDER_LIST",To="ADD_NOTIFICATION",No="REMOVE_NOTIFICATION",Eo="SET_REVIEW_APPLICATION_ROUNDS",Po="SET_REVIEW_APPLICATION_ROUND",So="SET_REVIEW_APPLICATIONS_ORDER",Ro="SET_REVIEW_APPLICATIONS_PREFERENCES",Do="SET_REVIEW_APPLICATIONS",Lo="SET_REVIEW_APPLICATIONS_SCORES",Mo="SET_REVIEW_APPLICATION",ko="SET_REVIEW_APPLICATION_DATA_AGREEMENT",Oo="SET_REVIEW_APPLICATIONS_SCORESTATISTIC",Fo="SET_REVIEW_APPLICATION_NDA_AGREEMENT",$o="SET_APPLICATION_GRANT",Zo="SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR",Go="SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR_ID",Bo="SET_APPLICATION_GRANT_STATUS_REPORT",Uo="APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD",Wo="SET_APPLICATION_GRANT_PAYMENT_DETAILS",Vo="SET_APPLICATION_GRANT_PAYMENT_REQUEST",zo="SET_INSTALLMENT_WIZARD",jo="SET_MESSAGES",Yo="SET_APPLICATION_MESSAGES",qo="SET_NOMINATION_MESSAGES",Ho="SET_NOMINEE_MESSAGES",Ko="SET_MESSAGE",Qo="SET_MESSAGE_FILES",Jo="SET_MESSAGES_THREAD",Xo={SET_TOKEN:Qs,ADD_NOMINEE:Xs,REMOVE_NOMINEE:tr,UPDATE_NOMINEE:er,
1SET_NOMINATION_LIST:pr,SET_NOMINATION:ar,ADD_NOMINATION:mr,GET_PROFILE_REQUEST:Ir,GET_PROFILE_SUCCESS:Ar,GET_PROFILE_ERROR:br,CLEAR_PROFILE:xr,UPDATE_PROFILE:Cr,UPDATE_DYNAMIC_FIELD:nr,UPDATE_NOMINEE_DYNAMIC_FIELD:ir,REMOVE_NOMINATION:fr,SET_NOMINATION_ROUND_LIST:vr,SET_PRIVACY_NOTICE:hr,SET_DATA_AGREEMENT:gr,ADD_NOTIFICATION:To,REMOVE_NOTIFICATION:No,ADD_VALIDATION_ERRORS:sr,REMOVE_VALIDATION_ERROR:rr,CLEAR_VALIDATION_ERRORS:or,SUBMIT_SUCCESS:lr,SET_NOMINATION_PDF:cr,CHANGE_PASSWORD_SUCCESS:yr,CHANGE_PASSWORD_ERROR:wr,CHANGE_PASSWORD_REQUEST:Tr,CHANGE_PASSWORD_RESET:Nr,SET_PENDING_PAYMENT:Er,SET_PENDING_PAYMENT_ID:Pr,SET_PENDING_PAYMENT_LIST:Sr,SET_REVIEW_ROUND_LIST:Rr,SET_REVIEW_DATA_AGREEMENT:Dr,SET_REVIEW_ROUND:Lr,SET_REVIEW_NOMINATIONS:Mr,SET_REVIEW_NOMINATIONS_ORDER:kr,SET_REVIEW:Or,SET_ADDING_NOMINEE_ERROR:ur,SET_FILES:dr,SET_APPLICATIONS:Gr,SET_APPLICATIONS_ORDER:Br,SET_APPLICATION_ROUNDS:Ur,SET_APPLICATION_COPY_ROUNDS:Wr,SET_APPLICATION:Vr,ADD_APPLICATION:qr,APPLICATION_UPDATE_DYNAMIC_FIELD:Hr,DELETE_APPLICATION:Kr,APPLICATION_ADD_INSTITUTION:Qr,APPLICATION_ADD_FILE:Jr,APPLICATION_ADD_IMAGE_FILE:Xr,APPLICATION_ADD_DOCUMENT_FILE:to,APPLICATION_REMOVE_FILE:eo,APPLICATION_SET_FILES:no,APPLICATION_SET_IMAGE_FILES:io,APPLICATION_SET_DOCUMENT_FILES:ao,APPLICATION_ADD_BUDGET:so,APPLICATION_REMOVE_BUDGET:ro,APPLICATION_UPDATE_BUDGET:oo,APPLICATION_SET_BUDGET_ITEM:lo,APPLICATION_SET_BUDGET_ITEMS:co,APPLICATION_SET_LATEST_BUDGET_ITEMS:uo,APPLICATION_ADD_APPLICANT:po,APPLICATION_SET_APPLICANT:mo,APPLICATION_REMOVE_APPLICANT:fo,APPLICATION_UPDATE_APPLICANT:vo,APPLICATION_SET_APPLICANTS:ho,SET_APPLICATION_PRIVACY_NOTICE:$r,SET_APPLICATION_DATA_AGREEMENT:Zr,SET_APPLICATION_VALIDATION_ERRORS:zr,ADD_APPLICATION_VALIDATION_ERRORS:jr,REMOVE_APPLICATION_VALIDATION_ERROR:Yr,SET_POSITION_LIST:Co,SET_DEGREE_LIST:yo,SET_GENDER_LIST:wo,SET_REVIEW_APPLICATION_ROUNDS:Eo,SET_REVIEW_APPLICATION_ROUND:Po,SET_REVIEW_APPLICATIONS_ORDER:So,SET_REVIEW_APPLICATIONS_PREFERENCES:Ro,SET_REVIEW_APPLICATIONS:Do,SET_REVIEW_APPLICATIONS_SCORES:Lo,SET_REVIEW_APPLICATION:Mo,SET_REVIEW_APPLICATION_DATA_AGREEMENT:ko,SET_REVIEW_APPLICATIONS_SCORESTATISTIC:Oo,SET_APPLICATION_GRANT:$o,SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR:Zo,SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR_ID:Go,SET_APPLICATION_GRANT_STATUS_REPORT:Bo,APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD:Uo,SET_APPLICATION_GRANT_PAYMENT_DETAILS:Wo,SET_APPLICATION_GRANT_PAYMENT_REQUEST:Vo,SET_MESSAGES:jo,SET_APPLICATION_MESSAGES:Yo,SET_NOMINATION_MESSAGES:qo,SET_NOMINEE_MESSAGES:Ho,SET_NOMINATION_ERROR_MESSAGE:_r,SET_MESSAGE:Ko,SET_MESSAGE_FILES:Qo,SET_MESSAGES_THREAD:Jo,STATUSREPORT_ADD_IMAGE_FILE:go,STATUSREPORT_ADD_DOCUMENT_FILE:_o,STATUSREPORT_SET_IMAGE_FILES:Io,STATUSREPORT_REMOVE_FILE:bo,STATUSREPORT_SET_DOCUMENT_FILES:Ao,SET_INSTALLMENT_WIZARD:zo,SET_APPLICATION_GRANT_ACCOUNTING:xo},tl=(n(92222),n(46943)),el=n(72631),nl=function(){var t=this,e=t._self._c;return e("div",[t._v("404")])},il=[],al={},sl=al,rl=(0,f.Z)(sl,nl,il,!1,null,null,null),ol=rl.exports,ll=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card"},[e("v-card",{staticClass:"inner py-4",attrs:{flat:""}},[e("v-layout",{attrs:{"justify-center":""}},[e("v-flex",{staticClass:"justify-center text-xs-center",attrs:{md4:"",lg3:"","pb-0":"",fluid:""}},[e("h1",{staticClass:"text-xs-center mb-4"},[t._v("Log in")]),t.error?e("v-alert",{staticClass:"alert",attrs:{value:t.error,type:"error",outline:"","data-test":"error"}},[t._v("Email or password are not valid")]):t._e(),e("v-form",{ref:"form",staticClass:"mb-3",model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",{staticClass:"justify-center text-xs-center",attrs:{"pb-0":"",fluid:""}},[e("v-layout",{attrs:{column:""}},[e("v-flex",[e("v-text-field",{attrs:{rules:t.emailRules,label:"E-mail","validate-on-blur":"",box:"","data-test":"email"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login.apply(null,arguments)}},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),e("v-text-field",t._g(t._b({attrs:{rules:t.passwordRules,"append-icon":t.visible?"visibility_off":"visibility",type:t.visible?"text":"password",label:"Password","data-test":"password",box:""},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login.apply(null,arguments)},"click:append":function(e){t.visible=!t.visible}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}},"v-text-field",t.$attrs,!1),t.$listeners))],1)],1),t.pending?e("v-layout",{attrs:{column:"","align-center":"","my-4":""}},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):e("v-layout",{attrs:{column:"","align-center":"","mx-1":""}},[e("v-btn",{staticClass:"button mb-3",attrs:{color:"success","data-test":"loginBtn"},on:{click:t.login}},[t._v("Log in")]),e("span",{staticClass:"separator mb-3"},[t._v("or")]),e("v-btn",{staticClass:"button mb-3",attrs:{dark:"",color:"primary","data-test":"signupBtn"},on:{click:function(e){return t.$router.push({name:"Signup"})}}},[t._v("Create profile")])],1)],1)],1)],1)],1),e("v-layout",{attrs:{"justify-center":""}},[e("v-flex",{staticClass:"justify-center text-xs-center",attrs:{md4:"",lg4:"","pb-0":"",fluid:""}},[e("v-container",{staticClass:"justify-center text-xs-center",attrs:{"pt-0":"",fluid:""}},[e("h3",{staticClass:"welcomeText text-xs-center"},[t._v(" WELCOME TO THE"),e("br"),t._v(" LUNDBECK FOUNDATIONâS"),e("br"),t._v(" APPLICATION & NOMINATION SYSTEM ")]),e("v-layout",{staticClass:"py-4",attrs:{column:"","align-end":""}},[e("router-link",{attrs:{to:{name:"PasswordReset"}}},[t._v("Forgot password")])],1)],1)],1)],1)],1)],1)},cl=[],ul={data:function(){return{valid:!1,password:"",passwordRules:[function(t){return!!t||"Password is required"}],email:"",emailRules:[function(t){return!!t||"E-mail is required"},function(t){return z(t)}],visible:!1,pending:!1,error:!1}},methods:{login:function(){var t=this;if(this.error=!1,this.$refs.form.validate()){var e=this.email,n=this.password;this.pending=!0,this.$store.dispatch(te,{email:e,password:n}).then((function(){t.pending=!1,t.$router.push({name:"Home"})})).catch((function(){t.pending=!1,t.error=!0}))}}},beforeMount:function(){console.log("node env: production"),console.log("env file: production")}}
1,dl=ul,pl=(0,f.Z)(dl,ll,cl,!1,null,null,null),ml=pl.exports,fl=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[e("v-card",{staticClass:"inner py-4",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-4"},[t._v("Create new profile")]),t.error?e("v-alert",{staticClass:"alert text-xs-center",attrs:{value:t.error,type:"error",outline:"","data-test":"signupError"}},[t._v(t._s(t.error))]):t._e(),e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",{staticClass:"justify-center text-xs-center",attrs:{md6:"",lg6:"","pb-0":"",fluid:""}},[e("v-layout",{staticClass:"wrapper",attrs:{row:"",wrap:"","justify-space-between":""}},[e("v-flex",{staticClass:"removePadding",attrs:{xs12:"",md6:""}},[e("v-text-field",{staticClass:"itemMargin",attrs:{rules:t.firstNameRules,label:"First name",required:"",box:""},model:{value:t.firstName,callback:function(e){t.firstName=e},expression:"firstName"}})],1),e("v-flex",{staticClass:"removePadding",attrs:{xs12:"",md6:""}},[e("v-text-field",{staticClass:"itemMargin",attrs:{rules:t.lastNameRules,label:"Last name",required:"",box:""},model:{value:t.lastName,callback:function(e){t.lastName=e},expression:"lastName"}})],1)],1),e("v-layout",{staticClass:"justify-center",attrs:{xs12:"",md1:"",lg1:"",column:""}},[e("v-flex",{attrs:{xs12:"",md4:""}},[e("v-text-field",{attrs:{rules:t.emailRules,"validate-on-blur":"",label:"E-mail",required:"",box:""},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),e("v-text-field",t._g(t._b({attrs:{label:"Password",required:"",box:"",rules:t.passwordRules,"append-icon":t.visible?"visibility_off":"visibility",type:t.visible?"text":"password"},on:{"click:append":function(e){t.visible=!t.visible}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}},"v-text-field",t.$attrs,!1),t.$listeners)),e("v-text-field",{attrs:{label:"Repeat password",rules:t.passwordConfirmationRules,required:"",box:"",type:"password"},model:{value:t.password2,callback:function(e){t.password2=e},expression:"password2"}})],1)],1),t.pending?e("v-progress-circular",{staticClass:"marginBottom",attrs:{indeterminate:"",color:"green"}}):e("v-layout",{staticClass:"marginBottom",attrs:{row:"",xs12:"",md1:"",lg1:"",wrap:"","justify-space-between":""}},[e("v-flex",{attrs:{xs6:""}},[e("v-btn",{staticClass:"button btnCancel",attrs:{color:"primary"},on:{click:function(e){return t.$router.push({name:"Login"})}}},[t._v("Cancel")])],1),e("v-flex",{attrs:{xs6:""}},[e("v-btn",{staticClass:"button buttonSize",attrs:{color:"success"},on:{click:t.signup}},[t._v("Create profile")])],1)],1)],1)],1)],1)],1)},vl=[],hl={data:function(){return{valid:!1,error:!1,pending:!1,firstName:"",lastName:"",firstNameRules:[function(t){return!!t||"First name is required"}],lastNameRules:[function(t){return!!t||"Last name is required"}],email:"",emailRules:[function(t){return!!t||"E-mail is required"},function(t){return z(t)}],password:"",password2:"",passwordRules:[function(t){return!!t||"Password is required"},function(t){return t.length>=8||"Passwords must be at least 8 characters"}],visible:!1}},computed:{passwordConfirmationRules:function(){var t=this;return[function(){return t.password===t.password2||"Passwords must match"},function(t){return!!t||"Password confirmation is required"}]}},methods:{signup:function(){var t=this;if(this.$refs.form.validate()){this.pending=!0;var e=this.email,n=this.password,i=this.firstName,a=this.lastName;this.$store.dispatch(ne,{firstName:i,lastName:a,email:e,password:n}).then((function(e){t.pending=!1,t.$router.push({name:"EmailConfirmation"})})).catch((function(e){console.log(e),t.pending=!1,t.error=e.response.data.Messages[0].Message}))}}}},gl=hl,_l=(0,f.Z)(gl,fl,vl,!1,null,null,null),Il=_l.exports,Al=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[t.error?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Sorry")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("We were unable to verify your email.")]),e("p",{staticClass:"text-xs-center mb-4"}
1,[t._v("Please try again or contact us if the problem persists.")])]):t.done?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Your profile was created")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("You can now log in.")]),e("v-layout",{attrs:{column:"","align-center":""}},[e("router-link",{staticClass:"link",attrs:{to:{name:"Login"}}},[e("v-btn",{staticClass:"button",attrs:{color:"primary"}},[t._v("Log in")])],1)],1)],1):t.token?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Email confirmation")]),t.password_email?[e("p",{staticClass:"text-xs-center mb-4"},[t._v("Verifying token...")]),e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})]:[e("p",[t._v("Please enter the email address you've used at registration:")]),e("v-form",{ref:"form",staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{attrs:{column:""}},[e("v-text-field",{attrs:{rules:t.emailRules,label:"E-mail",required:"",box:""},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}})],1),e("v-layout",{attrs:{column:"","align-center":""}},[e("v-btn",{staticClass:"button",attrs:{type:"submit",color:"success"}},[t._v("Verify email")])],1)],1)]],2):e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Confirm your email")]),e("p",{staticClass:"text-xs-center mb-2"},[t._v("We've sent a confirmation email to your address.")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v(" Please check your inbox and click the confirmation link to create your profile. ")]),e("v-layout",{attrs:{column:"","pt-2":""}},[e("v-flex",[e("v-btn",{staticClass:"button",attrs:{color:"primary"},on:{click:t.resend}},[t._v("Resend confirmation email")])],1)],1)],1)],1)},bl=[],xl={props:{token:String},data:function(){return{login:null,done:!1,error:null,form:{email:null},valid:!1,emailRules:[function(t){return!!t||"E-mail is required"},function(t){return z(t)}]}},computed:(0,Dt.Z)({},(0,Xt.vn)(["auth.password_email"])),methods:{resend:function(){this.$router.push({name:"ResendConfirmation"})},submit:function(){this.$store.commit("SET_PASSWORD_EMAIL",this.form.email),this.verify()},verify:function(){var t=this;this.$store.dispatch(ae,{LoginName:this.password_email,Token:this.token}).then((function(e){t.done=!0})).catch((function(e){console.log(e),t.error=!0}))}},mounted:function(){this.token&&this.password_email&&this.verify()}},Cl=xl,yl=(0,f.Z)(Cl,Al,bl,!1,null,null,null),wl=yl.exports,Tl=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[t.error?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Sorry")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("Something went wrong on our side.")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("Please try again or contact us if the problem persists.")])]):e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("No email?")]),e("v-layout",{attrs:{column:""}},[e("v-flex",[e("p",{staticClass:"text-xs-center pt-2"},[t._v("A confirmation link was sent to "+t._s(t.password_email))]),e("p",{staticClass:"pt-2"},[t._v(" Haven't received an email yet?"),e("br"),t._v(" Allow a few minutes for the email to arrive, and check your Spam folder. ")]),e("p",{staticClass:"pb-2"},[t._v(" If you haven't received an email, click here to resend the confirmation email. ")]),!t.sending&&t.sent?e("p",[t._v("Try now?")]):t._e(),t.sending?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("v-btn",{staticClass:"button",attrs:{color:"primary"},on:{click:t.resend}},[t._v("Resend confirmation email")])],1)],1)],1)],1)},Nl=[],El={props:{token:String},data:function(){return{login:null,sending:!1,sent:!1,done:!1,error:null}},computed:(0,Dt.Z)({},(0,Xt.vn)(["auth.password_email"])),methods:{resend:function(){var t=this;this.sending=!0,this.$store.dispatch(ie,this.password_email).then((function(e){t.sending=!1,t.$router.push({name:"EmailConfirmation"})})).catch((function(e){console.log(e),t.sending=!1}))}},mounted:function(){var t=this;this.token&&this.$store.dispatch(ae,{LoginName:this.password_email,Token:this.token}).then((function(e){t.done=!0})).catch((function(e){console.log(e),t.error=!0}))}},Pl=El,Sl=(0,f.Z)(Pl,Tl,Nl,!1,null,null,null),Rl=Sl.exports,Dl=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[e("div",[e("h2",{staticClass:"text-xs-center mb-5 title"},[t._v("Account successfully created")]),e("router-link",{staticClass:"link",attrs:{to:{name:"Login"}}},[e("v-btn",{staticClass:"button",attrs:{color:"success"}},[t._v("Log in")])],1)],1)])},Ll=[],Ml={},kl=(0,f.Z)(Ml,Dl,Ll,!1,null,null,null),Ol=kl.exports,Fl=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card profile"},[e("h1",{staticClass:"text-xs-center title"},[t._v("Profile settings")]),e("notification"),t.profile?e("v-container",{staticClass:"inner mb-4 mb-md-0",attrs:{fluid:"","grid-list-xl":""}},[e("v-card",{staticClass:"card ma-3",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Account")])]),e("v-form",{staticClass:"cardForm",model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",[e("v-layout",{attrs:{column:"",wrap:""}},[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding"},[e("v-text-field",{staticClass:"disabledInput",attrs:{value:t.email,label:"E-mail",box:"",disabled:""},on:{change:function(e){t.email=e}}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding"},[e("v-text-field",{attrs:{value:t.firstName,rules:t.nameRules,label:"First name",required:"",box:""},on:{change:function(e){t.firstName=e}}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding"},[e("v-text-field",{attrs:{value:t.lastName,rules:t.nameRules,label:"Last name",required:"",box:""},on:{change:function(e){t.lastName=e}}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding"},[e("v-select",{attrs:{items:t.languageList,label:"Prefered language","item-value":"id","item-text":"text",attach:"",box:""},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})],1)],1)],1)],1)],1)],1),e("v-card",{staticClass:"card ma-3",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("User information")])]),e("v-form",{staticClass:"cardForm",model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",[e("v-layout",{attrs:{column:"",wrap:""}},[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md7:"",sm6:"",xs12:""}},[e("v-select",{attrs:{items:this.profile.NationalityList,label:"Country","item-value":"Key","item-text":"Value",attach:"",box:""},model:{value:t.country,callback:function(e){t.country=e},expression:"country"}})],1),e("v-flex",{staticClass:"removePadding",attrs:{md5:"",sm6:"",xs12:""}},[e("v-text-field",{attrs:{value:t.postalCode,label:"Postal code",box:""},on:{change:function(e){t.postalCode=e}}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md7:"",sm6:"",xs12:""}},[e("v-text-field",{attrs:{value:t.address,label:"Street name and number",required:"",box:""},on:{change:function(e){t.address=e}}})],1),e("v-flex",{staticClass:"removePadding",attrs:{md5:"",sm6:"",xs12:""}},[e("v-text-field",{attrs:{value:t.city,label:"City",required:"",box:""},on:{change:function(e){t.city=e}}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",md1:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md3:"",sm3:"",xs4:""}},[e("v-text-field",{attrs:{value:t.phonePrefix,mask:"+###",label:"Phone prefix",box:""},on:{change:function(e){t.phonePrefix=e}}})],1),e("v-flex",{staticClass:"removePadding",attrs:{md4:"",sm3:"",xs8:""}},[e("v-text-field",{attrs:{value:t.phone,mask:"############",label:"Phone",box:""},on:{change:function(e){t.phone=e}}})],1),e("v-flex",{attrs:{md5:"",sm6:"",xs12:""}},[e("v-menu",{attrs:{"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-text-field",t._g({attrs:{value:t.dateOfBirth,label:"Date of birth (YYYY-MM-DD)","append-icon":"date_range",mask:"####-##-##",box:"",color:"primary"},on:{change:function(e){t.dateOfBirthField=e}}},i))]}}],null,!1,1982324074),model:{value:t.datePicker,callback:function(e){t.datePicker=e},expression:"datePicker"}},[e("v-date-picker",{attrs:{min:"1919-01-01",color:"primary"},on:{input:function(e){t.datePicker=!1}},model:{value:t.dateOfBirth,callback:function(e){t.dateOfBirth=e},expression:"dateOfBirth"}})],1)],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md7:"",sm6:"",xs12:""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{md12:""}}
1,[e("v-select",{attrs:{items:t.genderList,label:"Gender","item-value":"id","item-text":"text",attach:"",box:"","min-width":"15rem"},model:{value:t.gender,callback:function(e){t.gender=e},expression:"gender"}}),4==t.gender?e("v-text-field",{attrs:{rules:t.genderRules,autofocus:"",label:"Type your gender",required:"",box:""},on:{blur:function(e){t.customGender=t.typedGenderBuffer}},model:{value:t.typedGenderBuffer,callback:function(e){t.typedGenderBuffer=e},expression:"typedGenderBuffer"}}):t._e()],1)],1)],1)],1)],1)],1)],1)],1),e("v-card",{staticClass:"card ma-3",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Password")])]),e("p",{staticClass:"cardText text-xs-center"},[t._v(t._s(t.lastPasswordChangeText))]),e("div",{staticClass:"text-xs-center mb-4"},[e("v-dialog",{attrs:{"content-class":"xlmodalWidth",persistent:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-btn",t._g({staticClass:"button",attrs:{color:"primary"}},i),[t._v("Change password")])]}}],null,!1,1652058309),model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[e("changePassword",{on:{closeModal:t.closeModal}})],1)],1)],1),e("v-card",{staticClass:"card ma-3 formWidth",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle cardTitleMargin",attrs:{"align-center":""}},[t._v("Position and title")])]),e("v-form",{staticClass:"cardForm"},[e("v-layout",{staticClass:"removeMargin",attrs:{row:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md7:""}},[e("v-select",{attrs:{items:t.degreeList,label:"Degree","item-value":"id","item-text":"text",attach:"",box:""},model:{value:t.degree,callback:function(e){t.degree=e},expression:"degree"}})],1)],1),e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"removePadding",attrs:{md7:"",sm6:"",xs12:""}},[e("v-select",{attrs:{items:t.titleList,label:"Position 1","item-value":"id","item-text":"text",attach:"",box:""},model:{value:t.title1,callback:function(e){t.title1=e},expression:"title1"}})],1),e("v-flex",{staticClass:"removePadding",attrs:{md5:"",sm6:"",xs12:""}},[e("v-select",{attrs:{items:t.titleList,label:"Position 2","item-value":"id","item-text":"text",clearable:"",attach:"",box:""},model:{value:t.title2,callback:function(e){t.title2=e},expression:"title2"}})],1)],1)],1)],1)],1):t._e()],1)},$l=[],Zl=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"inner text-xs-center change-password",attrs:{flat:""}},[t.success?e("div",[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v("Password was changed successfully")]),e("v-btn",{attrs:{color:"success"},on:{click:t.closeModal}},[t._v("OK")])],1):e("div",[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v("Change password")]),t.error?e("v-alert",{staticClass:"alert",attrs:{value:t.error,type:"error",outline:""}},[t._v(t._s(t.error))]):t._e(),e("v-form",{ref:"form",staticClass:"form",model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{attrs:{column:""}},[e("v-flex",[e("v-text-field",t._g(t._b({attrs:{"append-icon":t.passwordVisible?"visibility_off":"visibility",type:t.passwordVisible?"text":"password",label:"Current password",box:"",autocomplete:"current-password","data-test":"password"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePassword.apply(null,arguments)},"click:append":function(e){t.passwordVisible=!t.passwordVisible}},model:{value:t.oldPassword,callback:function(e){t.oldPassword=e},expression:"oldPassword"}},"v-text-field",t.$attrs,!1),t.$listeners)),e("v-text-field",t._g(t._b({attrs:{rules:t.passwordRules,"append-icon":t.visible?"visibility_off":"visibility",type:t.visible?"text":"password",label:"New password",box:"",autocomplete:"new-password","data-test":"password"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePassword.apply(null,arguments)},"click:append":function(e){t.visible=!t.visible}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}},"v-text-field",t.$attrs,!1),t.$listeners)),e("v-text-field",t._g(t._b({attrs:{rules:t.passwordConfirmationRules,"append-icon":t.repeatPasswordVisible?"visibility_off":"visibility",type:t.repeatPasswordVisible?"text":"password",label:"Retype new password",box:"",autocomplete:"new-password","data-test":"password"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePassword.apply(null,arguments)},"click:append":function(e){t.repeatPasswordVisible=!t.repeatPasswordVisible}},model:{value:t.repeatPassword,callback:function(e){t.repeatPassword=e},expression:"repeatPassword"}},"v-text-field",t.$attrs,!1),t.$listeners)),t.pending?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("v-btn",{staticClass:"button",attrs:{color:"success"},on:{click:t.changePassword}},[t._v("Update password")])],1)],1)],1)],1),e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.closeModal.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1)])},Gl=[],Bl={data:function(){return{valid:!1,oldPassword:"",password:"",repeatPassword:"",passwordVisible:!1,visible:!1,repeatPasswordVisible:!1,error:null,pending:!1,success:!1}},methods:{changePassword:function(){var t=this;if(this.$refs.form.validate()){var e=this.password,n=this.oldPassword;this.$store.dispatch(Re,{newPassword:e,oldPassword:n}).then((function(e){e.data;t.reset()})).catch((function(e){var n=e.response.data;t.error=n.Messages[0].Message}))}},closeModal:function(){this.$refs.form&&this.reset(),this.$emit("closeModal")},reset:function(){this.oldPassword="",this.password="",this.repeatPassword="",this.passwordVisible=!1,this.visible=!1,this.repeatPasswordVisible=!1,this.error=null,this.pending=!1,this.success=!1,this.$refs.form.resetValidation()}},computed:{passwordRules:function(){return[function(t){return t.length>=8||"Passwords must be at least 8 characters"},function(t){return!!t||"Password is required"}]},passwordConfirmationRules:function(){var t=this;return[function(){return t.password===t.repeatPassword||"Passwords must match"},function(t){return t.length>=8||"Passwords must be at least 8 characters"},function(t){return!!t||"Password confirmation is required"}]}}},Ul=Bl,Wl=(0,f.Z)(Ul,Zl,Gl,!1,null,null,null),Vl=Wl.exports,zl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"notification"},[t.notification?e("v-chip",{staticClass:"label",class:[t.notificationColor],attrs:{label:""}}
1,[t._v(t._s(t.notification.text))]):t._e()],1)},jl=[],Yl={computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["notification"])),{},{notificationColor:function(){return this.notification&&this.notification.status?"green":"red"}})},ql=Yl,Hl=(0,f.Z)(ql,zl,jl,!1,null,null,null),Kl=Hl.exports,Ql={components:{ChangePassword:Vl,Notification:Kl},data:function(){return{datePicker:!1,modal:!1,valid:!1,nameRules:[function(t){return/^[^\d]+$/.test(t)||"Field should not contain special characters"}],genderRules:[function(t){return null!==t&&t.length>0||"Gender must contain one or more characters"}],dateOfBirthField:null,typedGenderBuffer:""}},methods:{updateProfile:function(t){this.$store.dispatch(Se,t)},closeModal:function(){this.modal=!1}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$store.dispatch(Pe).then((function(){t.typedGenderBuffer=t.customGender}));case 1:case"end":return e.stop()}}),e)})))()},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["user.profile"])),{},{languageList:function(){return B(this.profile.LanguageList)},genderList:function(){return B(this.profile.GenderList)},degreeList:function(){return B(this.profile.DegreeList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},titleList:function(){return B(this.profile.TitleList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},countryList:function(){var t=B(this.profile.NationalityList);return t.sort((function(t,e){return t.text>e.text}))},lastPasswordChangeText:function(){var t=this.profile.LastPasswordChangeDate;return t&&A()(t).isAfter(A()("0001-01-01"))?"The password was last changed on "+A()(t).format("YYYY-MM-DD"):""},firstName:{get:function(){return this.profile.FirstName},set:function(t){this.valid&&this.updateProfile({name:"FirstName",value:t,notificationName:"first name"})}},lastName:{get:function(){return this.profile.LastName},set:function(t){this.valid&&this.updateProfile({name:"LastName",value:t,notificationName:"last name"})}},email:{get:function(){return this.profile.LoginName},set:function(t){this.updateProfile({name:"LoginName",value:t,notificationName:"login name"})}},phonePrefix:{get:function(){return this.profile.PhonePrefix},set:function(t){this.updateProfile({name:"PhonePrefix",value:t,notificationName:"phone prefix"})}},phone:{get:function(){return this.profile.PhoneNumber},set:function(t){this.updateProfile({name:"PhoneNumber",value:t,notificationName:"phone number"})}},address:{get:function(){return this.profile.StreetAndNumber},set:function(t){this.updateProfile({name:"StreetAndNumber",value:t,notificationName:"street and number"})}},city:{get:function(){return this.profile.City},set:function(t){this.updateProfile({name:"City",value:t,notificationName:"city"})}},postalCode:{get:function(){return this.profile.PostalCode},set:function(t){this.updateProfile({name:"PostalCode",value:t,notificationName:"postal code"})}},dateOfBirth:{get:function(){var t=this.profile.DateOfBirth;return t?A()(t).format("YYYY-MM-DD"):""},set:function(t){this.updateProfile({name:"DateOfBirth",value:t,notificationName:"date of birth"})}},degree:{get:function(){return this.profile.Degree},set:function(t){this.updateProfile({name:"Degree",value:t,notificationName:"degree"})}},country:{get:function(){return this.profile.Nationality},set:function(t){this.updateProfile({name:"Nationality",value:t,notificationName:"country"})}},language:{get:function(){return this.profile.PreferredLanguage},set:function(t){this.updateProfile({name:"PreferredLanguage",value:t,notificationName:"language"})}},gender:{get:function(){return this.profile.Gender},set:function(t){this.updateProfile({name:"Gender",value:t,notificationName:"gender"}),4!==this.gender&&(this.typedGenderBuffer=null,this.customGender=this.typedGenderBuffer)}},customGender:{get:function(){return this.profile.CustomGender},set:function(t){this.valid&&this.updateProfile({name:"CustomGender",value:t,notificationName:"gender"})}},title1:{get:function(){return this.profile.Title1},set:function(t){this.updateProfile({name:"Title1",value:t,notificationName:"position"})}},title2:{get:function(){return this.profile.Title2},set:function(t){this.updateProfile({name:"Title2",value:t,notificationName:"position"})}}}),watch:{dateOfBirthField:function(t){this.profile.DateOfBirth=t?A()(t).format("YYYY-MM-DD"):"";
1var e=t?A()(t).format("YYYY-MM-DD"):"";this.updateProfile({name:"DateOfBirth",value:e,notificationName:"date of birth"})}}},Jl=Ql,Xl=(0,f.Z)(Jl,Fl,$l,!1,null,null,null),tc=Xl.exports,ec=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card"},[e("v-card",{staticClass:"inner py-4",attrs:{flat:""}},[e("v-layout",{attrs:{"justify-center":""}},[t.done?e("v-flex",{attrs:{md4:""}},[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v("Done")]),e("p",[t._v(" Your password has been set. You can now log in with the new password. ")]),e("v-layout",{attrs:{column:"","align-center":""}},[e("router-link",{staticClass:"link",attrs:{to:{name:"Login"}}},[e("v-btn",{staticClass:"button",attrs:{color:"success"}},[t._v("Log in")])],1)],1)],1):t.sent?e("v-flex",{attrs:{md4:""}},[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v("Check your Inbox")]),e("p",[t._v(" If the email address is correct, you will receive a message with instructions to set a new password. ")])]):t.token?e("v-flex",{attrs:{md4:""}},[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v(" Choose a new password ")]),e("v-form",{ref:"passwordForm",staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.setPassword.apply(null,arguments)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{attrs:{column:""}},[e("v-text-field",{attrs:{rules:t.emailRules,label:"E-mail",required:"",box:""},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),e("v-text-field",t._g(t._b({attrs:{label:"Password",required:"",box:"",rules:t.passwordRules,"append-icon":t.visible?"visibility_off":"visibility",type:t.visible?"text":"password"},on:{"click:append":function(e){t.visible=!t.visible}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}},"v-text-field",t.$attrs,!1),t.$listeners)),e("v-text-field",{attrs:{label:"Repeat password",rules:t.passwordConfirmationRules,required:"",box:"",type:t.visible?"text":"password"},model:{value:t.password2,callback:function(e){t.password2=e},expression:"password2"}})],1),e("v-layout",[t.error?e("v-alert",{staticClass:"alert text-xs-center",attrs:{value:t.error,type:"error",outline:""}},[t._v(t._s(t.error))]):t._e()],1),e("v-layout",{attrs:{column:"","align-center":""}},[e("v-btn",{staticClass:"button",attrs:{type:"submit",color:"success"}},[t._v("Change password")])],1)],1)],1):e("v-flex",{attrs:{md4:""}},[e("h2",{staticClass:"text-xs-center title mb-5"},[t._v(" Reset password ")]),e("p",[t._v("Please enter the email address you've used at registration:")]),e("v-form",{ref:"form",staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{attrs:{column:""}},[e("v-text-field",{attrs:{rules:t.emailRules,label:"E-mail",required:"",box:""},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})],1),e("v-layout",[t.error?e("v-alert",{staticClass:"alert text-xs-center",attrs:{value:t.error,type:"error",outline:""}},[t._v(t._s(t.error))]):t._e()],1),e("v-layout",{attrs:{column:"","align-center":""}},[e("v-btn",{staticClass:"button",attrs:{type:"submit",color:"success"}},[t._v("Get recovery link")])],1)],1)],1)],1)],1)],1)},nc=[],ic={name:"PasswordReset",props:["token"],data:function(){return{valid:!1,sent:!1,done:!1,visible:!1,password:"",password2:"",email:"",error:null,emailRules:[function(t){return!!t||"E-mail is required"},function(t){return z(t)}],passwordRules:[function(t){return!!t||"Password is required"},function(t){return t.length>=8||"Passwords must be at least 8 characters"}]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["auth.password_email"])),{},{passwordConfirmationRules:function(){var t=this;return[function(){return t.password===t.password2||"Passwords must match"},function(t){return!!t||"Password confirmation is required"}]}}),created:function(){this.email=this.password_email},methods:{submit:function(){var t=this;this.$refs.form.validate()&&this.$store.dispatch(De,this.email).then((function(e){t.sent=!0})).catch((function(e){console.log(e),e.response.data&&e.response.data.Messages&&(t.error=e.response.data.Messages[0].Message)}))},setPassword:function(){var t=this;if(this.$refs.passwordForm.validate()){var e=this.email,n=this.token,i=this.password;this.$store.dispatch(Le,{loginName:e,token:n,newPassword:i}).then((function(e){t.done=!0})).catch((function(e){console.log(e),e.response.data&&e.response.data.Messages&&(t.error=e.response.data.Messages[0].Message)}))}}}},ac=ic,sc=(0,f.Z)(ac,ec,nc,!1,null,null,null),rc=sc.exports,oc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container main"},[t.isLoaded?e("v-card",{staticClass:"card"},[e("v-card",{staticClass:"inner py-4 px-4",attrs:{flat:""}},[e("h1",{staticClass:"text-xs-center headline mb-5"},[t._v("Select activity")]),e("v-layout",{attrs:{row:"",wrap:"","justify-center":""}},[t.profile.IsApplicant?e("v-flex",{attrs:{xs4:""}},[e("v-card",{staticClass:"justify-center text-xs-center py-4 mx-2 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationList"})}}},[e("h3",[e("v-icon",{attrs:{color:"primary"}},[t._v("view_list")]),t._v(" Apply ")],1)])],1):t._e(),t.profile.IsApplicationReviewer?e("v-flex",{attrs:{xs4:""}},[e("v-card",{staticClass:"justify-center text-xs-center py-4 mx-2 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationReviewWizard"})}}},[e("h3",[e("v-icon",{attrs:{color:"primary"}},[t._v("rate_review")]),t._v(" Review Application ")],1)])],1):t._e()],1),e("br"),e("v-layout",{attrs:{row:"",wrap:"","justify-center":""}},[t.profile.IsNominator?e("v-flex",{attrs:{xs4:""}},[e("v-card",{staticClass:"justify-center text-xs-center py-4 mx-2 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.$router.push({name:"NominationList"})}}},[e("h3",[e("v-icon",{attrs:{color:"primary"}},[t._v("view_list")]),t._v(" Nominate ")],1)])],1):t._e(),t.profile.IsReviewer?e("v-flex",{attrs:{xs4:""}},[e("v-card",{staticClass:"justify-center text-xs-center py-4 mx-2 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ReviewWizard"})}}},[e("h3",[e("v-icon",{attrs:{color:"primary"}},[t._v("rate_review")]),t._v(" Review Nomination ")],1)])],1):t._e()],1)],1)],1):e("v-card",{staticClass:"card"},[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])],1)},lc=[],cc={data:function(){return{isLoaded:!1}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["user.profile"])),(0,Lt.rn)(["nomination"])),{},{roles:function(){var t=[];return this.profile.IsNominator&&t.push("nominator"),this.profile.IsReviewer&&t.push("reviewer"),this.profile.IsApplicant&&t.push("applicant"),t}}),created:function(){var t=this;this.$store.dispatch(Pe).then((function(e){t.isLoaded=!0,1===t.roles.length&&(t.profile.IsNominator?t.$router.push({name:"NominationList"}):t.profile.IsNominator?t.$router.push({name:"ReviewList"}):t.profile.IsApplicant&&t.$router.push({name:"ApplicationList"}))}))}},uc=cc,dc=(0,f.Z)(uc,oc,lc,!1,null,null,null),pc=dc.exports,mc=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"item-list"},[e("v-layout",{attrs:{"mb-5":""}},[e("v-flex",{attrs:{sm6:"","text-xs-left":""}},[e("h1",{staticClass:"headline"},[t._v("My nominations")])]),e("v-flex",{attrs:{sm6:"","text-xs-right":""}},[e("v-btn",{staticClass:"btn-add fz-md my-0",attrs:{color:"success"},on:{click:function(e){return t.$events.$emit("addNomination")}}},[t._v(" New nomination "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1)],1)],1),t._l(t.viewedNominationList,(function(t){return e("nomination-list-item",{key:t.Id,attrs:{nomination:t}})})),t.nominationListDiffer?e("div",{staticClass:"text-xs-center mt-4"},[e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[e("v-btn",t._g(t._b({attrs:{flat:"",color:"primary"},on:{click:function(e){t.showOnlyActive=!t.showOnlyActive}}},"v-btn",a,!1),i),[e("v-icon",{attrs:{left:""}},[t._v("filter_list")]),t._v(" "+t._s(t.showOnlyActive?"Show All Nominations":"Show Only Active")+" ")],1)]}}],null,!1,2418707406)},[e("span",{staticClass:"helptext"},[t._v(" "+t._s(t.showOnlyActive?"Only active nominations are shown.\nClick to show all nominations":"All nominations are shown.\nClick to only show active nominations")+" ")])])],1):t._e(),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.showErrorDialog,callback:function(e){t.showErrorDialog=e},expression:"showErrorDialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(" "+t._s(t.errorMessage)+" ")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.resetErrorMessage()}}},[t._v("Ok")])],1)],1)],1)],2)},fc=[],vc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-4 inner nomination"},[e("router-link",{staticClass:"link",attrs:{to:{name:"WizardNominee",params:{id:t.nomination.Id}}}},[e("div",{staticClass:"d-flex align-center"},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-layout",{staticClass:"titleWrapper",attrs:{column:"",wrap:""}},[e("v-card-title",{staticClass:"subheading"},[t._v(t._s(t.nomination.Name))])],1),e("div",{staticClass:"list"},[e("v-list",[t._l(t.nomination.NomineeList,(function(n){return[e("v-list-tile-content",{key:n.Id},[e("v-list-tile-title",{staticClass:"subheading text-dark-gray"}
1,[t._v(t._s(n))])],1)]}))],2)],1)],1),e("v-layout",{staticClass:"text",attrs:{"justify-center":"","align-center":""}},[e("div",{staticClass:"subheading text-xs-left"},[t._v(t._s(t.status))])]),e("div",[t.nomination.SubmissionDate?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({},i),[t._v("visibility")])]}}],null,!1,2838337192)},[e("span",[t._v("View nomination")])]):e("v-icon",[t._v("edit")]),e("a",{staticClass:"icon-hover ml-2",attrs:{title:"Messages"},on:{click:function(e){return e.preventDefault(),t.openMessages(t.nomination)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("mail_outline")])],1)],1),e("div",[t.nomination.CanBeReopened?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-btn",t._g({on:{click:function(e){return e.preventDefault(),t.confirmReopen(t.nomination)}}},i),[e("v-icon",{attrs:{color:"primary"}},[t._v("keyboard_arrow_left")]),t._v("Â Reopen ")],1)]}}],null,!1,767643011)},[e("span",[t._v("Reopen nomination")])]):t._e()],1)],1)]),t.isSubmitted?t._e():e("v-dialog",{attrs:{"content-class":"modalWidth"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("span",t._g({staticClass:"btn-remove"},i),[e("v-icon",{attrs:{color:"white"}},[t._v("clear")])],1)]}}],null,!1,445679960),model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete nomination?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.dialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.removeNomination(t.nomination.Id)}}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.reopenDialog,callback:function(e){t.reopenDialog=e},expression:"reopenDialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(" Are you sure you wish to reopen the nomination? ")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.reopenDialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.reopenNomination()}}},[t._v("Yes")])],1)],1)],1)],1)},hc=[],gc={props:{nomination:Object},data:function(){return{dialog:!1,reopenItem:null,reopenDialog:!1}},methods:{removeNomination:function(t){this.dialog=!1,this.$store.dispatch(Ee,t)},openMessages:function(t){this.$router.push({name:"NominationMessages",params:{id:t.Id}})},confirmReopen:function(t){this.reopenItem=t,this.reopenDialog=!0},reopenNomination:function(){var t=this;this.$store.dispatch(Ae,this.reopenItem.Id).then((function(){t.$store.dispatch(Te).then((function(){t.reopenDialog=!1}))}))}},computed:{status:function(){var t=this.nomination.SubmissionDate;return t?"Submitted at ".concat(A()(t).format("YYYY-MM-DD")):"Draft"},isSubmitted:function(){return this.nomination.SubmissionDate}}},_c=gc,Ic=(0,f.Z)(_c,vc,hc,!1,null,null,null),Ac=Ic.exports,bc={data:function(){return{showOnlyActive:!0,showErrorDialog:!1}},components:{nominationListItem:Ac},computed:(0,Dt.Z)({nominationListDiffer:function(){return this.list.length!==this.activeNominations.length&&this.activeNominations.length>0},activeNominations:function(){var t=this.list.filter((function(t){return"Withdrawn"!==t.State&&"Finished"!==t.State&&"Rejected"!==t.State&&"Grant rejected"!==t.State}));return t},viewedNominationList:function(){return this.showOnlyActive&&this.nominationListDiffer?this.activeNominations:this.list}},(0,Xt.vn)(["nominationList.list","nominationList.errorMessage"])),methods:{resetErrorMessage:function(){this.$store.commit(_r,null),this.showErrorDialog=!1}},created:function(){this.$store.dispatch(Te)},watch:{errorMessage:function(){this.showErrorDialog=null!=this.errorMessage}}},xc=bc,Cc=(0,f.Z)(xc,mc,fc,!1,null,"3700a814",null),yc=Cc.exports,wc=function(){var t=this,e=t._self._c;return e("div",[e("error-dialog",{attrs:{errors:t.errors}}),t.nominationIsSubmitted?e("pdf-viewer"):e("div",{staticClass:"wizard"},[t.isLoaded?t.submitSuccess?t._e():e("v-card",{staticClass:"card"},[e("notification"),e("div",{staticClass:"titleWrapper"},[e("h3",{staticClass:"text-xs-center title mb-4"},[t._v(t._s(t.steps[t.step]))]),e("div",[e("dot-progress-bar",{attrs:{steps:t.steps,stepsWithErrors:t.stepsWithErrors,currentStep:t.step},on:{updateStep:t.updateStep}})],1)]),t.nomination.RoundSpecificText?e("v-container",[e("h3",{staticClass:"text-xs-left mb-0 text-red",domProps:{innerHTML:t._s(t.nomination.RoundSpecificText)}})]):t._e(),e("router-view"),e("div",{staticClass:"buttons"}
1,[0!==t.step?e("v-btn",{staticClass:"btnBack",class:[t.btnClass],attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.prev.apply(null,arguments)}}},[e("v-icon",{staticClass:"icon iconBack"},[t._v("keyboard_arrow_left")]),t._v("Back ")],1):t._e(),t.step<3?e("v-btn",{staticClass:"button btnNext",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.next.apply(null,arguments)}}},[t._v(" Next "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t._e(),3===t.step&&t.submitIsPossible?e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[t.firstSubmit||1!==t.nomination.NomineesList.length?e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to submit your nomination?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:t.rejectSecondSubmit}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.submit}},[t._v("Yes")])],1)],1):e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Do you want to nominate more than one candidate for this achievement?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.firstSubmit=!0}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.addNominee}},[t._v("Yes")])],1)],1)],1):t._e(),3===t.step?e("v-btn",{staticClass:"button btnSubmit",class:{submitDisabled:!t.submitIsPossible},attrs:{color:t.submitIsPossible?"success":"grey lighten-1"},on:{click:t.askSubmit}},[t.submitIsPossible?t._e():e("v-icon",{staticClass:"iconDisabled",attrs:{left:""}},[t._v("block")]),t._v(" Submit nomination ")],1):t._e()],1)],1):e("v-card",{staticClass:"card"},[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)]),t.submitSuccess?e("nominationSubmitApproved"):t._e()],1)],1)},Tc=[],Nc=(n(34553),function(){var t=this,e=t._self._c;return e("ol",{staticClass:"progressBar"},t._l(t.steps,(function(n,i){return e("li",{key:n,staticClass:"step",class:i<=t.currentStep?"current":""},[e("svg",{staticClass:"icon",on:{click:function(e){return t.navigate(i)}}},[e("use",{attrs:{"xlink:href":"#checkmark-bold"}})]),e("span",{staticClass:"stepLabel hidden-xs-only",class:t.stepHasErrors(n)?"stepLabelWarning":""},[t._v(" "+t._s(n)+" "),t.stepHasErrors(n)?e("v-icon",{staticClass:"warning",attrs:{color:"error"}},[t._v("warning")]):t._e()],1)])})),0)}),Ec=[],Pc={props:["currentStep","steps","stepsWithErrors","updateStep"],methods:{navigate:function(t){this.$emit("updateStep",t)},stepHasErrors:function(t){return this.stepsWithErrors.includes(t)}}},Sc=Pc,Rc=(0,f.Z)(Sc,Nc,Ec,!1,null,null,null),Dc=Rc.exports,Lc=function(){var t=this,e=t._self._c;return t.numPages?e("div",t._l(t.numPages,(function(n){return e("pdf",{key:n+t.offSet,staticStyle:{width:"100%",margin:"20px auto"},attrs:{src:t.src,page:n}})})),1):t._e()},Mc=[],kc=n(97839),Oc={components:{pdf:kc.Z},data:function(){return{src:null,numPages:null,offSet:0}},computed:{pdfData:function(){return this.$store.state.nomination.pdf}},watch:{pdfData:function(t){var e=this;t.PdfData&&(this.src=kc.Z.createLoadingTask("data:application/pdf;base64,"+t.PdfData),this.src.then((function(t){e.numPages=t.numPages,e.offSet+=t.numPages})))}}},Fc=Oc,$c=(0,f.Z)(Fc,Lc,Mc,!1,null,null,null),Zc=$c.exports,Gc=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[e("div",[e("h2",{staticClass:"text-xs-center mb-4 title"},[t._v("Thank you!")]),e("p",{staticClass:"subheading mb-5"},[t._v("Your nomination was submitted.")]),e("div",{staticClass:"iconWrapper success mb-5"},[e("v-icon",{staticClass:"icon-done",attrs:{dark:""}},[t._v("done")])],1),e("router-link",{staticClass:"link",attrs:{to:{name:"NominationList"}}},[e("v-btn",{staticClass:"button",attrs:{dark:"",color:"primary"}},[t._v("SEE YOUR NOMINATIONS")])],1)],1)])},Bc=[],Uc={},Wc=(0,f.Z)(Uc,Gc,Bc,!1,null,null,null),Vc=Wc.exports,zc={name:"NominationWizard",components:{dotProgressBar:Dc,nominationSubmitApproved:Vc,notification:Kl,pdfViewer:Zc,errorDialog:gt},props:{id:[Number,String]},data:function(){return{steps:["Nominee","Nomination","Contribution","Preview"],highestStep:0,dialog:!1,buttonStyle:null,firstSubmit:!1,errors:[]}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["nomination.nomination","nomination.submitSuccess","nomination.validationErrors"])),(0,Lt.Se)(["stepsWithErrors","nominationIsSubmitted"])),{},{step:function(){var t=this;return this.steps.findIndex((function(e){return e===t.$route.name.replace("Wizard","")}))},isLoaded:function(){return this.nomination&&this.nomination.Id===parseInt(this.id
1)},submitIsPossible:function(){return 0===Object.keys(this.validationErrors).length},btnClass:function(){return this.step<3?"button":"button btnWithSubmit"}}),methods:{prev:function(){this.navigate(this.step-1)},next:function(){this.navigate(this.step+1)},navigate:function(t){t>this.highestStep&&(this.highestStep=t,this.$store.dispatch(fe,this.highestStep)),this.$router.push({name:"Wizard".concat(this.steps[t]),params:{id:this.nomination.Id}})},updateStep:function(t){this.navigate(t)},askSubmit:function(){this.submitIsPossible&&(this.dialog=!0)},submit:function(){var t=this;this.dialog=!1,this.$store.dispatch(me).then((function(e){t.errors=e}))},addNominee:function(){this.dialog=!1,this.firstSubmit=!1,this.navigate(0),this.$store.dispatch(le)},rejectSecondSubmit:function(){this.dialog=!1,this.firstSubmit=!1}},created:function(){this.$store.dispatch(se,this.$route.params.id)}},jc=zc,Yc=(0,f.Z)(jc,wc,Tc,!1,null,null,null),qc=Yc.exports,Hc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container nominee-list"},[t._l(t.nomination.NomineesList,(function(t){return e("nominee-list-item",{key:t.Id,attrs:{nominee:t}})})),e("v-btn",{staticClass:"btn-add mb-4 mx-auto d-block fz-md btn-multiline",attrs:{disabled:t.nomination.NomineesList.length===t.MaximumNumberNominees,color:"success"},on:{click:t.addNominee}},[t._v(" Add nominee for the same achievement "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1),e("v-alert",{staticClass:"alert text-xs-center",attrs:{value:t.addingNomineeError,type:"error",outline:""}},[t._v(t._s(t.addingNomineeError))])],2)},Kc=[],Qc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"nominee"},[e("v-form",{model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{staticClass:"d-flex align-center",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-text-field",{attrs:{value:t.firstName,label:"First name",box:"","error-messages":t.getValidationError("Firstname"),autocomplete:"none"},on:{change:function(e){return t.firstName=e}}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-text-field",{attrs:{value:t.lastName,label:"Last name",box:"","error-messages":t.getValidationError("Lastname"),autocomplete:"none"},on:{change:function(e){return t.lastName=e}}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-text-field",{attrs:{value:t.email,rules:t.emailRules,label:"E-mail",box:"","error-messages":t.getValidationError("Email"),autocomplete:"none"},on:{change:function(e){return t.save(e,"email")}}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-select",{attrs:{items:t.titleList,"item-value":"id","item-text":"text",label:"Position 1",box:"","error-messages":t.getValidationError("Title1"),clearable:""},model:{value:t.title1,callback:function(e){t.title1=e},expression:"title1"}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-select",{attrs:{items:t.titleList,"item-value":"id","item-text":"text",label:"Position 2",box:"",required:"","error-messages":t.getValidationError("Title2"),clearable:""},model:{value:t.title2,callback:function(e){t.title2=e},expression:"title2"}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-select",{attrs:{items:t.degreeList,label:"Degree","item-value":"id","item-text":"text",box:"","error-messages":t.getValidationError("Degree"),clearable:""},model:{value:t.degree,callback:function(e){t.degree=e},expression:"degree"}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-select",{attrs:{items:t.genderList,label:"Gender","item-value":"id","item-text":"text",box:"","error-messages":t.getValidationError("Gender")},model:{value:t.gender,callback:function(e){t.gender=e},expression:"gender"}}),4==t.gender?e("v-text-field",{attrs:{rules:t.genderRules,autofocus:"",label:"Type your gender",required:"",box:""},on:{blur:function(e){t.customGender=t.typedGenderBuffer}},model:{value:t.typedGenderBuffer,callback:function(e){t.typedGenderBuffer=e},expression:"typedGenderBuffer"}}):t._e()],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-select",{attrs:{items:this.nominee.NationalityList,label:"Country","item-value":"Key","item-text":"Value",box:"","error-messages":t.getValidationError("Nationality")},model:{value:t.country,callback:function(e){t.country=e},expression:"country"}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-text-field",{attrs:{value:t.age,rules:t.ageRules,mask:"###",label:"Age",box:"","error-messages":t.getValidationError("Age"),autocomplete:"none"},on:{change:function(e){return t.age=e}}})],1),e("v-flex",{staticClass:"nomItem",attrs:{"mx-3":""}},[e("v-text-field",{attrs:{value:t.affiliation,label:"Affiliation",box:"","error-messages":t.getValidationError("Affiliation"),autocomplete:"none"},on:{change:function(e){return t.affiliation=e}}})],1)],1)],1),t.notLastNominee?e("v-dialog",{attrs:{"content-class":"modalWidth"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[t.notLastNominee?e("span",t._g({staticClass:"btn-remove"},i),[e("v-icon",{attrs:{color:"white"}},[t._v("clear")])],1):t._e()]}}],null,!1,3725135859),model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete nominee?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.dialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.removeNominee}},[t._v("Yes")])],1)],1)],1):t._e()],1)},Jc=[],Xc={props:{nominee:Object},data:function(){return{emailRules:[function(t){return z(t)}],ageRules:[function(t){return t<100||"Enter correct age"}],genderRules:[function(t){return null!==t&&t.length>0||"Gender must contain one or more characters"}],typedGenderBuffer:"",dialog:!1,valid:!1}},mounted:function(){this.typedGenderBuffer=this.customGender},methods:{updateNominee:function(t){this.$store.dispatch(ue,{id:this.nominee.Id,property:t})},removeNominee:function(){this.$store.dispatch(ce,this.nominee.Id)},save:function(t,e){this[e]=t},getValidationError:function(t){return this.validationErrors[t+"/"+this.nominee.Id]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["nomination.nomination","nomination.validationErrors"])),{},{notLastNominee:function(){return this.nomination.NomineesList.length>1},genderList:function(){return G(this.nominee.GenderList)},titleList:function(){return G(this.nominee.TitleList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},degreeList:function(){return G(this.nominee.DegreeList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},countryList:function(){return G(this.nominee.NationalityList)},firstName:{get:function(){return this.nominee.Firstname},set:function(t){this.updateNominee({name:"Firstname",value:t,notificationName:"first name"})}},lastName:{get:function(){return this.nominee.Lastname},set:function(t){this.updateNominee({name:"Lastname",value:t,notificationName:"last name"})}},email:{get:function(){return this.nominee.Email},set:function(t){this.updateNominee({name:"Email",value:t,notificationName:"e-mail"})}},gender:{get:function(){return this.nominee.Gender},set:function(t){this.updateNominee({name:"Gender",value:t,notificationName:"gender"}
1),4!==this.gender&&(this.typedGenderBuffer=null,this.customGender=this.typedGenderBuffer)}},customGender:{get:function(){return this.nominee.CustomGender},set:function(t){this.valid&&this.updateNominee({name:"CustomGender",value:t,notificationName:"gender"})}},title1:{get:function(){return this.nominee.Title1},set:function(t){this.updateNominee({name:"Title1",value:t,notificationName:"position"})}},title2:{get:function(){return this.nominee.Title2},set:function(t){this.updateNominee({name:"Title2",value:t,notificationName:"position"})}},degree:{get:function(){return this.nominee.Degree},set:function(t){this.updateNominee({name:"Degree",value:t,notificationName:"degree"})}},country:{get:function(){return this.nominee.Nationality},set:function(t){this.updateNominee({name:"Nationality",value:t,notificationName:"country"})}},age:{get:function(){return this.nominee.Age},set:function(t){this.valid&&this.updateNominee({name:"Age",value:t,notificationName:"age"})}},affiliation:{get:function(){return this.nominee.Affiliation},set:function(t){this.updateNominee({name:"Affiliation",value:t,notificationName:"affiliation"})}}})},tu=Xc,eu=(0,f.Z)(tu,Qc,Jc,!1,null,null,null),nu=eu.exports,iu={components:{nomineeListItem:nu},computed:(0,Dt.Z)({},(0,Xt.vn)(["nomination.nomination","nomination.nomination.MaximumNumberNominees","nomination.addingNomineeError"])),methods:{addNominee:function(){this.$store.dispatch(le)}}},au=iu,su=(0,f.Z)(au,Hc,Kc,!1,null,null,null),ru=su.exports,ou=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"container pb-4 mb-5"},[t._l(t.nomination.DynamicFieldsList,(function(n){return e("v-layout",{key:n.Id,attrs:{row:"",wrap:""}},[e(t.getComponent(n.Type),{tag:"component",class:n.HelpText?"":"fieldWidth",attrs:{field:n,errors:t.validationErrors[n.Id]},on:{update:t.update}}),n.HelpText?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!0)},[e("span",[t._v(t._s(n.HelpText))])]):t._e()],1)})),e("file-list",{staticClass:"mt-5",attrs:{maxNumber:t.nomination.MaximumNumberAttachments,files:t.files,nominees:t.nominees},on:{add:t.fileAdd,update:t.fileUpdate,remove:t.fileRemove,download:t.fileDownload}})],2)},lu=[],cu={computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["files"])),(0,Xt.vn)(["nomination.nomination","nomination.validationErrors"])),{},{nominees:function(){return this.nomination.NomineesList.map((function(t){return{id:t.Id,text:t.Firstname+" "+t.Lastname}}))}}),methods:{getComponent:function(t){return U(t)},update:function(t){this.$store.dispatch(de,t)},fileAdd:function(t){this.$store.dispatch(be,t)},fileUpdate:function(t){this.$store.dispatch(ye,t)},fileRemove:function(t){this.$store.dispatch(Ce,t)},fileDownload:function(t){this.$store.dispatch(we,t)}}},uu=cu,du=(0,f.Z)(uu,ou,lu,!1,null,null,null),pu=du.exports,mu=function(){var t=this,e=t._self._c;return e("v-container",t._l(t.NomineeFieldsList,(function(t){return e("contribution-item",{key:t.Id,attrs:{nominee:t}})})),1)},fu=[],vu=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-5"},[e("h2",{staticClass:"mb-3"},[t._v(t._s(t.getNomineeName(t.nominee.Id)))]),t._l(t.nominee.DynamicFieldsList,(function(n){return e("v-layout",{key:n.Id,attrs:{row:"",wrap:""}},[e(t.getComponent(n.Type),{tag:"component",class:n.HelpText?"":"fieldWidth",attrs:{field:n,errors:t.validationErrors[n.Id]},on:{update:t.update}}),n.HelpText?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!0)},[e("span",[t._v(t._s(n.HelpText))])]):t._e()],1)}))],2)},hu=[],gu={props:{nominee:Object},computed:(0,Dt.Z)({},(0,Xt.vn)(["nomination.validationErrors"])),methods:{getNomineeName:function(t){var e=this.$store.getters.nomineeByID(t),n=e.Firstname,i=e.Lastname;return"".concat(n||""," ").concat(i||"")},getComponent:function(t){return U(t)},update:function(t){this.$store.dispatch(pe,(0,Dt.Z)({nomineeId:this.nominee.Id},t))}}},_u=gu,Iu=(0,f.Z)(_u,vu,hu,!1,null,null,null),Au=Iu.exports,bu={components:{contributionItem:Au},computed:(0,Dt.Z)({},(0,Xt.vn)(["nomination.nomination.NomineeFieldsList"]))},xu=bu,Cu=(0,f.Z)(xu,mu,fu,!1,null,null,null),yu=Cu.exports,wu=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container"},[e("h1",[t._v("Nominees")]),t._l(t.nomination.NomineesList,(function(n){return e("div",{key:n.Id,staticClass:"block fz-large"},[e("v-layout",{attrs:{column:""}},[e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Name:")]),t._v(" "+t._s(n.Firstname||"")+" "+t._s(n.Lastname||"")+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("E-mail:")]),t._v(" "+t._s(n.Email)+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Position 1:")]),t._v(" "+t._s(n.TitleList[n.Title1])+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Position 2:")]),t._v(" "+t._s(n.TitleList[n.Title2])+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Degree:")]),t._v(" "+t._s(n.DegreeList[n.Degree])+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Gender:")]),t._v(" "+t._s(n.GenderList[n.Gender])+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Country:")]),t._v(" "+t._s(t.getNomineeCountry(n.NationalityList,n.Nationality))+" ")]),e("span",[e("span",{staticClass:"fieldTitle"},[t._v("Age:")]),t._v(" "+t._s(n.Age)+" ")]),e("span",{staticClass:"mb-3"},[e("span",{staticClass:"fieldTitle"},[t._v("Affiliation:")]),t._v(" "+t._s(n.Affiliation)+" ")])])],1)})),e("hr",{staticClass:"space space-sm"}),e("h1",[t._v("Nomination")]),t._l(t.nomination.DynamicFieldsList,(function(n){return e("div",{key:n.Id,staticClass:"block"},[e("div",{staticClass:"field pre"},[e("span",{staticClass:"fieldTitle"},[t._v(t._s(n.Name)+":")]),2==n.Type?e("span",{domProps:{innerHTML:t._s(t.getPreviewFieldContent(n))}}):e("span",{class:1==n.Type?"d-block":""},[t._v(t._s(t.getPreviewFieldContent(n)))])])])})),e("hr",{staticClass:"space space-sm"}),e("h1",[t._v("Contribution")]),t._l(t.nomination.NomineeFieldsList,(function(n){return e("div",{key:"c
1ontribution"+n.Id,staticClass:"block"},[e("h2",{staticClass:"my-3"},[t._v(t._s(t.nomineesNamesMap[n.Id]))]),t._l(n.DynamicFieldsList,(function(n){return e("div",{key:"contribution"+n.Id},[e("div",{staticClass:"field pre"},[e("span",{staticClass:"fieldTitle"},[t._v(t._s(n.Name)+":")]),2==n.Type?e("span",{domProps:{innerHTML:t._s(t.getPreviewFieldContent(n))}}):e("span",{class:1==n.Type?"d-block":""},[t._v(t._s(t.getPreviewFieldContent(n)))])])])}))],2)}))],2)},Tu=[],Nu={computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["nomination.nomination"])),{},{nomineesNamesMap:function(){var t=this.nomination.NomineesList.reduce((function(t,e){return t[e.Id]="".concat(e.Firstname||""," ").concat(e.Lastname||""),t}),{});return t}}),methods:{getPreviewFieldContent:function(t){return V(t)},getNomineeCountry:function(t,e){var n=t.find((function(t){return t.Key===e}));return n?n.Value:""}}},Eu=Nu,Pu=(0,f.Z)(Eu,wu,Tu,!1,null,null,null),Su=Pu.exports,Ru=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[t.error?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Sorry")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("Something went wrong on our side.")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("Please try again or contact us if the problem persists.")])]):e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Accept nomination")]),e("v-layout",{attrs:{column:""}},[e("v-flex",[t.sending?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("p",{staticClass:"py-2"},[t._v(" Thank you."),e("br"),t._v(" You have accepted the nomination. ")])],1)],1)],1)],1)},Du=[],Lu={props:{token:String},data:function(){return{sending:!0,error:null}},methods:{send:function(){var t=this;this.sending=!0;var e=this.token.split("-");if(2===e.length){var n=e[0],i=e[1];this.$store.dispatch(Ie,{NominationNomineeId:n,ValidationToken:i}).then((function(e){t.sending=!1})).catch((function(e){t.error=e,t.sending=!1}))}else this.error="Invalid token"}},mounted:function(){this.token&&this.send()}},Mu=Lu,ku=(0,f.Z)(Mu,Ru,Du,!1,null,null,null),Ou=ku.exports,Fu=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard"},[e("div",{staticClass:"wizard-fullscreen"},[[e("v-tabs",{staticClass:"mt-5 application-review",attrs:{color:"transparent"}},[e("v-tab",{attrs:{ripple:""}},[t._v("Review")]),t.nominees&&t.nominees.length>0?e("v-tab",{attrs:{ripple:""}},[t._v("Score overview")]):t._e(),e("v-tab-item",[e("review-list")],1),e("v-tab-item",[e("score-list")],1)],1)]],2)])])},$u=[],Zu=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",{staticClass:"px-4 py-4 text-xs-center"},[t.round?[e("v-toolbar",{staticClass:"review-toolbar"},[e("v-toolbar-items",[e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("nomineefirstname")}}},[t._v(" First name "),"nomineefirstname"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("nomineelastname")}}},[t._v(" Last name "),"nomineelastname"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("affiliation")}}},[t._v(" Affiliation "),"affiliation"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("score")}}},[t._v(" Score "),"score"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("status")}}},[t._v(" Status "),"status"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2)],1)],1),t.isLoading?e("v-layout",{attrs:{column:"","align-center":"","my-4":""}},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),t.isLoading||!t.nominationsLoaded||t.nominations.length?t._e():[e("div",{staticClass:"container text-sm-center"},[e("p",{staticClass:"mb-0"},[t._v("No nominees to review at this moment.")])])],t.isLoading?t._e():e("v-expansion-panel",{attrs:{popout:"",value:t.openedNominee}},t._l(t.nominations,(function(n,i){return e("v-expansion-panel-content",{key:i,staticClass:"review-panel",scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[e("v-layout",{attrs:{"align-center":"","justify-center":"",row:"",wrap:""}},[e("v-flex",{attrs:{xs3:""}},[t._v(" "+t._s(n.NomineeFirstName)+" ")]),e("v-flex",{attrs:{xs3:""}},[t._v(" "+t._s(n.NomineeLastName)+" ")]),e("v-flex",{attrs:{xs2:""}},[t._v(" "+t._s(n.Affiliation)+" ")]),e("v-flex",{attrs:{xs2:"","text-xs-center":""}},[t._v(" "+t._s(n.MyScoreAvg)+" ")]),e("v-flex",{attrs:{xs2:"","text-xs-right":""}},[n.IsFinished?e("v-btn",{on:{click:function(e){return e.preventDefault(),t.reviewNomination(n)}}},[t._v("Finished")]):e("v-btn",{attrs:{color:"success"},on:{click:function(e){return e.preventDefault(),t.reviewNomination(n)}}},[t._v("Review")])],1)],1)],1)]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("v-data-table",{attrs:{headers:t.headers,items:n.NominationList,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.NominatorName))]),e("td",[n.item.CoNomineeList.length>0?[t._l(n.item.CoNomineeList,(function(i,a){return[t.hasNomineeLink(i.ReviewId)?e("a",{key:i.Id,attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openNominee(i.ReviewId)}}},[t._v(t._s(i.FullName))]):[t._v(" "+t._s(i.FullName))],a<n.item.CoNomineeList.length-1?[t._v(",")]:t._e()]}))]:[t._v(" - ")]],2),e("td",[t._v(t._s(n.item.NominationNumber))])]}}],null,!0)})],1)],1)],1)})),1)]:t.roundsListLoaded&&0==t.roundsList.length?[e("h1",{staticClass:"pb-4"},[t._v("No review round available.")]),e("p",[t._v("There is currently no rounds available to review.")]),e("p",[t._v(" If you believe this is in error, please contact the administrator to make sure a round is correctly initiated. ")])]:t.roundsListLoaded?[e("h1",{staticClass:"pb-4"},[t._v("Please select a review round.")]),e("p",[t._v("Please "),e("a",{attrs:{href:"#"},on:{click:t.openRoundSelector}},[t._v("select a round")]),t._v(" to review application.")])]:[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)],e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.dataAgreementModal,callback:function(e){t.dataAgreementModal=e},expression:"dataAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[t.round?e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v(t._s(t.round.RoundName))]):t._e(),e("iframe",{ref:"dataAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeDataAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeDataAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1)],2)],1)}
1,Gu=[],Bu={data:function(){return{dataAgreementModal:!1,DataTransferAgreementAccepted:!1,openedNominee:null,headers:[{text:"Nominator",sortable:!1,value:"name"},{text:"Co-nominees",sortable:!1,value:"conominees"},{text:"Nomination number",sortable:!1,value:"number"}],isLoading:!1}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)({nominations:"reviewNominations"})),(0,Xt.vn)(["review.dataAgreement","review.round","review.roundsList","review.roundsListLoaded","review.nominationsLoaded","review.orderBy","review.orderAsc","review.review"])),watch:{round:function(t){t&&(this.updateLegals(),this.updateRound())},nominations:function(){var t=this;if(this.review){var e=this.nominations.find((function(e){return e.Id===parseInt(t.review.Id)}));e&&this.reviewNomination(e)}}},mounted:function(){this.updateLegals(),this.round&&this.updateRound()},methods:{updateRound:function(){var t=this;this.isLoading=!0,this.round.DataProcessorAgreementAccepted?this.$store.dispatch(Be).then((function(){t.isLoading=!1})):(this.dataAgreementModal=!0,this.isLoading=!1)},updateLegals:function(){var t=this;this.$store.dispatch(Ze).then((function(){t.$refs.dataAgreementFrame.contentWindow.document.open(),t.$refs.dataAgreementFrame.contentWindow.document.write(t.dataAgreement),t.$refs.dataAgreementFrame.contentWindow.document.close()}))},reviewNomination:function(t){this.$router.push({name:"ReviewItem",params:{id:t.Id}})},hasNomineeLink:function(t){return-1!==this.nominations.findIndex((function(e){return e.Id===t}))},openNominee:function(t){var e=this;this.openedNominee=null;var n=this.nominations.findIndex((function(e){return e.Id===t}));-1!==n&&setTimeout((function(){e.openedNominee=n}),1)},setOrder:function(t){this.orderBy===t?this.$store.commit(kr,{orderBy:t,orderAsc:!this.orderAsc}):this.$store.commit(kr,{orderBy:t,orderAsc:this.orderAsc})},closeDataAgreementModal:function(t){var e=this;this.DataTransferAgreementAccepted=t,this.dataAgreementModal=!1,t?this.$store.dispatch(Ge,this.round.RoundId).then((function(){e.$store.dispatch($e),e.$store.dispatch(Be)})):this.$store.commit(Lr,null)},openRoundSelector:function(){this.$events.$emit("openRoundSelector")}}},Uu=Bu,Wu=(0,f.Z)(Uu,Zu,Gu,!1,null,null,null),Vu=Wu.exports,zu=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("error-dialog",{attrs:{errors:t.errors}}),e("v-card",{staticClass:"px-4 py-4 text-xs-center"},[t.round?[e("v-toolbar",{staticClass:"review-toolbar"},[e("v-toolbar-items",[e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("nomineefirstname")}}},[t._v(" First name "),"nomineefirstname"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("nomineelastname")}}},[t._v(" Last name "),"nomineelastname"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("affiliation")}}},[t._v(" Affiliation "),"affiliation"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("score")}}},[t._v(" Average score "),"score"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2)],1)],1),t.isLoading?e("v-layout",{attrs:{column:"","align-center":"","my-4":""}},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),t.isLoading||t.nominees.length?t._e():[e("div",{staticClass:"container text-sm-center"},[e("p",{staticClass:"mb-0"},[t._v("No nominees to review at this moment.")])])],t.isLoading?t._e():e("v-expansion-panel",{attrs:{popout:"",value:t.openedNominee}},t._l(t.nominees,(function(n,i){return e("v-expansion-panel-content",{key:i,staticClass:"review-panel",scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[e("v-layout",{attrs:{"align-center":"","justify-center":"",row:"",wrap:""}},[e("v-flex",{attrs:{xs3:""}},[t._v(" "+t._s(n.NomineeFirstName)+" ")]),e("v-flex",{attrs:{xs4:""}},[t._v(" "+t._s(n.NomineeLastName)+" ")]),e("v-flex",{attrs:{xs2:""}},[t._v(" "+t._s(n.Affiliation)+" ")]),e("v-flex",{attrs:{xs3:"","text-xs-right":"","py-2":""}},[t._v(" "+t._s(t.getScore(n.AverageScore))+" ")])],1)],1)]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("v-data-table",{attrs:{headers:t.headers,items:n.NomineeNominationList,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(i){return[e("td",[t._v(t._s(i.item.NominatorName))]),e("td",[i.item.CoNomineeList.length>0?[t._l(i.item.CoNomineeList,(function(n,a){return[t.hasNomineeLink(n.ReviewId)?e("a",{key:n.Id,attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openNominee(n.ReviewId)}}},[t._v(t._s(n.FullName))]):[t._v(" "+t._s(n.FullName))],a<i.item.CoNomineeList.length-1?[t._v(",")]:t._e()]}))]:[t._v(" - ")]],2),e("td",[i.item.AttachmentList&&i.item.AttachmentList.length?t._e():[t._v(" - ")],t._l(i.item.AttachmentList,(function(i){return[e("v-icon",{key:i.Id,attrs:{small:""},on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.OwnReviewId,i.Id)}}},[t._v("attach_file")])]}))],2),e("td",[t._v(t._s(i.item.NominationNumber))]),e("td",{staticClass:"text-xs-center"},[e("v-btn",{staticStyle:{width:"200px"},attrs:{color:"grey lighten-3"},on:{click:function(e){return t.downloadPdf(i.item)}}},[t.pdfDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",[e("v-layout",{attrs:{flex:"","align-center":""}},[e("v-icon",{attrs:{color:"primary"}},[t._v("remove_red_eye")]),e("a",[t._v("Â View nomination")])],1)],1)],1)],1)]}}],null,!0)}),e("br"),t.nominees&&t.nominees.length>0?e("v-data-table",{attrs:{headers:t.nomineesHeaders,items:n.ReviewerScoringList,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.RoleName))]),e("td",[t._v(t._s(n.item.ReviewerName))]),e("td",[t._v(t._s(n.item.AverageScore))]),e("td",[t._v(t._s(n.item.Comment))])]}}],null,!0)}):t._e()],1)],1)],1)})),1)]:t.roundsListLoaded&&0==t.roundsList.length?[e("h1",{staticClass:"pb-4"},[t._v("No review round available.")]),e("p",[t._v("There is currently no rounds available to review.")]),e("p",[t._v(" If you believe this is in error, please contact the administrator to make sure a round is correctly initiated. ")])]:t.roundsListLoaded?[e("h1",{staticClass:"pb-4"},[t._v("Please select a review round.")]),e("p",[t._v("Please "),e("a",{attrs:{href:"#"},on:{click:t.openRoundSelector}},[t._v("select a round")]),t._v(" to review application.")])]:[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)],e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.dataAgreementModal,callback:function(e){t.dataAgreementModal=e},expression:"dataAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[t.round?e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v(t._s(t.round.RoundName))]):t._e(),e("iframe",{ref:"dataAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeDataAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeDataAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1)],2),e("appPdfViewerModal",{attrs:{pdfData:t.pdfData},model:{value:t.showApplicationPdf,callback:function(e){t.showApplicationPdf=e},expression:"showApplicationPdf"}})],1)},ju=[],Yu=(n(56977),n(61874),function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{fullscreen:""},model:{value:t.showPdf,callback:function(e){t.showPdf=e},expression:"showPdf"}},[e("v-card",[e("v-card-actions",{staticStyle:{position:"sticky",top:"0"}},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.showPdf=!1}}},[e("v-icon",{attrs:{size:32}},[t._v("close")])],1)]),e("v-card-text",[e("v-layout",{staticClass:"pa-4",attrs:{"justify-center":""}},[e("v-card",[e("applicationPdf",{attrs:{pdfData:t.pdfData}})],1)],1)],1)],1)],1)}),qu=[],Hu=function(){var t=this,e=t._self._c;return e("div",[t.numPages?e("div",{staticClass:"pdf-container"},[t._t("default"),t._l(t.numPages,(function(n){return e("pdf",{key:n+t.offSet,attrs:{src:t.src,page:n}})}))],2):e("v-layout",{attrs:{column:"","align-center":"","my-4":""}},[e("hr",{staticClass:"space space-lg"}),e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)],1)},Ku=[],Qu={props:{pdfData:Object},components:{pdf:kc.Z},data:function(){return{src:null,numPages:null,offSet:0}},watch:{pdfData:function(t){var e=this;t.PdfData&&(this.src=kc.Z.createLoadingTask("data:application/pdf;base64,"+t.PdfData),this.src.then((function(t){e.numPages=t.numPages,e.offSet+=t.numPages})))}}},Ju=Qu,Xu=(0,f.Z)(Ju,Hu,Ku,!1,null,"656793cb",null),td=Xu.exports,ed={name:"AppPDFViewerModal",props:{showModal:B
1oolean,pdfData:Object},model:{prop:"showModal",event:"update"},components:{applicationPdf:td},computed:{showPdf:{get:function(){return this.showModal},set:function(t){this.$emit("update",t)}}}},nd=ed,id=(0,f.Z)(nd,Yu,qu,!1,null,null,null),ad=id.exports,sd={components:{appPdfViewerModal:ad,errorDialog:gt},data:function(){return{dataAgreementModal:!1,DataTransferAgreementAccepted:!1,openedNominee:null,headers:[{text:"Nominator",sortable:!1,value:"name"},{text:"Co-nominees",sortable:!1,value:"conominees",width:"30%"},{text:"Attachments",sortable:!1,value:"attachments"},{text:"Nomination number",sortable:!1,value:"number"},{text:"",sortable:!1,value:"action"}],nomineesHeaders:[{text:"Role",sortable:!1,value:"role"},{text:"Name",sortable:!1,value:"name"},{text:"Result",sortable:!1,value:"result"},{text:"Comment",sortable:!1,value:"comment",width:"40%"}],isLoading:!1,pdfDataLoading:!1,pdfData:null,errors:[],showApplicationPdf:!1}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)({nominees:"reviewNomineeNominations"})),(0,Xt.vn)(["user.profile","review.dataAgreement","review.round","review.roundsList","review.roundsListLoaded","review.nominationsLoaded","review.orderBy","review.orderAsc"])),watch:{round:function(t){t&&(this.updateLegals(),this.updateRound())}},mounted:function(){this.updateLegals(),this.round&&this.updateRound()},methods:{getScore:function(t){return Number.parseFloat(t).toFixed(2)},updateRound:function(){var t=this;this.isLoading=!0,this.round.DataProcessorAgreementAccepted?this.$store.dispatch(Ke).then((function(){t.isLoading=!1})):(this.dataAgreementModal=!0,this.isLoading=!1)},updateLegals:function(){var t=this;this.$store.dispatch(Ze).then((function(){t.$refs.dataAgreementFrame.contentWindow.document.open(),t.$refs.dataAgreementFrame.contentWindow.document.write(t.dataAgreement),t.$refs.dataAgreementFrame.contentWindow.document.close()}))},review:function(t){this.$router.push({name:"ReviewItem",params:{id:t.Id}})},setOrder:function(t){this.orderBy===t?this.$store.commit(kr,{orderBy:t,orderAsc:!this.orderAsc}):this.$store.commit(kr,{orderBy:t,orderAsc:this.orderAsc})},closeDataAgreementModal:function(t){var e=this;this.DataTransferAgreementAccepted=t,this.dataAgreementModal=!1,t?this.$store.dispatch(Ge,this.round.RoundId).then((function(){e.$store.dispatch($e),e.$store.dispatch(Ke)})):this.$store.commit(Lr,null)},openRoundSelector:function(){this.$events.$emit("openRoundSelector")},downloadPdf:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){var i;return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.pdfDataLoading=!0,n.next=3,e.$store.dispatch(re,t.Id);case 3:i=n.sent,i.Success?(e.pdfData={FileName:i.Value.Filename,PdfData:i.Value.PdfData},e.showApplicationPdf=!0):e.errors=i.Messages,e.pdfDataLoading=!1;case 6:case"end":return n.stop()}}),n)})))()},hasNomineeLink:function(t){return-1!==this.nominees.findIndex((function(e){return e.Id===t}))},openNominee:function(t){var e=this;this.openedNominee=null;var n=this.nominees.findIndex((function(e){return e.Id===t}));-1!==n&&setTimeout((function(){e.openedNominee=n}),1)},downloadAttachment:function(t,e){this.$store.dispatch(ze,{reviewId:t,fileId:e})}}},rd=sd,od=(0,f.Z)(rd,zu,ju,!1,null,null,null),ld=od.exports,cd={components:{reviewList:Vu,scoreList:ld},computed:(0,Dt.Z)({},(0,Lt.Se)({nominees:"reviewNomineeNominations"}))},ud=cd,dd=(0,f.Z)(ud,Fu,$u,!1,null,null,null),pd=dd.exports,md=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"item-list text-xs-center"},[e("notification"),e("span",{staticClass:"closeButton",on:{click:function(e){return e.preventDefault(),t.close()}}},[e("v-icon",{attrs:{color:"white"}},[t._v("clear")])],1),t.isLoaded?e("v-toolbar",{staticClass:"review-item",attrs:{height:"auto"}},[e("v-toolbar-items",[e("v-btn",{staticClass:"button-height",attrs:{flat:"",disabled:!t.previous},on:{click:t.goPrevious}},[t.previous?e("v-icon",[t._v("arrow_left")]):t._e(),t.previous?e("div",{staticClass:"word-wrap"},[t._v(t._s(t.fullName(t.previous)))]):t._e()],1),e("div",{staticClass:"py-2",attrs:{flat:""}},[t.current?e("div",{staticClass:"word-wrap middle-header"},[t._v(t._s(t.fullName(t.current)))]):t._e()]),e("v-btn",{staticClass:"ma-0 pr-4 button-height",attrs:{flat:"",disabled:!t.next},on:{click:t.goNext}},[t.next?e("div",{staticClass:"word-wrap"},[t._v(t._s(t.fullName(t.next)))]):t._e(),t.next?e("v-icon",[t._v("arrow_right")]):t._e()],1)],1)],1):t._e(),e("hr",{staticClass:"space space-sm"}),t.isLoaded?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"pr-2",attrs:{xs6:""}},[e("v-checkbox",{scopedSlots:t._u([{key:"label",fn:function(){return[t._v(" Conflict of interests  "),e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!1,2915330974)},[e("span",[t._v("Tick if you have a conflict of interest with the nomination")])])]},proxy:!0}],null,!1,1199360336),model:{value:t.isConflict,callback:function(e){t.isConflict=e},expression:"isConflict"}}),t.isConflict?t._e():[e("hr",{staticClass:"space space-sm"}),e("p",[t._v("Nominated by:")]),t.review?e("v-expansion-panel",{attrs:{popout:"",expand:""},model:{value:t.nomineePanels,callback:function(e){t.nomineePanels=e},expression:"nomineePanels"}},t._l(t.review.NomineeNominationList,(function(n,i){return e("v-expansion-panel-content",{key:i,staticClass:"review-panel",attrs:{tabindex:100+i},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[t._v(" "+t._s(n.NominatorName)+" "),e("span",{staticClass:"text-right sans",on:{click:function(e){return e.stopPropagation(),t.download(n.Id)}}},[t._v(" Nomination: "),e("v-icon",{attrs:{small:""}},[t._v("attach_file")])],1)])]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("p",[t._v(" Co-nominees: "),n.CoNomineeList&&n.CoNomineeList.length?t._e():[t._v(" - ")],t._l(n.CoNomineeList,(function(e,i){return[t._v(" "+t._s(e.FullName)+" "),i<n.CoNomineeList.length-1?[t._v(", ")]:t._e()]}))],2),e("p",[t._v(" Attachments: "),n.AttachmentList&&n.AttachmentList.length?t._e():[t._v(" - ")],t._l(n.AttachmentList,(function(n){return[e("v-icon",{key:n.Id,attrs:{small:""},on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.Id)}}},[t._v("attach_file")])]}))],2)])],1)],1)})),1):t._e()]],2),e("v-flex",{attrs:{xs6:""}},[t.isConflict?t._e():[e("v-form",{ref:"form",model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-expansion-panel",{staticClass:"elevation-1",attrs:{expand:""},model:{value:t.openedPanels,callback:function(e){t.openedPanels=e},expression:"openedPanels"}},t._l(t.review.ScoringList,(function(n,i){return e("v-expansion-panel-content",{key:n.Id,staticClass:"review-panel score-panel",attrs:{tabindex:i},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[t._v(t._s(n.Name))])]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("p",[n.Description?e("span",{staticClass:"pre"},[t._v(t._s(n.Description))]):t._e()]),e("v-select",{ref:"score".concat(n.Id),refInFor:!0,attrs:{items:t.getScoreList(n.ScoreList),"item-value":"id","item-text":"text",label:"Score",rules:t.scoreRules,box:""},on:{change:function(e){return t.updateScore(n)}},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTabScore(e,i))}},model:{value:t.form[n.Id].score,callback:function(e){t.$set(t.form[n.Id],"score",e)},expression:"form[item.Id].score"}}),e("v-textarea",{key:t.autoGrow,ref:"comment".concat(n.Id),refInFor:!0,attrs:{label:"Comment",placeholder:"",loading:t.is
1FormLoading,disabled:t.isFormLoading,"auto-grow":"",rows:"1"},on:{input:function(e){return t.updateComment(n)},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTabComment(e,i))}},model:{value:t.form[n.Id].comment,callback:function(e){t.$set(t.form[n.Id],"comment",e)},expression:"form[item.Id].comment"}})],1)],1)],1)})),1),e("hr",{staticClass:"space space-sm"}),e("v-alert",{staticClass:"alert text-xs-center",attrs:{value:t.showError,type:"error",outline:""}},[t._v(" Some information is missing. Please provide a score for each category. ")]),e("v-btn",{attrs:{color:t.valid?"success":"grey lighten-1"},on:{click:function(e){return e.preventDefault(),t.markFinished()}}},[t._v(" Finish review ")])],1)]],2)],1):e("v-layout",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)]),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.isConflict,callback:function(e){t.isConflict=e},expression:"isConflict"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("p",[t._v("Do you have a conflict of interest with this nomination?")]),e("p",[t._v("If yes, the review will be deactivated and cannot be submitted.")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.isConflict=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.markConflict}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.downloadDialog,callback:function(e){t.downloadDialog=e},expression:"downloadDialog"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.downloadDialog=!1}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])],1)],1)],1)},fd=[],vd={props:["id"],components:{notification:Kl},data:function(){return{form:{},valid:!1,isConflict:!1,downloadDialog:!1,nomineePanels:[],openedPanels:null,showError:!1,scoreRules:[function(t){return!!t||"Please select a score"}],isFormLoading:!1,autoGrow:!1}},created:function(){this.createForm()},mounted:function(){var t=this;this.$store.dispatch(Ue,this.id).then((function(){t.initTab(),t.initPanels(),t.forceReRender()})),!this.reviewNominations.length&&this.round&&this.$store.dispatch(Be)},beforeDestroy:function(){window.removeEventListener("keyup",this.onTab)},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["reviewNominations"])),(0,Xt.vn)(["review.review","review.round"])),{},{index:function(){var t=this;return this.reviewNominations.findIndex((function(e){return e.Id===parseInt(t.id)}))},current:function(){return this.reviewNominations.length?this.reviewNominations[this.index]:null},next:function(){return this.reviewNominations.length&&this.index<this.reviewNominations.length-1?this.reviewNominations[this.index+1]:null},previous:function(){return this.reviewNominations.length&&this.index>0?this.reviewNominations[this.index-1]:null},isLoaded:function(){return this.review&&this.reviewNominations.length>0&&parseInt(this.id)===this.review.Id}}),watch:{review:function(){this.createForm()},id:function(){var t=this;this.$store.dispatch(Ue,this.id).then((function(){t.initPanels()}))},round:function(){this.$store.dispatch(Be)},valid:function(){this.valid&&(this.showError=!1)}},methods:{fullName:function(t){return t.NomineeFirstName+" "+t.NomineeLastName},goNext:function(){this.next&&this.$router.push({name:"ReviewItem",params:{id:this.next.Id}})},goPrevious:function(){this.previous&&this.$router.push({name:"ReviewItem",params:{id:this.previous.Id}})},download:function(t){var e=this;this.downloadDialog=!0,this.$store.dispatch(Ve,{reviewId:this.id,nominationId:t}).then((function(t){e.downloadDialog=!1}))},downloadAttachment:function(t){this.$store.dispatch(ze,{reviewId:this.id,fileId:t})},createForm:function(){if(this.review)for(var t in this.review.ScoringList){var e=this.review.ScoringList[t];this.form[e.Id]={score:this.review.ScoringList[t].ScoreId,comment:this.review.ScoringList[t].Comment}}},getScoreList:function(t){return G(t)},onTabScore:function(t,e){var n=this;t.shiftKey&&e>
10?this.openPanel(e-1).then((function(){n.$refs["comment".concat(n.review.ScoringList[e-1].Id)][0].focus()})):t.shiftKey||this.$refs["comment".concat(this.review.ScoringList[e].Id)][0].focus()},onTabComment:function(t,e){var n=this;!t.shiftKey&&e<this.review.ScoringList.length-1?this.openPanel(e+1).then((function(){n.$refs["score".concat(n.review.ScoringList[e+1].Id)][0].focus()})):t.shiftKey&&this.$refs["score".concat(this.review.ScoringList[e].Id)][0].focus()},openPanel:function(t){var e=this;return new Promise((function(n,i){if(e.openedPanels[t])setTimeout((function(){n()}),1);else{var a=e.openedPanels.slice();e.openedPanels=null,setTimeout((function(){e.openedPanels=a,e.openedPanels[t]=!0,setTimeout((function(){n()}),250)}),1)}}))},updateScore:function(t){var e=this;this.$store.dispatch(je,{reviewId:this.id,scoringId:t.Id,data:this.form[t.Id].score}),this.$nextTick((function(){e.$refs["score".concat(t.Id)][0].focus()}))},updateComment:function(t){var e=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((function(){e.isFormLoading=!0,e.$store.dispatch(Ye,{reviewId:e.id,scoringId:t.Id,data:e.form[t.Id].comment}).then((function(){e.isFormLoading=!1,setTimeout((function(){e.$refs["comment"+t.Id][0].focus()}),10)})).catch((function(){e.isFormLoading=!1}))}),1e3)},markConflict:function(){var t=this;this.$store.dispatch(qe,this.id).then((function(){t.$router.push({name:"ReviewWizard"})}))},markFinished:function(){var t=this;if(this.showError=!1,this.$refs.form.validate())this.$store.dispatch(He,this.id).then((function(){t.$router.push({name:"ReviewWizard"})}));else{this.showError=!0;var e=this.$refs.form.inputs.findIndex((function(t){return!t.valid}));if(-1!==e){var n=Math.floor(e/2);this.openPanel(n)}}},initPanels:function(){this.nomineePanels=this.review.NomineeNominationList.map((function(){return!0})),this.openedPanels=this.review.ScoringList.map((function(){return!0}))},initTab:function(){window.addEventListener("keyup",this.onTab)},onTab:function(t){var e=this,n=t.keyCode||t.which;if(9===n&&document.activeElement.classList.contains("score-panel")){var i=document.activeElement.tabIndex;this.openPanel(parseInt(i)).then((function(){e.$refs["score".concat(e.review.ScoringList[i].Id)][0].focus()}))}},close:function(){this.$router.push({name:"ReviewWizard"}),this.$store.dispatch(Qe)},forceReRender:function(){this.autoGrow=!this.autoGrow}}},hd=vd,gd=(0,f.Z)(hd,md,fd,!1,null,"2f875a68",null),_d=gd.exports,Id=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"item-list text-xs-center application-list"},[e("v-layout",{attrs:{"mb-5":""}},[e("v-flex",{attrs:{sm6:"","text-xs-left":""}},[e("h1",{staticClass:"headline"},[t._v("My applications")])]),e("v-flex",{attrs:{sm6:"","text-xs-right":""}},[e("v-btn",{staticClass:"btn-add button my-0",attrs:{color:"success"},on:{click:function(e){return t.$events.$emit("addApplication")}}},[t._v(" New application "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1)],1)],1),e("v-toolbar",{staticClass:"review-toolbar"},[e("v-toolbar-items",[e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("round")}}},[t._v(" Reference "),"round"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{staticClass:"ml-4",attrs:{flat:""},on:{click:function(e){return t.setOrder("title")}}},[t._v(" Title "),"title"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("v-btn",{staticStyle:{visibility:"hidden"},attrs:{flat:""}}),e("span"),e("v-btn",{attrs:{flat:""},on:{click:function(e){return t.setOrder("IsSubmitted")}}},[t._v(" Status "),"IsSubmitted"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2),e("span")],1)],1),t.viewedApplications.length?t._e():[e("div",{staticClass:"container text-sm-center"},[e("p",[t._v("No applications yet.")])])],e("v-expansion-panel",{attrs:{popout:"",value:t.openedPanel}},t._l(t.viewedApplications,(function(n,i){return e("v-expansion-panel-content",{key:i,staticClass:"review-panel",scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[e("v-layout",{attrs:{"align-center":"","justify-center":"",row:"",wrap:""}},[e("v-flex",{attrs:{xs2:""}},[t._v(" "+t._s(n.RefNo)+" ")]),e("v-flex",{attrs:{xs5:"","offset-xs1":""}},[t._v(" "+t._s(n.ProjectTitle)+" ")]),e("v-flex",{attrs:{xs2:"","text-xs-right":""}},["Submitted"==n.State?e("div",[e("span",{staticClass:"primary--text"},[t._v("Submitted")])]):e("div",[e("span",{staticClass:"gray--text"},[t._v(t._s(n.State))])])]),e("v-flex",{attrs:{xs1:"","text-xs-right":"","ml-2":""}},[n.CanOpenGrantManagement&&!n.AwaitingMainApplicantGrantAccept?e("a",{staticClass:"icon-hover",attrs:{title:"Grant management"},on:{click:function(e){return e.preventDefault(),t.openGrant(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("attach_money")])],1):n.CanOpenGrantManagement&&n.AwaitingMainApplicantGrantAccept?e("a",{staticClass:"icon-hover",attrs:{title:"Grant management can first be accessed once the main applicant has accepted the grant terms"}},[e("v-icon",{attrs:{color:"grey"}},[t._v("attach_money")])],1):t._e(),n.IsSubmitted?e("a",{staticClass:"icon-hover",attrs:{title:"Download PDF"},on:{click:function(e){return e.preventDefault(),t.openApplicationPDF(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("visibility")])],1):e("a",{staticClass:"icon-hover",attrs:{title:"View application"},on:{click:function(e){return e.preventDefault(),t.openApplication(n)}}},[n.CanBeEdited?e("v-icon",{attrs:{color:"primary"}},[t._v("edit")]):e("v-icon",{attrs:{color:"primary"}},[t._v("visibility")])],1),n.CanOpenMessaging?e("a",{staticClass:"icon-hover",attrs:{title:"Messages"},on:{click:function(e){return e.preventDefault(),t.openMessages(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("mail_outline")])],1):t._e()])],1)],1)]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("v-layout",[e("v-flex",{attrs:{xs6:"","px-4":""}},[n.ApplicationDeadline?[t._v(" Deadline: "+t._s(t.displayDate(n.ApplicationDeadline))),e("br")]:t._e(),t._v(" Round: "+t._s(n.Ap
1plicationRoundName)),e("br"),t._v(" Role: "+t._s(n.ApplicantType)+" ")],2),e("v-flex",{attrs:{xs6:"","text-xs-right":"","px-4":""}},[e("v-layout",{attrs:{"align-center":"","justify-end":""}},[n.CanBeWithdrawn?e("v-btn",{on:{click:function(e){return t.confirmWithdraw(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("work_off")]),t._v("Â Withdraw ")],1):t._e(),n.CanBeReopened?e("v-btn",{on:{click:function(e){return t.confirmReopen(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("keyboard_arrow_left")]),t._v("Â Reopen ")],1):t._e(),n.CanBeEdited?e("v-btn",{staticClass:"disabled",on:{click:function(e){return t.openApplication(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("edit")]),t._v("Â Edit ")],1):t._e(),n.CanBeDeleted?e("v-btn",{staticClass:"disabled",on:{click:function(e){return t.confirmDelete(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("close")]),t._v("Â Delete ")],1):e("v-btn",{on:{click:function(e){return t.openApplicationPDF(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("assignment_returned")]),t._v("Â Download PDF ")],1),e("v-btn",{on:{click:function(e){return t.copyApplication(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("file_copy")]),t._v("Â Copy ")],1)],1)],1)],1)],1)],1)],1)})),1),t.applicationListDiffer?e("div",{staticClass:"text-xs-center mt-4"},[e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[e("v-btn",t._g(t._b({attrs:{flat:"",color:"primary"},on:{click:function(e){t.showOnlyActive=!t.showOnlyActive}}},"v-btn",a,!1),i),[e("v-icon",{attrs:{left:""}},[t._v("filter_list")]),t._v(" "+t._s(t.showOnlyActive?"Show All Applications":"Show Only Active")+" ")],1)]}}],null,!1,1326419778)},[e("span",{staticClass:"helptext"},[t._v(" "+t._s(t.showOnlyActive?"Only active applications are shown.\nClick to show all applications":"All applications are shown.\nClick to only show active applications")+" ")])])],1):t._e(),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete application?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.dialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.deleteApplication()}}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.withdrawDialog,callback:function(e){t.withdrawDialog=e},expression:"withdrawDialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(" Are you sure you wish to withdraw the application?"),e("br"),t._v(" A withdrawn application can't be re-opened."),e("br"),t._v(" You can't undo this action. ")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.withdrawDialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.withdrawApplication()}}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.reopenDialog,callback:function(e){t.reopenDialog=e},expression:"reopenDialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(" Are you sure you wish to reopen the application? ")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.reopenDialog=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.reopenApplication()}}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.copyDialog,callback:function(e){t.copyDialog=e},expression:"copyDialog"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.copyDialog=!1}}},[e("v-icon",[t._v("close")])],1),t.copyRoundsLoading?[e("v-card-text",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])]:t.copyRounds.length?[e("v-card-text",[e("span",[t._v("Choose round to copy application to:")])]),e("v-card-actions",[e("v-spacer"),t.copyRounds?e("div",[e("v-select",{attrs:{items:t.copyRounds,"item-value":"RoundId","item-text":"RoundName",label:"Round",box:""},model:{value:t.copyRound,callback:function(e){t.copyRound=e},expression:"copyRound"}})],1):t._e()],1)]:[e("v-card-text",[e("span",[t._v("No rounds available for copying application")])])]],2)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.errorDialog,callback:function(e){t.errorDialog=e},expression:"errorDialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(" "+t._s(t.errorMessage)+" ")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"success"},on:{click:function(e){t.errorDialog=!1}}},[t._v("Ok")])],1)],1)],1)],2)},Ad=[],bd={data:function(){return{openedPanel:null,dialog:!1,copyDialog:!1,copyRoundsLoading:!1,copyRound:null,copyAppId:null,deleteItem:null,withdrawDialog:!1,reopenDialog:!1,withdrawItem:null,reopenItem:null,errorDialog:null,errorMessage:null,showOnlyActive:!0}},computed:(0,Dt.Z)((0,Dt.Z)({applicationListDiffer:function(){return this.applications.length!==this.activeApplications.length&&this.activeApplications.length>0},activeApplications:function(){var t=this.applications.filter((function(t){return"Withdrawn"!==t.State&&"Finis
1hed"!==t.State&&"Rejected"!==t.State&&"Grant rejected"!==t.State}));return t},viewedApplications:function(){return this.showOnlyActive&&this.applicationListDiffer?this.activeApplications:this.applications}},(0,Lt.Se)({applications:"applicationList"})),(0,Xt.vn)(["application.orderBy","application.orderAsc","application.copyRounds"])),watch:{copyRound:function(){var t=this;this.copyRound&&(this.copyRoundsLoading=!0,this.$store.dispatch(cn,{appId:this.copyAppId,roundId:this.copyRound}).then((function(e){t.copyRoundsLoading=!1,t.$router.push({name:"ApplicationWizard",params:{id:e.Id}})})))}},mounted:function(){this.$store.dispatch(tn)},methods:{openApplication:function(t){this.$router.push({name:"ApplicationWizard",params:{id:t.Id,canEdit:t.CanBeEdited}})},openGrant:function(t){this.$router.push({name:"ApplicationGrantsFunding",params:{id:t.Id}})},openApplicationPDF:function(t){this.$store.dispatch(rn,t.Id)},openMessages:function(t){this.$router.push({name:"ApplicationMessages",params:{id:t.Id}})},setOrder:function(t){this.orderBy===t?this.$store.commit(Br,{orderBy:t,orderAsc:!this.orderAsc}):this.$store.commit(Br,{orderBy:t,orderAsc:this.orderAsc})},copyApplication:function(t){var e=this;this.copyAppId=t.Id,this.copyRoundsLoading=!0,this.$store.dispatch(nn,t.Id).then((function(){e.copyRoundsLoading=!1})),this.copyDialog=!0},deleteApplication:function(t){t||(t=this.deleteItem),this.$store.dispatch(mn,t.Id),this.dialog=!1},confirmDelete:function(t){this.deleteItem=t,this.dialog=!0},withdrawApplication:function(t){var e=this;t||(t=this.withdrawItem),this.$store.dispatch(fn,t.Id).then((function(){e.$store.dispatch(tn),e.withdrawDialog=!1}))},reopenApplication:function(t){var e=this;t||(t=this.reopenItem),this.$store.dispatch(vn,t.Id).then((function(){e.$store.dispatch(tn),e.reopenDialog=!1})).catch((function(){e.errorMessage="Could not reopen the application at this time",e.errorDialog=!0,e.reopenDialog=!1}))},confirmWithdraw:function(t){this.withdrawItem=t,this.withdrawDialog=!0},confirmReopen:function(t){this.reopenItem=t,this.reopenDialog=!0},openPanel:function(t){var e=this;return new Promise((function(n,i){e.openedPanel!==t&&(e.openedPanel=null,setTimeout((function(){e.openedPanel=t,setTimeout((function(){n()}),100)}),1))}))},displayDate:function(t){var e="0:00:00";if(t){var n=A()(t);return n.format("H:mm:ss")===e?n.format("L"):n.format("L LT")}return""}}},xd=bd,Cd=(0,f.Z)(xd,Id,Ad,!1,null,"3fb81ef3",null),yd=Cd.exports,wd=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard"},[e("notification"),t.isLoaded?t.initPanel?e("div",{staticClass:"card profile wizard-fullscreen px-0 py-0",on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab(e)}}},[e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationList"})}}},[t._v("< Back to overview ")])],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[t.application?e("h1",{staticClass:"headline mb-2"},[t._v(" "+t._s(t.application.RefNo)+" "),e("a",{staticClass:"icon-hover",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openMessages.apply(null,arguments)}}},[e("v-icon",{attrs:{color:"gray"}},[t._v("mail_outline")])],1)]):t._e(),t.rounds.Messages&&t.rounds.Messages.length>0?e("div",t._l(t.rounds.Messages,(function(n){return e("h3",{key:n},[t._v(t._s(n.Message))])})),0):t._e(),t.application?e("h3",{staticClass:"text-red",domProps:{innerHTML:t._s(t.application.RoundExtraInformation)}}):t._e(),t.validationErrorsMap.application?e("b",{staticClass:"text-red"},[e("br"),t._v(t._s(t.validationErrorsMap.application)+" ")]):t._e()])])]),t.application?e("v-tabs",{ref:"tabs",attrs:{color:"transparent","hide-slider":""},on:{change:t.panelChanged},model:{value:t.openedPanel,callback:function(e){t.openedPanel=e},expression:"openedPanel"}},[e("v-tab",{staticClass:"w-100",class:t.hasContactErrors?"has-errors":"",attrs:{ripple:""}},[t._v("Contact")]),t.canEdit?[e("v-tab",{class:t.hasProjectErrors?"has-errors":"",attrs:{ripple:""}}
1,[t._v("Project")]),t._l(t.application.DynamicFieldPageList,(function(n){return e("v-tab",{key:n.Id,class:t.pageErrors[n.Id]?"has-errors":"",attrs:{ripple:""}},[t._v(" "+t._s(n.PageName)+" ")])})),t.enableEnclosures?e("v-tab",{attrs:{ripple:""}},[t._v("Enclosures")]):t._e(),t.canEditBudget?e("v-tab",{class:t.hasBudgetErrors?"has-errors":"",attrs:{ripple:""}},[t._v("Budget")]):t._e()]:t._e(),e("v-tab",{ref:"tabPreview",staticClass:"no-border",attrs:{ripple:""}},[t._v("Preview")]),t.canEdit?e("v-container",{staticClass:"buttons w-100"},[e("v-layout",[e("v-flex",{attrs:{sm1:""}}),e("v-flex",{attrs:{sm1:""}},[e("br"),e("v-btn",{staticClass:"button",class:{submitDisabled:!t.submitIsPossible},attrs:{color:t.submitIsPossible?"success":"grey lighten-1"},on:{click:t.askSubmit}},[t.submitIsPossible?t._e():e("v-icon",{staticClass:"iconDisabled",attrs:{left:""}},[t._v("block")]),t._v(" Submit ")],1)],1)],1)],1):t._e(),e("v-tab-item",[e("form-contact")],1),t.canEdit?[e("v-tab-item",[e("form-project")],1),t._l(t.application.DynamicFieldPageList,(function(t){return e("v-tab-item",{key:t.Id},[e("form-properties",{attrs:{"page-id":t.Id,title:t.PageName,fields:t.DynamicFieldsList}})],1)})),t.enableEnclosures?e("v-tab-item",[e("form-attachments",{attrs:{showImagesCondition:this.application&&(this.application.MaxNumberPictures>0||this.filesImages.length>0),showDocumentsCondition:this.application&&(this.application.MaxNumberDocuments>0||this.filesDocuments.length>0),maxNumberPictures:t.application.MaxNumberPictures,maxNumberDocuments:t.application.MaxNumberDocuments,useApplicationAttachment:""}})],1):t._e(),t.canEditBudget?e("v-tab-item",[e("form-budget")],1):t._e()]:t._e(),e("v-tab-item",[e("preview",{attrs:{pdfData:t.pdfData}},[e("v-btn",{staticClass:"w-100 pa-0 ma-0",attrs:{flat:"",color:"primary",background:"white"},on:{click:function(e){return t.openApplicationPDF(t.id)}}},[e("v-icon",{attrs:{left:"",color:"primary"}},[t._v("assignment_returned")]),t._v("Â Download PDF ")],1)],1)],1)],2):t._e()],1):t._e():e("v-card",{staticClass:"card"},[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])],1),t.submitIsPossible?e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to submit your application?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:t.rejectSubmit}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.submit}},[t._v("Yes")])],1)],1)],1):t._e()],1)},Td=[],Nd=(n(38862),3e3),Ed={ANSProjektTitel:"ProjectTitle",ProjektTitel:"ProjectTitle",ANSProjektAbstract:"ProjectShortDescription",ProjektAbstract:"ProjectShortDescription",ANSProjektStartDato:"ProjectStartDate",ANSProjektSlutDato:"ProjectEndDate",ANSForskningskategori:"ResearchCategory",FAGNo:"SubjectAreaId",ANSInstitutionTelefonnummer:"InstitutionPhoneNumber",INSNo:"InstitutionId",InstitutADRAdresse:"InstituteAddress",InstitutADRBy:"InstituteCity",InstitutADRPostnummer:"InstitutePostalCode",ANSHovedOmraade:"MainArea"},Pd={STBNo:"Title1",BRUTelefon:"PhoneNumber",BrugerADRAdresse:"StreetAndNumber",BrugerADRBy:"City",BrugerADRPostnummer:"PostalCode"},Sd=function(){var t=this,e=t._self._c;return t.profile?e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card",{staticClass:"card my-3 w-100",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Account")])]),e("p",{staticClass:"text-xs-center"},[t._v(" If you want to make a change in contact information, please go to "),e("router-link",{attrs:{to:{name:"Profile"}}},[t._v("'My profile'")])],1),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("E-mail:")]),e("dd",{staticClass:"flex py-1 md9"},[t.email?e("span",[t._v(t._s(t.email))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("First name:")]),e("dd",{staticClass:"flex py-1 md9"},[t.firstName?e("span",[t._v(t._s(t.firstName))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Last name:")]),e("dd",{staticClass:"flex py-1 md9"},[t.lastName?e("span",[t._v(t._s(t.lastName))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Preferred language:")]),e("dd",{staticClass:"flex py-1 md9"},[t.language?e("span",[t._v(t._s(t.language.text))]):t._e()])]),e("br")],1),e("v-card",{staticClass:"card my-3 w-100",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("User information")])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Country:")]),e("dd",{staticClass:"flex py-1 md9"},[t.country?e("span",[t._v(" "+t._s(t.country.Value))]):t._e()])]),e("dl",{staticClass:"layout row wrap",class:t.validationErrorsMap.PostalCode?"error--text":""},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Postal code:")]),e("dd",{staticClass:"flex py-1 md9"},[t.postalCode?e("span",[t._v(t._s(t.postalCode))]):t._e()])]),e("dl",{staticClass:"layout row wrap",class:t.validationErrorsMap.StreetAndNumber?"error--text":""},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Street name and number:")]),e("dd",{staticClass:"flex py-1 md9"},[t.address?e("span",[t._v(t._s(t.address))]):t._e()])]),e("dl",{staticClass:"layout row wrap",class:t.validationErrorsMap.City?"error--text":""},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("City:")]),e("dd",{staticClass:"flex py-1 md9"},[t.city?e("span",[t._v(t._s(t.city))]):t._e()])]),e("dl",{staticClass:"layout row wrap",class:t.validationErrorsMap.PhoneNumber?"error--text":""},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Phone:")]),e("dd",{staticClass:"flex py-1 md9"},[t.phonePrefix?e("span",[t._v("+"+t._s(t.phonePrefix))]):t._e(),t._v(" "),t.phone?e("span",[t._v(t._s(t.phone))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Date of birth:")]),e("dd",{staticClass:"flex py-1 md9"},[t.dateOfBirth?e("span",[t._v(t._s(t.dateOfBirth))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Gender:")]),e("dd",{staticClass:"flex py-1 md9"},[t.gender?e("span",[t._v(t._s(t.gender.text))]):t._e()])]),e("br")],1),e("v-card",{staticClass:"card my-3 w-100",attrs:{flat:""}},[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle cardTitleMargin",attrs:{"align-center":""}},[t._v("Position and title")])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Degree:")]),e("dd",{staticClass:"flex py-1 md9"},[t.degree?e("span",[t._v(t._s(t.degree.text))]):t._e()])]),e("dl",{staticClass:"layout row wrap",class:t.validationErrorsMap.Title1?"error--text":""},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Position 1:")]),e("dd",{staticClass:"flex py-1 md9"},[t.title1?e("span",[t._v(t._s(t.title1.text))]):t._e()])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 xs6 md2"},[t._v("Position 2:")]),e("dd",{staticClass:"flex py-1 md9"},[t.title2?e("span",[t._v(t._s(t.title2.text))]):t._e()])]),e("br")],1)],1)],1)],1):t._e()},Rd=[],Dd={data:function(){return{datePicker:!1,modal:!1,valid:!1,nameRules:[function(t){return/^[^\d]+$/.test(t)||"Field should not contain special characters"}]}},methods:{updateProfile:function(t){this.$store.dispatch(Se,t)},closeModal:function(){this.modal=!1}},created:function(){this.$store.dispatch(Pe)},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap"])),(0,Xt.vn)(["user.profile"])),{},{languageList:function(){return B(this.profile.LanguageList)},genderList:function(){return B(this.profile.GenderList)},degreeList:function(){return B(this.profile.DegreeList)},titleList:function(){return B(this.profile.TitleList)},countryList:function(){return B(this.profile.NationalityList)},lastPasswordChangeText:function(){var t=this.profile.LastPasswordChangeDate;return t&&A()(t).isAfter(A()("0001-01-01"))?"The password was last changed on "+A()(t).format("YYYY-MM-DD"):""},firstName:{get:function(){return this.profile.FirstName},set:function(t){this.valid&&this.updateProfile({name:"FirstName",value:t,notificationName:"first name"})}},lastName:{get:function(){return this.profile.LastName},set:function(t){this.valid&&this.updateProfile({name:"LastName",value:t,notificationName:"last name"})}},email:{get:function(){return this.profile.LoginName},set:function(t){this.updateProfile({name:"LoginName",value:t,notificationName:"login name"})}},phonePrefix:{get:function(){return this.profile.PhonePrefix},set:function(t){this.updateProfile({name:"PhonePrefix",value:t,notificationName:"phone prefix"})}},phone:{get:function(){return this.profile.PhoneNumber},set:function(t){this.updateProfile({name:"PhoneNumber",value:t,notificationName:"phone number"})}},address:{get:function(){return this.profile.StreetAndNumber},set:function(t){this.updateProfile({name:"StreetAndNumber",value:t,notificationName:"street and number"})}},city:{get:function(){return this.profile.City},set:function(t){this.updateProfile({name:"City",value:t,notificationName:"
1city"})}},postalCode:{get:function(){return this.profile.PostalCode},set:function(t){this.updateProfile({name:"PostalCode",value:t,notificationName:"postal code"})}},dateOfBirth:{get:function(){return this.profile.DateOfBirth.substr(0,10)},set:function(t){this.updateProfile({name:"DateOfBirth",value:t,notificationName:"date of birth"})}},degree:{get:function(){var t=this;return this.degreeList.filter((function(e){return e.id===t.profile.Degree}))[0]},set:function(t){this.updateProfile({name:"Degree",value:t,notificationName:"degree"})}},country:{get:function(){var t=this;return this.profile.NationalityList.filter((function(e){return e.Key===t.profile.Nationality}))[0]},set:function(t){this.updateProfile({name:"Nationality",value:t,notificationName:"country"})}},language:{get:function(){var t=this;return this.languageList.filter((function(e){return e.id===t.profile.PreferredLanguage}))[0]},set:function(t){this.updateProfile({name:"PreferredLanguage",value:t,notificationName:"language"})}},gender:{get:function(){var t=this;return this.genderList.filter((function(e){return e.id===t.profile.Gender}))[0]},set:function(t){this.updateProfile({name:"Gender",value:t,notificationName:"gender"})}},title1:{get:function(){var t=this;return this.titleList.filter((function(e){return e.id===t.profile.Title1}))[0]},set:function(t){this.updateProfile({name:"Title1",value:t,notificationName:"position"})}},title2:{get:function(){var t=this;return this.titleList.filter((function(e){return e.id===t.profile.Title2}))[0]},set:function(t){this.updateProfile({name:"Title2",value:t,notificationName:"position"})}}})},Ld=Dd,Md=(0,f.Z)(Ld,Sd,Rd,!1,null,null,null),kd=Md.exports,Od=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Project information")])]),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Project title",autocomplete:"none",box:"",required:"",counter:"100",hint:"100 characters max","error-messages":t.validationErrorsMap.ProjectTitle,"persistent-hint":""},model:{value:t.application.ProjectTitle,callback:function(e){t.$set(t.application,"ProjectTitle",e)},expression:"application.ProjectTitle"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("div",{staticClass:"w-100"},[e("v-textarea",{attrs:{value:t.application.ProjectShortDescription,"error-messages":t.validationErrorsMap.ProjectShortDescription,label:"Summary of application",box:"",rows:10},on:{change:function(e){t.application.ProjectShortDescription=e,t.idleUpdate()}}})],1),e("div",{staticClass:"v-messages theme--light mb-3"},[t._v(" The summary must be a description of the application, that makes it possible for non-experts to understand what it is about. Max. 2000 characters including spaces. ")]),e("div",{staticClass:"v-messages theme--light mb-3 text-right mr-2",class:{"error--text":t.strippedStringLength(t.application.ProjectShortDescription)>2e3}},[t._v(" "+t._s(t.strippedStringLength(t.application.ProjectShortDescription))+" / 2000 ")])]),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:"","pr-2":""}},[e("v-menu",{attrs:{"content-class":"v-menu__content__min-width-fix","close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-text-field",t._g({attrs:{value:t.ProjectStartDate,"error-messages":t.validationErrorsMap.ProjectStartDate,label:"Project start date (YYYY-MM-DD)","append-icon":"date_range",box:"",mask:"####-##-##",color:"primary"},on:{change:function(e){t.projectStartField=e,t.idleUpdate()}}},i))]}}]),model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[e("v-date-picker",{attrs:{color:"primary"},on:{input:function(e){t.menu=!1}},model:{value:t.ProjectStartDate,callback:function(e){t.ProjectStartDate=e},expression:"ProjectStartDate"}})],1)],1),e("v-flex",{attrs:{xs6:"","pl-2":""}},[e("v-menu",{attrs:{"content-class":"v-menu__content__min-width-fix","close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-text-field",t._g({attrs:{value:t.ProjectEndDate,"error-messages":t.validationErrorsMap.ProjectEndDate,label:"Project end date (YYYY-MM-DD)","append-icon":"date_range",box:"",mask:"####-##-##",color:"primary"},on:{change:function(e){t.projectEndField=e,t.idleUpdate()}}},i))]}}]),model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[e("v-date-picker",{attrs:{color:"primary"},on:{input:function(e){t.menu2=!1}},model:{value:t.ProjectEndDate,callback:function(e){t.ProjectEndDate=e},expression:"ProjectEndDate"}})],1)],1)],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.researchAreaItems,"item-value":"id","item-text":"text","error-messages":t.validationErrorsMap.ResearchCategory,label:"Research area",box:""},model:{value:t.application.ResearchCategory,callback:function(e){t.$set(t.application,"ResearchCategory",e)},expression:"application.ResearchCategory"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.mainFieldItems,"item-value":"id","item-text":"text","error-messages":t.validationErrorsMap.MainArea,label:"Main field",box:"",required:""},model:{value:t.application.MainArea,callback:function(e){t.$set(t.application,"MainArea",e)},expression:"application.MainArea"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.subjectAreaItems,"item-value":"id","item-text":"text","error-messages":t.validationErrorsMap.SubjectAreaId,label:"Field of expertise",box:"",required:""},model:{value:t.application.SubjectAreaId,callback:function(e){t.$set(t.application,"SubjectAreaId",e)},expression:"application.SubjectAreaId"}})],1),e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Institution")])]),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.institutionListArray,"item-value":"id","item-text":"text","error-messages":t.validationErrorsMap.InstitutionId,label:"Institution",box:"",required:"",hint:"Institution (name of university, hospital etc.)
1where the project will be carried out",id:"institution","persistent-hint":""},on:{focus:function(e){return t.disableSpaceBar()}},model:{value:t.application.InstitutionId,callback:function(e){t.$set(t.application,"InstitutionId",e)},expression:"application.InstitutionId"}})],1),0===t.application.InstitutionId?e("v-layout",{attrs:{column:"",wrap:"","pl-4":""}},[e("v-text-field",{attrs:{label:"Name of the new Institution",autocomplete:"none",box:"",type:"text",required:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addInstitution.apply(null,arguments)}},model:{value:t.institutionName,callback:function(e){t.institutionName=e},expression:"institutionName"}}),e("div",[e("v-btn",{attrs:{color:"primary"},on:{click:t.addInstitution}},[t._v("Add")])],1),e("br")],1):t._e(),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstitutionDepartment,label:"Department",counter:"200",hint:"Department not Faculty. 200 characters max.","persistent-hint":"",autocomplete:"none",box:""},model:{value:t.application.InstitutionDepartment,callback:function(e){t.$set(t.application,"InstitutionDepartment",e)},expression:"application.InstitutionDepartment"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstitutionInstitute,label:"Section",counter:"100",hint:"100 characters max.","persistent-hint":"",autocomplete:"none",box:""},model:{value:t.application.InstitutionInstitute,callback:function(e){t.$set(t.application,"InstitutionInstitute",e)},expression:"application.InstitutionInstitute"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{staticClass:"disabledInput",attrs:{items:this.profile.NationalityList,"error-messages":t.validationErrorsMap.InstituteCountry,label:"Country","item-value":"Key","item-text":"Value",attach:"",box:"",required:""},on:{change:t.fetchCity},model:{value:t.application.InstituteCountry,callback:function(e){t.$set(t.application,"InstituteCountry",e)},expression:"application.InstituteCountry"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstituteAddress,label:"Institution's street name and street number",counter:"250",hint:"250 characters max.","persistent-hint":"",autocomplete:"none",box:"",required:""},model:{value:t.application.InstituteAddress,callback:function(e){t.$set(t.application,"InstituteAddress",e)},expression:"application.InstituteAddress"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:"",md3:"","pr-2":""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstitutePostalCode,label:"Postal code",autocomplete:"none",box:"",required:""},on:{change:t.fetchCity},model:{value:t.application.InstitutePostalCode,callback:function(e){t.$set(t.application,"InstitutePostalCode",e)},expression:"application.InstitutePostalCode"}})],1),e("v-flex",{attrs:{xs6:"","pl-2":""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstituteCity,label:"City",autocomplete:"none",box:"",required:""},model:{value:t.application.InstituteCity,callback:function(e){t.$set(t.application,"InstituteCity",e)},expression:"application.InstituteCity"}})],1)],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:"",md3:"","pr-2":""}},[e("v-text-field",{attrs:{value:t.application.InstitutionPhonePrefix,mask:"+###",label:"Phone prefix",box:""},on:{change:function(e){t.application.InstitutionPhonePrefix=e}}})],1),e("v-flex",{attrs:{xs6:"","pl-2":""}},[e("v-text-field",{attrs:{"error-messages":t.validationErrorsMap.InstitutionPhoneNumber,label:"Phone",autocomplete:"none",type:"number",box:"",required:""},model:{value:t.application.InstitutionPhoneNumber,callback:function(e){t.$set(t.application,"InstitutionPhoneNumber",e)},expression:"application.InstitutionPhoneNumber"}})],1)],1),t.coApplicantsAllowed()?e("applicant-list",{attrs:{items:t.applicants,add:t.addItem,remove:t.removeItem,update:t.updateItem,allowCoApplicant:t.application.CoApplicantAllowCoApplicant,allowMentor:t.application.CoApplicantAllowMentor,allowInstituteAdmin:t.application.CoApplicantAllowInstituteAdmin,allowHost:t.application.CoApplicantAllowHost,allowCollaborator:t.application.CoApplicantAllowCollaborator}}):t._e()],1)],1)],1)},Fd=[],$d={data:function(){return{menu:null,menu2:null,idleTimer:null,shouldFetchCity:!1,institutionName:null,projectStartField:null,projectEndField:null}},components:{AppRTE:Ct},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap","institutionListArray"])),(0,Xt.vn)(["user.profile","application.application","application.applicants","application.validationErrors"])),{},{countryList:function(){if(this.profile){var t=B(this.profile.NationalityList);return t.sort((function(t,e){return t.text>e.text}))}return[]},researchAreaItems:function(){return B(this.application.ResearchCategoryList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},mainFieldItems:function(){return B(this.application.MainAreaList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},subjectAreaItems:function(){return B(this.application.SubjectAreaList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},ProjectStartDate:{get:function(){var t=this.application.ProjectStartDate;return t?A()(t).format("YYYY-MM-DD"):""},set:function(t){this.application.ProjectStartDate=new Date(t).toISOString()}},ProjectEndDate:{get:function(){var t=this.application.ProjectEndDate;return t?A()(t).format("YYYY-MM-DD"):""},set:function(t){this.application.ProjectEndDate=new Date(t).toISOString()}}}),watch:{application:{handler:function(t,e){this.idleUpdate()},deep:!0},projectStartField:function(t){this.application.ProjectStartDate=t?A()(t).format("YYYY-MM-DD"):""},projectEndField:function(t){this.application.ProjectEndDate=t?A()(t).format("YYYY-MM-DD"):""}},methods:{strippedStringLength:function(t){return Y(t,!0)},addItem:function(t){return this.$store.dispatch(Ln,t.item)},removeItem:function(t){return this.$store.dispatch(kn,t)},updateItem:function(t){return this.$store.dispatch(On,t.item)},updateField:function(t){var e=(0,Ks.Z)({},t,this.application[t]);this.$store.dispatch(ln,e)},idleUpdate:function(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(this.updateOnIdle,1e3)},fetchCity:function(){this.shouldFetchCity=!0},updateOnIdle:function(){var t=this;0!==this.application.InstitutionId&&this.$store.dispatch(ln,this.application).then((function(){if(t.$store.dispatch(Ia,{status:!0,text:"Updated application"}),t.validationErrors.length>0&&t.$store.dispatch(dn,t.application.Id),t.shouldFetchCity){var e={postalCode:t.application.InstitutePostalCode,countryId:t.application.InstituteCountry};t.$store.dispatch($n,e).then((function(e){var n=e.data;n.Value&&(t.application.InstituteCity=n.Value)}))}}))},disableSpaceBar:function(t){window.addEventListener("keypress",(function(t){if(32!==t.keyCode||"institution"!==t.target.id)return!0;t.preventDefault()}))},addInstitution:function(){var t=this;this.$store.dispatch(hn,this.institutionName).then((function(e){var n=e.data;t.application.InstitutionId=n.Value.Id}))},coApplicantsAllowed:function(){return!0===this.application.CoApplicantAllowCoApplicant||!0===this.application.CoApplicantAllowMentor||!0===this.application.CoApplicantAllowInstituteAdmin||!0===this.application.CoApplicantAllowHost||!0===this.application.CoApplicantAllowCollaborator}}},Zd=$d,Gd=(0,f.Z)(Zd,Od,Fd,!1,null,null,null),Bd=Gd.exports,Ud=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v(t._s(t.title))])]),t._l(t.fields,(function(n){return e("v-layout",{key:n.Id,attrs:{row:"",wrap:""}},[e(t.getComponent(n.Type),{tag:"component",class:n.HelpText?"":"fieldWidth",attrs:{field:n,errors:t.validationErrorsMap[n.Id]},on:{update:t.update}}),n.HelpText?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!0)},[e("span",{staticClass:"helptext"},[t._v(t._s(n.HelpText))])]):t._e()],1)}))],2)],1)],1)},Wd=[],Vd={props:{pageId:[String,Number],title:String,fields:Array},data:function(){return{}},methods:{getComponent:function(t){return U(t)},update:function(t){t.pageId=this.pageId,this.$store.dispatch(un,t)}},created:function(){},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap"])),(0,Xt.vn)(["application.application","application.files","application.validationErrors"]))},zd=Vd,jd=(0,f.Z)(zd,Ud,Wd,!1,null,"211c51f8",null),Yd=jd.exports,qd=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pa-0 ma-4"},[e("v-card",[e("v-card-text",[t.showImagesCondition?[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h1",{staticClass:"fz-large strong mb-3",attrs:{"align-center":""}},[t._v("Images")])]),t.error?e("p",{staticClass:"error--text"},[t._v(" "+t._s(t.error)+" ")]):t._e(),t.useApplicationAttachment?e("file-list",{staticClass:"mt-3",attrs:{files:t.filesImages,maxNumber:t.maxNumberPictures,addLabel:"Upload Image",accept:"jpg",disabled:t.disabled},on:{add:t.fileAddApplicationImage,update:t.fileUpdateApplicationImage,remove:t.fileApplicationRemove,download:t.fileApplicationDownload}}):t._e(),t.useApplicationAttachment?t._e():e("file-list",{staticClass:"mt-3",attrs:{files:t.filesImagesGrant,maxNumber:t.maxNumberPictures,addLabel:"Upload Image",accept:"jpg",disabled:t.disabled},on:{add:t.fileAddStatusReportImage,update:t.fileUpdateStatusReportImage,remove:t.fileStatusReportRemove,download:t.fileStatusReportDownload}})]:t._e(),t.showDocumentsCondition?[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h1",{staticClass:"fz-large strong mb-3",attrs:{"align-center":""}},[t._v("Documents")])]),t.useApplicationAttachment?e("file-list",{staticClass:"mt-3",attrs:{files:t.filesDocuments,maxNumber:t.maxNumberDocuments,addLabel:"Add Document",accept:"documents",disabled:t.disabled},on:{add:t.fileAddApplicationDocument,update:t.fileUpdateApplicationDocument,remove:t.fileApplicationRemove,download:t.fileApplicationDownload}}):t._e(),t.useApplicationAttachment?t._e():e("file-list",{staticClass:"mt-3",attrs:{files:t.filesDocumentsGrant,maxNumber:t.maxNumberDocuments,addLabel:"Add Document",accept:"documents",disabled:t.disabled},on:{add:t.fileAddStatusReportDocument,update:t.fileUpdateStatusReportDocument,remove:t.fileStatusReportRemove,download:t.fileStatusReportDownload}})]:t._e()],2)],1)],1)},Hd=[],Kd={data:function(){return{error:null}},props:{showImagesCondition:Boolean,showDocumentsCondition:Boolean,maxNumberPictures:Number,maxNumberDocuments:Number,useApplicationAttachment:Boolean,reportId:String,disabled:{type:Boolean,default:!1}},computed:(0,Dt.Z)({},(0,Xt.vn)(["application.application","application.filesImages","application.filesDocuments","application.validationErrors","application.filesImagesGrant","application.filesDocumentsGrant"])),methods:{fileAddStatusReportImage:function(t){this.$store.dispatch(zn,{reportId:this.reportId,payload:t.fileContent}).catch(this.displayError)},fileAddStatusReportDocument:function(t){this.$store.dispatch(Qn,{reportId:this.reportId,payload:t.fileContent}).catch(this.displayError)},fileUpdateStatusReportImage:function(t){var e=this;console.log((0,Dt.Z)((0,Dt.Z)({},t),{},{reportId:this.reportId})),this.$store.dispatch(qn,(0,Dt.Z)((0,Dt.Z)({},t),{},{reportId:this.reportId})).then((function(){e.$store.dispatch(jn,{reportId:e.reportId})}))},fileUpdateStatusReportDocument:function(t){var e=this;this.$store.dispatch(qn,(0,Dt.Z)((0,Dt.Z)({},t),{},{reportId:this.reportId})).then((function(){e.$store.dispatch(Yn,{reportId:e.reportId})}))},fileStatusReportRemove:function(t){this.$store.dispatch(Hn,{reportId:this.reportId,fileId:t})},fileStatusReportDownload:function(t){this.$store.dispatch(Kn,{reportId:this.reportId,fileId:t})},fileAddApplicationImage:function(t){this.$store.dispatch(_n,t.fileContent).catch(this.displayError)},fileAddApplicationDocument:function(t){this.$store.dispatch(In,t.fileContent).catch(this.displayError)},fileUpdateApplicationImage:function(t){var e=this;this.$store.dispatch(yn,t).then((function(){e.$store.dispatch(bn,{reportId:e.reportId})}))},fileUpdateApplicationDocument:function(t){var e=this;this.$store.dispatch(yn,t).then((function(){e.$store.dispatch(xn)}))},fileApplicationRemove:function(t){this.$store.dispatch(Cn,t)},fileApplicationDownload:function(t){this.$store.dispatch(wn,t)},displayError:function(t){t.response.data&&t.response.data.Messages&&t.response.data.Messages.length>0&&(this.error=t.response.data.Messages[0].Message)}}},Qd=Kd,Jd=(0,f.Z)(Qd,qd,Hd,!1,null,null,null),Xd=Jd.exports,tp=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Budget")])]),t.validationErrorsMap.Budget?e("v-layout",{attrs:{row:"",wrap:""}},[e("p",{staticClass:"error--text"},[t._v(t._s(t.validationErrorsMap.Budget))])]):t._e(),e("budget-list")],1)],1)],1)},ep=[],np={name:"Budget",data:function(){return{}},computed:(0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap"]))},ip=np,ap=(0,f.Z)(ip,tp,ep,!1,null,null,null),sp=ap.exports,rp={name:"ApplicationWizard",components:{notification:Kl,formContact:kd,formProject:Bd,formProperties:Yd,formBudget:sp,formAttachments:Xd,preview:td},props:{id:[Number,String],canEdit:{type:Boolean,default:function(){var t=localStorage.getItem("canEdit_"+this.id
1);return null===t||JSON.parse(t)}}},data:function(){return{dialog:!1,buttonStyle:null,firstSubmit:!1,openedPanel:0,panels:[],submitSuccess:!1,initPanel:!1,reviewing:!1,canEditBudget:!1,pdfData:null}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","application.validationErrors","application.rounds","application.budgetItems","application.filesDocuments","application.filesImages"])),(0,Lt.Se)(["stepsWithErrors","validationErrorsMap"])),{},{isLoaded:function(){return!0},submitIsPossible:function(){return 0===this.validationErrors.length},btnClass:function(){return this.step<4?"button":"button btnWithSubmit"},enableEnclosures:function(){return this.application&&(this.application.MaxNumberDocuments>0||this.application.MaxNumberPictures>0||this.filesDocuments.length>0||this.filesImages.length>0)},hasContactErrors:function(){var t,e=(0,ut.Z)(this.validationErrors);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(Pd[n.AppliesTo])return!0}}catch(n){e.e(n)}finally{e.f()}return!1},hasProjectErrors:function(){var t,e=(0,ut.Z)(this.validationErrors);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(Ed[n.AppliesTo])return!0}}catch(n){e.e(n)}finally{e.f()}return!1},hasBudgetErrors:function(){var t,e=(0,ut.Z)(this.validationErrors);try{for(e.s();!(t=e.n()).done;){var n=t.value;if("Budget"===n.AppliesTo)return!0}}catch(n){e.e(n)}finally{e.f()}return!1},pageErrors:function(){if(this.validationErrors.length>0){var t=this.validationErrors.map((function(t){return t.AppliesTo})),e=this.application.DynamicFieldPageList.reduce((function(e,n){var i=n.DynamicFieldsList.map((function(t){return String(t.Id)}));return e[n.Id]=i.filter((function(e){return-1!==t.indexOf(e)})).length>0,e}),{});return e}return{}}}),created:function(){var t=this;localStorage.setItem("canEdit_"+this.id,JSON.stringify(this.canEdit)),this.$store.dispatch(sn,this.id).then((function(){t.$store.dispatch(xn),t.$store.dispatch(bn),t.$store.dispatch(Nn).then((function(e){t.canEditBudget=!0})).catch((function(e){t.canEditBudget=!1})),t.$store.dispatch(Fn),t.initPanel=!0})),this.$store.dispatch(en)},watch:{canEdit:function(t){localStorage.setItem("canEdit_"+this.id,JSON.stringify(t))}},methods:{openApplicationPDF:function(t){this.$store.dispatch(rn,t)},askSubmit:function(){var t=this;this.$store.dispatch(dn,this.id).then((function(e){t.submitIsPossible&&(t.dialog=!0)}))},togglePreview:function(){this.reviewing=!this.reviewing,this.scrollToTop()},submit:function(){var t=this;this.dialog=!1,this.$store.dispatch(pn,this.id).then((function(e){t.$store.dispatch(Ia,{status:!0,text:"Application submitted."}),t.$router.push({name:"ApplicationList"})}))},rejectSubmit:function(){this.dialog=!1},openMessages:function(){this.$router.push({name:"ApplicationMessages",params:{id:this.id}})},onTab:function(t){var e=t.target.closest(".v-window-item");if(this.panels=[].slice.call(document.querySelectorAll(".v-window-item")),e){var n=this.panels.indexOf(e),i=e.querySelectorAll("input, textarea, select, button"),a=t.target.nodeName;if(i.length>0){var s=i[0],r=i[i.length-1];t.shiftKey&&t.target===s?this.onTabFirst(t,n):t.target===r?this.onTabLast(t,n):"INPUT"!==a&&"TEXTAREA"!==a&&(t.shiftKey?this.onTabFirst(t,n):this.onTabLast(t,n))}}else if(t.target.classList.contains("apply-panel")){var o=this.panels.indexOf(t.target.querySelector(".v-expansion-panel__body"));t.shiftKey?this.onTabFirst(t,o):this.onTabLast(t,o)}else if(t.shiftKey&&t.target.classList.contains("btnSubmit")){var l=this.panels.length;this.onTabFirst(t,l)}},onTabFirst:function(t,e){var n=this;t.shiftKey&&e>0&&this.openPanel(e-1).then((function(){var t=n.panels[e-1].querySelectorAll("input, textarea, select, button");t.length>0?(t[t.length-1].focus(),n.scrollIntoView(t[t.length-1])):n.panels[e-1].scrollIntoView()}))},onTabLast:function(t,e){var n=this;!t.shiftKey&&e<this.panels.length-1&&this.openPanel(e+1).then((function(){var t=n.panels[e+1].querySelectorAll("input, textarea, select, button");t.length>0?(t[0].focus(),n.scrollIntoView(t[0])):n.panels[e+1].scrollIntoView()}))},openPanel:function(t){var e=this;return new Promise((function(n,i){e.openedPanel!==t&&(e.openedPanel=null,setTimeout((function(){e.openedPanel=t,setTimeout((function(){n()}),250)}),1))}))},panelChanged:function(){var t=this;this.$refs.tabs.activeTab===this.$refs.tabPreview&&this.$store.dispatch(on,this.id).then((function(e){t.pdfData=e.Value}))},scrollToTop:function(){this.$refs.scroller.scrollTop=0},scrollIntoView:function(t){var e=t.getBoundingClientRect().top,n=-100,i=this.$refs.scroller.scrollTop,a=this.$refs.scroller.getBoundingClientRect().top;this.$refs.scroller.scrollTop=i+e-a+n}}},op=rp,lp=(0,f.Z)(op,wd,Td,!1,null,null,null),cp=lp.exports,up=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard"},[e("div",{staticClass:"wizard-fullscreen"},[t.round?[e("v-tabs",{staticClass:"mt-5 no-margin-on-print application-review",attrs:{color:"transparent"}},[e("v-tab",{attrs:{ripple:""}},[t._v("Review")]),t.applicationsScores&&t.applicationsScores.length>0?e("v-tab",{attrs:{ripple:""},on:{click:t.setScoreStatistic}},[t._v("Your scores")]):t._e(),t.applicationScoreStatistics&&t.applicationScoreStatistics.length>0?e("v-tab",{attrs:{ripple:""},on:{click:t.setScoreStatistic}},[t._v("Score overview")]):t._e(),t.applicationsScores&&t.applicationsScores.length>0?e("v-tab",{attrs:{ripple:""}},[t._v("All scores & comments")]):t._e(),e("v-tab-item",[e("application-review-list",{attrs:{step:2,applications:t.applicationsReview,"review-id":t.id,isRoundLoading:t.isRoundLoading},on:{scoreupdated:t.loadScoreStatistic}})],1),t.applicationsScores&&t.applicationsScores.length>0?e("v-tab-item",[e("application-review-list",{attrs:{step:3,applications:t.applicationsScores,"review-id":t.id,isRoundLoading:t.isRoundLoading}})],1):t._e(),t.applicationScoreStatistics&&t.applicationScoreStatistics.length>0?e("v-tab-item",[e("application-review-score-statistic",{attrs:{dataSource:t.applicationScoreStatisticsDataSource,roundName:t.round.RoundName}})],1):t._e(),t.applicationsScores&&t.applicationsScores.length>0?e("v-tab-item",[e("application-review-list",{attrs:{step:4,applications:t.applicationsScores,"review-id":t.id,isRoundLoading:t.isRoundLoading}})],1):t._e()],1)]:t.roundsListLoaded&&0==t.roundsList.length?[e("v-card",{staticClass:"item-list text-xs-center"},[e("h1",{staticClass:"pb-4"},[t._v("No review round available.")]),e("p",[t._v("There is currently no rounds available to review.")]),e("p",[t._v(" If you believe this is in error, please contact the administrator to make sure a round is correctly initiated. ")])])]:t.roundsListLoaded?[e("v-card",{staticClass:"item-list text-xs-center"},[e("h1",{staticClass:"pb-4"},[t._v("Please select a review round.")]),e("p",[t._v("Please "),e("a",{attrs:{href:"#"},on:{click:t.openRoundSelector}},[t._v("select a round")]),t._v(" to review application.")])])]:t._e()],2)]),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.dataAgreementModal,callback:function(e){t.dataAgreementModal=e},expression:"dataAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[t.round?e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v(t._s(t.round.RoundName))]):t._e(),e("iframe",{ref:"dataAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeDataAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeDataAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"frameDialog"},model:{value:t.ndaAgreementModal,callback:function(e){t.ndaAgreementModal=e},expression:"ndaAgreementModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[t.round?e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v(t._s(t.round.RoundName))]):t._e(),e("iframe",{ref:"ndaAgreementFrame"})]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeNdaAgreementModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeNdaAgreementModal(!0)}}},[t._v(" Accept ")])],1)],1)],1)],1)},dp=[],pp=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0 print-section"},[e("error-dialog",{attrs:{errors:t.errors}}),e("notification"),e("v-card",{staticClass:"px-4 py-4 no-box-sha
1dow-on-print"},[e("h1",{staticClass:"show-only-on-print pb-4"},[2==t.step?e("span",[t._v("Review")]):t._e(),3==t.step?e("span",[t._v("Your Scores")]):t._e(),4==t.step?e("span",[t._v("All Scores & Comments")]):t._e()]),e("v-toolbar",{staticClass:"review-toolbar"},[3==this.step||4==this.step?e("button",{staticClass:"remove-print",on:{click:function(e){return t.openAll()}}},[e("v-icon",[t._v("keyboard_arrow_down")])],1):t._e(),3==this.step||4==this.step?e("button",{staticClass:"remove-print",on:{click:function(e){return t.closeAll()}}},[e("v-icon",[t._v("keyboard_arrow_up")])],1):t._e(),e("v-toolbar-items",[e("v-layout",{ref:"toolbar",attrs:{"align-center":"",row:"",wrap:""}},[e("v-flex",{attrs:{xs2:"","text-xs-left":""}},[e("v-btn",{staticClass:"text-dark",class:{"v-btn--active":t.orderedByContains("ApplicantName"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("ApplicantName"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("ApplicantName")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Applicant name")]),"ApplicantName"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1),e("v-flex",{attrs:{xs2:""}},[e("v-btn",{staticClass:"text-dark",class:{"v-btn--active":t.orderedByContains("ProjectTitle"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("ProjectTitle"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("ProjectTitle")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Title")]),"ProjectTitle"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1),e("v-flex",{attrs:{xs2:""}},[e("v-btn",{staticClass:"pl-2 text-dark",class:{"v-btn--active":t.orderedByContains("AppliedAmount"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("AppliedAmount"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("AppliedAmount")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Applied for")]),"AppliedAmount"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1),e("v-flex",{attrs:{xs2:""}},[e("v-btn",{staticClass:"pl-2 text-dark",class:{"v-btn--active":t.orderedByContains("InstitutionName"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("InstitutionName"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("InstitutionName")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Institution")]),"InstitutionName"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1),e("v-flex",{attrs:{xs1:""}},[e("v-btn",{staticClass:"pl-2 text-dark",class:{"v-btn--active":t.orderedByContains("RefNo"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("RefNo"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("RefNo")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Ref. Number")]),"RefNo"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1),3==t.step||4==t.step?e("v-flex",{attrs:{xs3:""}},[e("v-layout",[e("v-flex",{attrs:{xs6:"","text-xs-center":""}},[e("v-btn",{staticClass:"text-dark",class:{"v-btn--active":t.orderedByContains("AverageScoreOwn"),"wrap-btn":!0},staticStyle:{height:"64px","white-space":"pre-wrap"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("AverageScoreOwn"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("AverageScoreOwn")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Score")]),e("div",{staticClass:"remove-print"},["AverageScoreOwn"===t.orderBy?[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])]:t._e()],2)])])],1),e("v-flex",{attrs:{xs6:"","text-xs-center":""}},[e("v-btn",{staticClass:"pl-2 text-dark",class:{"v-btn--active":t.orderedByContains("AverageScoreAllReviewers"),"wrap-btn":!0},staticStyle:{height:"64px"},attrs:{flat:""},on:{click:[function(e){return e.altKey?t.orderByMultiple("AverageScoreAllReviewers"):null},function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.setOrder("AverageScoreAllReviewers")}]}},[e("div",{staticClass:"d-flex"},[e("span",[t._v("Average scores")]),"AverageScoreAllReviewers"===t.orderBy?[e("div",{staticClass:"remove-print"},[t.orderAsc?e("v-icon",[t._v("arrow_drop_down")]):e("v-icon",[t._v("arrow_drop_up")])],1)]:t._e()],2)])],1)],1)],1):t._e()],1)],1)],1),t.isRoundLoading?e("v-layout",{attrs:{column:"","align-center":"","my-4":""}},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),!t.isRoundLoading&&!t.applicationsList||!t.isRoundLoading&&!t.applicationsList.length?[e("div",{staticClass:"container text-sm-center"},[e("p",[t._v("No applications to review at this moment.")])])]:t._e(),t.isRoundLoading?t._e():e("v-expansion-panel",{attrs:{popout:"",value:t.openedNominee,expand:3==t.step||4==t.step},model:{value:t.reviewPanel,callback:function(e){t.reviewPanel=e},expression:"reviewPanel"}},t._l(t.orderApplications(),(function(n,i){return e("v-expansion-panel-content",{key:i,staticClass:"review-panel",scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[e("v-layout",{staticClass:"toolbar-start-padding-on-print",staticStyle:{padding:"20px 20px 20px 40px"},attrs:{row:""}},[e("v-flex",{attrs:{xs2:""}}
1,[t._v(" "+t._s(n.ApplicantName)+" ")]),e("v-flex",{staticClass:"pl-2",attrs:{xs2:""}},[t._v(t._s(n.ProjectTitle))]),e("v-flex",{staticClass:"pl-2",attrs:{xs2:""}},[t._v(t._s(t._f("currency")(n.AppliedAmount,0)))]),e("v-flex",{staticClass:"pl-2",attrs:{xs2:""}},[t._v(t._s(n.InstitutionName))]),e("v-flex",{staticClass:"pl-3",attrs:{xs1:""}},[t._v(t._s(n.RefNo))]),e("v-flex",{staticClass:"pl-3",attrs:{xs3:"","text-xs-center":""}},[e("v-layout",[e("v-flex",{attrs:{xs6:""}},[1==t.step?e("v-btn",{staticClass:"remove-print",attrs:{color:"success"}},[t._v("Set Preference")]):t._e(),2==t.step&&n.MarkedCompleted?e("v-btn",{staticClass:"remove-print",on:{click:function(e){return e.stopPropagation(),t.reviewApp(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("remove_red_eye")]),t._v("Â Finished")],1):t._e(),2!=t.step||n.MarkedCompleted?t._e():e("v-btn",{staticClass:"remove-print",attrs:{color:"success"},on:{click:function(e){return e.stopPropagation(),t.reviewApp(n)}}},[e("v-icon",{attrs:{color:"white"}},[t._v("edit")]),t._v("Â Review")],1),3==t.step||4==t.step?e("span",[t._v(t._s(t.convertToNumber(n.AverageScoreOwn)))]):t._e()],1),3==t.step||4==t.step?e("v-flex",{staticClass:"pl-3",attrs:{xs6:""}},[t._v(" "+t._s(t.convertToNumber(n.AverageScoreAllReviewers))+" ")]):t._e()],1)],1)],1)],1)]},proxy:!0}],null,!0)},[e("v-card",[1==t.step?e("v-card-text",[e("v-layout",[e("v-flex",{attrs:{xs8:"","px-4":""}},[e("v-btn",{staticStyle:{width:"200px"},attrs:{color:"grey lighten-3"},on:{click:function(e){return t.showPdf(n.Id)}}},[t.showPdfDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",[e("v-layout",{attrs:{flex:"","align-center":""}},[e("v-icon",{attrs:{color:"primary"}},[t._v("remove_red_eye")]),e("a",[t._v("Â View Application")])],1)],1)],1)],1),e("v-flex",{staticClass:"removePadding removePaddingMobile",attrs:{xs4:"","text-xs-right":"","px-4":""}},[1==t.step?e("v-select",{staticClass:"ml-2",attrs:{items:t.roles,label:"Preferred Role","item-value":"id","item-text":"text",attach:"",box:""},on:{change:function(e){return t.updatePreference(e,n)}},model:{value:n.OwnPreferredRole,callback:function(e){t.$set(n,"OwnPreferredRole",e)},expression:"item.OwnPreferredRole"}}):t._e()],1)],1),1==t.step?e("v-layout",[e("v-flex",{attrs:{xs8:"","px-4":""}},[n.ApplicationFileList&&n.ApplicationFileList.length>0?e("div",[e("p",[t._v("Attachments ("+t._s(n.ApplicationFileList.length)+"):")]),n.ApplicationFileList&&n.ApplicationFileList.length?t._l(n.ApplicationFileList,(function(i){return e("p",{key:i.Id,staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.Id,i.Id)}}},[e("v-icon",{key:i.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(i.FileName)+" ")],1)})):e("p",[t._v(" - ")])],2):t._e()])],1):t._e()],1):t._e(),2==t.step?e
1("v-card-text",[e("v-layout",[e("v-flex",{attrs:{xs7:"","px-4":""}},[e("p",[e("strong",[t._v("Amount applied for DKK:")]),t._v(" "+t._s(t._f("currency")(n.AppliedAmount,0))+" ")]),e("p",{staticClass:"mb-0"},[e("strong",[t._v("Institution:")]),t._v(" "+t._s(n.InstitutionName)),n.InstitutionDepartment?e("span",[t._v(",")]):t._e(),t._v(" "+t._s(n.InstitutionDepartment)+" ")])])],1)],1):t._e(),3==t.step?e("v-card-text",[e("v-layout",[e("application-review-result",{staticClass:"w-100 mb-3",attrs:{"only-show-own":"","score-prop":n}})],1),e("v-layout",{staticClass:"remove-print",attrs:{"align-center":"","justify-center":""}},[e("v-btn",{staticStyle:{width:"200px"},on:{click:function(e){return t.showPdf(n.OwnReviewId)}}},[t.showPdfDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",{staticClass:"d-flex align-center"},[e("v-icon",{attrs:{color:"primary"}},[t._v("remove_red_eye")]),e("span",[t._v("Â View Application")])],1)],1),e("v-btn",{staticStyle:{width:"240px"},on:{click:function(e){return t.savePdf(n.OwnReviewId)}}},[t.pdfSaveDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",{staticClass:"d-flex align-center"},[e("v-icon",{attrs:{color:"primary"}},[t._v("download")]),e("span",[t._v("Â Download Application")])],1)],1),e("v-btn",{on:{click:function(e){return t.viewResult(n)}}},[e("v-icon",{attrs:{color:"primary"}},[t._v("list")]),t._v("Â Result of Review ")],1)],1),e("v-layout",[e("v-flex",{attrs:{xs8:"","px-4":""}},[n.ApplicationFileList&&n.ApplicationFileList.length>0?e("div",[e("p",[t._v("Attachments ("+t._s(n.ApplicationFileList.length)+"):")]),n.ApplicationFileList&&n.ApplicationFileList.length?t._l(n.ApplicationFileList,(function(i){return e("p",{key:i.Id,staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.OwnReviewId,i.Id)}}},[e("v-icon",{key:i.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(i.FileName)+" ")],1)})):e("p",[t._v(" - ")])],2):t._e()])],1)],1):t._e(),4==t.step?e("v-card-text",[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:n.CompleteScoringList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(t.getRole(n.item)))]),e("td",[e("span",{staticClass:"no-wrap"},[t._v(t._s(n.item.ReviewerName))])]),e("td",[t._v(t._s(n.item.Name))]),e("td",[e("span",{staticClass:"no-wrap"},[t._v(t._s(n.item.ScoreStr))])]),e("td",[t._v(t._s(n.item.Comment))])]}}],null,!0)})],1):t._e()],1)],1)})),1),t.reviewProp&&2===t.step?e("v-dialog",{attrs:{"content-class":"dialog-editor","max-width":"1140px"},on:{input:function(e){return e||t.closeModal()}},model:{value:t.reviewModal,callback:function(e){t.reviewModal=e},expression:"reviewModal"}},[e("application-review-modal",{attrs:{applications:t.applicationsList,"review-prop":t.reviewProp,nextReview:t.nextReview,prevReview:t.prevReview,isLoading:t.isLoading},on:{close:t.closeModal,next:t.goNext,prev:t.goPrev,scoreupdated:function(e){return t.$emit("scoreupdated")}}})],1):t._e(),t.scoreProp&&3===t.step?e("v-dialog",{attrs:{"content-class":"no-shadow","max-width":"1140px"},model:{value:t.scoreModal,callback:function(e){t.scoreModal=e},expression:"scoreModal"}},[e("application-result-modal",{attrs:{"score-prop":t.scoreProp},on:{close:t.closeScoreModal}})],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.finishModal,callback:function(e){t.finishModal=e},expression:"finishModal"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to mark all reviews as finished?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeFinishModal(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeFinishModal(!0)}}}
1,[t._v("Yes")])],1)],1)],1)],2),2==t.step?e("v-layout",{staticClass:"remove-print",attrs:{"align-end":"","justify-end":"",row:"",wrap:"","pt-4":"","pr-4":""}},[e("v-btn",{on:{click:function(e){return e.preventDefault(),t.openFinishModal()}}},[t._v(" Mark all finished ")])],1):t._e(),3==t.step||4==t.step?e("v-layout",{staticClass:"remove-print",attrs:{"align-center":"","justify-center":"",row:"",wrap:"","pt-4":"","pr-4":""}},[e("v-btn",{staticClass:"remove-print",staticStyle:{"max-width":"120px"},on:{click:t.printReviewedList}},[e("v-icon",{staticClass:"pr-2"},[t._v("print")]),t._v(" Print ")],1)],1):t._e(),e("appPDFViewerModal",{attrs:{pdfData:t.pdfData},model:{value:t.showApplicationPdf,callback:function(e){t.showApplicationPdf=e},expression:"showApplicationPdf"}})],1)},mp=[],fp=(n(43290),function(){var t=this,e=t._self._c;return t.review&&t.reviewProp?e("v-card",{staticClass:"item-list-modal"},[e("notification"),e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.close.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1),e("v-toolbar",{staticClass:"review-item",attrs:{height:t.buttonHeight}},[e("v-toolbar-items",[e("v-btn",{staticClass:"ma-0",style:{height:t.buttonHeight},attrs:{flat:"",disabled:!t.prevReview},on:{click:function(e){return e.preventDefault(),t.goPrevious.apply(null,arguments)}}},[t.prevReview?[e("v-icon",[t._v("arrow_left")]),t._v(" "+t._s(t.prevReview.RefNo)+" ")]:t._e()],2),e("div",{ref:"middleButton",staticClass:"py-2",staticStyle:{display:"flex","flex-direction":"column","align-items":"center"},attrs:{flat:""}},[e("div",{staticClass:"word-wrap",staticStyle:{"white-space":"normal"}},[t._v(t._s(t.reviewProp.ProjectTitle))]),e("div",[t._v("("+t._s(t.reviewProp.RefNo)+")")])]),e("v-btn",{staticClass:"ma-0",style:{height:t.buttonHeight},attrs:{flat:"",disabled:!t.nextReview},on:{click:function(e){return e.preventDefault(),t.goNext.apply(null,arguments)}}},[t.nextReview?[t._v(" "+t._s(t.nextReview.RefNo)+" "),e("v-icon",[t._v("arrow_right")])]:t._e()],2)],1)],1),e("hr",{staticClass:"space space-sm"}),t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),t.review&&!t.isLoading?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"pr-2",attrs:{xs6:""}},[e("div",{staticClass:"mr-5"},[e("h2",{staticClass:"text-xs-center"},[t._v("Application Information")]),e("v-checkbox",{attrs:{color:"primary"},on:{change:t.onCheckboxChange},scopedSlots:t._u([{key:"label",fn:function(){return[t._v(" Conflict of interests  "),e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!1,2915330974)},[e("span",[t._v("Tick if you have a conflict of interest with the application")])])]},proxy:!0}],null,!1,1265088860),model:{value:t.isConflict,callback:function(e){t.isConflict=e},expression:"isConflict"}}),t.reviewProp.ApplicantName?e("p",{staticClass:"mb-0"},[t._v(" Applicant name: "),e("strong",[t._v(t._s(t.reviewProp.ApplicantName))])]):t._e(),t.review.InsitutionName?e("p",{staticClass:"mb-0"},[t._v(" Institution: "),e("strong",[t._v(t._s(t.review.InsitutionName))])]):t._e(),e("p",{staticClass:"mt-2"},[e("a",{attrs:{href:t.getScholarLink(),target:"_blank"}},[t._v("Google Scholar")]),t._v(" ⢠"),e("a",{attrs:{href:t.getPubMedLink(),target:"_blank"}},[t._v("PubMed")])]),e("hr",{staticClass:"space space-sm"}),e("h2",[t._v(t._s(t.reviewProp.ProjectTitle))]),e("p",{staticClass:"py-2"},[t._v(" Amount applied for DKK: "),e("strong",[t._v(t._s(t.getBudgetTotal()))])]),e("v-btn",{staticStyle:{width:"200px"},attrs:{color:"grey lighten-3"},on:{click:t.showPdf}},[t.pdfShowDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",[e("v-layout",{attrs:{flex:"","align-center":""}},[e("v-icon",{attrs:{color:"primary"}},[t._v("remove_red_eye")]),e("a",[t._v(" View Application")])],1)],1)],1),e("v-btn",{staticStyle:{width:"240px"},attrs:{color:"grey lighten-3"},on:{click:t.savePdf}},[t.pdfSaveDataLoading?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("div",[e("v-layout",{attrs:{flex:"","align-center":""}},[e("v-icon",{attrs:{color:"primary"}},[t._v("download")]),e("a",[t._v(" Download Application")])],1)],1)],1),t.review?e("v-expansion-panel",{attrs:{popout:"",expand:""},model:{value:t.applicationPanels,callback:function(e){t.applicationPanels=e},expression:"applicationPanels"}},[e("v-expansion-panel-content",{staticClass:"review-panel",attrs:{tabindex:100},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[e("span",[t._v("Attachments "),e("span",[t._v("("+t._s(t.review.AttachmentList.length)+")")])])])]},proxy:!0}],null,!1,3494590753)},[e("v-card",[e("v-card-text",[t.review.AttachmentList&&t.review.AttachmentList.length?t._l(t.review.AttachmentList,(function(n){return e("p",{key:n.Id,staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.Id)}}},[e("v-icon",{key:n.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(n.FileName)+" ")],1)})):e("p",[t._v(" - ")])],2)],1)],1)],1):t._e()],1)]),e("v-flex",{attrs:{xs6:""}},[e("h2",{staticClass:"text-xs-center"},[t._v("Review")]),e("v-expansion-panel",{staticClass:"elevation-1",attrs:{expand:""},model:{value:t.openedPanels,callback:function(e){t.openedPanels=e},expression:"openedPanels"}},t._l(t.review.ScoringList,(function(n,i){return e("v-expansion-panel-content",{key:n.Id,staticClass:"review-panel score-panel",attrs:{tabindex:i},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"slot-header"},[t._v(t._s(n.Name))])]},proxy:!0}],null,!0)},[e("v-card",[e("v-card-text",[e("p",[n.Description?e("span",{staticClass:"pre"},[t._v(t._s(n.Description))]):t._e()]),e("v-textarea",{key:t.autoGrow,ref:"comment".concat(n.Id),refInFor:!0,attrs:{label:"Comment",placeholder:"",loading:t.is
1FormLoading,disabled:t.isFormLoading,"auto-grow":"",rows:"1"},on:{input:function(e){return t.updateComment(n)},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTabComment(e,i))}},model:{value:t.form[n.Id].comment,callback:function(e){t.$set(t.form[n.Id],"comment",e)},expression:"form[item.Id].comment"}}),n.UseScoring?e("v-select",{ref:"score".concat(n.Id),refInFor:!0,attrs:{items:t.getScoreList(n.ScoreList),"item-value":"id","item-text":"text",label:"Score",rules:t.scoreRules,"error-messages":t.errorsMap["Score-".concat(n.Id)],box:""},on:{change:function(e){return t.updateScore(n)}},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTabScore(e,i))}},model:{value:t.form[n.Id].score,callback:function(e){t.$set(t.form[n.Id],"score",e)},expression:"form[item.Id].score"}}):t._e()],1)],1)],1)})),1),t.errors.length?e("div",[e("br"),t._l(t.errors,(function(n){return e("p",{key:n.Message,staticClass:"error--text"},[t._v(" "+t._s(n.Message)+" ")])}))],2):t._e(),e("hr",{staticClass:"space space-sm"}),e("div",{staticClass:"text-xs-center"},[t.reviewProp.MarkedCompleted?e("v-btn",{on:{click:function(e){return e.preventDefault(),t.close.apply(null,arguments)}}},[t._v(" Close ")]):e("v-btn",{attrs:{color:t.valid?"success":"grey lighten-1"},on:{click:function(e){return e.preventDefault(),t.openFinishModal()}}},[t._v(" Finish review ")])],1)],1)],1):t._e(),e("v-dialog",{attrs:{"content-class":"modalWidth"},on:{input:function(e){return e||(t.isConflict=!1)}},model:{value:t.conflictModal,callback:function(e){t.conflictModal=e},expression:"conflictModal"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("p",[t._v("Do you have a conflict of interest with this application?")]),e("p",[t._v("If yes, the review will be deactivated and cannot be submitted.")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeConflictModal(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeConflictModal(!0)}}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.finishDialog,callback:function(e){t.finishDialog=e},expression:"finishDialog"}},[e("application-review-finish-modal",{on:{close:t.closeFinishModal}})],1),e("appPdfViewerModal",{attrs:{pdfData:t.pdfData},model:{value:t.showApplicationPdf,callback:function(e){t.showApplicationPdf=e},expression:"showApplicationPdf"}})],1):t._e()}),vp=[],hp=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to finish the review?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},gp=[],_p={name:"ApplicationReviewFinishModal",methods:{save:function(){},close:function(t){this.$emit("close",t)}}},Ip=_p,Ap=(0,f.Z)(Ip,hp,gp,!1,null,null,null),bp=Ap.exports,xp=n(66154),Cp={props:["reviewProp","nextReview","prevReview","applications","isLoading"],components:{notification:Kl,applicationReviewFinishModal:bp,appPdfViewerModal:ad},data:function(){return{form:{},valid:!1,isConflict:!1,conflictModal:!1,applicationPanels:[!0,!0],openedPanels:null,showError:!1,scoreRules:[function(t){return!!t||"Please select a score"}],finishDialog:!1,buttonHeight:null,buttonWidth:null,errors:[],errorsMap:{},autoGrow:!1,isFormLoading:!1,showApplicationPdf:!1,pdfData:null,pdfShowDataLoading:!1,pdfSaveDataLoading:!1}},computed:(0,Dt.Z)({},(0,Xt.vn)(["reviewApplications.review","reviewApplications.round"])),created:function(){this.createForm()},mounted:function(){var t=this;this.initTab(),this.reviewProp&&this.$store.dispatch(li,this.reviewProp.Id).then((function(){t.forceReRender()}))},beforeDestroy:function(){window.removeEventListener("keyup",this.onTab)},watch:{review:function(t){t&&(this.errors=[],this.createForm(),this.initPanels(),this.isConflict=t.ConflictOfInterest,this.getbuttonHeight())},errors:function(t){t&&t.length>0?this.errorsMap=t.reduce((function(t,e){return t[e.AppliesTo]=e.Message,t}),{}):this.errorsMap={}}
1},methods:{openFinishModal:function(t){this.finishDialog=!0},closeFinishModal:function(t){t&&this.markFinished(),this.finishDialog=!1},closeConflictModal:function(t){t?this.markConflict():(this.isConflict=!1,this.conflictModal=!1)},goNext:function(){this.$emit("next")},goPrevious:function(){this.$emit("prev")},showPdf:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.pdfShowDataLoading=!0,e.next=3,t.$store.dispatch(di,t.review.Id);case 3:n=e.sent,n.Success?(t.pdfData={FileName:n.Value.Filename,PdfData:n.Value.FileContent},t.showApplicationPdf=!0):t.errors=n.Messages,t.pdfShowDataLoading=!1;case 6:case"end":return e.stop()}}),e)})))()},savePdf:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.pdfSaveDataLoading=!0,e.next=3,t.$store.dispatch(di,t.review.Id);case 3:n=e.sent,n.Success?(0,xp.saveAs)(j("data:application/octet-stream;
1base64,".concat(n.Value.FileContent)),n.Value.Filename):t.errors=n.Messages,t.pdfSaveDataLoading=!1;case 6:case"end":return e.stop()}}),e)})))()},downloadAttachment:function(t){this.$store.dispatch(ui,{reviewId:this.review.Id,fileId:t})},updateScore:function(t){var e=this;this.$store.dispatch(pi,{reviewId:this.reviewProp.Id,scoringId:t.Id,payload:this.form[t.Id].score}).then((function(){e.$emit("scoreupdated")})),this.$nextTick((function(){e.$refs["score".concat(t.Id)][0].focus()}))},updateComment:function(t){var e=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((function(){e.isFormLoading=!0,e.$store.dispatch(mi,{reviewId:e.reviewProp.Id,scoringId:t.Id,payload:e.form[t.Id].comment}).then((function(){e.isFormLoading=!1,setTimeout((function(){e.$refs["comment"+t.Id][0].focus()}),10)})).catch((function(){e.isFormLoading=!1}))}),1e3)},updateMessage:function(){this.$store.dispatch(fi,{reviewId:this.reviewProp.Id,payload:'"'.concat(this.review.MessageToApplicant,'"')})},markConflict:function(){var t=this;this.$store.dispatch(vi,{reviewId:this.reviewProp.Id}).then((function(){t.$store.dispatch(ri,t.round.RoundId),t.close()}))},markFinished:function(){var t=this;this.errors=[],this.$store.dispatch(hi,{reviewId:this.reviewProp.Id}).then((function(){t.$store.dispatch(ri,t.round.RoundId),t.close()})).catch((function(e){t.errors=e.response.data.Messages}))},createForm:function(){if(this.review)for(var t in this.review.ScoringList){var e=this.review.ScoringList[t];this.form[e.Id]={score:this.review.ScoringList[t].ScoreId,comment:this.review.ScoringList[t].Comment}}},onTabScore:function(t,e){var n=this;t.shiftKey&&e>0?this.openPanel(e-1).then((function(){n.$refs["comment".concat(n.review.ScoringList[e-1].Id)][0].focus()})):t.shiftKey||this.$refs["comment".concat(this.review.ScoringList[e].Id)][0].focus()},onTabComment:function(t,e){var n=this;t.shiftKey?this.$refs["score".concat(this.review.ScoringList[e].Id)][0].focus():e<this.review.ScoringList.length-1?this.openPanel(e+1).then((function(){n.$refs["score".concat(n.review.ScoringList[e+1].Id)][0].focus()})):this.openPanel(this.review.ScoringList.length).then((function(){n.$refs.message.focus()}))},onTabMessage:function(t){var e=this;if(t.shiftKey){var n=this.review.ScoringList.length-1;this.openPanel(n).then((function(){e.$refs["comment".concat(e.review.ScoringList[n].Id)][0].focus()}))}else this.openPanel(0).then((function(){e.$refs["score".concat(e.review.ScoringList[0].Id)][0].focus()}))},openPanel:function(t){var e=this;return new Promise((function(n,i){if(e.openedPanels[t])setTimeout((function(){n()}),1);else{var a=e.openedPanels.slice();e.openedPanels=null,setTimeout((function(){e.openedPanels=a,e.openedPanels[t]=!0,setTimeout((function(){n()}),250)}),1)}}))},initPanels:function(){this.openedPanels=this.review.ScoringList.map((function(){return!0})),this.openedPanels.push(!0)},initTab:function(){window.addEventListener("keyup",this.onTab)},onTab:function(t){var e=this,n=t.keyCode||t.which;if(9===n&&document.activeElement.classList.contains("score-panel")){var i=document.activeElement.tabIndex;this.openPanel(parseInt(i)).then((function(){e.$refs["score".concat(e.review.ScoringList[i].Id)][0].focus()}))}},getScoreList:function(t){return G(t)},getBudgetTotal:function(){return this.convertToNumber(this.reviewProp.AppliedAmount)},convertToNumber:function(t){return Number(t).toLocaleString(void 0,{maximumFractionDigits:2})},close:function(){this.$emit("close")},onCheckboxChange:function(t){var e=this;t?(this.conflictModal=!0,setTimeout((function(){e.isConflict=!1}),10)):setTimeout((function(){e.isConflict=!0}),10)},getbuttonHeight:function(){this.$refs.middleButton&&(this.buttonHeight=this.$refs.middleButton.clientHeight+"px",this.buttonWidth=this.$refs.middleButton.clientWidth+"px")},getScholarLink:function(){var t=this.reviewProp.ApplicantName,e=t.split(" ").slice(0,-1).join(" ").toUpperCase(),n=t.split(" ").slice(-1).join(" ").toUpperCase();return"https://scholar.google.dk/scholar?q=author%3A%22".concat(e,"+").concat(n,"%22")},getPubMedLink:function(){var t=this.reviewProp.ApplicantName,e=t.split(" ").slice(0,-1).join(" ").toUpperCase().charAt(0),n=t.split(" ").slice(-1).join(" ").toUpperCase();return"https://www.ncbi.nlm.nih.gov/pubmed?cmd=search&term=".concat(n,"+").concat(e)},forceReRender:function(){this.autoGrow=!this.autoGrow}}}
1,yp=Cp,wp=(0,f.Z)(yp,fp,vp,!1,null,"bde2ca1c",null),Tp=wp.exports,Np=function(){var t=this,e=t._self._c;return t.scoreProp?e("v-card",{staticClass:"item-list-modal"},[e("notification"),e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.close.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1),e("application-review-result",{attrs:{"show-title":"","score-prop":t.scoreProp}})],1):t._e()},Ep=[],Pp=function(){var t=this,e=t._self._c;return t.scoreProp?e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"px-2",attrs:{xs12:""}},[t.showTitle?e("h2",{staticClass:"text-xs-center"},[t._v("Result of Review")]):t._e(),e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.onlyShowOwn?t.scoreProp.OwnScoringList:t.scoreProp.CompleteScoringList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[t.onlyShowOwn?t._e():e("td",[t._v(t._s(t.getRole(n.item)))]),t.onlyShowOwn?t._e():e("td",[e("span",{staticClass:"no-wrap"},[t._v(t._s(n.item.ReviewerName))])]),e("td",[t._v(t._s(n.item.Name))]),e("td",[e("span",{staticClass:"no-wrap"},[t._v(t._s(n.item.ScoreStr))])]),e("td",[t._v(t._s(n.item.Comment))])]}}],null,!1,414850502)})],1)],1):t._e()},Sp=[],Rp=(n(30541),{props:{scoreProp:Object,showTitle:Boolean,onlyShowOwn:Boolean},data:function(){var t=[{text:"Parameter",value:"result",sortable:!1},{text:"Score",value:"score",sortable:!1},{text:"Comment",value:"comment",sortable:!1}];return this.onlyShowOwn||t.unshift({text:"Role",value:"role",sortable:!1},{text:"Name",value:"name",sortable:!1}),{headers:t}},methods:{getRole:function(t){return t.IsMainReviewer?"Main Reviewer":"Reviewer"}}}),Dp=Rp,Lp=(0,f.Z)(Dp,Pp,Sp,!1,null,null,null),Mp=Lp.exports,kp={props:["scoreProp"],components:{notification:Kl,ApplicationReviewResult:Mp},data:function(){return{headers:[{text:"Role",value:"role",sortable:!1},{text:"Name",value:"name",sortable:!1},{text:"Parameter",value:"result",sortable:!1},{text:"Score",value:"score",sortable:!1},{text:"Comment",value:"comment",sortable:!1}]}},computed:{},created:function(){},mounted:function(){},methods:{getRole:function(t){return t.IsMainReviewer?"Main Reviewer":"Reviewer"},close:function(){this.$emit("close")}}},Op=kp,Fp=(0,f.Z)(Op,Np,Ep,!1,null,null,null),$p=Fp.exports,Zp={props:["applications","step","reviewId","isRoundLoading"],components:{notification:Kl,applicationReviewModal:Tp,applicationResultModal:$p,ApplicationReviewResult:Mp,errorDialog:gt,appPDFViewerModal:ad},data:function(){return{openedNominee:null,role:null,roles:[{id:1,text:"Not Reviewer"},{id:2,text:"Reviewer"},{id:3,text:"Main Reviewer"},{id:4,text:"Unable to Review"}],headers:[{text:"Role",value:"role",sortable:!1},{text:"Name",value:"name",sortable:!1},{text:"Parameter",value:"result",sortable:!1},{text:"Score",value:"score",sortable:!1},{text:"Comment",value:"comment",sortable:!1}],reviewModal:!1,reviewProp:null,nextReview:null,prevReview:null,scoreModal:!1,scoreProp:null,finishModal:!1,isLoading:!1,buttonHeight:null,applicationsList:null,errors:[],orderedBy:[],reviewPanel:null,pdfData:null,showPdfDataLoading:!1,showApplicationPdf:!1,pdfSaveDataLoading:!1}},computed:(0,Dt.Z)({},(0,Xt.vn)(["reviewApplications.applicationsPreferences","reviewApplications.applicationsReview","reviewApplications.applicationsScores","reviewApplications.round","reviewApplications.orderBy","reviewApplications.orderAsc","reviewApplications.review"])),watch:{applications:function(){var t=this;if(this.reviewId&&this.applications.length>0){var e=this.applications.find((function(e){return e.Id===parseInt(t.reviewId)}));e&&this.reviewApp(e)}if(this.review){var n=this.applications.find((function(e){return e.Id===parseInt(t.review.Id)}));n&&this.reviewApp(n)}1===this.step?this.applicationsList=this.applicationsPreferences:2===this.step?this.applicationsList=this.applicationsReview:3!==this.step&&4!==this.step||(this.applicationsList=this.applicationsScores)},orderBy:function(){this.refreshApplicationList()},orderAsc:function(){this.refreshApplicationList()}},methods:{printReviewedList:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.openAll(),setTimeout((function(){window.print()}),50);case 2:case"end":return e.stop()}}),e)})))()},getRole:function(t){return t.IsMainReviewer?"Main Reviewer":"Reviewer"},openAll:function(){this.reviewPanel=Array(this.applicationsList.length).fill(1)},closeAll:function(){this.reviewPanel=[]},reviewApp:function(t){this.$store.dispatch(li,t.Id),this.$router.push({name:"ApplicationReview",params:{roundId:this.round.RoundId,id:t.Id}}),this.reviewProp=t,this.prevReview=this.applicationsList[this.getIndex(parseInt(t.Id))-1],this.nextReview=this.applicationsList[this.getIndex(parseInt(t.Id))+1],this.openModal()},viewResult:function(t){this.scoreProp=t,this.scoreModal=!0},showPdf:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){var i;return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.showPdfDataLoading=!0,n.next=3,e.$store.dispatch(di,t);case 3:i=n.sent,i.Success?(e.pdfData={FileName:i.Value.Filename,PdfData:i.Value.FileContent},e.showApplicationPdf=!0):e.errors=i.Messages,e.showPdfDataLoading=!1;case 6:case"end":return n.stop()}}),n)})))()},savePdf:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){var i;return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.pdfSaveDataLoading=!0,n.next=3,e.$store.dispatch(di,t);case 3:i=n.sent,i.Success?(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i.Value.FileContent)),i.Value.Filename):e.errors=i.Messages,e.pdfSaveDataLoading=!1;case 6:case"end":return n.stop()}}),n)})))()},resetStep:function(){this.orderBy="applicant",this.orderAsc=!0},orderByMultiple:function(t){this.resetStep(),this.orderedByContains(t)?this.orderedBy=this.orderedBy.filter((function(e){return e!==t})):(this.orderedBy.length>1&&this.orderedBy.pop(),this.orderedBy.push(t))},orderedByContains:function(t){return this.orderedBy.includes(t)},orderApplications:function(){var t=this;return this.applications.slice().sort((function(e,n){var i=e.ApplicantName.toLowerCase()>n.ApplicantName.toLowerCase();return t.orderedBy.includes("InstitutionName")&&t.orderedBy.includes("AverageScoreAllReviewers")?(i=e.InstitutionName>n.InstitutionName,e.InstitutionName===n.InstitutionName&&(i=Number(e.AverageScoreAllReviewers)>Number(n.AverageScoreAllReviewers))):t.orderedBy.includes("InstitutionName")&&t.orderedBy.includes("RefNo")?i=e.InstitutionName.toLowerCase()>n.InstitutionName.toLowerCase():t.orderedBy.includes("ApplicantName")&&t.orderedBy.includes("AverageScoreAllReviewers")?(i=e.ApplicantName>n.ApplicantName,e.ApplicantName===n.ApplicantName&&(i=Number(e.AverageScoreAllReviewers)>Number(n.AverageScoreAllReviewers))):t.orderedBy.includes("ApplicantName")&&t.orderedBy.includes("RefNo")?(i=e.ApplicantName>n.ApplicantName,e.ApplicantName===n.ApplicantName&&(i=Number(e.RefNo.replace("-",""))>Number(n.RefNo.replace("-","")))):t.orderedBy.includes("ApplicantName")&&t.orderedBy.includes("AppliedAmount")?(i=e.ApplicantName>n.ApplicantName,e.ApplicantName===n.ApplicantName&&(i=e.AppliedAmount>n.AppliedAmount)):"ProjectTitle"===t.orderBy?i=e.ProjectTitle.toLowerCase()>n.ProjectTitle.toLowerCase():"AppliedAmount"===t.orderBy?i=e.AppliedAmount>n.AppliedAmount:"InstitutionName"===t.orderBy?i=e.InstitutionName>
1n.InstitutionName:"RefNo"===t.orderBy?i=Number(e.RefNo.replace("-",""))>Number(n.RefNo.replace("-","")):"AverageScoreAllReviewers"===t.orderBy?i=Number(e.AverageScoreAllReviewers)>Number(n.AverageScoreAllReviewers):"AverageScoreOwn"===t.orderBy&&(i=Number(e.AverageScoreOwn)>Number(n.AverageScoreOwn)),t.orderedBy.length>0||t.orderAsc?i?1:-1:i?-1:1}))},setOrder:function(t){this.orderBy===t?(this.orderBy=t,this.orderAsc=!this.orderAsc):this.orderBy=t},refreshApplicationList:function(){var t=this;this.applicationsList=this.applicationsList.sort((function(e,n){for(var i=t.orderBy.split(","),a=0;a<i.length;a++){var s=t.sortField(e,n,i[a],t.orderAsc);if(0!==s)return s}var r=0;return r=t.sortField(e,n,"Year",t.orderAsc),0===r&&(r=t.sortField(e,n,"Number",t.orderAsc)),r}))},sortField:function(t,e,n,i){var a=t[n],s=e[n],r=0;return void 0!==a.toLowerCase&&void 0!==s.toLowerCase?a.toLowerCase()!==s.toLowerCase()&&(r=a.toLowerCase()>s.toLowerCase()?1:-1):a!==s&&(r=a>s?1:-1),i||0===r||(r=1===r?-1:1),r},openModal:function(){this.reviewModal=!0},closeModal:function(t){this.$router.push({name:"ApplicationReviewWizard"}),this.reviewModal=!1,this.$store.dispatch(_i)},closeScoreModal:function(){this.scoreModal=!1},openFinishModal:function(){this.finishModal=!0},closeFinishModal:function(t){var e=this;this.finishModal=!1,t&&this.$store.dispatch(gi,{roundId:this.round.RoundId}).then((function(t){t.data.Success||(e.errors=t.data.Messages),e.$store.dispatch(si,e.round.RoundId),e.$store.dispatch(ri,e.round.RoundId),e.$store.dispatch(oi,e.round.RoundId)}))},updatePreference:function(t,e){this.$store.dispatch(ci,{reviewId:e.Id,reviewerType:t})},goPrev:function(){var t=this;this.isLoading=!0;var e=this.getIndex(this.reviewProp.Id);e>0?(this.$store.dispatch(li,this.prevReview.Id).then((function(){t.isLoading=!1})),this.prevReview=this.applicationsList[e-2]||null,this.reviewProp=this.applicationsList[e-1],this.nextReview=this.applicationsList[e]):(this.prevReview=null,this.isLoading=!1)},goNext:function(){var t=this;this.isLoading=!0;var e=this.getIndex(this.reviewProp.Id);e<this.applicationsList.length-1?(this.$store.dispatch(li,this.nextReview.Id).then((function(){t.isLoading=!1})),this.prevReview=this.applicationsList[e],this.reviewProp=this.applicationsList[e+1],this.nextReview=this.applicationsList[e+2]||null):(this.nextReview=null,this.isLoading=!1)},getIndex:function(t){return this.applicationsList.findIndex((function(e){return e.Id===parseInt(t)}))},convertToNumber:function(t){return Number(t).toLocaleString(void 0,{maximumFractionDigits:2})},downloadAttachment:function(t,e){this.$store.dispatch(ui,{reviewId:t,fileId:e})}},mounted:function(){var t=this;this.applicationsList=this.applications,3!==this.step&&4!==this.step||this.openAll(),window.addEventListener("beforeprint",(function(){3!==t.step&&4!==t.step||t.openAll()}))}},Gp=Zp,Bp=(0,f.Z)(Gp,pp,mp,!1,null,null,null),Up=Bp.exports,Wp=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",{staticClass:"px-4 py-4 print-section no-box-shadow-on-print"},[e("v-layout",{attrs:{row:""}},[e("v-flex",{attrs:{xs12:""}},[e("h1",{staticClass:"text-xs-center headline mb-4"},[t._v("Your scores for "+t._s(t.roundName))]),e("DxChart",{ref:t.dxChartRefKey,attrs:{"data-source":t.dataSource,id:"chart"}},[e("DxSeries",{attrs:{"argument-field":"Name","value-field":"Value",name:"Your scores",type:"bar",color:"#F1B27A"}}),e("DxValueAxis",{attrs:{title:"Number of scores"}}),e("DxArgumentAxis",{attrs:{title:"Score value"}}),e("DxTooltip",{attrs:{enabled:!0}})],1),e("div",{staticClass:"d-flex justify-center pt-4"},[e("v-btn",{staticClass:"remove-print",staticStyle:{"max-width":"120px"},on:{click:t.printChart}},[e("v-icon",{staticClass:"pr-2"},[t._v("print")]),t._v(" Print ")],1)],1)],1)],1)],1)],1)},Vp=[],zp=n(75699),jp="chart",Yp={props:{roundName:String,dataSource:Array}
1,components:{DxChart:zp.DxChart,DxSeries:zp.DxSeries,DxValueAxis:zp.DxValueAxis,DxArgumentAxis:zp.DxArgumentAxis,DxTooltip:zp.DxTooltip},data:function(){return{dxChartRefKey:jp}},created:function(){var t=this;window.onbeforeprint=function(){t.dxChart.option("size",{width:"700"}),t.dxChart.option("size",{height:"700"}),t.renderChart()},window.onafterprint=function(){console.log("onafterprint"),t.dxChart.option("size",{width:"100%"}),t.dxChart.option("size",{height:"100%"}),t.renderChart()}},computed:{dxChart:function(){return this.$refs[jp].instance}},methods:{printChart:function(){window.print()},renderChart:function(){var t=this;setTimeout((function(){t.dxChart.render()}),100)}},updated:function(){this.renderChart()}},qp=Yp,Hp=(0,f.Z)(qp,Wp,Vp,!1,null,null,null),Kp=Hp.exports,Qp={components:{applicationReviewList:Up,applicationReviewScoreStatistic:Kp},props:["roundId","id"],data:function(){return{dataAgreementModal:!1,dataProcessorAgreementAccepted:!1,ndaAgreementAccepted:!1,ndaAgreementModal:!1,isRoundLoading:!1,applicationScoreStatisticsDataSource:null}},computed:(0,Dt.Z)({},(0,Xt.vn)(["reviewApplications.dataAgreement","reviewApplications.round","reviewApplications.roundsList","reviewApplications.roundsListLoaded","reviewApplications.applicationsPreferences","reviewApplications.applicationsReview","reviewApplications.applicationsScores","reviewApplications.applicationScoreStatistics","reviewApplications.review","reviewApplications.ndaAgreement"])),watch:{round:function(){this.round&&this.roundsList.length>0&&(this.updateLegals(),this.updateRound())},roundsList:{handler:function(){var t=this;if(this.round&&this.roundsList.length>0){var e=this.roundsList.find((function(e){return e.RoundId===parseInt(t.round.RoundId)}));e&&this.$store.commit(Po,e)}},immediate:!0}},mounted:function(){this.updateLegals(),this.round&&this.updateRound()},methods:{updateRound:function(){var t=this;this.isRoundLoading=!0,this.round.DataProcessorAgreementAccepted||(this.dataAgreementModal=!0,this.isRoundLoading=!1),this.round.NdaAgreementAccepted||(this.ndaAgreementModal=!0,this.isRoundLoading=!1),this.round.DataProcessorAgreementAccepted&&this.round.NdaAgreementAccepted&&(this.$store.dispatch(si,this.round.RoundId).then((function(){t.isRoundLoading=!1})).catch((function(){t.isRoundLoading=!1})),this.$store.dispatch(ri,this.round.RoundId).then((function(){t.isRoundLoading=!1})).catch((function(){t.isRoundLoading=!1})),this.$store.dispatch(oi,this.round.RoundId).then((function(){t.isRoundLoading=!1})).catch((function(){t.isRoundLoading=!1})),this.loadScoreStatistic())},loadScoreStatistic:function(){var t=this;this.$store.dispatch(Ai,this.round.RoundId).catch((function(){t.isRoundLoading=!1,t.$store.dispatch(Ia,{status:!1,text:"Failed to get your scores."})}))},updateLegals:function(){var t=this;this.$store.dispatch(ni).then((function(){t.$refs.dataAgreementFrame.contentWindow.document.open(),t.$refs.dataAgreementFrame.contentWindow.document.write(t.dataAgreement),t.$refs.dataAgreementFrame.contentWindow.document.close()})),this.$store.dispatch(bi).then((function(){t.$refs.ndaAgreementFrame.contentWindow.document.open(),t.$refs.ndaAgreementFrame.contentWindow.document.write(t.ndaAgreement),t.$refs.ndaAgreementFrame.contentWindow.document.close()}))},closeDataAgreementModal:function(t){var e=this;this.dataProcessorAgreementAccepted=t,this.dataAgreementModal=!1,t?this.$store.dispatch(ii,this.round.RoundId).then((function(){e.$store.dispatch(ei),e.round.NdaAgreementAccepted?e.$store.dispatch(ri,e.round.RoundId):e.ndaAgreementModal=!0})):this.$store.commit(Po,null)},closeNdaAgreementModal:function(t){var e=this;this.ndaAgreementAccepted=t,this.ndaAgreementModal=!1,t?this.$store.dispatch(xi,this.round.RoundId).then((function(){e.$store.dispatch(ei),e.round.DataProcessorAgreementAccepted?e.$store.dispatch(ri,e.round.RoundId):e.dataAgreementModal=!0})):this.$store.commit(Po,null)},openRoundSelector:function(){this.$events.$emit("openAppRoundSelector")},setScoreStatistic:function(){this.applicationScoreStatisticsDataSource=this.$store.state.reviewApplications.applicationScoreStatistics}}},Jp=Qp,Xp=(0,f.Z)(Jp,up,dp,!1,null,null,null),tm=Xp.exports,em=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard"},[e("div",{staticClass:"card profile wizard-fullscreen px-0 py-0"},[t.grantConditionsConfirmed?[e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationList"})}}},[t._v("< Back to overview ")])],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[t.application&&t.isLoaded?e("h1",{staticClass:"headline mb-2"},[t._v(" "+t._s(t.application.RefNo)+" ")]):t._e(),t.isLoaded?t._e(
1):e("div",{staticClass:"text-sm-center mt-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])])]),t.isLoaded?e("v-tabs",{attrs:{color:"transparent"},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[t._l(t.getTabs,(function(n){return e("v-tab",{key:n.id,attrs:{to:n.route,exact:""}},[t._v(" "+t._s(n.name)+" ")])})),e("v-tab-item",{attrs:{value:t.activeTab}},[e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("router-view")],1)],1)],1)],1)],2):t._e()]:e("v-card",{staticClass:"item-list text-xs-center pt-5"},[e("h2",{staticClass:"pb-4"},[t._v("Please "),e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openGrantConditionsModal.apply(null,arguments)}}},[t._v("read and accept")]),t._v(" The Lundbeck Foundationâs General Terms and Conditions.")])])],2)]),e("v-dialog",{attrs:{persistent:"",width:"500px"},model:{value:t.grantConditionsModal,callback:function(e){t.grantConditionsModal=e},expression:"grantConditionsModal"}},[e("v-card",{staticClass:"modalCard frameCard"},[e("v-card-text",[e("p",[t._v("I confirm that I have read and accept The Lundbeck Foundationâs "),e("a",{attrs:{href:"https://lundbeckfonden.com/en/grants-and-prizes/grant-recipients/terms-and-conditions-research-grants",target:"_blank"}},[t._v("General Terms and Conditions")]),t._v(".")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.closeGrantConditionsModal(!1)}}},[t._v(" Cancel ")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.closeGrantConditionsModal(!0)}}},[t._v(" Confirm ")])],1)],1)],1)],1)},nm=[],im={components:{},props:{id:[Number,String]},data:function(){return{activeTab:1,tabs:[{id:1,name:"Funding information",route:"/applications/".concat(this.id,"/grant-management/funding")},{id:2,name:"Payment details",route:"/applications/".concat(this.id,"/grant-management/payment-details")},{id:3,name:"Payments",route:"/applications/".concat(this.id,"/grant-management/payment-request")},{id:4,name:"Reports",route:"/applications/".concat(this.id,"/grant-management/reports")},{id:5,name:"Institute administrators",route:"/applications/".concat(this.id,"/grant-management/institute-administrators")}],tabsCR:[{id:1,name:"Funding information",route:"/applications/".concat(this.id,"/grant-management/funding")},{id:2,name:"Payment details",route:"/applications/".concat(this.id,"/grant-management/payment-details")},{id:3,name:"Payments",route:"/applications/".concat(this.id,"/grant-management/payment-request")},{id:4,name:"Reports",route:"/applications/".concat(this.id,"/grant-management/reports")},{id:5,name:"Institute administrators",route:"/applications/".concat(this.id,"/grant-management/institute-administrators")}],isLoaded:null,grantConditionsModal:!1,grantConditionsConfirmed:!0}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.grant"])),{},{getTabs:function(){return this.grant.BudgetChangeRequest?this.tabsCR:this.tabs}}),mounted:function(){},methods:{openGrantConditionsModal:function(){this.grantConditionsModal=!0},closeGrantConditionsModal:function(t){t?this.acceptGrantConditions():this.grantConditionsModal=!1},acceptGrantConditions:function(){var t=this;this.$store.dispatch(yi,this.id).then((function(){t.$store.dispatch(Ci,t.id),t.grantConditionsModal=!1}))}},created:function(){var t=this;this.$store.dispatch(sn,this.id).then((function(){t.$store.dispatch(En),t.$store.dispatch(Ci,t.id).then((function(){t.isLoaded=!0,t.grant.BudgetChangeRequest&&t.$store.dispatch(Nn)}))}))},watch:{grant:function(t){t.GrantConditionsConfirmed?(this.grantConditionsModal=!1,this.grantConditionsConfirmed=!0):(this.grantConditionsModal=!0,this.grantConditionsConfirmed=!1)}}},am=im,sm=(0,f.Z)(am,em,nm,!1,null,null,null),rm=sm.exports,om=function(){var t=this,e=t._self._c;return e("div",[e("h1",{staticClass:"text-xs-center headline mb-5"},[t._v("Funding information")]),e("v-container",[e("v-layout",[e("v-flex",{staticClass:"py-1 xs3 md2 xl1"},[e("strong",[t._v("Status:")])]),e("v-flex",{staticClass:"py-1 xs2 md3 text-xs-right"},[t._v(t._s(t.grant.Status))]),e("v-flex",{staticClass:"py-1 xs1 md1"}),e("v-flex",{staticClass:"py-1 xs3 md2 xl1"},[e("strong",[t._v("Project start:")])]),e("v-flex",{staticClass:"py-1 xs2 md3 text-xs-right"},[e("span",[t._v(t._s(t._f("moment")(t.application.ProjectStartDate,"YYYY-MM-DD")))])]),e("v-flex",{staticClass:"py-1 xs1 md1"})],1),e("v-layout",[e("v-flex",{staticClass:"py-1 xs3 md2 xl1"},[e("strong",[t._v("Total fund:")])]),e("v-flex",{staticClass:"py-1 xs2 md3 text-xs-right"},[e("span",{staticClass:"no-wrap"},[t._v(t._s(t._f("currency")(t.grant.TotalGrant)))])]),e("v-flex",{staticClass:"py-1 xs1 md1"}),e("v-flex",{staticClass:"py-1 xs3 md2 xl1"},[e("strong",[t._v("Project end:")])]),e("v-flex",{staticClass:"py-1 xs2 md3 text-xs-right"},[e("span",[t._v(t._s(t._f("moment")(t.application.ProjectEndDate,"YYYY-MM-DD")))])]),e("v-flex",{staticClass:"py-1 xs1 md1"})],1),e("v-layout",[e("v-flex",{staticClass:"py-1 xs3 md3 xl2"},[e("strong",[t._v("Remaining amount:")])]),e("v-flex",{staticClass:"py-1 xs2 md2 xl2 text-xs-right"},[e("span",{staticClass:"no-wrap"},[t._v(t._s(t._f("currency")(t.grant.RemainingGrant)))])]),e("v-flex",{staticClass:"py-1 xs7 md7"})],1)],1),t.grant.AllowBudgetChangeRequests?e("v-toolbar",{staticClass:"pt-5",attrs:{flat:"",color:"white"}},[e("div",{staticClass:"d-flex justify-start",staticStyle:{"flex-direction":"column"}},[e("div",[!t.wizardIsFirstRate||t.isStandaloneBudgetChange?e("v-btn",{attrs:{disabled:!t.wizardAvailable,color:"primary"},on:{click:function(e){return t.openGrantsWizard()}}},[t._v(" "+t._s(t.wizardButtonText)+" ")]):t._e(),e("v-btn",{attrs:{disabled:!t.budgetChangeCanBeCreated,color:"primary"},on:{click:function(e){return t.createBudgetCR()}}},[t._v(" Create budget change ")])],1)])]):t._e(),e("v-sheet",{staticClass:"mx-auto pa-3 mt-5",attrs:{elevation:"6"}},[e("h1",{staticClass:"text-xs-center headline"},[t._v("Current Budget")]),e("budget-list",{attrs:{getLatest:!0,readOnly:!0}})],1)],1)},lm=[],cm={Unavailable:0,CanCreate:1,CanEdit:2,CanSee:3},um={Unavailable:0,CanEditAndSubmit:1,Submitted:2,ReturnedWithComments:3},dm={Unavailable:0,CanEditAndSubmit:1,Submitted:2,ReturnedWithComments:3},pm={Unavailable:0,CanEditAndSubmit:1,Submitted:2,ReturnedWithComments:3,AwaitAccountingSubmit:4,CanBeCreated:5,Accepted:6},mm={Unavailable:0,CanSubmit:1,CanNotSubmit:2},fm={Unavailable:0,CanEdit:1,MissingAccept:2},vm={computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["grants.installmentWizard"])),{},{wizardAvailable:function(){return this.installmentWizard&&this.installmentWizard.WizardApplicantState!==cm.Unavailable},wizardCanBeViewed:function(){return this.installmentWizard&&this.installmentWizard.WizardApplicantState===cm.CanSee},wizardCanBeEdited:function(){return this.installmentWizard&&this.installmentWizard.WizardApplicantState===cm.CanEdit},wizardCanBeCreated:function(){return this.installmentWizard&&this.installmentWizard.WizardApplicantState===cm.CanCreate},wizardIsFirstRate:function(){var t;return 1===(null===(t=this.installmentWizard)||void 0===t?void 0:t.RateNumber)},isStandaloneBudgetChange:function(){return this.installmentWizard&&!0===this.installmentWizard.IsStandaloneBudgetChange},budgetChangeCanBeCreated:function(){return this.installmentWizard&&this.installmentWizard.WizardApplicantState===cm.CanCreate}}),methods:{createBudgetCR:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return localStorage.setItem("previousPage",t.$route.name),e.next=3,t.$store.dispatch(Yi);case 3:if(!t.wizardCanBeViewed&&!t.wizardCanBeEdited){e.next=7;break}t.$router.push({name:"GrantsWizard",params:{id:t.$route.params.id}}),e.next=13;break;case 7:if(!t.wizardCanBeCreated){e.next=13;break}return e.next=10,t.$store.dispatch(Gn);case 10:return e.next=12,t.$store.dispatch(Yi);case 12:t.$router.push({name:"GrantsWizard",params:{id:t.$route.params.id}});case 13:case"end":return e.stop()}}),e)})))()},openGrantsWizardForRate:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(localStorage.setItem("previousPage",e.$route.name),!t){n.next=6;break}return n.next=4,e.$store.dispatch(qi,{rateId:t});case 4:n.next=8;break;case 6:return n.next=8,e.$store.dispatch(Yi);case 8:e.wizardCanBeViewed||e.wizardCanBeEdited?e.$router.push({name:"GrantsWizard",params:{id:e.$route.params.id,rateid:t}}
1):e.wizardCanBeCreated&&console.error("Specific rate cannot be opened");case 9:case"end":return n.stop()}}),n)})))()},openGrantsWizard:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return localStorage.setItem("previousPage",t.$route.name),e.next=3,t.$store.dispatch(Yi);case 3:if(!t.wizardCanBeViewed&&!t.wizardCanBeEdited){e.next=7;break}t.$router.push({name:"GrantsWizard",params:{id:t.$route.params.id}}),e.next=13;break;case 7:if(!t.wizardCanBeCreated){e.next=13;break}return e.next=10,t.$store.dispatch(Hi);case 10:return e.next=12,t.$store.dispatch(Yi);case 12:t.$router.push({name:"GrantsWizard",params:{id:t.$route.params.id}});case 13:case"end":return e.stop()}}),e)})))()}}},hm=vm,gm=(0,f.Z)(hm,i,a,!1,null,null,null),_m=gm.exports,Im={mixins:[_m],name:"ApplicationGrantsFunding",created:function(){this.$store.dispatch(Yi)},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.grant","grants.installmentWizard"])),{},{AvailableRatesForPaymentRequestList:function(){return B(this.grant.AvailableRatesForPaymentRequestList)},rateId:function(){return this.AvailableRatesForPaymentRequestList[0].id},hasBudgetChangeRequest:function(){return!!this.grant.BudgetChangeRequest},hasActiveStatusReport:function(){return this.grant.StatusReportList.some((function(t){return"Approved"!==t.ReportState&&"Rejected"!==t.ReportState&&"Preapproved"!==t.ReportState}))},hasDraftBudget:function(){return this.hasBudgetChangeRequest||this.hasActiveStatusReport},wizardButtonText:function(){return this.isStandaloneBudgetChange?"Edit budget change":this.wizardCanBeEdited?"Edit report":this.wizardCanBeViewed?"View report":this.wizardCanBeCreated?"Create new report":"Report unavailable"}})},Am=Im,bm=(0,f.Z)(Am,om,lm,!1,null,null,null),xm=bm.exports,Cm=function(){var t=this,e=t._self._c;return e("div",[e("h1",{staticClass:"text-xs-center headline mb-5"},[t._v("Payment details")]),!0!==t.payment.PaymentDetailsAreAccepted?e("div",{staticClass:"text-sm-center my-5"},[t._v(" Please "),e("a",{on:{click:function(e){return t.openGrantsWizard()}}},[t._v(" create payout ")]),t._v(" to enter payment details! ")]):t._e(),t.wizardIsFirstRate&&t.wizardCanBeViewed?e("div",{staticClass:"text-sm-center my-5"},[t._v(" Awaiting payout of first installment ")]):t._e(),t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),e("error-dialog",{attrs:{errors:t.errors}}),t.isLoading||!t.paymentDetails||t.wizardIsFirstRate?t._e():e("v-form",{ref:"form",staticClass:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",[e("v-layout",{staticClass:"removeMargin d-flex justify-center",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{md6:"",sm6:"",xs12:""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Civil registration number",box:""},model:{value:t.payment.CivilRegistrationNumber,callback:function(e){t.$set(t.payment,"CivilRegistrationNumber",e)},expression:"payment.CivilRegistrationNumber"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Cvr no",box:""},model:{value:t.payment.BusinessId,callback:function(e){t.$set(t.payment,"BusinessId",e)},expression:"payment.BusinessId"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Reference number",box:""},model:{value:t.payment.ReferenceNumber,callback:function(e){t.$set(t.payment,"ReferenceNumber",e)},expression:"payment.ReferenceNumber"}})],1),e("payment-details-fields",t._b({},"payment-details-fields",t.payment,!1,!0))],1)],1)],1)],1),e("v-toolbar",{attrs:{flat:"",color:"white"}},[t.wizardIsFirstRate?t.wizardCanBeViewed?t._e():e("v-btn",{attrs:{disabled:!t.wizardAvailable,color:"primary"},on:{click:function(e){return t.openGrantsWizard()}}},[t._v(" "+t._s(t.wizardButtonText)+" ")]):e("v-btn",{staticClass:"v-btn",attrs:{color:"primary",disabled:!t.valid},on:{click:t.update}},[t._v(" Update ")])],1)],1)},ym=[],wm={mixins:[_m],name:"ApplicationGrantsPaymentDetails",components:{paymentDetailsFields:vs,errorDialog:gt},data:function(){return{isLoading:!1,paymentMethods:[],payment:{PaymentMethodId:null,CivilRegistrationNumber:null,BusinessId:null,ReferenceNumber:null,RegistrationNumber:null,PaymentMethodList:null,AccountNumber:null,AbaFw:null,Iban:null,SwiftBic:null,AcceptPaymentDetails:!1,PaymentDetailsAreAccepted:!1}
1,valid:!1,errors:[]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["grants.paymentDetails"])),{},{wizardButtonText:function(){return this.wizardCanBeEdited?"Edit payout":this.wizardCanBeViewed?"View payout":this.wizardCanBeCreated?"Create payout":"Payout unavailable"}}),mounted:function(){},methods:{update:function(){var t=this;this.isLoading=!0,this.$refs.form.validate()&&this.$store.dispatch(Gi,this.payment).then((function(e){t.errors=[],t.$store.dispatch(Zi)})).catch((function(e){t.errors=e.response.data.Messages})),this.isLoading=!1}},created:function(){var t=this;this.isLoading=!0,this.$store.dispatch(Yi),this.$store.dispatch(Zi).then((function(e){t.payment.CivilRegistrationNumber=t.paymentDetails.CivilRegistrationNumber,t.payment.BusinessId=t.paymentDetails.BusinessId,t.payment.ReferenceNumber=t.paymentDetails.ReferenceNumber,t.payment.AccountNumber=t.paymentDetails.AccountNumber,t.payment.RegistrationNumber=t.paymentDetails.RegistrationNumber,t.payment.AbaFw=t.paymentDetails.AbaFw,t.payment.Iban=t.paymentDetails.Iban,t.payment.SwiftBic=t.paymentDetails.SwiftBic,t.payment.PaymentMethodId=t.paymentDetails.PaymentMethodId,t.payment.PaymentMethodList=t.paymentDetails.PaymentMethodList,t.payment.PaymentDetailsAreAccepted=t.paymentDetails.PaymentDetailsAreAccepted,t.isLoading=!1}))}},Tm=wm,Nm=(0,f.Z)(Tm,Cm,ym,!1,null,null,null),Em=Nm.exports,Pm=function(){var t=this,e=t._self._c;return e("div",[e("error-dialog",{attrs:{errors:t.errors}}),e("h1",{staticClass:"text-xs-center headline mb-5"},[t._v("Reports")]),t.grant?e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.CurrentReportList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.ReportRateName))]),e("td",[t._v(t._s(n.item.ReportType))]),e("td",[t._v(t._s(n.item.ReportState))]),e("td",[t._v(t._s(n.item.Comments))]),e("td",[n.item.SubmissionDate?e("span",[t._v(t._s(t._f("moment")(n.item.SubmissionDate,"YYYY-MM-DD")))]):t._e()]),e("td",{staticClass:"layout"},[n.item.OpenReportPdfAllowed?e("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:"",title:"Download PDF"},on:{click:function(e){return t.downloadAsPDF(n.item)}}},[t._v("download")]):t._e(),n.item.ViewWizardAllowed?e("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:"",title:"View Report"},on:{click:function(e){return t.openGrantsWizardForRate(n.item.RateId)}}},[t._v("remove_red_eye")]):t._e(),n.item.EditWizardAllowed?e("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:"",title:"Edit Report"},on:{click:function(e){return t.openGrantsWizardForRate(n.item.RateId)}}},[t._v("edit")]):t._e()],1)]}}],null,!1,2624122725)}):t._e(),e("v-toolbar",{attrs:{flat:"",color:"white"}},[t.reportTypeList&&0!==t.reportTypeList.length?e("v-btn",{staticClass:"v-btn",attrs:{color:"primary"},on:{click:function(e){return t.openGrantsWizard()}}},[t._v(" Create new ")]):t.wizardIsFirstRate?t._e():e("v-btn",{attrs:{disabled:!t.wizardAvailable,color:"primary"},on:{click:function(e){return t.openGrantsWizard()}}},[t._v(" "+t._s(t.wizardButtonText)+" ")])],1),t.FutureReportList&&t.FutureReportList.length>0?e("div",[e("h1",{staticClass:"text-xs-center headline mb-5 mt-5"},[t._v("Expected future reports")]),t.grant?e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headersFuture,items:t.FutureReportList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.ReportRateName))]),e("td",[t._v(t._s(n.item.ReportType))]),e("td",[n.item.DeadlineDate?e("span",[t._v(t._s(t._f("moment")(n.item.DeadlineDate,"YYYY-MM-DD")))]):t._e()]),e("td",{staticClass:"layout"})]}}],null,!1,1716653138)}):t._e()],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.removeModal,callback:function(e){t.removeModal=e},expression:"removeModal"}},[e("remove-report-modal",{on:{close:t.closeRemoveModal}})],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.addModal,callback:function(e){t.addModal=e},expression:"addModal"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){return e.preventDefault(),t.closeAddModal.apply(null,arguments)}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",[e("span",[t._v("Choose report type")])]),e("v-card-actions",[e("v-spacer"),t.grant.ReportTypesAllowed?e("div",[e("v-select",{attrs:{items:t.reportTypeList,"item-value":"id","item-text":"text",label:"Report type",box:""},model:{value:t.reportType,callback:function(e){t.reportType=e},expression:"reportType"}})],1):t._e()],1)],1)],1),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.submitModal,callback:function(e){t.submitModal=e},expression:"submitModal"}},[e("submit-report-modal",{on:{close:t.closeSubmitModal}})],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.downloadDialog,callback:function(e){t.downloadDialog=e},expression:"downloadDialog"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.downloadDialog=!1}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])],1)],1)],1)},Sm=[],Rm=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this report?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)}
1,Dm=[],Lm={name:"RemoveReportModal",methods:{close:function(t){this.$emit("close",t)}}},Mm=Lm,km=(0,f.Z)(Mm,Rm,Dm,!1,null,null,null),Om=km.exports,Fm=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to submit this report?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},$m=[],Zm={name:"SubmitReportModal",methods:{close:function(t){this.$emit("close",t)}}},Gm=Zm,Bm=(0,f.Z)(Gm,Fm,$m,!1,null,null,null),Um=Bm.exports,Wm={mixins:[_m],name:"ApplicationGrantsReports",components:{removeReportModal:Om,submitReportModal:Um,errorDialog:gt},data:function(){return{headers:[{text:"Installment",value:"ReportRateName",width:"20%"},{text:"Type",value:"ReportType",width:"20%"},{text:"Status",value:"ReportState"},{text:"Comment",value:"Comments",sortable:!1,width:"30%"},{text:"Submission date",value:"SubmissionDate"},{text:"",value:"action",sortable:!1}],headersFuture:[{text:"Installment",value:"ReportRateName",width:"30%"},{text:"Type",value:"ReportType",width:"30%"},{text:"Deadline",value:"DeadlineDate",width:"20%"},{text:"",value:"action",sortable:!1}],downloadDialog:!1,removeModal:!1,addModal:!1,submitModal:!1,reportType:null,activeItem:null,reportTypeList:null,errors:[]}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["grants.grant"])),(0,Lt.Se)(["appId"])),{},{CurrentReportList:function(){return this.grant.StatusReportList.filter((function(t){return!1===t.IsFutureReport}))},FutureReportList:function(){return this.grant.StatusReportList.filter((function(t){return!0===t.IsFutureReport}))},hasBudgetChangeRequest:function(){return!!this.grant.BudgetChangeRequest},hasActiveStatusReport:function(){return this.grant.StatusReportList.some((function(t){return"Approved"!==t.ReportState&&"Rejected"!==t.ReportState}))},hasDraftBudget:function(){return this.hasBudgetChangeRequest||this.hasActiveStatusReport},wizardButtonText:function(){return this.isStandaloneBudgetChange?"Edit budget change":this.wizardCanBeEdited?"Edit report":this.wizardCanBeViewed?"View report":this.wizardCanBeCreated?"Create new report":"Report unavailable"}}),mounted:function(){this.reportTypeList=B(this.grant.ReportTypesAllowed)},methods:{openRemoveModal:function(t){this.removeModal=!0,this.activeItem=t},closeRemoveModal:function(t){this.removeModal=!1,t&&this.remove(this.activeItem)},openEditModal:function(t){this.$router.push({name:"WizardGrantsReport",params:{id:"".concat(this.appId),reportId:"".concat(t.Id)}})},openAddModal:function(){this.reportType=null,this.addModal=!0},closeAddModal:function(){this.addModal=!1},openSubmitModal:function(t){this.activeItem=t,this.submitModal=!0},closeSubmitModal:function(t){this.submitModal=!1,t&&this.submit(this.activeItem)},submit:function(t){var e=this;this.$store.dispatch(Li,{reportId:t.Id}).then((function(t){e.$store.dispatch(Ci,e.$route.params.id)})).catch((function(t){e.errors=t.response.data.Messages}))},add:function(){var t=this;this.$store.dispatch(Di,{reportType:this.reportType}).then((function(e){t.$router.push({name:"WizardGrantsReport",params:{id:t.appId,reportId:e.Value.Id}})})).catch((function(e){t.addModal=!1,t.errors=e.response.data.Messages}))},downloadAsPDF:function(t){var e=this;this.downloadDialog=!0,this.$store.dispatch(Si,{reportId:t.Id}).then((function(t){e.downloadDialog=!1}))},remove:function(t){var e=this;this.$store.dispatch(ki,{reportId:t.Id}).then((function(t){e.$store.dispatch(Ci,e.$route.params.id)})).catch((function(t){e.errors=t.response.data.Messages}))}},watch:{reportType:function(t){this.reportType&&(this.closeAddModal(),this.add())}}},Vm=Wm,zm=(0,f.Z)(Vm,Pm,Sm,!1,null,null,null),jm=zm.exports,Ym=function(){var t=this,e=t._self._c;return e("div",[e("error-dialog",{attrs:{errors:t.errors}}),e("h1",{staticClass:"text-xs-center headline mb-5"},[t._v("Payments")]),e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.CurrentPaymentRequestList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(t._f("moment")(n.item.RequestDate,"YYYY-MM-DD")))]),e("td",[t._v(t._s(n.item.RateName))]),e("td",{staticClass:"no-wrap text-right"},[t._v(t._s(t._f("currency")(n.item.AmountApproved)))]),e("td",[t._v(t._s(n.item.State))]),e("td",[t._v(t._s(n.item.PaymentMethod))]),e("td",{staticClass:"layout"},[n.item.EditRequestAllowed?e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.openEditModal(n.item)}}},[t._v("edit")]):t._e(),n.item.DeleteRequestAllowed?e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.openRemoveModal(n.item.Id)}}},[t._v("delete")]):t._e(),n.item.SubmitRequestAllowed?e("v-icon",{attrs:{small:""},on:{click:function(e){return t.submit(n.item)}}},[t._v("send")]):t._e()],1)]}}])}),e("h1",{staticClass:"text-xs-center headline mb-5 mt-5"}
1,[t._v("Expected future installments")]),e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headersFuture,items:t.FuturePaymentRequestList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.RateName))]),e("td",{staticClass:"no-wrap text-right"},[t._v(t._s(t._f("currency")(n.item.AmountApproved)))])]}}])}),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-request-modal",{attrs:{rate:t.editItemRate},on:{close:t.closeEditModal,update:t.update,submit:t.updateSubmit}})],1):t._e(),t.rateDialog?e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.rateDialog,callback:function(e){t.rateDialog=e},expression:"rateDialog"}},[e("v-card",{staticClass:"modalCard"},[e("a",{staticClass:"btn-close",on:{click:function(e){e.preventDefault(),t.rateDialog=!1}}},[e("v-icon",[t._v("close")])],1),e("v-card-text",[e("span",[t._v("Select payment rate")])]),e("v-card-actions",[e("v-spacer"),t.adding?e("div",{staticClass:"text-sm-center w-100"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),!t.adding&&t.AvailableRatesForPaymentRequestList.length?e("div",[e("v-select",{attrs:{items:t.AvailableRatesForPaymentRequestList,"item-value":"id","item-text":"text",label:"Rate",box:""},model:{value:t.rate,callback:function(e){t.rate=e},expression:"rate"}})],1):t._e()],1)],1)],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.removeDialog,callback:function(e){t.removeDialog=e},expression:"removeDialog"}},[e("remove-request-modal",{on:{close:t.closeRemoveModal}})],1)],1)},qm=[],Hm=function(){var t=this,e=t._self._c;return e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(" Edit payment request ")]),e("v-layout",{attrs:{"justify-end":""}},[e("v-btn",{attrs:{icon:""},on:{click:t.close}},[e("v-icon",[t._v("close")])],1)],1)],1),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",staticClass:"requestForm",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-container",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs12:""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("p",[t._v(t._s(t.rate))])]),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-textarea",{attrs:{label:"Comment",box:"","auto-grow":"",rows:"5"},model:{value:t.entry.Comment,callback:function(e){t.$set(t.entry,"Comment",e)},expression:"entry.Comment"}})],1),e("payment-details-fields",t._b({},"payment-details-fields",t.entry,!1,!0))],1)],1)],1)],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary",disabled:!t.valid},on:{click:t.save}},[t._v(" Save ")]),e("v-btn",{attrs:{color:"success",disabled:!t.valid},on:{click:t.submit}},[t._v(" Submit ")])],1)],1)},Km=[],Qm={name:"EditRequestModal",props:["rate"],components:{paymentDetailsFields:vs},data:function(){return{valid:!1}},computed:(0,Dt.Z)({},(0,Xt.vn)({entry:"grants.paymentRequest"})),methods:{save:function(){this.$refs.form.validate()&&(this.close(),this.$emit("update",this.entry))},submit:function(){this.$refs.form.validate()&&(this.close(),this.$emit("submit",this.entry))},close:function(){this.$emit("close")}},created:function(){}},Jm=Qm,Xm=(0,f.Z)(Jm,Hm,Km,!1,null,null,null),tf=Xm.exports,ef=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this request?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},nf=[],af={name:"RemoveRequestModal",methods:{close:function(t){this.$emit("close",t)}}},sf=af,rf=(0,f.Z)(sf,ef,nf,!1,null,null,null),of=rf.exports,lf={name:"ApplicationGrantsPaymentRequest",components:{editRequestModal:tf,removeRequestModal:of,errorDialog:gt},data:function(){return{headers:[{text:"Date",value:"RequestDate"},{text:"Installment",value:"RateName"},{text:"Ready for payment",value:"AmountApproved",sortable:!1},{text:"Status",value:"State"},{text:"Payment method",value:"PaymentMethod",sortable:!1},{text:"",value:"action",sortable:!1}],headersFuture:[{text:"Installment",value:"RateName"},{text:"Amount",value:"AmountApproved",sortable:!1,align:"right"},{text:"",value:"action",sortable:!1,width:"50%"}],rate:null,adding:!1,editItem:null,editItemRate:null,editDialog:!1,rateDialog:!1,removeId:null,removeDialog:!1,errors:[]}},computed:(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["appId"])),(0,Xt.vn)(["grants.grant"])),{},{CurrentPaymentRequestList:function(){return this.grant.PaymentRequestList.filter((function(t){return!1===t.IsFutureRequest}))},FuturePaymentRequestList:function(){return this.grant.PaymentRequestList.filter((function(t){return!0===t.IsFutureRequest}))},AvailableRatesForPaymentRequestList:function(){return B(this.grant.AvailableRatesForPaymentRequestList)}}),methods:{closeEditModal:function(){this.editDialog=!1,this.rate=null},openEditModal:function(t){var e=this;if(this.errors=[],t)this.$store.dispatch(Ui,t.Id).then((function(){e.editDialog=!0,t&&(e.editItemRate=t.RateName)}));else if(this.editDialog=!0,this.editItemRate=null,this.rate){var n=this.AvailableRatesForPaymentRequestList.find((function(t){return t.id===e.rate}));n&&(this.editItemRate=n.text)}},openRateModal:function(){this.adding=!1,this.rate=null,this.rateDialog=!0},closeRateModal:function(){this.rateDialog=!1},openRemoveModal:function(t){this.removeId=t,this.removeDialog=!0},closeRemoveModal:function(t){this.removeDialog=!1,t&&this.remove(this.removeId)},add:function(){this.AvailableRatesForPaymentRequestList.length>1?this.openRateModal():this.rate=this.AvailableRatesForPaymentRequestList[0].id},update:function(t){var e=this;this.$store.dispatch(Wi,t).then((function(){e.$store.dispatch(Ci,e.appId)}))},remove:function(t){var e=this;this.$store.dispatch(Vi,t).then((function(){e.$store.dispatch(Ci,e.appId)}))},submit:function(t){var e=this;this.$store.dispatch(zi,t.Id).then((function(){e.$store.dispatch(Ci,e.appId)})).catch((function(t){e.errors=t.response.data.Messages}))},updateSubmit:function(t){var e=this;this.$store.dispatch(Wi,t).then((function(){e.$store.dispatch(zi,t.Id).then((function(){e.$store.dispatch(Ci,e.appId)})).catch((function(t){e.errors=t.response.data.Messages}))}))}},watch:{rate:function(t){var e=this;t&&(this.adding=!0,this.$store.dispatch(Bi,t).then((function(){e.$store.dispatch(Ci,e.appId),e.adding=!1,e.openEditModal(),e.closeRateModal()})).catch((function(t){console.log("err",t),e.rateDialog=!1,e.errors=t.response.data.Messages})))}},mounted:function(){}},cf=lf,uf=(0,f.Z)(cf,Ym,qm,!1,null,null,null),df=uf.exports,pf=function(){var t=this,e=t._self._c;return e("div",[e("h1",{staticClass:"text-xs-center headline mb-5"}
1,[t._v("Institute administrators")]),t.grant?e("v-data-table",{staticClass:"elevation-1",attrs:{loading:t.isLoading,headers:t.headers,items:t.grant.InstituteAdministratorList,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){return[e("td",[t._v(t._s(n.item.Name))]),e("td",[t._v(t._s(n.item.Email))]),e("td",{staticClass:"layout justify-end"},[n.item.CanBeEdited?e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.openEditModal(n.item)}}},[t._v("edit")]):t._e(),e("v-icon",{staticClass:"mr-2",attrs:{small:""},on:{click:function(e){return t.openRemoveModal(n.item)}}},[t._v("delete")])],1)]}}],null,!1,2536818865)}):t._e(),e("v-toolbar",{attrs:{flat:"",color:"white"}},[e("v-btn",{staticClass:"v-btn",attrs:{color:"primary"},on:{click:function(e){return t.openAddModal()}}},[t._v(" Assign new ")])],1),t.initEditDialog?e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-institute-administrator-modal",{attrs:{administrator:t.editItem,errors:t.errors,isLoading:t.isLoading},on:{add:t.addItem,close:t.closeEditModal,update:t.update}})],1):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.removeDialog,callback:function(e){t.removeDialog=e},expression:"removeDialog"}},[e("remove-institute-administrator-modal",{on:{close:t.closeRemoveModal,remove:t.removeItem}})],1)],1)},mf=[],ff=function(){var t=this,e=t._self._c;return e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t.administrator?e("span",[t._v("Edit")]):e("span",[t._v("Add")]),t._v(" Institute administrator")]),e("v-layout",{attrs:{"justify-end":""}},[e("v-btn",{attrs:{icon:""},on:{click:t.close}},[e("v-icon",[t._v("close")])],1)],1)],1),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",staticClass:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{md6:"",sm6:"",xs12:"","pr-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.firstNameRules,label:"First name",box:"",required:""},model:{value:t.item.FirstName,callback:function(e){t.$set(t.item,"FirstName",e)},expression:"item.FirstName"}})],1)],1),e("v-flex",{attrs:{md6:"",sm6:"",xs12:"","pl-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.lastNameRules,label:"Last name",box:"",required:""},model:{value:t.item.LastName,callback:function(e){t.$set(t.item,"LastName",e)},expression:"item.LastName"}})],1)],1),e("v-flex",{attrs:{md5:"",sm6:"",xs12:"","pr-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.requiredRules,mask:"+###",label:"Phone prefix",box:"",required:""},model:{value:t.item.PhonePrefix,callback:function(e){t.$set(t.item,"PhonePrefix",e)},expression:"item.PhonePrefix"}})],1)],1),e("v-flex",{attrs:{md7:"",sm6:"",xs12:"","pl-2":""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.requiredRules,label:"Phone number",box:"",required:""},model:{value:t.item.PhoneNumber,callback:function(e){t.$set(t.item,"PhoneNumber",e)},expression:"item.PhoneNumber"}})],1)],1),e("v-flex",{attrs:{md12:""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{rules:t.emailRules,disabled:t.isEdit,label:"E-mail",box:"",required:""},model:{value:t.item.Email,callback:function(e){t.$set(t.item,"Email",e)},expression:"item.Email"}})],1)],1),t.profile?e("v-flex",[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.genderList,label:"Gender","item-value":"id","item-text":"text",attach:"",box:""},model:{value:t.item.GenderId,callback:function(e){t.$set(t.item,"GenderId",e)},expression:"item.GenderId"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.degreeList,label:"Academic degree","item-value":"id","item-text":"text",attach:"",box:"","menu-props":{maxHeight:"250"}},model:{value:t.item.DegreeId,callback:function(e){t.$set(t.item,"DegreeId",e)},expression:"item.DegreeId"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-select",{attrs:{items:t.positionList,label:"Position","item-value":"id","item-text":"text",attach:"",box:"","menu-props":{maxHeight:"150"}},model:{value:t.item.PositionId,callback:function(e){t.$set(t.item,"PositionId",e)},expression:"item.PositionId"}})],1)],1):t._e()],1)],1),t.isLoading?e("div",[e("div",{staticClass:"container text-sm-center"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)]):t._e(),t.errors.length?e("div",[e("br"),t._l(t.errors,(function(n){return e("p",{key:n.Message,staticClass:"error--text"},[t._v(" "+t._s(n.Message)+" ")])}))],2):t._e(),e("hr",{staticClass:"space space-xs"})],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary"},on:{click:t.add}},[t._v(" Save ")])],1)],1)},vf=[],hf={name:"EditInstituteAdministratorModal",props:{administrator:[Object],errors:Array,isLoading:{default:!1}},data:function(){return{valid:!1,isEdit:!1,item:{Email:null,FirstName:null,LastName:null,PhonePrefix:null,PhoneNumber:null,GenderId:null,DegreeId:null,PositionId:null},firstNameRules:[function(t){return!!t||"First name is required"}],lastNameRules:[function(t){return!!t||"Last name is required"}],emailRules:[function(t){return!!t||"Email is required"}],requiredRules:[function(t){return!!t||"This field is required"}]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["user.profile"])),{},{genderList:function(){return B(this.profile.GenderList)},degreeList:function(){return B(this.profile.DegreeList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},positionList:function(){return B(this.profile.TitleList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))}}),methods:{add:function(){this.$refs.form.validate()&&(this.administrator?this.$emit("update",this.item):this.$emit("add",this.item))},close:function(){this.$emit("close"),this.resetItem()},resetItem:function(){this.item={Email:null,FirstName:null,LastName:null,PhonePrefix:null,PhoneNumber:null,GenderId:null,DegreeId:null,PositionId:null}}},created:function(){},watch:{administrator:function(){this.administrator?(this.isEdit=!0,this.item={Email:this.administrator.Email,FirstName:this.administrator.FirstName,LastName:this.administrator.LastName,PhonePrefix:this.administrator.PhonePrefix,PhoneNumber:this.administrator.PhoneNumber,GenderId:this.administrator.GenderId,DegreeId:this.administrator.DegreeId,PositionId:this.administrator.PositionId}):this.isEdit=!1}}},gf=hf,_f=(0,f.Z)(gf,ff,vf,!1,null,null,null),If=_f.exports,Af=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this administrator?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},bf=[],xf={name:"RemoveInstituteAdministratorModal",methods:{save:function(){},close:function(t){this.$emit("close",t)}}},Cf=xf,yf=(0,f.Z)(Cf,Af,bf,!1,null,null,null),wf=yf.exports,Tf={name:"ApplicationGrantsInstituteAdministrators",components:{editInstituteAdministratorModal:If,removeInstituteAdministratorModal:wf},data:function(){return{headers:[{text:"Name",value:"Name",width:"35%"},{text:"Email",value:"Email",width:"55%"},{text:"",value:"action",sortable:!1}],editDialog:!1,removeDialog:!1,editItem:null,removeItemId:null,initEditDialog:!1,isLoading:!1,errors:[]}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["grants.grant"])),(0,Lt.Se)(["appId"])),mounted:function(){},methods:{openRemoveModal:function(t){this.removeDialog=!0,this.removeItemId=t.Id},closeRemoveModal:function(t){t&&this.removeItem(),this.removeDialog=!1},openAddModal:function(){var t=this;this.errors=[],this.reloadEditDialog().then((function(){t.editItem=null,t.editDialog=!0}))},openEditModal:function(t){var e=this;this.editItem=null,this.errors=[],this.reloadEditDialog().then((function(){e.$store.dispatch(wi,{administratorId:t.Id}).then((function(t){e.editItem=t.Value,e.editDialog=!0}))}))},closeEditModal:function(){this.editDialog=!1},update:function(t){var e=this;
1this.isLoading=!0,this.errors=[],this.$store.dispatch(Ti,t).then((function(t){e.isLoading=!1,t.Success?(e.$store.dispatch(Ci,e.appId),e.closeEditModal()):e.errors=t.Messages}))},addItem:function(t){var e=this;this.isLoading=!0,this.errors=[],this.$store.dispatch(Ni,t).then((function(t){e.isLoading=!1,t.Success?(e.$store.dispatch(Ci,e.appId),e.closeEditModal()):e.errors=t.Messages}))},removeItem:function(t){var e=this;this.isLoading=!0,this.$store.dispatch(Ei,{administratorId:this.removeItemId}).then((function(t){e.$store.dispatch(Ci,e.appId),e.isLoading=!1}))},reloadEditDialog:function(){var t=this;return new Promise((function(e,n){t.initEditDialog=!1,t.$nextTick((function(){t.initEditDialog=!0,e()}))}))}}},Nf=Tf,Ef=(0,f.Z)(Nf,pf,mf,!1,null,null,null),Pf=Ef.exports,Sf=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard"},[e("div",[e("notification"),e("error-dialog",{attrs:{errors:t.errors}}),e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationGrantsReports",params:"id: application.Id"})}}},[t._v("< Back to reports ")])],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[t.application&&t.isLoaded?e("h1",{staticClass:"headline mb-2"},[t._v(" "+t._s(t.application.RefNo)+" ")]):t._e(),t.isLoaded?t._e():e("div",{staticClass:"text-sm-center mt-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1)])])]),t.statusReport&&t.isLoaded?e("v-tabs",{attrs:{color:"transparent","align-tabs":"end"},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[t._l(t.pagelist,(function(n,i){return e("v-tab",{key:i,class:t.pageErrors[n.Id]?"has-errors":"",attrs:{ripple:""}},[t._v(" "+t._s(n.PageName)+" ")])})),t.statusReport.IsResearchfishEnabled?e("div",{staticClass:"text-small",staticStyle:{width:"300px","text-align":"center"}},[e("br"),e("v-btn",{attrs:{loading:t.isResearchfishLoading},on:{click:t.openResearchfishModal}},[t._v(" Import Researchfish data ")]),e("br"),t.statusReport.LastUpdatedResearchfishData?e("span",[t._v("Last import: "+t._s(t.formatResearchfishDate()))]):e("span",[t._v("No data imported")])],1):t._e(),t._l(t.pagelistResearchfish,(function(n,i){return e("v-tab",{key:i+100,class:t.pageErrors[n.Id]?"has-errors":"",attrs:{ripple:""}},[t._v(" "+t._s(n.PageName)+" ")])})),t.enableEnclosures()?e("v-tab",{attrs:{ripple:""}},[t._v("Enclosures")]):t._e(),e("v-tab",{class:""!=t.accountingValidationErrors?"has-errors":"",attrs:{ripple:""}},[t._v("Accounting")]),e("v-tab",{staticClass:"tab-submit w-100"},[e("hr",{staticClass:"space space-xs hidden-sm-and-down"}),e("div",{staticClass:"buttons"},[e("v-btn",{staticClass:"button",attrs:{color:"success"},on:{click:t.openSubmitModal}},[t._v(" Submit ")])],1)]),t._l(t.pagelist,(function(t,n){return e("v-tab-item",{key:n},[e("form-properties",{attrs:{"page-id":t.Id,title:t.PageName,fields:t.DynamicFieldsList,isResearchfish:t.IsResearchfishPage}})],1)})),t.enableEnclosures()?e("v-tab-item",[e("form-attachments",{attrs:{showImagesCondition:this.application&&this.application.MaxNumberPicturesReport>0,showDocumentsCondition:this.application&&this.application.MaxNumberDocumentsReport>0,maxNumberPictures:t.application.MaxNumberPicturesReport,maxNumberDocuments:t.application.MaxNumberDocumentsReport,reportId:t.reportId}})],1):t._e(),t._l(t.pagelistResearchfish,(function(t,n){return e("v-tab-item",{key:n+100},[e("form-properties",{attrs:{"page-id":t.Id,title:t.PageName,fields:t.DynamicFieldsList,isResearchfish:t.IsResearchfishPage}})],1)})),e("v-tab-item",[e("form-accounting",{attrs:{submitErrors:t.accountingValidationErrors}})],1)],2):t._e(),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.fetchResearchfishModal,callback:function(e){t.fetchResearchfishModal=e},expression:"fetchResearchfishModal"}},[e("fetch-researchfish-modal",{on:{close:t.closeResearchfishModal}})],1),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.submitModal,callback:function(e){t.submitModal=e},expression:"submitModal"}},[e("submit-report-modal",{on:{close:t.closeSubmitModal}})],1)],1)])])},Rf=[],Df=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t._v("Accounting")])]),""!=t.submitErrors?e("div",{staticClass:"error--text mb-1"},[t._v(t._s(t.submitErrors))]):t._e(),e("div",t._l(t.dividedAccounting(),(function(n,i){return e("div",{key:i}
1,[t.accounting?e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,loading:t.isLoading,items:n,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){var i=n.item;return[e("td",[t._v(t._s(i.RateNo))]),e("td",[t._v(t._s(i.Name))]),e("td",{staticClass:"no-wrap text-right"},[t._v(t._s(t._f("currency")(i.Amount)))]),e("td",[t._v(t._s(i.AmountComment))]),e("td",{staticClass:"no-wrap text-right"},[i.IsEditable?e("v-edit-dialog",{attrs:{"return-value":i.AmountUsed,lazy:""},on:{"update:returnValue":function(e){return t.$set(i,"AmountUsed",e)},"update:return-value":function(e){return t.$set(i,"AmountUsed",e)},save:function(e){return t.saveAmount(i)},cancel:t.cancel,open:function(e){return t.openAmount(i)},close:function(e){return t.closeAmount(i)}},scopedSlots:t._u([{key:"input",fn:function(){return[e("v-text-field",{attrs:{label:"Enter amount","single-line":"",type:"number"},model:{value:t.amountUsed,callback:function(e){t.amountUsed=e},expression:"amountUsed"}})]},proxy:!0}],null,!0)},[null!=i.AmountUsed?e("span",{staticClass:"text-mandatory"},[t._v(t._s(t._f("currency")(i.AmountUsed)))]):e("em",[t._v("--")])]):null!=i.AmountUsed?e("span",[t._v(" "+t._s(t._f("currency")(i.AmountUsed)))]):t._e()],1),e("td",[i.IsEditable?e("v-edit-dialog",{attrs:{"return-value":i.AmountUsedComment,lazy:"","multi-line":""},on:{"update:returnValue":function(e){return t.$set(i,"AmountUsedComment",e)},"update:return-value":function(e){return t.$set(i,"AmountUsedComment",e)},save:function(e){return t.saveDescription(i)},cancel:t.cancel,open:function(e){return t.openDescription(i)},close:function(e){return t.closeDescription(i)}},scopedSlots:t._u([{key:"input",fn:function(){return[e("v-text-field",{attrs:{label:"Enter comment","single-line":""},model:{value:t.description,callback:function(e){t.description=e},expression:"description"}})]},proxy:!0}],null,!0)},[i.AmountUsedComment?e("span",{staticClass:"text-mandatory"},[t._v(t._s(i.AmountUsedComment))]):e("em",[t._v("report usage")])]):e("span",[t._v(" "+t._s(i.AmountUsedComment)+" ")])],1)]}}],null,!0)}):t._e(),e("table",{staticClass:"d-flex align-right",staticStyle:{"flex-direction":"column"}},[e("tr",[e("td",{staticClass:"pr-3"},[e("h3",{staticClass:"cardTitle mt-3 no-wrap text-left"},[t._v("Total amount:")])]),e("td",[e("h3",{staticClass:"cardTitle mt-3 no-wrap text-left"},[t._v(" "+t._s(t._f("currency")(t.totalAmount(n)))+" ")])])]),e("tr",[e("td",{staticClass:"pr-3"},[e("h3",{staticClass:"cardTitle mt-3 no-wrap text-left"},[t._v("Total amount used:")])]),e("td",[e("h3",{staticClass:"cardTitle mt-3 no-wrap text-left"},[t._v(" "+t._s(t._f("currency")(t.totalAmountUsed(n)))+" ")])])])])],1)})),0)],1)],1),e("v-btn",{staticClass:"button mt-4 ml-0",staticStyle:{width:"10%"},attrs:{disabled:!t.canEditAndSubmit,color:"success"},on:{click:t.openSubmitModal}},[t._v(" Submit ")]),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.showAccountingModal,callback:function(e){t.showAccountingModal=e},expression:"showAccountingModal"}},[e("submit-accounting-modal",{on:{close:function(e){return t.submitAccounting(e)}}})],1)],1)},Lf=[],Mf=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to submit accounting?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},kf=[],Of={methods:{close:function(t){this.$emit("close",t)}}},Ff=Of,$f=(0,f.Z)(Ff,Mf,kf,!1,null,null,null),Zf=$f.exports,Gf={name:"Accounting",inject:["getWizardStatus"],components:{SubmitAccountingModal:Zf},data:function(){return{headers:[{text:"Rate",value:"RateNo",sortable:!1,width:"10%"},{text:"Post",value:"Name",sortable:!1},{text:"Applied amount",value:"Amount",sortable:!1},{text:"Applied description",value:"AmountComment",sortable:!1,width:"30%"},{text:"Used amount",value:"AmountUsed",sortable:!1},{text:"Used description",value:"AmountUsedComment",sortable:!1,width:"30%"}],isLoading:!1,amountUsed:null,description:null,lastKeyPressed:null,showAccountingModal:!1,submitErrors:""}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.statusReport","grants.accounting","grants.installmentWizard"])),{},{canEditAndSubmit:function(){return this.installmentWizard&&this.installmentWizard.AccountingState===dm.CanEditAndSubmit}}),methods:{dividedAccounting:function(){var t=[];return this.accounting.BudgetLineList&&(t=Object.groupBy(this.accounting.BudgetLineList,(function(t){var e=t.RateNo;return e})),t=Object.keys(t).reduce((function(e,n){return[].concat((0,Kt.Z)(e),[t[n]])}),[])),t},totalAmount:function(t){var e=t.reduce((function(t,e){return t+e.Amount}),0);return e},totalAmountUsed:function(t){var e=t.reduce((function(t,e){return t+e.AmountUsed}),0);return e},openSubmitModal:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.showAccountingModal=!0;case 1:case"end":return e.stop()}}),e)})))()},submitAccounting:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.submitErrors="",!t){n.next=4;break}return n.next=4,e.$store.dispatch(ti).then((function(){e.getWizardStatus()})).catch((function(t){e.submitErrors=t.response.data.Messages[0].Message}));case 4:e.showAccountingModal=!1;case 5:case"end":return n.stop()}}),n)})))()},cancel:function(){},openAmount:function(t){this.amountUsed=t.AmountUsed},closeAmount:function(t){this.saveAmount(t),this.openNextDescriptionEditDialog(t)}
1,saveAmount:function(t){var e=this;console.log(t),this.amountUsed&&(this.isLoading=!0,this.$store.dispatch(Oi,{accountingId:t.Id,amount:this.amountUsed}).then((function(t){e.$store.dispatch(Xn),e.isLoading=!1})))},openDescription:function(t){this.description=t.AmountUsedComment},closeDescription:function(t){this.saveDescription(t),this.openNextAmountEditDialog(t)},saveDescription:function(t){var e=this;this.description&&(this.isLoading=!0,this.$store.dispatch(Fi,{reportId:this.installmentWizard.StatusReportId,accountingPostId:t.Id,description:JSON.stringify(this.description)}).then((function(t){e.$store.dispatch(Xn),e.isLoading=!1})))},openNextDescriptionEditDialog:function(t){this.activateEditDialog(t,1)},openNextAmountEditDialog:function(t){this.activateEditDialog(t,2)},activateEditDialog:function(t,e){if("Enter"===this.lastKeyPressed){this.lastKeyPressed=null;var n=this.accounting.BudgetLineList.filter((function(t){return t.IsEditable})),i=n.indexOf(t),a=2*i+e;if(a<document.getElementsByClassName("v-menu__activator").length){var s=document.getElementsByClassName("v-menu__activator")[a];s.click()}}},recordKeypress:function(t){this.lastKeyPressed=null===t||void 0===t?void 0:t.key}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch(Yi);case 2:return document.addEventListener("keydown",t.recordKeypress,!0),e.next=5,t.$store.dispatch(Xn);case 5:case"end":return e.stop()}}),e)})))()}},Bf=Gf,Uf=(0,f.Z)(Bf,Df,Lf,!1,null,null,null),Wf=Uf.exports,Vf=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[e("v-card-title",{staticClass:"justify-center",attrs:{"primary-title":""}},[e("h3",{staticClass:"cardTitle mb-3",attrs:{"align-center":""}},[t.isResearchfish?e("img",{attrs:{src:n(54380),width:"20"}}):t._e(),t._v(" "+t._s(t.title)+" ")])]),t._l(t.fields,(function(n){return e("v-layout",{key:n.Id,attrs:{row:"",wrap:""}},[e(t.getComponent(n.Type),{tag:"component",class:n.HelpText?"":"fieldWidth",attrs:{field:n,errors:t.validationErrorsMap[n.Id]},on:{update:t.update}}),n.HelpText?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!0)},[e("span",[t._v(t._s(n.HelpText))])]):t._e()],1)}))],2)],1)],1)},zf=[],jf=function(){var t=this,e=t._self._c;return e("v-flex",[1==t.field.FieldHeight?e("v-text-field",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors,readonly:!0}}):e("v-textarea",{attrs:{value:t.value,label:t.label,hint:t.hint,"persistent-hint":!0,box:"","error-messages":t.errors,rows:t.field.FieldHeight,readonly:!0}})],1)},Yf=[],qf={props:["field","update","errors"],computed:{value:function(){return this.field.ContentText},label:function(){return this.field.Name},hint:function(){return this.field.Description}},methods:{}},Hf=qf,Kf=(0,f.Z)(Hf,jf,Yf,!1,null,null,null),Qf=Kf.exports,Jf={components:{readonlyField:Qf},props:{pageId:[String,Number],title:String,fields:Array,isResearchfish:Boolean,readonly:{type:Boolean,default:!1}},data:function(){return{}},methods:{getComponent:function(t){return this.isResearchfish||this.readonly?"readonly-field":U(t)},update:function(t){t.pageId=this.pageId,t.reportId=Number(this.$route.params.reportId),this.$store.dispatch(Ri,t)}},created:function(){},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap"])),(0,Xt.vn)(["application.application","application.files","application.validationErrors"]))},Xf=Jf,tv=(0,f.Z)(Xf,Vf,zf,!1,null,null,null),ev=tv.exports,nv=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("h2",[t._v("Are you sure you want to import data from Researchfish?")]),e("h3",[t._v("NOTE: This operation will take several minutes!")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},iv=[],av={name:"FetchResearchfishModal",methods:{close:function(t){this.$emit("close",t)}}},sv=av,rv=(0,f.Z)(sv,nv,iv,!1,null,null,null),ov=rv.exports,lv={components:{notification:Kl,errorDialog:gt,formAccounting:Wf,formProperties:ev,submitReportModal:Um,fetchResearchfishModal:ov,formAttachments:Xd},props:["id","reportId"],data:function(){return{dataAgreementModal:!1,DataProcessorAgreementAccepted:!1,isLoaded:null,errors:[],accountingValidationErrors:"",submitModal:!1,fetchResearchfishModal:!1,isResearchfishLoading:!1,active:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.statusReport","application.filesImagesGrant","application.validationErrors"])),{},{pagelist:function(){return this.statusReport.DynamicFieldPageList.filter((function(t){return!t.IsResearchfishPage}))},pagelistResearchfish:function(){return this.statusReport.DynamicFieldPageList.filter((function(t){return t.IsResearchfishPage}))},pageErrors:function(){if(this.validationErrors.length>0){var t=this.validationErrors.map((function(t){return t.AppliesTo})),e=this.statusReport.DynamicFieldPageList.reduce((function(e,n){var i=n.DynamicFieldsList.map((function(t){return String(t.Id)}));return e[n.Id]=i.filter((function(e){return-1!==t.indexOf(e)})).length>0,e}),{});return e}return{}}}),mounted:function(){},methods:{openModal:function(){this.reviewModal=!0},closeModal:function(){this.reviewModal=!1},validateMandatoryBudgetlines:function(){var t=this;return this.statusReport.BudgetLineList.find((function(e){return e.RateNo===t.statusReport.RateNo&&(null==e.AmountUsed||0===e.AmountUsed.length||null==e.AmountUsedComment||0===e.AmountUsedComment.trim().length)}))?(this.accountingValidationErrors="All 'used amount' and 'used description' fields are mandatory for rate number "+this.statusReport.RateNo,this.active=this.statusReport.DynamicFieldPageList.length,!1):(this.accountingValidationErrors="",!0)},openSubmitModal:function(t){this.submitModal=!0},closeSubmitModal:function(t){this.submitModal=!1,t&&this.submit()},submit:function(){var t=this;this.validateMandatoryBudgetlines()&&this.$store.dispatch(Li,{reportId:this.reportId}).then((function(e){t.$store.dispatch(Ci,t.id),t.$store.dispatch(sn,t.id),t.$router.push({name:"WizardGrantsReports",params:{id:t.id}})})).catch((function(e){t.$store.commit(zr,e.response.data.Messages)}))},enableEnclosures:function(){return this.application&&(this.application.MaxNumberDocumentsReport>0||this.application.MaxNumberPicturesReport>0)},openResearchfishModal:function(t){this.fetchResearchfishModal=!0},closeResearchfishModal:function(t){this.fetchResearchfishModal=!1,t&&this.fetchResearchfish()},fetchResearchfish:function(){var t=this;this.isResearchfishLoading=!0,this.$store.dispatch($i,{reportId:this.reportId}).then((function(){t.$store.dispatch(Pi,{reportId:t.reportId}).then((function(){t.isResearchfishLoading=!1}))})).catch((function(e){console.log("FEJL: "+e),t.errors=e.response.data.Messages}))},formatResearchfishDate:function(){var t=new Date(Date.parse(this.statusReport.LastUpdatedResearchfishData));
1return t.toLocaleString("da-DK")}},created:function(){var t=this;this.$store.dispatch(sn,this.$route.params.id).then((function(){t.$store.dispatch(jn,{reportId:t.reportId}),t.$store.dispatch(Yn,{reportId:t.reportId}),t.$store.dispatch(Ci,t.$route.params.id).then((function(){t.isLoaded=!0})),t.$store.dispatch(Pi,{reportId:t.reportId}).catch((function(e){t.errors=e.response.data.Messages}))}))}},cv=lv,uv=(0,f.Z)(cv,Sf,Rf,!1,null,null,null),dv=uv.exports,pv=function(){var t=this,e=t._self._c;return e("div",{staticClass:"d-flex justify-center"},[e("grants-wizard-provider",{scopedSlots:t._u([{key:"default",fn:function(n){var i=n.loading;return[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.exitWizard.apply(null,arguments)}}},[t._v("< Back to "+t._s(t.previousPageName)+" ")])],1),i?t._e():e("div",[e("div",{staticClass:"d-flex justify-center"},[e("div",{staticClass:"wizard card",staticStyle:{"max-width":"90%"}},[t.application?e("h1",{staticClass:"headline d-flex align-center pb-3"},[t._v(" "+t._s(t.application.RefNo)+" ")]):t._e(),e("v-card",{staticClass:"pa-5"},[e("div",{staticClass:"d-flex align-center pb-5",staticStyle:{"flex-direction":"column"}},[e("h1",{staticClass:"headline"},[t._v(t._s(t.stepNames[t.step]))])]),e("div",{staticClass:"pb-5"},[e("dot-progress-bar",{attrs:{steps:t.stepNames,stepsWithErrors:t.errors,currentStep:t.step},on:{updateStep:function(e){return t.updateStep(e)}}})],1),e("router-view")],1)],1)])])]}}])})],1)},mv=[],fv=(n(54747),function(){var t=this,e=t._self._c;return e("div",[t._t("default",null,null,{loading:t.loading})],2)}),vv=[],hv={props:{},provide:function(){return{getWizard:this.getWizard,getWizardStatus:this.getWizardStatus}},data:function(){return{loading:!1}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.getWizard();case 3:t.loading=!1;case 4:case"end":return e.stop()}}),e)})))()},methods:{getWizard:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.application&&t.application.appId){e.next=3;break}return e.next=3,t.getApplication();case 3:if(t.installmentWizard){e.next=6;break}return e.next=6,t.getWizardStatus();case 6:case"end":return e.stop()}}),e)})))()},getApplication:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch(sn,t.$route.params.id);case 2:case"end":return e.stop()}}),e)})))()},getWizardStatus:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.$route.params.rateid,!n){e.next=6;break}return e.next=4,t.$store.dispatch(qi,{rateId:n});case 4:e.next=8;break;case 6:return e.next=8,t.$store.dispatch(Yi);case 8:case"end":return e.stop()}}),e)})))()}},computed:(0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.installmentWizard"]))},gv=hv,_v=(0,f.Z)(gv,fv,vv,!1,null,null,null),Iv=_v.exports,Av={components:{DotProgressBar:Dc,GrantsWizardProvider:Iv},provide:function(){var t=this;return{nextStep:this.nextStep,prevStep:this.prevStep,exitWizard:this.exitWizard,hasNextStep:function(){return t.hasNextStep},hasPrevStep:function(){return t.hasPrevStep}}},data:function(){return{visited:{Report:!1,Accounting:!1,"Budget change":!1,"Payment details":!1},previousPage:"",previousPageName:""}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.getPreviousPage(),t.installmentWizard&&t.navigateToDefaultStep();case 2:case"end":return e.stop()}}),e)})))()},methods:{navigateToDefaultStep:function(){var t=this,e=this.viewableSteps.findIndex((function(e){return e.name===t.defaultState}));this.navigate(e)},getPreviousPage:function(){this.previousPage=localStorage.getItem("previousPage")||"ApplicationGrantsFunding",this.previousPageName=this.previousPage.replace("ApplicationGrants","")},updateStep:function(t){this.navigate(t)},navigate:function(t){var e=this.viewableSteps[t];if(e){this.checkVisited(t);var n=this.viewableSteps[this.step];if(n&&e.name===n.name)return;this.$router.push({name:"WizardGrants".concat(e.name).replace(" ",""),params:e.params})}else{var i=this;setTimeout((function(){i.navigate(t)}),100)}},checkVisited:function(t){var e=this;this.viewableSteps.forEach((function(n){var i=e.stepNameToIndex(n.name);(t>i||t===e.stepNameToIndex("Submit"))&&(e.visited[n.name]=!0)}))},nextStep:function(){this.step+1<this.viewableSteps.length&&this.updateStep(this.step+1)},prevStep:function(){this.step-1>=0&&this.updateStep(this.step-1)},exitWizard:function(){this.$router.push({name:this.previousPage,params:{id:this.$route.params.id}})},stepNameToIndex:function(t){return this.viewableSteps.findIndex((function(e){return e.name===t}))}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.installmentWizard"])),{},{step:function(){var t=this;return this.viewableSteps.findIndex((function(e){return e.name.replace(" ","")===t.$route.name.replace("WizardGrants","")}))},hasNextStep:function(){return this.step+1<this.viewableSteps.length},hasPrevStep:function(){return this.step-1>=0},statusReportTypeText:function(){return this.installmentWizard.StatusReportTypeText},defaultState:function(){return this.installmentWizard.WizardApplicantState===cm.CanSee||this.installmentWizard.StatusReportState===um.CanEditAndSubmit||this.installmentWizard.StatusReportState===um.ReturnedWithComments?"Report":this.installmentWizard.AccountingState===dm.CanEditAndSubmit||this.installmentWizard.AccountingState===dm.ReturnedWithComments?"Accounting":this.installmentWizard.BudgetChangeState===pm.CanEditAndSubmit||this.installmentWizard.BudgetChangeState===pm.ReturnedWithComments||this.installmentWizard.BudgetChangeState===pm.CanBeCreated?"Budget change":this.installmentWizard.WizardSubmitState===mm.CanSubmit?"Submit":this.installmentWizard.PayoutState!==fm.Unavailable?"Payment details":this.viewableSteps[0].name},viewableSteps:function(){var t=this,e=[];return this.installmentWizard?(this.installmentWizard.StatusReportState!==um.Unavailable&&e.push({text:this.statusReportTypeText,name:"Report",params:{id:"".concat(this.application.Id),reportId:"".concat(this.installmentWizard.StatusReportId)}}),this.installmentWizard.AccountingState!==dm.Unavailable&&e.push({text:"Accounting",name:"Accounting",params:{}}),this.installmentWizard.BudgetChangeState!==pm.Unavailable&&e.push({text:"Budget
1change",name:"Budget change",params:{}}),this.installmentWizard.PayoutState!==fm.Unavailable&&e.push({text:"Payment details",name:"Payment details",params:{}}),this.installmentWizard.WizardSubmitState!==mm.Unavailable&&e.push({text:"Submit",name:"Submit",params:{}}),this.$route.params.rateid&&(e=e.map((function(e){return e.params=(0,Dt.Z)((0,Dt.Z)({},e.params),{},{rateid:t.$route.params.rateid}),e}))),e):e},stepsValid:function(){return{Report:this.installmentWizard.StatusReportState===um.Submitted,Accounting:this.installmentWizard.AccountingState===dm.Submitted,"Budget change":this.installmentWizard.BudgetChangeState===pm.Submitted,"Payment details":this.installmentWizard.PayoutState!==fm.MissingAccept,Submit:!0}},stepNames:function(){return this.viewableSteps.map((function(t){return t.text}))},errors:function(){var t=this,e=[];return this.viewableSteps.forEach((function(n){var i=t.stepNameToIndex(n.name);i>-1&&!t.stepsValid[n.name]&&t.visited[n.name]&&e.push(n.text)})),e}}),watch:{viewableSteps:{handler:function(){this.checkVisited(this.step)}}}},bv=Av,xv=(0,f.Z)(bv,pv,mv,!1,null,null,null),Cv=xv.exports,yv=function(){var t=this,e=t._self._c;return e("div",[t._v(" "+t._s(t.messages)+" "),e("message-list",{attrs:{items:t.messages}})],1)},wv=[],Tv=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",[t.messages&&t.messages.length>0?e("v-list",{attrs:{"two-line":""}},[t._l(t.messages,(function(n,i){return[n.header?e("v-subheader",{key:n.header},[t._v(" "+t._s(n.header)+" ")]):t._e(),e("v-list-tile",{key:i,staticClass:"message-tile",class:n.Id===t.activeItem?"highlighted":"",attrs:{"active-class":"highlighted",avatar:""},on:{click:function(e){return t.showThread(n)}}},[e("v-list-tile-avatar",[t.profile?e("span",{staticClass:"icon"},[t._v(t._s(t.initials(n.FromName)))]):t._e()]),"inbox"==t.type?e("v-list-tile-content",[e("v-list-tile-title",{class:{strong:!n.IsRead},domProps:{innerHTML:t._s(n.FromName)}}),e("v-list-tile-sub-title",[e("span",{staticClass:"text--primary",class:{strong:!n.IsRead}},[t._v(t._s(n.Subject))]),t._v(" â "),e("span",{class:{strong:!n.IsRead}},[t._v(t._s(t._f("moment")(n.ThreadDateTime,"MMM D, LT")))])])],1):t._e(),"sent"==t.type?e("v-list-tile-content",[e("v-list-tile-title",{class:{strong:!n.IsRead},domProps:{innerHTML:t._s(n.Subject)}}),e("v-list-tile-sub-title",[e("span",{staticClass:"text--primary",class:{strong:!n.IsRead}},[t._v(t._s(n.Text))]),t._v(" â "),e("span",{class:{strong:!n.IsRead}},[t._v(t._s(t._f("moment")(n.Date,"MMM D, LT")))])])],1):t._e(),"draft"==t.type?e("v-list-tile-content",[e("v-list-tile-title",{class:{strong:!n.IsRead},domProps:{innerHTML:t._s("[Draft]"+n.Subject)}}),e("v-list-tile-sub-title",[e("span",{staticClass:"text--primary",class:{strong:!n.IsRead}},[t._v(t._s(n.Text))])])],1):t._e(),"inbox"==t.type?e("v-list-tile-action",[n.HasAttachments?e("v-icon",{attrs:{color:"light"}},[t._v("attach_file")]):t._e()],1):e("v-list-tile-action",[n.AttachmentCnt?e("v-icon",{attrs:{color:"light"}},[t._v("attach_file")]):t._e()],1)],1),i<t.messages.length-1?e("v-divider",{key:n.Id,attrs:{inset:n.inset}}):t._e()]}))],2):e("p",{staticClass:"mt-3"},[t._v("No "+t._s(t.type)+" messages.")])],1)],1)],1)},Nv=[],Ev={name:"MessageList",props:["items","type","toggleReset"],data:function(){return{activeItem:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["user.profile"])),{},{messages:function(){return(0,Kt.Z)(this.items).reverse()}}),methods:{showThread:function(t){"draft"===this.type?this.$emit("editDraft",t):(this.$emit("showThread",t),this.activeItem=t.Id)},send:function(){this.$emit("send")},initials:function(t){t||(t=this.profile.FirstName.slice(0,1)+" "+this.profile.LastName.slice(0,1)),t||(t="Not Available");var e=name.match(/\b\w/g)||[];return((e.shift()||"")+(e.pop()||"")).toUpperCase()},reset:function(){this.activeItem=null}},watch:{toggleReset:function(){this.reset()}}},Pv=Ev,Sv=(0,f.Z)(Pv,Tv,Nv,!1,null,null,null),Rv=Sv.exports,Dv={components:{MessageList:Rv},data:function(){return{}},computed:(0,Dt.Z)({},(0,Xt.vn)(["messages.messages"])),mounted:function(){this.$store.dispatch(Qi)},methods:{},created:function(){}},Lv=Dv,Mv=(0,f.Z)(Lv,yv,wv,!1,null,null,null),kv=Mv.exports,Ov=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard messages-wizard"},[e("div",{staticClass:"card profile wizard-fullscreen px-0 py-0"},[t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):[e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"ApplicationList"})}}},[t._v("< Back to overview ")]),e("br")],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[e("h1",{staticClass:"headline mb-2"},[t._v("Messages - Application "+t._s(t.applicationMessages.ReferenceId))])])])]),t.applicationMessages?e("v-tabs",{attrs:{color:"transparent"},on:{change:t.onTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("inbox")]),t._v(" Inbox "),0!==t.inboxUnreadCount?e("span",[t._v(" ("+t._s(t.inboxUnreadCount)+")")]):t._e()],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("send")]),t._v(" Sent")],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("insert_drive_file")]),t._v(" Drafts "),t.applicationMessages.DraftMessageList.length?[t._v("("+t._s(t.applicationMessages.DraftMessageList.length)+")")]:t._e()],2),e("v-container",{staticClass:"buttons w-100"},[e("v-layout",[e("v-flex",{attrs:{sm1:""}}),e("v-flex",{attrs:{sm1:""}},[e("br"),e("br"),e("v-btn",{attrs:{color:"success",large:""},on:{click:t.openEditModal}},[t._v("New message  "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1)],1)],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.applicationMessages.InboxMessageThreadList,type:"inbox"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"inbox"},on:{reply:t.reply,editDraft:t.editDraft,editInboxDraft:t.editInboxDraft}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.applicationMessages.SentMessageList,type:"sent"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"sent"},on:{reply:t.reply}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.applicationMessages.DraftMessageList,type:"draft"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage,editDraft:t.editDraft}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread}}
1)],1):t._e()],1)],1),e("v-tab-item")],1):t._e()]],2)]),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px"},on:{input:function(e){return e||t.resetEdit()}},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-message-modal",{attrs:{replyThread:t.replyThread,inboxMessage:t.editInboxMessage,appId:t.id,title:"Application - "+t.applicationMessages.ReferenceId,isDraft:t.isDraft},on:{close:t.closeEditModal,update:t.update}})],1):t._e()],1)},Fv=[],$v=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pt-0"},[e("v-card",[e("v-card-text",["inbox"==t.type?[e("v-layout",{staticClass:"mb-4",attrs:{row:"",wrap:"","align-center":""}},[e("v-flex",{attrs:{xs8:""}},[e("h2",{staticClass:"headline mb-0"},[t._v(t._s(t.thread.Subject))])]),e("v-flex",{attrs:{xs4:"","text-xs-right":""}},[e("v-btn",{staticClass:"mr-0",attrs:{color:"primary"},on:{click:function(e){return t.reply()}}},[e("v-icon",[t._v("reply")]),t._v(" Reply")],1)],1)],1),t._l(t.reverse(t.thread.Messages),(function(n,i){return e("v-card",{key:i,staticClass:"mb-3",class:{"blue-grey lighten-5 cursor-pointer":n.IsDraft,"lime lighten-5":n.SenderIsMe&&!n.IsDraft},on:{click:function(e){return t.showMessage(n)}}},[e("v-card-title",{attrs:{"primary-title":""}},[e("v-layout",{staticClass:"align-start",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs9:""}},[e("v-layout",{staticClass:"w-100 break-word",attrs:{row:"",wrap:""}},[e("v-avatar",{staticClass:"mr-3"},[t.profile?e("span",{staticClass:"icon"},[t._v(t._s(t.initials(n.SenderName)))]):t._e()]),e("div",{staticClass:"w-70"},[n.SenderIsMe?e("h3",{staticClass:"headline mb-0"},[t._v(t._s(t.profile.FirstName))]):e("h3",{staticClass:"headline mb-0"},[t._v(t._s(n.SenderName))]),n.Date?e("p",{staticClass:"mb-0"},[t._v(t._s(t._f("moment")(n.Date,"MMM D, LT")))]):t._e()])],1)],1),n.IsDraft?e("v-flex",{staticClass:"text-xs-right",attrs:{xs3:""}},[n.IsDraft?e("v-chip",{staticClass:"cursor-pointer",attrs:{small:""}},[t._v("Draft")]):t._e()],1):t._e()],1)],1),e("v-card-title",{staticClass:"pt-0 break-word"},[n.Text?e("div",{class:{pre:!t.isHtmlEmail(n.Text)},domProps:{innerHTML:t._s(n.Text)}}):t._e()]),e("v-card-text",[n.AttachmentList&&n.AttachmentList.length>0?e("div",[e("p",[t._v("Attachments ("+t._s(n.AttachmentList.length)+"):")]),n.AttachmentList&&n.AttachmentList.length?t._l(n.AttachmentList,(function(i){return e("p",{key:i.Id},[e("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.Id,i.Id)}}},[e("v-icon",{key:i.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(i.FileName))],1)])})):e("p",[t._v(" - ")])],2):t._e()])],1)}))]:e("v-card",{staticClass:"mb-3"},[e("v-card-title",{attrs:{"primary-title":""}},[e("v-avatar",{staticClass:"mr-3"},[t.profile?e("span",{staticClass:"icon"},[t._v(t._s(t.initials()))]):t._e()]),e("div",[e("h3",{staticClass:"headline mb-0"},[t._v(t._s(t.thread.Subject))])])],1),e("v-card-title",{staticClass:"pt-0"},[t.thread.Text?e("div",{class:{pre:!t.isHtmlEmail(t.thread.Text)},domProps:{innerHTML:t._s(t.thread.Text)}}):t._e()]),e("v-card-text",[t.thread.AttachmentList&&t.thread.AttachmentList.length>0?e("div",[e("p",[t._v("Attachments ("+t._s(t.thread.AttachmentList.length)+"):")]),t.thread.AttachmentList&&t.thread.AttachmentList.length?t._l(t.thread.AttachmentList,(function(n){return e("p",{key:n.Id},[e("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(t.thread.Id,n.Id)}}},[e("v-icon",{key:n.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(n.FileName))],1)])})):e("p",[t._v(" - ")])],2):t._e()])],1)],2)],1)],1)},Zv=[],Gv={name:"ThreadList",props:["type"],data:function(){return{}},computed:(0,Dt.Z)({},(0,Xt.vn)(["user.profile","messages.thread"])),mounted:function(){},methods:{send:function(){this.$emit("send")},reply:function(){this.$emit("reply",this.thread)},downloadAttachment:function(t,e){this.$store.dispatch(ca,{messageId:t,fileId:e})},initials:function(t){return t||(t=this.profile.FirstName.slice(0,1)+" "+this.profile.LastName.slice(0,1)),t.match(/\b\w/g).join("").replace(/[^a-zÃÃÆÆÆÆÄ²ÅÅáºÃÇ·ÈæðÇÉÉɣijÅÅĸſÃþƿÈÄÆÃÄÆÄĦĮÆÅÃÆ ÅÈÅ¢ÈŦŲƯY̨ƳÄ
ÉçÄÉÄħįÆÅøơÅÈÅ£Èŧųưy̨ƴÃÃÃÃÇÄÄ
1ÃÃ
ǺÄÃǼǢÆÄÄÄÄÃÄá¸ÄÆÃÃÃÄÃÃÄÄÄÄáº¸ÆÆÆÄ ÄǦÄÄ¢ÆÃ¡Ã âäÇÄÄãåǻÄ
æǽǣÉÄÄÄÄçÄá¸ÄÉðéèÄêëÄÄÄÄẹÇÉÉÄ¡ÄǧÄģɣĤḤĦIÃÃİÃÃÇĬĪĨĮá»Ä²Ä´Ä¶ÆÄ¹Ä»ÅĽĿʼNÅNÌÅÃÅ
ÅÃÃÃÃÇÅÅÃÅá»ÃÇ¾Æ ÅĥḥħıÃìiîïÇÄīĩįá»Ä³ÄµÄ·ÆÄ¸ÄºÄ¼ÅľÅÅÅnÌÅñÅÅóòôöÇÅÅõÅá»Ã¸Ç¿Æ¡ÅÅÅÅÅÅÅ ÅÈá¹¢áºÅ¤Å¢á¹¬Å¦ÃÃÃÃÃÇŬŪŨŰŮŲỤƯáºáºÅ´áºÇ·ÃỲŶŸȲỸƳŹŻŽáºÅÅÅÅ¿ÅÅÅ¡ÅÈá¹£Ãťţá¹Å§Ã¾ÃºÃ¹Ã»Ã¼ÇÅūũűůųụưáºáºÅµáº
ƿýỳŷÿȳỹƴźżžáº]/gi,"").slice(0,2).toUpperCase()},isHtmlEmail:function(t){return t.startsWith("<!DOCTYPE")},reverse:function(t){if(t)return(0,Kt.Z)(t).reverse().sort((function(t,e){var n=t.Date>e.Date;return n?-1:1}))},showMessage:function(t){t.IsDraft&&this.$emit("editInboxDraft",t,this.thread.Id)}},created:function(){}},Bv=Gv,Uv=(0,f.Z)(Bv,$v,Zv,!1,null,null,null),Wv=Uv.exports,Vv=function(){var t=this,e=t._self._c;return e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(" New message ")]),e("v-layout",{attrs:{"justify-end":""}},[e("v-btn",{attrs:{icon:""},on:{click:t.close}},[e("v-icon",[t._v("close")])],1)],1)],1),e("v-card-text",[t.replyThread?[e("p",[t._v("To: "+t._s(t.replyThread.FromName))]),e("p",[t._v("Subject: "+t._s(t.replyThread.Subject))])]:[e("p",[t._v("To: Lundbeck Foundation")])],t.messages.files&&t.messages.files.length>0?e("div",[e("p",[t._v("Attachments ("+t._s(t.messages.files.length)+"):")]),t.messages.files&&t.messages.files.length?t._l(t.messages.files,(function(n){return e("p",{key:n.Id},[e("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.downloadAttachment(n.Id)}}},[e("v-icon",{key:n.Id,attrs:{small:""}},[t._v("attach_file")]),t._v(" "+t._s(n.FileName))],1),t._v(" "),e("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.stopPropagation(),t.removeAttachment(n.Id)}}},[e("v-icon",{key:n.Id,attrs:{small:""}},[t._v("delete")])],1)])})):e("p",[t._v(" - ")])],2):t._e(),e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[t.replyThread||t.inboxMessage?t._e():e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Subject",autocomplete:"none",box:"",required:""},on:{blur:t.updateSubject},model:{value:t.message.Subject,callback:function(e){t.$set(t.message,"Subject",e)},expression:"message.Subject"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-textarea",{attrs:{rules:t.textRules,label:"Message",box:"","auto-grow":"",rows:"5"},on:{blur:t.updateMessage},model:{value:t.message.Text,callback:function(e){t.$set(t.message,"Text",e)},expression:"message.Text"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{staticClass:"disabledInput",attrs:{label:"Select file","append-icon":"attach_file",box:"","error-messages":t.error},on:{click:t.pickFile},model:{value:t.fileName,callback:function(e){t.fileName=e},expression:"fileName"}}),e("input",{ref:"file",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:t.onFilePicked}})],1)],1)],2),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"light"},on:{click:t.remove}},[e("v-icon",{attrs:{small:""}},[t._v("delete")])],1),e("v-btn",{attrs:{color:"light"},on:{click:t.close}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"primary"},on:{click:t.send}},[t._v(" Send ")])],1)],1)},zv=[],jv={name:"EditMessageModal",props:["title","appId","replyThread","nominationId","nomineeId","isDraft","inboxMessage"],data:function(){return{valid:!1,textRules:[function(t){return!!t||"Message is required"}],fileName:null,fileData:null,error:null}},computed:(0,Dt.Z)({},(0,Xt.vn)({message:"messages.message",messages:"messages"})),methods:{send:function(){this.$refs.form.validate()&&(this.close(),this.replyThread?this.sendReply():this.$emit("update",this.message))},close:function(){this.$emit("close")},attach:function(){this.$emit("attach")},updateSubject:function(t){var e=this;this.$store.dispatch(sa,{messageId:this.message.Id,subject:JSON.stringify(t.target.value)}).then((function(){e.appId&&e.$store.dispatch(Ji,e.appId),e.nominationId&&e.$store.dispatch(ta,e.nominationId),e.nomineeId&&e.$store.dispatch(fa,e.nomineeId)}))},updateMessage:function(t){var e=this;this.$store.dispatch(ra,{messageId:this.message.Id,text:JSON.stringify(t.target.value)}).then((function(){e.appId&&e.$store.dispatch(Ji,e.appId),e.nominationId&&e.$store.dispatch(ta,e.nominationId),e.nomineeId&&e.$store.dispatch(fa,e.nomineeId)}))},sendReply:function(){var t=this;this.$store.dispatch(ra,{messageId:this.message.Id,text:JSON.stringify(this.message.Text)}).then((function(){t.$store.dispatch(ia,{messageId:t.message.Id}).then((function(){t.$store.dispatch(aa,{messageId:t.message.Id}).then((function(){t.appId&&t.$store.dispatch(Ji,t.appId).then((function(){t.$store.dispatch(ma,{thread:t.$store.getters.applicationMessagesInboxThreadById(t.replyThread.Id)})})),t.nominationId&&t.$store.dispatch(ta,t.nominationId).then((function(){t.$store.dispatch(ma,{thread:t.$store.getters.nominationMessagesInboxThreadById(t.replyThread.Id)})})),t.nomineeId&&t.$store.dispatch(fa,t.nomineeId)}))}))}))},attachFile:function(){var t=this,e={Filename:this.fileName,FileContent:this.fileData};this.$store.dispatch(da,{messageId:this.message.Id,fileContent:e}).then((function(){t.$store.dispatch(pa,{messageId:t.message.Id})}))},pickFile:function(){this.$refs.file.click()},onFilePicked:function(t){var e=this,n=t.target.files;if(void 0!==n[0]){if(this.fileName=n[0].name,this.fileName.lastIndexOf(".")<=0)return;var i=new FileReader;i.readAsDataURL(n[0]),i.addEventListener("load",(function(){var t=i.result.replace(/^data:(.*;base64,)?/,"");t.length%4>0&&(t+="=".repeat(4-t.length%4)),e.fileData=t,e.fileData&&e.attachFile()}))}else this.fileName=null,this.fileData=null},downloadAttachment:function(t){this.$store.dispatch(ca,{messageId:this.message.Id,fileId:t})},removeAttachment:function(t){var e=this;this.$store.dispatch(ua,{messageId:this.message.Id,fileId:t}).then((function(){e.$store.dispatch(pa,{messageId:e.message.Id})}))},remove:function(){var t=this;this.$store.dispatch(la,{messageId:this.message.Id}).then((function(){t.appId&&t.$store.dispatch(Ji,t.appId).then((function(){t.close()})),t.nominationId&&t.$store.dispatch(ta,t.nominationId).then((function(){t.close()})),t.nomineeId&&t.$store.dispatch(fa,t.nomineeId).then((function(){t.close()}))}))}},created:function(){this.$store.dispatch(pa,{messageId:this.message.Id})}},Yv=jv,qv=(0,f.Z)(Yv,Vv,zv,!1,null,null,null),Hv=qv.exports,Kv={components:{MessageList:Rv,ThreadList:Wv,EditMessageModal:Hv},props:{id:[Number,String]},data:function(){return{thread:null,isLoading:!0,polling:null,editDialog:!1,reset:!1,replyThread:null,isDraft:!1,activeTab:0,editInboxMessage:!1,editThread:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["messages.applicationMessages"])),{},{inboxUnreadCount:function(){return this.applicationMessages.InboxMessageThreadList.filter((function(t){return!t.IsRead})).length||0}}
1),mounted:function(){this.init()},watch:{id:function(){this.init()}},methods:{init:function(){var t=this;this.isLoading=!0,this.$store.dispatch(Ji,this.id).then((function(){t.isLoading=!1}))},pollMessages:function(){var t=this;this.polling=setInterval((function(){t.$store.dispatch(Ji,t.id)}),1e4)},openEditModal:function(t){var e=this;this.$store.dispatch(Xi,this.id).then((function(){e.editDialog=!0,e.activeTab=2}))},closeEditModal:function(){this.editDialog=!1,this.resetEdit()},update:function(t){var e=this;this.activeTab=1,this.$store.dispatch(ia,{messageId:t.Id}).then((function(){e.$store.dispatch(Ji,e.id)}))},resetEdit:function(){var t=this;this.replyThread=null,this.isDraft=!1,this.editInboxMessage&&this.$store.dispatch(Ji,this.id).then((function(){t.$store.dispatch(ma,{thread:t.$store.getters.applicationMessagesInboxThreadById(t.editThread)}).then((function(){t.editInboxMessage=!1,t.editThread=null}))}))},editMessage:function(t){var e=this;this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editDraft:function(t){var e=this;this.isDraft=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editInboxDraft:function(t,e){var n=this;this.editThread=e,this.isDraft=!0,this.editInboxMessage=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){n.editDialog=!0}))},readMessages:function(t){var e=this;t.IsRead||t.Messages.length>0&&t.Messages.forEach((function(t){t.IsRead||e.$store.dispatch(aa,{messageId:t.Id}).then((function(){e.$store.dispatch(Ji,e.id)}))}))},showThread:function(t){this.thread=t,this.$store.dispatch(ma,{thread:t}),this.readMessages(t)},send:function(){this.$store.dispatch(Xi,this.id)},onTabChange:function(){this.thread=null,this.reset=!this.reset},reply:function(t){var e=this;this.replyThread=t,this.$store.dispatch(na,{threadId:t.Id}).then((function(t){e.editDialog=!0}))}},beforeDestroy:function(){clearInterval(this.polling)},created:function(){this.pollMessages()}},Qv=Kv,Jv=(0,f.Z)(Qv,Ov,Fv,!1,null,null,null),Xv=Jv.exports,th=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard messages-wizard"},[e("div",{staticClass:"card profile wizard-fullscreen px-0 py-0"},[t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):[e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"NominationList"})}}},[t._v("< Back to overview ")]),e("br")],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[e("h1",{staticClass:"headline mb-2"},[t._v("Messages - Nomination "+t._s(t.nominationMessages.ReferenceId))])])])]),t.nominationMessages?e("v-tabs",{attrs:{color:"transparent"},on:{change:t.onTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("inbox")]),t._v(" Inbox "),0!==t.inboxUnreadCount?e("span",[t._v(" ("+t._s(t.inboxUnreadCount)+")")]):t._e()],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("send")]),t._v(" Sent")],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("insert_drive_file")]),t._v(" Drafts "),t.nominationMessages.DraftMessageList.length?[t._v("("+t._s(t.nominationMessages.DraftMessageList.length)+")")]:t._e()],2),e("v-container",{staticClass:"buttons w-100"},[e("v-layout",[e("v-flex",{attrs:{sm1:""}}),e("v-flex",{attrs:{sm1:""}},[e("br"),e("br"),e("v-btn",{attrs:{color:"success",large:""},on:{click:t.openEditModal}},[t._v("New message  "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1)],1)],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nominationMessages.InboxMessageThreadList,type:"inbox"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"inbox"},on:{reply:t.reply,editDraft:t.editDraft,editInboxDraft:t.editInboxDraft}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nominationMessages.SentMessageList,type:"sent"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"sent"},on:{reply:t.reply}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nominationMessages.DraftMessageList,type:"draft"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage,editDraft:t.editDraft}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread}}
1)],1):t._e()],1)],1),e("v-tab-item")],1):t._e()]],2)]),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px"},on:{input:function(e){return e||t.resetEdit()}},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-message-modal",{attrs:{replyThread:t.replyThread,inboxMessage:t.editInboxMessage,nominationId:t.id,title:"Nomination - "+t.nominationMessages.ReferenceId,isDraft:t.isDraft},on:{close:t.closeEditModal,update:t.update}})],1):t._e()],1)},eh=[],nh={components:{MessageList:Rv,ThreadList:Wv,EditMessageModal:Hv},props:{id:[Number,String]},data:function(){return{thread:null,isLoading:!0,polling:null,editDialog:!1,reset:!1,replyThread:null,isDraft:!1,activeTab:0,editInboxMessage:!1,editThread:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["messages.nominationMessages"])),{},{inboxUnreadCount:function(){return this.nominationMessages.InboxMessageThreadList.filter((function(t){return!t.IsRead})).length||0}}),mounted:function(){this.init()},watch:{id:function(){this.init()}},methods:{init:function(){var t=this;this.isLoading=!0,this.$store.dispatch(ta,this.id).then((function(){t.isLoading=!1}))},pollMessages:function(){var t=this;this.polling=setInterval((function(){t.$store.dispatch(ta,t.id)}),1e4)},openEditModal:function(t){var e=this;this.$store.dispatch(ea,this.id).then((function(){e.editDialog=!0,e.activeTab=2}))},closeEditModal:function(){this.editDialog=!1,this.resetEdit()},update:function(t){var e=this;this.activeTab=1,this.$store.dispatch(ia,{messageId:t.Id}).then((function(){e.$store.dispatch(ta,e.id)}))},resetEdit:function(){var t=this;this.replyThread=null,this.isDraft=!1,this.editInboxMessage&&this.$store.dispatch(Ji,this.id).then((function(){t.$store.dispatch(ma,{thread:t.$store.getters.nominationMessagesInboxThreadById(t.editThread)}).then((function(){t.editInboxMessage=!1,t.editThread=null}))}))},editMessage:function(t){var e=this;this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editDraft:function(t){var e=this;this.isDraft=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editInboxDraft:function(t,e){var n=this;this.editThread=e,this.isDraft=!0,this.editInboxMessage=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){n.editDialog=!0}))},readMessages:function(t){var e=this;t.IsRead||t.Messages.length>0&&t.Messages.forEach((function(t){t.IsRead||e.$store.dispatch(aa,{messageId:t.Id}).then((function(){e.$store.dispatch(ta,e.id)}))}))},showThread:function(t){this.thread=t,this.$store.dispatch(ma,{thread:t}),this.readMessages(t)},send:function(){this.$store.dispatch(ea,this.id)},onTabChange:function(){this.thread=null,this.reset=!this.reset},reply:function(t){var e=this;this.replyThread=t,this.$store.dispatch(na,{threadId:t.Id}).then((function(t){e.editDialog=!0}))}},beforeDestroy:function(){clearInterval(this.polling)},created:function(){this.pollMessages()}},ih=nh,ah=(0,f.Z)(ih,th,eh,!1,null,null,null),sh=ah.exports,rh=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"wizard application-wizard messages-wizard"},[e("div",{staticClass:"card profile wizard-fullscreen px-0 py-0"},[t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):[e("div",{staticClass:"v-tabs"},[e("div",{staticClass:"v-tabs__bar"},[e("div",{staticClass:"v-tabs-return"},[e("v-btn",{staticClass:"btn-back mt-4",attrs:{flat:""},on:{click:function(e){return e.preventDefault(),t.$router.push({name:"Home"})}}},[t._v("< Back to Home ")]),e("br")],1)]),e("div",{staticClass:"v-window"},[e("div",{staticClass:"container"},[e("h1",{staticClass:"headline mb-2"},[t._v("Messages - Nomination "+t._s(t.nomineeMessages.ReferenceId))])])])]),t.nomineeMessages?e("v-tabs",{attrs:{color:"transparent"},on:{change:t.onTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("inbox")]),t._v(" Inbox "),0!==t.inboxUnreadCount?e("span",[t._v(" ("+t._s(t.inboxUnreadCount)+")")]):t._e()],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("send")]),t._v(" Sent")],1),e("v-tab",{attrs:{ripple:""}},[e("v-icon",[t._v("insert_drive_file")]),t._v(" Drafts "),t.nomineeMessages.DraftMessageList.length?[t._v("("+t._s(t.nomineeMessages.DraftMessageList.length)+")")]:t._e()],2),e("v-container",{staticClass:"buttons w-100"},[e("v-layout",[e("v-flex",{attrs:{sm1:""}}),e("v-flex",{attrs:{sm1:""}},[e("br"),e("br"),e("v-btn",{attrs:{color:"success",large:""},on:{click:t.openEditModal}},[t._v("New message  "),e("v-icon",{staticClass:"plus",attrs:{color:"success",right:""}},[t._v("add")])],1)],1)],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nomineeMessages.InboxMessageThreadList,type:"inbox"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"inbox"},on:{reply:t.reply,editDraft:t.editDraft,editInboxDraft:t.editInboxDraft}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nomineeMessages.SentMessageList,type:"sent"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread,type:"sent"},on:{reply:t.reply}})],1):t._e()],1)],1),e("v-tab-item",[e("v-layout",{staticClass:"removeMargin",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:""}},[e("message-list",{attrs:{toggleReset:t.reset,items:t.nomineeMessages.DraftMessageList,type:"draft"},on:{send:t.send,showThread:t.showThread,edit:t.editMessage,editDraft:t.editDraft}})],1),t.thread?e("v-flex",{attrs:{xs6:""}},[e("thread-list",{attrs:{items:t.thread}}
1)],1):t._e()],1)],1),e("v-tab-item")],1):t._e()]],2)]),t.editDialog?e("v-dialog",{attrs:{"max-width":"500px"},on:{input:function(e){return e||t.resetEdit()}},model:{value:t.editDialog,callback:function(e){t.editDialog=e},expression:"editDialog"}},[e("edit-message-modal",{attrs:{replyThread:t.replyThread,inboxMessage:t.editInboxMessage,nomineeId:t.id,title:"Nomination - "+t.nomineeMessages.ReferenceId,isDraft:t.isDraft},on:{close:t.closeEditModal,update:t.update}})],1):t._e()],1)},oh=[],lh={components:{MessageList:Rv,ThreadList:Wv,EditMessageModal:Hv},props:{id:[Number,String]},data:function(){return{thread:null,isLoading:!0,polling:null,editDialog:!1,reset:!1,replyThread:null,isDraft:!1,activeTab:0,editInboxMessage:!1,editThread:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["messages.nomineeMessages"])),{},{inboxUnreadCount:function(){return this.nomineeMessages.InboxMessageThreadList.filter((function(t){return!t.IsRead})).length||0}}),mounted:function(){this.init()},watch:{id:function(){this.init()}},methods:{init:function(){var t=this;this.isLoading=!0,this.$store.dispatch(fa,this.id).then((function(){t.isLoading=!1}))},pollMessages:function(){var t=this;this.polling=setInterval((function(){t.$store.dispatch(fa,t.id)}),1e4)},openEditModal:function(t){var e=this;this.$store.dispatch(va,this.id).then((function(){e.editDialog=!0,e.activeTab=2}))},closeEditModal:function(){this.editDialog=!1,this.resetEdit()},update:function(t){var e=this;this.activeTab=1,this.$store.dispatch(ia,{messageId:t.Id}).then((function(){e.$store.dispatch(fa,e.id)}))},resetEdit:function(){var t=this;this.replyThread=null,this.isDraft=!1,this.editInboxMessage&&this.$store.dispatch(Ji,this.id).then((function(){t.$store.dispatch(ma,{thread:t.$store.getters.nomineeMessagesInboxThreadById(t.editThread)}).then((function(){t.editInboxMessage=!1,t.editThread=null}))}))},editMessage:function(t){var e=this;this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editDraft:function(t){var e=this;this.isDraft=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){e.editDialog=!0}))},editInboxDraft:function(t,e){var n=this;this.editThread=e,this.isDraft=!0,this.editInboxMessage=!0,this.$store.dispatch(oa,{messageId:t.Id}).then((function(){n.editDialog=!0}))},readMessages:function(t){var e=this;t.IsRead||t.Messages.length>0&&t.Messages.forEach((function(t){t.IsRead||e.$store.dispatch(aa,{messageId:t.Id}).then((function(){e.$store.dispatch(fa,e.id)}))}))},showThread:function(t){this.thread=t,this.$store.dispatch(ma,{thread:t}),this.readMessages(t)},send:function(){this.$store.dispatch(va,this.id)},onTabChange:function(){this.thread=null,this.reset=!this.reset},reply:function(t){var e=this;this.replyThread=t,this.$store.dispatch(na,{threadId:t.Id}).then((function(t){e.editDialog=!0}))}},beforeDestroy:function(){clearInterval(this.polling)},created:function(){this.pollMessages()}},ch=lh,uh=(0,f.Z)(ch,rh,oh,!1,null,null,null),dh=uh.exports,ph=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"card center"},[t.error?e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Sorry")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v("Something went wrong on our side.")]),e("p",{staticClass:"text-xs-center mb-4"},[t._v(" Please try again or contact us if the problem persists. ")])]):e("v-card",{staticClass:"inner",attrs:{flat:""}},[e("h2",{staticClass:"text-xs-center title mb-3"},[t._v("Accept co-applicant status")]),e("v-layout",{attrs:{column:""}},[e("v-flex",[t.sending?e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}}):e("p",{staticClass:"py-2"},[t._v(" Thank you."),e("br"),t._v(" You have now confirmed that you are "+t._s(t.indefiniteArticle(this.applicantType))+" "+t._s(t.applicantType)+" on the application. ")])],1)],1)],1)],1)},mh=[],fh={props:{token:String},data:function(){return{sending:!0,error:null,applicantType:null}},methods:{indefiniteArticle:H,send:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n,i,a,s;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.sending=!0,n=t.token.split("-"),2!==n.length){e.next=11;break}return i=n[0],a=n[1],e.next=7,t.$store.dispatch(Zn,{ApplicationId:i,CoapplicantId:a}).then((function(e){return t.sending=!1,e})).catch((function(e){t.error=e,t.sending=!1}));case 7:s=e.sent,s.data.Success&&(t.applicantType=s.data.Value.ApplicationApplicantType),e.next=12;break;case 11:t.error="Invalid token";case 12:case"end":return e.stop()}}),e)})))()}},mounted:function(){this.token&&this.send()}},vh=fh,hh=(0,f.Z)(vh,ph,mh,!1,null,null,null),gh=hh.exports,_h=function(){var t=this,e=t._self._c;return e("div",{staticClass:"d-flex flex-column justify-center"},[e("div",[t.isLoading?e("div",{staticClass:"text-sm-center my-5"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"green"}})],1):t._e(),e("error-dialog",{attrs:{errors:t.errors}}),e("v-container",[e("v-layout",{attrs:{row:""}},[e("v-flex",{attrs:{xs8:"",md4:""}},[e("v-layout",{staticClass:"buttons",attrs:{column:""}},[e("v-btn",{staticClass:"button pa-0",attrs:{color:"success",disabled:!t.valid},on:{click:t.submit}},[t._v(" Submit "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1),t.hasPrevStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.prevStep()}}},[e("v-icon",{staticClass:"icon iconBack"},[t._v("keyboard_arrow_left")]),t._v(" Back ")],1):t._e()],1)],1),e("v-flex",{attrs:{xs8:""}},[!t.isLoading&&t.paymentDetails?e("v-form",{ref:"form",staticClass:"d-flex justify-start pr-5",staticStyle:{"max-width":"100%"}
1,attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e("v-flex",[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Civil registration number",box:""},model:{value:t.payment.CivilRegistrationNumber,callback:function(e){t.$set(t.payment,"CivilRegistrationNumber",e)},expression:"payment.CivilRegistrationNumber"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Cvr no",box:""},model:{value:t.payment.BusinessId,callback:function(e){t.$set(t.payment,"BusinessId",e)},expression:"payment.BusinessId"}})],1),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-text-field",{attrs:{label:"Reference number",box:""},model:{value:t.payment.ReferenceNumber,callback:function(e){t.$set(t.payment,"ReferenceNumber",e)},expression:"payment.ReferenceNumber"}})],1),e("payment-details-fields",t._b({},"payment-details-fields",t.payment,!1,!0))],1)],1):t._e()],1)],1)],1),e("div",{staticClass:"d-flex justify-space-between"})],1)])},Ih=[],Ah={components:{paymentDetailsFields:vs,errorDialog:gt},inject:["getWizardStatus","nextStep","prevStep","hasNextStep","hasPrevStep"],data:function(){return{isLoading:!1,paymentMethods:[],payment:{PaymentMethodId:null,CivilRegistrationNumber:null,BusinessId:null,ReferenceNumber:null,RegistrationNumber:null,PaymentMethodList:null,AccountNumber:null,AbaFw:null,Iban:null,SwiftBic:null,AcceptPaymentDetails:!0},valid:!1,errors:[]}},computed:(0,Dt.Z)({},(0,Xt.vn)(["grants.paymentDetails","grants.installmentWizard"])),mounted:function(){},methods:{submit:function(){var t=this;this.isLoading=!0,this.$refs.form.validate()&&this.$store.dispatch(Gi,this.payment).then((function(e){t.errors=[],t.$store.dispatch(Zi),t.getWizardStatus(),t.nextStep()})).catch((function(e){t.errors=e.response.data.Messages})),this.isLoading=!1}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,t.$store.dispatch(Zi).then((function(e){t.payment.CivilRegistrationNumber=t.paymentDetails.CivilRegistrationNumber,t.payment.BusinessId=t.paymentDetails.BusinessId,t.payment.ReferenceNumber=t.paymentDetails.ReferenceNumber,t.payment.AccountNumber=t.paymentDetails.AccountNumber,t.payment.RegistrationNumber=t.paymentDetails.RegistrationNumber,t.payment.AbaFw=t.paymentDetails.AbaFw,t.payment.Iban=t.paymentDetails.Iban,t.payment.SwiftBic=t.paymentDetails.SwiftBic,t.payment.PaymentMethodId=t.paymentDetails.PaymentMethodId,t.payment.PaymentMethodList=t.paymentDetails.PaymentMethodList,t.isLoading=!1}));case 3:case"end":return e.stop()}}),e)})))()}},bh=Ah,xh=(0,f.Z)(bh,_h,Ih,!1,null,null,null),Ch=xh.exports,yh=function(){var t=this,e=t._self._c;return e("div",[e("v-container",[e("v-layout",{attrs:{row:""}},[e("v-flex",{attrs:{xs9:"",md3:"",lg2:""}},[e("v-layout",{staticClass:"buttons",attrs:{column:""}},[t.canEditAndSubmit||t.returnedWithComments?e("v-btn",{staticClass:"button pa-0",attrs:{color:"success",disabled:t.totalAmountExceeded||0!==t.ratesMissing.length},on:{click:function(e){t.dialogSubmit=!0}}},[t._v(" Submit "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t.hasNextStep()&&t.canBeCreated?e("v-btn",{staticClass:"button pa-0",attrs:{disabled:t.totalAmountExceeded,color:"success"},on:{click:function(e){return e.preventDefault(),t.createAndSubmitBudgetCR()}}},[t._v(" Accept "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t.hasNextStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"success"},on:{click:function(e){return e.preventDefault(),t.nextStep()}}},[t._v(" Next "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t._e(),t.canBeCreated?e("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(e){return t.createBudgetCR()}}},[t._v(" Change ")]):t._e(),t.canEditAndSubmit||t.returnedWithComments?e("v-btn",{staticClass:"button pa-0",attrs:{color:"grey lighten-1"},on:{click:function(e){t.dialogDelete=!0}}},[t._v(" Delete request ")]):t._e(),t.hasPrevStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.prevStep()}}},[e("v-icon",{staticClass:"icon iconBack"},[t._v("keyboard_arrow_left")]),t._v(" Back ")],1):t._e(),t.commentFromAdmin?e("span",[e("v-spacer"),e("div",{staticClass:"error--text ma-2",staticStyle:{"overflow-wrap":"break-word"}},[t._v(" "+t._s(t.commentFromAdmin)+" ")])],1):t._e(),t.totalAmountExceeded?e("div",[e("v-spacer"),e("span",{staticClass:"text-red"},[t._v("Requested amount can not exceed total fund")]),e("v-spacer"),e("span",[e("br")])],1):t._e(),0!==t.ratesMissing.length?e("div",[e("v-spacer"),e("span",{staticClass:"text-red"},[t._v("All rates in grant must be accounted for in the budget")])],1):t._e()],1)],1),e("v-flex",{attrs:{xs9:""}},[t.awaitAccountingSubmit?e("v-layout",[e("div",{staticClass:"text-xs-center",staticStyle:{width:"100%"}},[e("h3",[t._v(" Submit accounting before making new budget ")])])]):t.submitted?e("v-layout",{staticStyle:{width:"100%","margin-bottom":"3em"}},[e("div",{staticClass:"text-xs-center",staticStyle:{width:"100%"}}
1,[e("h3",[t._v(" Budget change request "+t._s(t.grant.BudgetChangeRequest.BudgetStateText.toLowerCase())+" ")])])]):t._e(),t.budgetItems&&!t.awaitAccountingSubmit?e("v-layout",{staticClass:"pr-0 pb-0 pl-4",attrs:{xs9:""}},[e("div",{staticClass:"d-flex justify-space-between"},[e("div",[t.grant&&t.grant.BudgetChangeRequest&&!t.canBeCreated?e("div",{staticClass:"block"},[e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 md6"},[e("strong",[t._v("Funding information - total fund:")])]),e("dd",{staticClass:"flex py-1 md2 text-xs-right"},[e("span",{staticClass:"no-wrap"},[t._v(t._s(t._f("currency")(t.grant.TotalGrant)))])])]),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 md6"},[e("strong",[t._v("Budget Change Request - total amount:")])]),e("dd",{staticClass:"flex py-1 md2 text-xs-right"},[e("span",{staticClass:"no-wrap",class:t.totalAmountExceeded?"text-red":""},[t._v(t._s(t._f("currency")(t.getTotalAmount)))])])]),0!==t.getTotalDifference?e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 md6"},[e("strong",[t._v("Difference:")])]),e("dd",{staticClass:"flex py-1 md2 text-xs-right"},[e("span",{staticClass:"no-wrap",class:t.totalAmountExceeded?"text-red":""},[t._v(t._s(t._f("currency")(t.getTotalDifference)))])])]):t._e(),e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 md6"},[e("strong",[t._v("Budget Change Request - status:")])]),e("dd",{staticClass:"flex py-1 md2 text-xs-right"},[e("span",{staticClass:"no-wrap"},[t._v(t._s(t.grant.BudgetChangeRequest.BudgetStateText))])])]),0!==t.ratesMissing.length?e("dl",{staticClass:"layout row wrap"},[e("dt",{staticClass:"flex py-1 md6"},[e("strong",[t._v("Missing rates:")])]),e("dd",{staticClass:"flex py-1 md2 text-xs-right text-red"},[e("span",{staticClass:"no-wrap"},[t._v(t._s(t.ratesMissing))])])]):t._e(),e("budget-list",{attrs:{readOnly:t.accepted||t.submitted}}),e("br"),e("br"),e("v-textarea",{attrs:{value:this.grant.BudgetChangeRequest.ApplicantDescription,label:"Reason for Budget change request (mandatory)",readonly:!this.grant.BudgetChangeRequest.EditBudgetAllowed,box:""},on:{change:function(e){return t.updateDescription(e)},input:function(e){return t.updateLocalDescription(e)}}})],1):t._e(),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialogDelete,callback:function(e){t.dialogDelete=e},expression:"dialogDelete"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v("Are you sure you want to delete this budget change request?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.dialogDelete=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.deleteBudgetCR}},[t._v("Yes")])],1)],1)],1),e("v-dialog",{attrs:{"content-class":"modalWidth"},model:{value:t.dialogSubmit,callback:function(e){t.dialogSubmit=e},expression:"dialogSubmit"}},[e("v-card",{staticClass:"modalCard"},[e("v-card-text",[t.getTotalDifference<0?e("p",[e("span",[t._v("New budget amount is lower than the grant.")]),e("br")]):t._e(),e("span",[t._v("Are you sure you want to submit this budget change request?")])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){t.dialogSubmit=!1}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:t.submitBudgetCR}},[t._v("Yes")])],1)],1)],1)],1)])]):t._e(),!t.budgetItems||t.awaitAccountingSubmit||!t.grant.BudgetChangeRequest||t.canBeCreated?e("v-layout",[e("v-sheet",{staticClass:"mx-auto pa-3 mt-5",attrs:{elevation:"6"}},[e("h1",{staticClass:"text-xs-center headline"},[t._v("Current Budget")]),e("budget-list",{attrs:{getLatest:!0,readOnly:!0}})],1)],1):t._e()],1)],1)],1)],1)},wh=[],Th=(n(70189),n(78783),n(33948),{name:"BudgetChangeRequestWizard",components:{},inject:["nextStep","prevStep","hasNextStep","hasPrevStep","exitWizard"],data:function(){return{dialogDelete:!1,dialogSubmit:!1,rateId:null}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.rateId=t.$route.params.rateid,!t.rateId){e.next=6;break}return e.next=4,t.$store.dispatch(qi,{rateId:t.rateId});case 4:e.next=9;break;case 6:return e.next=8,t.$store.dispatch(Yi);case 8:t.rateId=t.installmentWizard.RateId;case 9:return e.next=11,t.$store.dispatch(En);case 11:return e.next=13,t.$store.dispatch(Ci,t.$route.params.id).then((function(){var e;null!==(e=t.grant)&&void 0!==e&&e.BudgetChangeRequest&&t.$store.dispatch(Nn)}));case 13:case"end":return e.stop()}}),e)})))()},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.grant","application.budgetItems","grants.installmentWizard"])),{},{canBeCreated:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.CanBeCreated},ratesMissing:function(){if(!this.budgetItems)return[];var t=(0,Kt.Z)(new Set(this.budgetItems.map((function(t){return t.Year})))),e=this.installmentWizard.GrantRates.filter((function(e){return!t.some((function(t){return t===e}))}));return e},canEditAndSubmit:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.CanEditAndSubmit},submitted:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.Submitted},awaitAccountingSubmit:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.AwaitAccountingSubmit},accepted:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.Accepted},returnedWithComments:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.ReturnedWithComments},commentFromAdmin:function(){return this.installmentWizard.BudgetChangeComments},unavailable:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState===pm.Unavailable},getTotalDifference:function(){return this.grant&&this.grant.TotalGrant?this.grant.TotalGrant-this.getTotalAmount:this.getTotalAmount},totalAmountExceeded:function(){return!(!this.grant||!this.grant.TotalGrant)&&this.getTotalAmount>this.grant.TotalGrant},getTotalAmount:function(){return this.budgetItems&&0!==this.budgetItems.length?this.budgetItems.reduce((function(t,e){return t+(null!=e.AmountUsed?Number(e.AmountUsed):Number(e.Amount))}),0):0}}),methods:{createBudgetCR:function(){var t=this;this.$store.dispatch(Gn).then((function(){t.$store.dispatch(Ci,t.application.Id),t.$store.dispatch(qi,{rateId:t.rateId})}))},createAndSubmitBudgetCR:function(){var t=this;this.$store.dispatch(Bn).then((function(){t.$store.dispatch(Ci,t.application.Id),t.$store.dispatch(qi,{rateId:t.rateId})})).then((function(){t.nextStep()}))},updateLocalDescription:function(t){this.grant.BudgetChangeRequest.ApplicantDescription=t}
1,updateDescription:function(t){this.$store.dispatch(Vn,{appId:this.application.Id,budgetId:this.grant.BudgetChangeRequest.Id,payload:t})},submitBudgetCR:function(){var t=this;this.$store.dispatch(Un).then((function(){t.$store.dispatch(Ci,t.application.Id),t.$store.dispatch(qi,{rateId:t.rateId}),t.dialogSubmit=!1,t.nextStep()}))},deleteBudgetCR:function(){var t=this;this.dialogDelete=!1,this.$store.dispatch(Wn).then((function(){t.$store.dispatch(En),t.$store.dispatch(Ci,t.application.Id).then((function(){var e;null!==(e=t.grant)&&void 0!==e&&e.BudgetChangeRequest&&t.$store.dispatch(Nn)})),t.$store.dispatch(qi,{rateId:t.rateId}).then((function(e){e&&e.Value&&"Unavailable"===e.Value.WizardSubmitStateText&&t.exitWizard()}))}))}}}),Nh=Th,Eh=(0,f.Z)(Nh,yh,wh,!1,null,null,null),Ph=Eh.exports,Sh=function(){var t,e,n=this,i=n._self._c;return i("div",[i("notification"),i("error-dialog",{attrs:{errors:n.errors}}),i("v-container",[i("v-layout",{attrs:{row:""}},[i("v-flex",{attrs:{xs9:"",md3:"",lg2:""}},[i("v-layout",{staticClass:"buttons",attrs:{column:""}},[n.readonly?n.hasNextStep()?i("v-btn",{staticClass:"button pa-0",attrs:{color:"success"},on:{click:function(t){return t.preventDefault(),n.nextStep()}}},[n._v(" Next "),i("v-icon",{staticClass:"icon"},[n._v("keyboard_arrow_right")])],1):n._e():i("div",[n.readonly?n._e():i("v-btn",{staticClass:"button",attrs:{color:"success"},on:{click:n.openSubmitModal}},[n._v(" Submit "),i("v-icon",{staticClass:"icon"},[n._v("keyboard_arrow_right")])],1)],1),n.hasPrevStep()?i("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(t){return t.preventDefault(),n.prevStep()}}},[i("v-icon",{staticClass:"icon iconBack"},[n._v("keyboard_arrow_left")]),n._v(" Back ")],1):n._e(),i("div",{staticClass:"error--text ma-2 text-left wrap w-100",staticStyle:{"overflow-wrap":"break-word"}},[i("v-spacer"),n._v(" "+n._s(n.reportComment)+" ")],1)],1)],1),i("v-flex",{staticClass:"pr-0 pb-0 pl-4",attrs:{xs9:""}},[n.readonly?i("div",[i("h3",{staticClass:"text-center"},[n._v(n._s(n.statusReportTypeText)+" submitted")])]):i("div",[i("v-card",{staticClass:"card profile wizard-fullscreen px-0 py-0"},[n.pagelist&&n.pagelist.length+n.enableEnclosures()>1?i("v-tabs",{attrs:{"background-color":"transparent","show-arrows":"","center-active":"","slider-color":"primary"},model:{value:n.active,callback:function(t){n.active=t},expression:"active"}},[n._l(n.pagelist,(function(t,e){return i("v-tab",{key:"main-item-"+e,staticClass:"report-wizard-tab"},[n._v(" "+n._s(t.PageName)+" ")])})),n.enableEnclosures()?i("v-tab",{key:"main-item-"+((null===(t=n.pagelist)||void 0===t?void 0:t.length)||0),staticClass:"report-wizard-tab"},[n._v("Enclosures")]):n._e()],2):n._e(),i("v-tabs-items",{model:{value:n.active,callback:function(t){n.active=t},expression:"active"}},[n._l(n.pagelist,(function(t,e){return i("v-tab-item",{key:"main-item-"+e},[i("reports-container-dynamic-view",{attrs:{readonly:n.readonly,"page-id":t.Id,title:t.PageName,fields:t.DynamicFieldsList,isResearchfish:t.IsResearchfishPage}})],1)})),n.enableEnclosures()?i("v-tab-item",{key:"main-item-"+((null===(e=n.pagelist)||void 0===e?void 0:e.length)||0)},[i("form-attachments",{attrs:{showImagesCondition:this.application&&this.application.MaxNumberPicturesReport>0,showDocumentsCondition:this.application&&this.application.MaxNumberDocumentsReport>0,maxNumberPictures:n.application.MaxNumberPicturesReport,maxNumberDocuments:n.application.MaxNumberDocumentsReport,reportId:n.reportId}})],1):n._e()],2)],1),n._e(),i("v-dialog",{attrs:{"max-width":"500px"},model:{value:n.submitModal,callback:function(t){n.submitModal=t},expression:"submitModal"}},[i("submit-report-modal",{on:{close:n.closeSubmitModal}})],1)],1)])],1),n.readonly?i("div",{staticClass:"d-flex align-center",staticStyle:{"flex-direction":"column"}},[i("v-card",{staticStyle:{"margin-top":"3em"}},[i("statusreportpdf",{attrs:{pdfData:n.pdfData}})],1)],1):n._e()],1),n._m(0)],1)},Rh=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"wizard application-wizard"},[e("div",{staticClass:"wizard-fullscreen d-flex",staticStyle:{"flex-direction":"column"}})])}],Dh=function(){var t=this,e=t._self._c;return e("v-container",{staticClass:"inner-container pa-0"},[e("v-card-text",t._l(t.fields,(function(n){return e("v-layout",{key:n.Id,attrs:{row:"",wrap:""}},[e(t.getComponent(n.Type),{tag:"component",class:n.HelpText?"":"fieldWidth",attrs:{field:n,errors:t.validationErrorsMap[n.Id]},on:{update:t.update}}),n.HelpText?e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-icon",t._g({staticClass:"tooltipIcons"},i),[t._v("help")])]}}],null,!0)},[e("span",[t._v(t._s(n.HelpText))])]):t._e()],1)})),1)],1)},Lh=[],Mh={components:{readonlyField:Qf},props:{pageId:[String,Number],title:String,fields:Array,isResearchfish:Boolean,readonly:{type:Boolean,default:!1}},data:function(){return{}},methods:{getComponent:function(t){return this.isResearchfish||this.readonly?"readonly-field":U(t)},update:function(t){t.pageId=this.pageId,t.reportId=Number(this.$route.params.reportId),this.$store.dispatch(Ri,t)}},created:function(){},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Lt.Se)(["validationErrorsMap"])),(0,Xt.vn)(["application.application","application.files","application.validationErrors"]))},kh=Mh,Oh=(0,f.Z)(kh,Dh,Lh,!1,null,null,null),Fh=Oh.exports,$h={components:{notification:Kl,errorDialog:gt,ReportsContainerDynamicView:Fh,submitReportModal:Um,fetchResearchfishModal:ov,statusreportpdf:td,FormAttachments:Xd},props:{id:String,reportId:String},inject:["getWizardStatus","nextStep","prevStep","hasNextStep","hasPrevStep"],data:function(){return{dataAgreementModal:!1,DataProcessorAgreementAccepted:!1,isLoaded:null,errors:[],submitModal:!1,fetchResearchfishModal:!1,isResearchfishLoading:!1,active:0,pdfData:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.statusReport","grants.installmentWizard","application.filesImagesGrant","application.validationErrors"])),{},{editable:function(){return this.installmentWizard&&this.installmentWizard.StatusReportState===um.CanEditAndSubmit},returnedWithComments:function(){return this.installmentWizard&&this.installmentWizard.StatusReportState===um.ReturnedWithComments},reportComment:function(){return this.installmentWizard.StatusReportComments},statusReportTypeText:function(){return this.installmentWizard.StatusReportTypeText},readonly:function(){return this.installmentWizard&&this.installmentWizard.StatusReportState===um.Submitted},pagelist:function(){var t;return null===(t=this.statusReport)||void 0===t?void 0:t.DynamicFieldPageList.filter((function(t){return!t.IsResearchfishPage}))},pagelistResearchfish:function(){var t;return null===(t=this.statusReport)||void 0===t?void 0:t.DynamicFieldPageList.filter((function(t){return t.IsResearchfishPage}))},pageErrors:function(){if(this.validationErrors.length>0){var t,e=this.validationErrors.map((function(t){return t.AppliesTo})),n=null===(t=this.statusReport)||void 0===t?void 0:t.DynamicFieldPageList.reduce((function(t,n){var i=n.DynamicFieldsList.map((function(t){return String(t.Id)}));return t[n.Id]=i.filter((function(t){return-1!==e.indexOf(t)})).length>0,t}),{});return n}return{}}}),methods:{getPdf:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch(Jn,{reportId:t.reportId});case 2:n=e.sent,t.pdfData={FileName:n.Value.Filename,PdfData:n.Value.FileContent};case 4:case"end":return e.stop()}}),e)})))()},openModal:function(){this.reviewModal=!0},closeModal:function(){this.reviewModal=!1},openSubmitModal:function(t){this.submitModal=!0},closeSubmitModal:function(t){this.submitModal=!1,t&&this.submit()},submit:function(){var t=this;this.$store.dispatch(Mi,{reportId:this.reportId}).then((function(e){t.$store.dispatch(Ci,t.id),t.$store.dispatch(sn,t.id),t.getWizardStatus(),t.nextStep()})).catch((function(e){t.$store.commit(zr,e.response.data.Messages),t.errors=e.response.data.Messages}))},enableEnclosures:function(){return this.application&&(this.application.MaxNumberDocumentsReport>0||this.application.MaxNumberPicturesReport>0)},openResearchfishModal:function(t){this.fetchResearchfishModal=!0},closeResearchfishModal:function(t){this.fetchResearchfishModal=!1,t&&this.fetchResearchfish()},fetchResearchfish:function(){var t=this;this.isResearchfishLoading=!0,this.$store.dispatch($i,{reportId:this.reportId}).then((function(){t.$store.dispatch(Pi,{reportId:t.reportId}).then((function(){t.isResearchfishLoading=!1}))})).catch((function(e){t.errors=e.response.data.Messages}))},formatResearchfishDate:function(){var t=new Date(Date.parse(this.statusReport.LastUpdatedResearchfishData));
1return t.toLocaleString("da-DK")},fetchReadonlyReport:function(){var t=this;this.getPdf(),this.$store.dispatch(sn,this.$route.params.id).then((function(){t.$store.dispatch(Ci,t.$route.params.id).then((function(){t.isLoaded=!0}))}))}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getWizardStatus();case 2:t.readonly?t.fetchReadonlyReport():t.$store.dispatch(sn,t.$route.params.id).then((function(){t.$store.dispatch(jn,{reportId:t.reportId}),t.$store.dispatch(Yn,{reportId:t.reportId}),t.$store.dispatch(Ci,t.$route.params.id).then((function(){t.isLoaded=!0})),t.$store.dispatch(Pi,{reportId:t.reportId}).catch((function(e){t.errors=e.response.data.Messages}))}));case 3:case"end":return e.stop()}}),e)})))()},watch:{readonly:function(t){!0===t&&this.fetchReadonlyReport()}}},Zh=$h,Gh=(0,f.Z)(Zh,Sh,Rh,!1,null,"05f6dd4a",null),Bh=Gh.exports,Uh=function(){var t=this,e=t._self._c;return e("accounting-detail",{attrs:{submitErrors:t.accountingValidationErrors}})},Wh=[],Vh=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"d-flex flex-column justify-center"},[e("v-container",[e("v-layout",{attrs:{row:""}},[e("v-flex",{attrs:{xs9:"",md3:"",lg2:""}},[e("v-layout",{staticClass:"buttons",attrs:{column:""}},[t.canEditAndSubmit||t.returnedWithComments?e("v-btn",{staticClass:"button",attrs:{color:"success"},on:{click:t.openSubmitModal}},[t._v(" Submit "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t.hasNextStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"success"},on:{click:function(e){return e.preventDefault(),t.nextStep()}}},[t._v(" Next "),e("v-icon",{staticClass:"icon"},[t._v("keyboard_arrow_right")])],1):t._e(),t.hasPrevStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.prevStep()}}},[e("v-icon",{staticClass:"icon iconBack"},[t._v("keyboard_arrow_left")]),t._v(" Back ")],1):t._e(),t.returnedWithComments?e("div",{staticClass:"error--text",staticStyle:{"overflow-wrap":"break-word"}},[t._v(" "+t._s(t.commentFromAdmin)+" ")]):t._e()],1)],1),e("v-flex",{attrs:{xs9:""}},[t.submitted?e("h3",{staticClass:"text-center"},[t._v("Accounting submitted")]):t._e(),e("v-card-text",{staticClass:"pt-0 pr-0 pb-0 pl-4"},[""!=t.submitErrors?e("div",{staticClass:"error--text mb-1"},[t._v(t._s(t.submitErrors))]):t._e(),e("div",[e("div",[e("v-expansion-panel",{attrs:{expand:""},model:{value:t.ratePanel,callback:function(e){t.ratePanel=e},expression:"ratePanel"}},[t._l(t.accountingList,(function(n,i){return e("v-expansion-panel-content",{key:i,scopedSlots:t._u([{key:"header",fn:function(){return[n.length>0?e("v-flex",{attrs:{xs9:""}},[e("h3",{staticClass:"cardTitle",attrs:{"align-center":""}},[t._v("Installment "+t._s(n[0].RateNo))])]):t._e(),e("v-flex",{staticClass:"pr-2",attrs:{xs6:""}},[e("div",[e("h3",{staticClass:"cardTitle mt-3 text-right"},[t._v("Total used: "+t._s(t._f("currency")(t.totalAmountUsed(n))))])]),e("div",[e("h3",{staticClass:"cardTitle mt-3 text-right"},[t._v("Approved budget: "+t._s(t._f("currency")(t.totalAmountApplied(n))))])])])]},proxy:!0}],null,!0)},[e("v-card",[t.accounting?e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,loading:t.isLoading,items:n,"hide-actions":"","disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(n){var i=n.item;return[e("td",[t._v(t._s(i.RateNo))]),e("td",[t._v(t._s(i.Name))]),e("td",{staticClass:"no-wrap text-right"},[t._v(t._s(t._f("currency")(i.Amount)))]),e("td",[t._v(t._s(i.AmountComment))]),e("td",{staticClass:"no-wrap text-right"},[i.IsEditable?e("v-edit-dialog",{attrs:{"return-value":i.AmountUsed,lazy:""},on:{"update:returnValue":function(e){return t.$set(i,"AmountUsed",e)},"update:return-value":function(e){return t.$set(i,"AmountUsed",e)},save:function(e){return t.saveAmount(i)},cancel:function(e){return t.closeAmount(i)},open:function(e){return t.openAmount(i)},close:function(e){return t.closeAmount(i)}},scopedSlots:t._u([{key:"input",fn:function(){return[e("v-text-field",{attrs:{label:"Enter amount","single-line":"",type:"number"},model:{value:t.amountUsed,callback:function(e){t.amountUsed=e},expression:"amountUsed"}})]},proxy:!0}],null,!0)},[null!=i.AmountUsed?e("span",{staticClass:"text-mandatory"},[t._v(t._s(t._f("currency")(i.AmountUsed)))]):e("em",[t._v("--")])]):null!=i.AmountUsed?e("span",[t._v(" "+t._s(t._f("currency")(i.AmountUsed)))]):t._e()],1),e("td",[i.IsEditable?e("v-edit-dialog",{attrs:{"return-value":i.AmountUsedComment,lazy:"","multi-line":""}
1,on:{"update:returnValue":function(e){return t.$set(i,"AmountUsedComment",e)},"update:return-value":function(e){return t.$set(i,"AmountUsedComment",e)},save:function(e){return t.saveDescription(i)},cancel:function(e){return t.closeDescription(i)},open:function(e){return t.openDescription(i)},close:function(e){return t.closeDescription(i)}},scopedSlots:t._u([{key:"input",fn:function(){return[e("v-text-field",{attrs:{label:"Enter comment","single-line":""},model:{value:t.description,callback:function(e){t.description=e},expression:"description"}})]},proxy:!0}],null,!0)},[i.AmountUsedComment?e("span",{staticClass:"text-mandatory"},[t._v(t._s(i.AmountUsedComment))]):e("em",[t._v("report usage")])]):e("span",[t._v(" "+t._s(i.AmountUsedComment)+" ")])],1)]}}],null,!0)}):t._e()],1)],1)})),e("v-expansion-panel-content",{attrs:{disabled:""},scopedSlots:t._u([{key:"header",fn:function(){return[e("v-layout",{attrs:{row:"",wrap:"","justify-end":""}},[e("v-flex",{attrs:{xs12:"",md12:""}},[e("h3",{staticClass:"cardTitle mt-3 wrap text-right"},[t._v("Total used: "+t._s(t._f("currency")(t.getAllTotalAmountUsed)))]),e("h3",{staticClass:"cardTitle mt-3 wrap text-right"},[t._v("Approved budget: "+t._s(t._f("currency")(t.getAllTotalAmountApplied)))])])],1)]},proxy:!0}])})],2)],1)])])],1)],1),e("v-layout",{attrs:{row:""}},[e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.showAccountingModal,callback:function(e){t.showAccountingModal=e},expression:"showAccountingModal"}},[e("submit-accounting-modal",{on:{close:function(e){return t.submitAccounting(e)}}})],1)],1)],1)],1)])},zh=[],jh={name:"Accounting",inject:["getWizardStatus","nextStep","prevStep","hasNextStep","hasPrevStep"],components:{SubmitAccountingModal:Zf},data:function(){return{headers:[{text:"Rate",value:"RateNo",sortable:!1,width:"10%"},{text:"Post",value:"Name",sortable:!1},{text:"Applied amount",value:"Amount",sortable:!1},{text:"Applied description",value:"AmountComment",sortable:!1,width:"30%"},{text:"Used amount",value:"AmountUsed",sortable:!1},{text:"Used description",value:"AmountUsedComment",sortable:!1,width:"30%"}],isLoading:!1,amountUsed:null,description:null,lastKeyPressed:null,showAccountingModal:!1,submitErrors:"",ratePanel:[],accountingList:null}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["application.application","grants.statusReport","grants.accounting","grants.installmentWizard"])),{},{canEditAndSubmit:function(){return this.installmentWizard&&this.installmentWizard.AccountingState===dm.CanEditAndSubmit},submitted:function(){return this.installmentWizard&&this.installmentWizard.AccountingState===dm.Submitted},returnedWithComments:function(){return this.installmentWizard&&this.installmentWizard.AccountingState===dm.ReturnedWithComments},getAllTotalAmountApplied:function(){var t,e=null===(t=this.accounting)||void 0===t?void 0:t.BudgetLineList.reduce((function(t,e){return t+e.Amount}),0);return e},getAllTotalAmountUsed:function(){var t,e=null===(t=this.accounting)||void 0===t?void 0:t.BudgetLineList.reduce((function(t,e){return t+e.AmountUsed}),0);return e},commentFromAdmin:function(){return this.installmentWizard.AccountingComment}}),methods:{dividedAccounting:function(){var t,e=[];return null!==(t=this.accounting)&&void 0!==t&&t.BudgetLineList&&(e=Object.groupBy(this.accounting.BudgetLineList,(function(t){var e=t.RateNo;return e})),e=Object.keys(e).reduce((function(t,n){return[].concat((0,Kt.Z)(t),[e[n]])}),[])),e},totalAmountApplied:function(t){var e=t.reduce((function(t,e){return t+e.Amount}),0);return e},totalAmountUsed:function(t){var e=t.reduce((function(t,e){return t+e.AmountUsed}),0);return e},openSubmitModal:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.showAccountingModal=!0;case 1:case"end":return e.stop()}}),e)})))()},submitAccounting:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.submitErrors="",!t){n.next=4;break}return n.next=4,e.$store.dispatch(ti).then((function(){e.getWizardStatus(),e.nextStep()})).catch((function(t){e.submitErrors=t.response.data.Messages[0].Message}));case 4:e.showAccountingModal=!1;case 5:case"end":return n.stop()}}),n)})))()},openAmount:function(t){this.amountUsed=t.AmountUsed},closeAmount:function(t){this.saveAmount(t),this.openNextDescriptionEditDialog(t)}
1,saveAmount:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.amountUsed){n.next=5;break}return e.isLoading=!0,n.next=4,e.$store.dispatch(Oi,{accountingId:t.Id,amount:e.amountUsed});case 4:e.$store.dispatch(Xn).then((function(t){e.isLoading=!1}));case 5:case"end":return n.stop()}}),n)})))()},openDescription:function(t){this.description=t.AmountUsedComment},closeDescription:function(t){this.saveDescription(t),this.openNextAmountEditDialog(t)},saveDescription:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.description){n.next=5;break}return e.isLoading=!0,n.next=4,e.$store.dispatch(Fi,{reportId:e.installmentWizard.StatusReportId,accountingPostId:t.Id,description:JSON.stringify(e.description)});case 4:e.$store.dispatch(Xn).then((function(t){e.isLoading=!1}));case 5:case"end":return n.stop()}}),n)})))()},openNextDescriptionEditDialog:function(t){this.activateEditDialog(t,1)},openNextAmountEditDialog:function(t){this.activateEditDialog(t,2)},activateEditDialog:function(t,e){if("Enter"===this.lastKeyPressed){this.lastKeyPressed=null;var n=this.accounting.BudgetLineList.filter((function(t){return t.IsEditable})),i=n.indexOf(t),a=2*i+e;if(a<document.getElementsByClassName("v-menu__activator").length){var s=document.getElementsByClassName("v-menu__activator")[a];s.click()}}},recordKeypress:function(t){this.lastKeyPressed=null===t||void 0===t?void 0:t.key},openAll:function(){this.ratePanel=[!0].concat((0,Kt.Z)(this.accountingList.map((function(){return!0}))))}},created:function(){var t=this;return(0,Jt.Z)((0,Qt.Z)().mark((function e(){var n;return(0,Qt.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.$route.params.rateid,!n){e.next=6;break}return e.next=4,t.$store.dispatch(qi,{rateId:n});case 4:e.next=8;break;case 6:return e.next=8,t.$store.dispatch(Yi);case 8:return document.addEventListener("keydown",t.recordKeypress,!0),e.next=11,t.$store.dispatch(Xn);case 11:t.accountingList=t.dividedAccounting(),t.openAll();case 13:case"end":return e.stop()}}),e)})))()},watch:{"accounting.BudgetLineList":{handler:function(){this.accountingList=this.dividedAccounting()}}}},Yh=jh,qh=(0,f.Z)(Yh,Vh,zh,!1,null,null,null),Hh=qh.exports,Kh={components:{AccountingDetail:Hh},data:function(){return{accountingValidationErrors:""}}},Qh=Kh,Jh=(0,f.Z)(Qh,Uh,Wh,!1,null,null,null),Xh=Jh.exports,tg=function(){var t=this,e=t._self._c;return e("div",[e("v-container",[e("v-layout",{attrs:{row:""}},[e("v-flex",{attrs:{xs8:"",md4:""}},[e("v-layout",{staticClass:"buttons",attrs:{column:""}},[e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on;return[e("v-btn",t._g({staticClass:"button pa-0",attrs:{disabled:t.canNotSubmit,color:"success"},on:{click:function(e){t.dialogSubmit=!0}}},i),[t._v(" Submit package ")])]}}])},[e("span",[t._v(" Submits the complete"),e("br"),t._v(" package for review ")])]),t.hasPrevStep()?e("v-btn",{staticClass:"button pa-0",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.prevStep()}}},[e("v-icon",{staticClass:"icon iconBack"},[t._v("keyboard_arrow_left")]),t._v(" Back ")],1):t._e()],1)],1),e("v-flex",{attrs:{xs8:""}},[e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs6:"",md4:""}},[e("strong",[t._v("Status Report - status:")])]),e("v-flex",{attrs:{xs6:"",md8:""}},[e("span",{staticClass:"text-xs-right"},[t.statusReportEditable?e("span",[e("router-link",{attrs:{to:{name:"WizardGrantsReport",params:{id:"".concat(this.$route.params.id),reportId:"".concat(this.installmentWizard.StatusReportId)}}}},[t._v(" "+t._s(t.installmentWizard.StatusReportStateText)+" ")])],1):t.installmentWizard?e("span",[t._v(t._s(t.installmentWizard.StatusReportStateText))]):t._e()])]),e("v-flex",{attrs:{xs6:"",md4:""}},[e("strong",[t._v("Accounting - status:")])]),e("v-flex",{attrs:{xs6:"",md8:""}},[e("span",{staticClass:"text-xs-right"},[t.accountingEditable?e("span",[e("router-link",{attrs:{to:{name:"WizardGrantsAccounting"}}},[t._v(" "+t._s(t.installmentWizard.AccountingStateText)+" ")])],1):t.installmentWizard?e("span",[t._v(t._s(t.installmentWizard.AccountingStateText))]):t._e()])]),e("v-flex",{attrs:{xs6:"",md4:""}}
1,[e("strong",[t._v("Budget change - status:")])]),e("v-flex",{attrs:{xs6:"",md8:""}},[e("span",{staticClass:"text-xs-right"},[t.budgetChangeEditable?e("span",[e("router-link",{attrs:{to:{name:"WizardGrantsBudgetchange"}}},[t._v(" "+t._s(t.installmentWizard.BudgetChangeStateText)+" ")])],1):t.installmentWizard?e("span",[t._v(t._s(t.installmentWizard.BudgetChangeStateText))]):t._e()])]),e("v-flex",{attrs:{xs6:"",md4:""}},[e("strong",[t._v("Payment details - status:")])]),e("v-flex",{attrs:{xs6:"",md8:""}},[e("span",{staticClass:"text-xs-right"},[t.paymentDetailsEditable?e("span",[e("router-link",{attrs:{to:{name:"WizardGrantsPaymentdetails"}}},[t._v(" "+t._s(t.installmentWizard.PayoutStateText)+" ")])],1):t.installmentWizard?e("span",[t._v(t._s(t.installmentWizard.PayoutStateText))]):t._e()])])],1)],1)],1)],1),e("v-layout",{attrs:{col:""}},[e("v-flex",{attrs:{xs8:"",md4:""}}),e("v-flex",{attrs:{xs12:"",md12:""}})],1),e("v-dialog",{attrs:{"max-width":"500px"},model:{value:t.dialogSubmit,callback:function(e){t.dialogSubmit=e},expression:"dialogSubmit"}},[e("submit-modal",{attrs:{"modal-text":"Are you sure you want to submit the package?"},on:{close:function(e){return t.submitWizard(e)}}})],1),e("error-dialog",{attrs:{errors:t.errors}})],1)},eg=[],ng=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"modalCard"},[e("v-card-text",[e("span",[t._v(t._s(t.modalText))])]),e("v-card-actions",[e("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.close(!1)}}},[t._v("No")]),e("v-btn",{attrs:{color:"success"},on:{click:function(e){return t.close(!0)}}},[t._v("Yes")])],1)],1)},ig=[],ag={props:{modalText:String},methods:{close:function(t){this.$emit("close",t)}}},sg=ag,rg=(0,f.Z)(sg,ng,ig,!1,null,null,null),og=rg.exports,lg={components:{SubmitModal:og,ErrorDialog:gt},inject:["prevStep","hasPrevStep"],data:function(){return{dialogSubmit:!1,errors:[]}},methods:{submitWizard:function(t){var e=this;return(0,Jt.Z)((0,Qt.Z)().mark((function n(){var i;return(0,Qt.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.dialogSubmit=!1,e.errors=[],!t){n.next=7;break}return n.next=5,e.$store.dispatch(Ki);case 5:i=n.sent,i.Success?e.$router.push({name:"ApplicationGrantsFunding",params:{id:e.$route.params.id}}):e.errors=i.Messages;case 7:case"end":return n.stop()}}),n)})))()}},computed:(0,Dt.Z)((0,Dt.Z)({},(0,Xt.vn)(["grants.installmentWizard"])),{},{canNotSubmit:function(){return this.installmentWizard&&this.installmentWizard.WizardSubmitState===mm.CanNotSubmit},accountingEditable:function(){return this.installmentWizard&&this.installmentWizard.AccountingState!==dm.Submitted&&this.installmentWizard.AccountingState!==dm.Unavailable},statusReportEditable:function(){return this.installmentWizard&&this.installmentWizard.StatusReportState!==um.Submitted&&this.installmentWizard.StatusReportState!==um.Unavailable},budgetChangeEditable:function(){return this.installmentWizard&&this.installmentWizard.BudgetChangeState!==pm.Submitted&&this.installmentWizard.BudgetChangeState!==pm.Unavailable},paymentDetailsEditable:function(){return this.installmentWizard&&this.installmentWizard.PayoutState!==fm.Unavailable}})},cg=lg,ug=(0,f.Z)(cg,tg,eg,!1,null,null,null),dg=ug.exports;s["default"].use(el.ZP);var pg=new el.ZP({mode:"history",scrollBehavior:function(){return{x:0,y:0}},routes:[{path:"/",name:"Home",component:pc,meta:{secure:!0}},{path:"/profile",name:"Profile",component:tc,meta:{secure:!0}},{path:"/nominations",name:"NominationList",component:yc,meta:{secure:!0}},{path:"/nominations/:id",name:"NominationWizard",component:qc,meta:{secure:!0},props:!0,children:[{path:"nominee",name:"WizardNominee",component:ru},{path:"nomination",name:"WizardNomination",component:pu},{path:"contribution",name:"WizardContribution",component:yu},{path:"preview",name:"WizardPreview",component:Su}]},{path:"/nominee/accept/:token",name:"AcceptNomination",component:Ou,props:!0},{path:"/review",name:"ReviewWizard",component:pd,meta:{secure:!0}},{path:"/review/:id",name:"ReviewItem",component:_d,props:!0,meta:{secure:!0}},{path:"/review-applications/:roundId/:id",name:"ApplicationReview",component:tm,meta:{secure:!0},props:!0},{path:"/review-applications",name:"ApplicationReviewWizard",component:tm,meta:{secure:!0}},{path:"/applications",name:"ApplicationList",component:yd,meta:{secure:!0}},{path:"/applications/:id",name:"ApplicationWizard",component:cp,meta:{secure:!0},props:!0,children:[{path:"contact",name:"ApplicationContact",component:kd},{path:"project",name:"ApplicationProject",component:Bd},{path:"properties",name:"ApplicationProperties",component:Yd},{path:"attachments",name:"ApplicationAttachments",component:Xd},{path:"budget",name:"ApplicationBudget",component:sp}]},{path:"/applications/:id/grant-wizard/:rateid?",name:"GrantsWizard",component:Cv,meta:{secure:!0},children:[{path:"report/:reportId",name:"WizardGrantsReport",props:!0,component:Bh},{path:"budgetchange",name:"WizardGrantsBudgetchange",component:Ph},{path:"paymentdetails",name:"WizardGrantsPaymentdetails",component:Ch,props:!0,meta:{secure:!0}},{path:"accounting",name:"WizardGrantsAccounting",component:Xh,meta:{secure:!0}},{path:"submit",name:"WizardGrantsSubmit",component:dg,meta:{secure:!0}}]},{path:"/applications/:id/grant-management",name:"ApplicationGrants",component:rm,meta:{secure:!0},props:!0,children:[{path:"funding",name:"ApplicationGrantsFunding",component:xm},{path:"payment-details",name:"ApplicationGrantsPaymentDetails",component:Em},{path:"reports",name:"ApplicationGrantsReports",component:jm},{path:"payment-request",name:"ApplicationGrantsPaymentRequest",component:df},{path:"institute-administrators",name:"ApplicationGrantsInstituteAdministrators",component:Pf}]},{path:"/applications/:id/messages",name:"ApplicationMessages",component:Xv,props:!0,meta:{secure:!0}},{path:"/nominations/:id/messages",name:"NominationMessages",component:sh,props:!0,meta:{secure:!0}},{path:"/nominee/:id/messages",name:"NomineeMessages",component:dh,props:!0,meta:{secure:!0}},{path:"/applications/:id/grant-management/reports/:reportId",name:"ApplicationGrantsWizardDEPRECATED",component:dv,props:!0,meta:{secure:!0}},{path:"/applications/acceptcoapplicant/:token",name:"AcceptCoapplicant",component:gh,props:!0},{path:"/messages/",name:"MessagesInbox",component:kv,meta:{secure:!0}}
1,{path:"/login",name:"Login",component:ml},{path:"/signup",name:"Signup",component:Il},{path:"/signup/confirm/resend/",name:"ResendConfirmation",component:Rl,props:!0},{path:"/signup/confirm/:token?",name:"EmailConfirmation",component:wl,props:!0},{path:"/signup/success",name:"SignupSuccess",component:Ol},{path:"/password/reset/:token?",name:"PasswordReset",component:rc,props:!0},{path:"*",component:ol}]});pg.beforeEach((function(t,e,n){t.matched.some((function(t){return t.meta.secure}))&&!J_.getters.isAuthenticated?n("/login"):n()}));var mg=pg,fg=tl.Z.create({baseURL:"https://nominationapi.lundbeckfonden.com/api",headers:{"Content-type":"application/json",Accept:"application/json"}});fg.interceptors.request.use((function(t){return t.headers.Authorization="Bearer "+J_.state.auth.token,t}),(function(t){return Promise.reject(t)})),fg.interceptors.response.use((function(t){return t.headers.refreshtoken&&J_.commit(Qs,t.headers.refreshtoken),t}),(function(t){return t.response&&401===t.response.status&&t.config&&(J_.dispatch(ee),mg.push("/login")),Promise.reject(t)}));var vg,hg,gg,_g,Ig,Ag,bg,xg,Cg,yg,wg,Tg,Ng,Eg,Pg,Sg,Rg,Dg,Lg,Mg,kg,Og,Fg,$g={getNominations:function(){return fg.get("nominations")},createNomination:function(t){return fg.post("nominations",t)},getNomination:function(t){return fg.get("nominations/".concat(t))},deleteNomination:function(t){return fg.delete("nominations/".concat(t))},createNominee:function(t){return fg.post("nominations/".concat(t,"/nominees"))},updateNominee:function(t,e,n){return fg.put("nominations/".concat(t,"/nominees/").concat(e),n)},deleteNominee:function(t,e){return fg.delete("nominations/".concat(t,"/nominees/").concat(e))},updateNomineeDynamicField:function(t,e,n){return fg.put("nominations/".concat(t,"/nominees/").concat(e,"/dynamicfield"),n)},submitNomination:function(t){return fg.post("nominations/".concat(t,"/submit"))},reopenNomination:function(t){return fg.post("nominations/".concat(t,"/reopen"))},updateNominationDynamicField:function(t,e){return fg.put("nominations/".concat(t,"/dynamicfield"),e)},validateNomination:function(t){return fg.get("nominations/".concat(t,"/validatesubmit"))},getNominationPdf:function(t){return fg.get("nominations/".concat(t,"/pdf"))},getRounds:function(){return fg.get("nominations/rounds")},getPrivacyNotice:function(){return fg.get("nominations/privacynotice")},getDataTransferAgreement:function(){return fg.get("nominations/datatransferagreement")},acceptNomination:function(t){return fg.put("nominations/acceptnomination",t)},createFile:function(t,e,n){return fg.post("/nominations/".concat(t,"/nominees/").concat(e,"/files"),n)},getFiles:function(t){return fg.get("/nominations/".concat(t,"/files"))},deleteFile:function(t,e){return fg.delete("nominations/".concat(t,"/files/").concat(e))},downloadFile:function(t,e){return fg.get("nominations/".concat(t,"/files/").concat(e,"/content"))},updateFile:function(t,e,n){return fg.put("nominations/".concat(t,"/files/").concat(e),n)},getReviewRounds:function(){return fg.get("nominationreviews/rounds")},getReviewDataTransferAgreement:function(){return fg.get("nominationreviews/dataprocessoragreement")},acceptReviewDataTransferAgreement:function(t){return fg.post("nominationreviews/".concat(t,"/acceptdataprocessoragreement"))},getReviewNominations:function(){return fg.get("nominationreviews/round/".concat(J_.state.review.round.RoundId))},getReview:function(t){return fg.get("nominationreviews/".concat(t))},updateReviewScore:function(t,e,n){return fg.put("nominationreviews/".concat(t,"/scoring/").concat(e,"/score"),n)},updateReviewComment:function(t,e,n){return fg.put("nominationreviews/".concat(t,"/scoring/").concat(e,"/comment"),n)},getReviewPdf:function(t,e){return fg.get("nominationreviews/".concat(t,"/nominations/").concat(e))},getReviewAttachment:function(t,e){return fg.get("nominationreviews/".concat(t,"/files/").concat(e))},markConflict:function(t){return fg.post("nominationreviews/".concat(t,"/markconflictinterests"))},markFinished:function(t){return fg.post("nominationreviews/".concat(t,"/markfinished"))},getNominees:function(){return fg.get("nominationreviews/results/round/".concat(J_.state.review.round.RoundId))},getApplications:function(){return fg.get("applications")},getApplicationRounds:function(){return fg.get("applications/rounds")},addApplication:function(t){return fg.post("applications",t)},getApplication:function(t){return fg.get("applications/".concat(t))},getApplicationPdf:function(t){return fg.get("applications/".concat(t,"/pdf"))},getApplicationCopyRounds:function(t){return fg.get("applications/".concat(t,"/roundscopy"))},copyApplication:function(t,e){return fg.post("applications/".concat(t,"/copy/").concat(e))},updateApplication:function(t,e){return fg.put("applications/".concat(t),e)},updateApplicationDynamicField:function(t,e){return fg.put("applications/".concat(t,"/dynamicfield"),e)},deleteApplication:function(t){return fg.delete("applications/".concat(t))},withdrawApplication:function(t){return fg.post("applications/".concat(t,"/withdraw"))},reopenApplication:function(t){return fg.post("applications/".concat(t,"/reopen"))},validateApplication:function(t){return fg.get("applications/".concat(t,"/validatesubmit"),{validateStatus:!1})},submitApplication:function(t){return fg.post("applications/".concat(t,"/submit"))},getApplicationPrivacyNotice:function(){return fg.get("applications/privacynotice")},getApplicationDataTransferAgreement:function(){return fg.get("applications/datatransferagreement")},createApplicationInstitution:function(t,e){return fg.post("applications/".concat(t,"/optionalinstitution"),e)},getApplicationFiles:function(t){return fg.get("applications/".concat(t,"/files"))},getApplicationImageFiles:function(t){return fg.get("applications/".concat(t,"/files/images"))},getApplicationDocumentFiles:function(t){return fg.get("applications/".concat(t,"/files/documents"))},addApplicationFile:function(t,e){return fg.post("applications/".concat(t,"/files"),e)},addApplicationImageFile:function(t,e){return fg.post("applications/".concat(t,"/files/images"),e)},addApplicationDocumentFile:function(t,e){return fg.post("applications/".concat(t,"/files/documents"),e)},getApplicationFile:function(t,e){return fg.delete("applications/".concat(t,"/files/").concat(e))},updateApplicationFile:function(t,e,n){return fg.put("applications/".concat(t,"/files/").concat(e),n)},deleteApplicationFile:function(t,e){return fg.delete("applications/".concat(t,"/files/").concat(e))},downloadApplicationFile:function(t,e){return fg.get("applications/".concat(t,"/files/").concat(e,"/content"))},getStatusReportImageFiles:function(t){return fg.get("applicationgrants/statusreport/".concat(t,"/files/images"))},getStatusReportDocumentFiles:function(t,e){return fg.get("applicationgrants/".concat(t,"/statusreport/").concat(e,"/files/documents"))},addStatusReportImageFile:function(t,e,n){return fg.post("applicationgrants/".concat(t,"/statusreport/").concat(e,"/files/images"),n)},addStatusReportDocumentFile:function(t,e,n){return fg.post("applicationgrants/".concat(t,"/statusreport/").concat(e,"/files/documents"),n)},updateStatusReportFile:function(t,e,n){return fg.put("applicationgrants/statusreport/".concat(t,"/files/").concat(e),n)},deleteStatusReportFile:function(t,e){return fg.delete("applicationgrants/statusreport/".concat(t,"/files/").concat(e))},downloadStatusReportFile:function(t,e){return fg.get("applicationgrants/statusreport/".concat(t,"/files/").concat(e,"/content"))},getPositionList:function(){return fg.get("applications/positionlist")},getDegreeList:function(){return fg.get("applications/academicdegreelist")},getGenderList:function(){return fg.get("applications/genderlist")},loadBudget:function(t){return fg.get("applications/".concat(t,"/budgetlines"))},loadLatestBudget:function(t){return fg.get("applications/".concat(t,"/budgetlines?getLatest=true"))},createBudget:function(t,e){return fg.post("applications/".concat(t,"/budgetlines"),e)},getBudgetItem:function(t,e){return fg.get("applications/".concat(t,"/budgetlines/").concat(e))},updateBudget:function(t,e,n){return fg.put("applications/".concat(t,"/budgetlines/").concat(e),n)},deleteBudget:function(t,e){return fg.delete("applications/".concat(t,"/budgetlines/").concat(e))},createBudgetCR:function(t){return fg.post("applications/".concat(t,"/budgetchangerequest"))},createAndSubmitBudgetCR:function(t){return fg.post("applications/".concat(t,"/budgetchangerequestsubmitted"))},submitBudgetCR:function(t){return fg.put("applications/".concat(t,"/budgetchangerequest"))},deleteBudgetCR:function(t){return fg.delete("applications/".concat(t,"/budgetchangerequest"))},updateBudgetCR:function(t,e,n){return fg.put("applications/".concat(t,"/budgetchangerequest/").concat(e,"/comment"),n,{validateStatus:!1})},loadApplicants:function(t){return fg.get("applications/".concat(t,"/applicants"))},createApplicant:function(t,e){return fg.post("applications/".concat(t,"/applicants"),e,{validateStatus:!1})},getApplicant:function(t,e){return fg.get("applications/".concat(t,"/applicants/").concat(e))},updateApplicant:function(t,e,n){return fg.put("applications/".concat(t,"/applicants/").concat(e),n,{validateStatus:!1})},deleteApplicant:function(t,e){return fg.delete("applications/".concat(t,"/applicants/").concat(e))},getApplicationReviewRounds:function(){return fg.get("applicationreviews/rounds")},getApplicationReviewPreferences:function(t){return fg.get("applicationreviews/round/".concat(t,"/reviewerpreferences"))},getApplicationReviews:function(t){return fg.get("applicationreviews/round/".concat(t,"/scoring"))},getApplicationReviewScores:function(t){return fg.get("applicationreviews/round/".concat(t,"/overview"))},getApplicationReview:function(t){return fg.get("applicationreviews/".concat(t))},updateApplicationReviewPreference:function(t,e){return fg.post("applicationreviews/".concat(t,"/setreviewerpreference/").concat(e))},getApplicationReviewFile:function(t,e){return fg.get("applicationreviews/".concat(t,"/files/").concat(e))},getApplicationReviewPdf:function(t){return fg.get("applicationreviews/".concat(t,"/pdf"))},updateApplicationReviewScore:function(t,e,n){return fg.put("applicationreviews/".concat(t,"/scoring/").concat(e,"/score"),n)},updateApplicationReviewComment:function(t,e,n){return fg.put("applicationreviews/".concat(t,"/scoring/").concat(e,"/comment"),n)},updateApplicationReviewMessage:function(t,e){return fg.put("applicationreviews/".concat(t,"/message"),e)},markApplicationReviewFinished:function(t){return fg.post("applicationreviews/".concat(t,"/markfinished"))},markAllFinished:function(t){return fg.post("applicationreviews/round/".concat(t,"/markallfinished"),{},{validateStatus:!1})},markApplicationReviewConflict:function(t){return fg.post("applicationreviews/".concat(t,"/markconflictinterests"))}
1,getApplicationReviewDataTransferAgreement:function(){return fg.get("applicationreviews/dataprocessoragreement")},acceptApplicationReviewDataTransferAgreement:function(t){return fg.post("applicationreviews/".concat(t,"/acceptdataprocessoragreement"))},getApplicationReviewScoreStatistic:function(t){return fg.get("applicationreviews/round/".concat(t,"/scorestatistics"))},getApplicationReviewerNdaAgreement:function(){return fg.get("applicationreviews/reviewerndaagreement")},acceptApplicationReviewerNdaAgreement:function(t){return fg.post("applicationreviews/".concat(t,"/acceptreviewerndaagreement"))},getApplicationGrant:function(t){return fg.get("applicationgrants/".concat(t))},acceptGrantConditions:function(t){return fg.put("applicationgrants/".concat(t,"/acceptconditions"))},getApplicationGrantInstituteAdministrator:function(t,e){return fg.get("applicationgrants/".concat(t,"/instituteadministrators/").concat(e))},updateApplicationGrantInstituteAdministrator:function(t,e,n){return fg.put("applicationgrants/".concat(t,"/instituteadministrators/").concat(e),n,{validateStatus:!1})},addApplicationGrantInstituteAdministrator:function(t,e){return fg.post("applicationgrants/".concat(t,"/instituteadministrators"),e,{validateStatus:!1})},deleteApplicationGrantInstituteAdministrator:function(t,e){return fg.delete("applicationgrants/".concat(t,"/instituteadministrators/").concat(e))},addApplicationGrantStatusReport:function(t,e){return fg.post("applicationgrants/".concat(t,"/statusreport/").concat(e),{validateStatus:!1})},getApplicationGrantStatusReport:function(t,e){return fg.get("applicationgrants/".concat(t,"/statusreport/").concat(e))},getApplicationGrantAccounting:function(t,e){return fg.get("applicationgrants/".concat(t,"/accounting/").concat(e))},getApplicationGrantStatusReportPdf:function(t,e){return fg.get("applicationgrants/".concat(t,"/statusreport/").concat(e,"/pdf"))},submitApplicationGrantStatusReport:function(t,e){return fg.put("applicationgrants/".concat(t,"/statusreport/").concat(e,"/submit"),{validateStatus:!1})},submitApplicationGrantStatusReportWithoutAccounting:function(t,e){return fg.put("applicationgrants/".concat(t,"/statusreport/").concat(e,"/submitwithoutaccounting"))},submitApplicationGrantAccounting:function(t,e){return fg.put("applicationgrants/".concat(t,"/accounting/").concat(e,"/submit"))},updateApplicationGrantDynamicField:function(t,e,n){return fg.put("applicationgrants/".concat(t,"/statusreport/").concat(e,"/dynamicfield"),n)},deleteApplicationGrantStatusReport:function(t,e){return fg.delete("applicationgrants/".concat(t,"/statusreport/").concat(e))},updateApplicationGrantStatusReportAmount:function(t,e,n,i){return console.log((0,Z.Z)(i)),fg.put("applicationgrants/".concat(t,"/statusreport/").concat(e,"/accountingpost/").concat(n,"/amount"),i)},updateApplicationGrantStatusReportDescription:function(t,e,n,i){return fg.put("applicationgrants/".concat(t,"/statusreport/").concat(e,"/accountingpost/").concat(n,"/description"),i)},updateApplicationGrantStatusReportResearchfish:function(t,e){return fg.post("applicationgrants/".concat(t,"/statusreport/").concat(e,"/collectresearchfield"))},getApplicationGrantPaymentDetails:function(t){return fg.get("applicationgrants/".concat(t,"/paymentdetails"))},updateApplicationGrantPaymentDetails:function(t,e){return fg.put("applicationgrants/".concat(t,"/paymentdetails"),e)},addApplicationGrantPaymentRequest:function(t,e){return fg.post("applicationgrants/".concat(t,"/paymentrequest/").concat(e))},getApplicationGrantPaymentRequest:function(t,e){return fg.get("applicationgrants/".concat(t,"/paymentrequest/").concat(e))},updateApplicationGrantPaymentRequest:function(t,e,n){return fg.put("applicationgrants/".concat(t,"/paymentrequest/").concat(e),n)},deleteApplicationGrantPaymentRequest:function(t,e){return fg.delete("applicationgrants/".concat(t,"/paymentrequest/").concat(e))},submitApplicationGrantPaymentRequest:function(t,e){return fg.put("applicationgrants/".concat(t,"/paymentrequest/").concat(e,"/submit"))},cancelApplicationGrantPaymentRequest:function(t,e){return fg.put("applicationgrants/".concat(t,"/paymentrequest/").concat(e,"/cancel"))},acceptCoapplicant:function(t){return fg.put("applicationgrants/acceptcoapplicant",t)},getInstallmentWizardStatus:function(t){return fg.get("applicationgrants/".concat(t,"/installmentwizardstatus"))},getInstallmentWizardStatusRate:function(t,e){return fg.get("applicationgrants/".concat(t,"/rate/").concat(e,"/installmentwizardstatus"))},createInstallmentWizard:function(t,e){return fg.post("applicationgrants/".concat(t,"/installmentwizard/").concat(e))},submitInstallmentWizard:function(t,e){return fg.put("applicationgrants/".concat(t,"/installmentwizard/").concat(e,"/submit"))},getMessages:function(){return fg.get("messages/overview")},getApplicationMessages:function(t){return fg.get("messages/application/".concat(t))},addApplicationMessage:function(t){return fg.post("messages/application/".concat(t))},getNominationMessages:function(t){return fg.get("messages/nomination/".concat(t))},addNominationMessage:function(t){return fg.post("messages/nomination/".concat(t))},getNomineeMessages:function(t){return fg.get("messages/nominee/".concat(t))},addNomineeMessage:function(t){return fg.post("messages/nominee/".concat(t))},addThreadMessage:function(t){return fg.post("messages/thread/".concat(t,"/reply"))},sendMessageDraft:function(t){return fg.put("messages/".concat(t,"/send"))},markMessageRead:function(t){return fg.put("messages/".concat(t,"/read"))},updateMessageSubject:function(t,e){return fg.put("messages/".concat(t,"/subject"),e)},updateMessage:function(t,e){return fg.put("messages/".concat(t,"/text"),e)},getMessageDraft:function(t){return fg.get("messages/".concat(t))},deleteMessageDraft:function(t){return fg.delete("messages/".concat(t))},getMessageFile:function(t,e){return fg.get("messages/".concat(t,"/files/").concat(e))},deleteMessageFile:function(t,e){return fg.delete("messages/".concat(t,"/files/").concat(e))},addMessageFile:function(t,e){return fg.post("messages/".concat(t,"/files"),e)},getMessageFiles:function(t){return fg.get("messages/".concat(t,"/files"))},getPendingPayment:function(){return fg.get("nominees/payment/pending")},getPendingPaymentInfo:function(t){return fg.get("nominees/payment/pending/".concat(t))},updatePendingPaymentInfo:function(t,e){return fg.put("nominees/payment/pending/".concat(t),e)},login:function(t){var e=t.email,n=t.password;return fg.post("users/login",{LoginName:e,Password:n})},getProfile:function(){return fg.get("users/profile")},updateProfile:function(t){return fg.put("users/profile",t)},changePassword:function(t){var e=t.loginName,n=t.oldPassword,i=t.newPassword;return fg.put("users/change-password",{LoginName:e,OldPassword:n,NewPassword:i})},activate:function(t){return fg.put("users/activate",t)},resendToken:function(t){return fg.get("users/activate/resendtoken",{params:{LoginName:t}})},verifyEmailToken:function(t){var e=t.login,n=t.token;return fg.put("users/activate",{params:{LoginName:e,Token:n}})},createUser:function(t){var e=t.firstName,n=t.lastName,i=t.email,a=t.password;return fg.post("users",{FirstName:e,LastName:n,LoginName:i,Password:a})},resetPasswordEmail:function(t){return fg.get("users/resetpassword?LoginName="+t)}
1,resetPassword:function(t){var e=t.loginName,n=t.token,i=t.newPassword;return fg.put("users/change-password-token",{LoginName:e,Token:n,NewPassword:i})},fetchCity:function(t){var e=t.postalCode,n=t.countryId;return fg.get("users/lookupcity",{params:{PostalCode:e,CountryId:n}})}},Zg={profile:null,pending:!1,error:!1,passwordChange:{pending:!1,error:"",success:!1}},Gg=(vg={},(0,Ks.Z)(vg,Pe,(function(t){var e=t.commit,n=t.dispatch;return e(Xo.GET_PROFILE_REQUEST),n(ke),$g.getProfile().then((function(t){var n=t.data;return e(Xo.GET_PROFILE_SUCCESS,n.Value),n.Value})).catch((function(){e(Xo.GET_PROFILE_ERROR)}))})),(0,Ks.Z)(vg,Se,(function(t,e){var n=t.commit,i=t.dispatch,a=t.state,s=e.name,r=e.value,o=e.notificationName,l=a.profile,c=(0,Ks.Z)({},s,l[s]),u=(0,Ks.Z)({},s,r);return n(Xo.UPDATE_PROFILE,{property:u}),$g.updateProfile(a.profile).then((function(t){t.data;i(Ia,{status:!0,text:"Updated "+o}),"PostalCode"===s&&i(Me,{postalCode:a.profile.PostalCode,countryId:a.profile.Nationality})})).catch((function(){n(Xo.UPDATE_PROFILE,{property:c}),i(Ia,{status:!1,text:"Failed update "+o})}))})),(0,Ks.Z)(vg,Re,(function(t,e){t.commit;var n=t.state,i=e.oldPassword,a=e.newPassword;return $g.changePassword({loginName:n.profile.Email,oldPassword:i,newPassword:a})})),(0,Ks.Z)(vg,Me,(function(t,e){var n=t.dispatch;$g.fetchCity(e).then((function(t){var e=t.data;e.Value&&n(Se,{name:"City",value:e.Value,notificationName:"city"})}))})),vg),Bg={},Ug=(hg={},(0,Ks.Z)(hg,Xo.GET_PROFILE_REQUEST,(function(t){t.pending=!0,t.error=!1})),(0,Ks.Z)(hg,Xo.GET_PROFILE_SUCCESS,(function(t,e){t.pending=!1,t.profile=e})),(0,Ks.Z)(hg,Xo.GET_PROFILE_ERROR,(function(t){t.pending=!1,t.error=!0})),(0,Ks.Z)(hg,Xo.CLEAR_PROFILE,(function(t){t.profile=null})),(0,Ks.Z)(hg,Xo.UPDATE_PROFILE,(function(t,e){var n=e.property;t.profile=(0,Dt.Z)((0,Dt.Z)({},t.profile),n)})),hg),Wg={state:Zg,getters:Bg,actions:Gg,mutations:Ug},Vg={token:null,password_email:null},zg=(gg={},(0,Ks.Z)(gg,te,(function(t,e){var n=t.commit,i=t.dispatch;return $g.login(e).then((function(t){var e=t.data;n(Qs,e.Value),i(Pe)}))})),(0,Ks.Z)(gg,ee,(function(t){var e=t.commit;e(Qs,null),e(xr),window.localStorage.removeItem("token")})),(0,Ks.Z)(gg,ne,(function(t,e){var n=t.commit;return n(Js,e.email),$g.createUser(e)})),(0,Ks.Z)(gg,ie,(function(t,e){t.commit;return $g.resendToken(e)})),(0,Ks.Z)(gg,ae,(function(t,e){t.commit;return $g.activate(e)})),(0,Ks.Z)(gg,De,(function(t,e){var n=t.commit;return n(Js,e),$g.resetPasswordEmail(e)})),(0,Ks.Z)(gg,Le,(function(t,e){t.commit;return $g.resetPassword(e)})),gg),jg={isAuthenticated:function(t){return!!t.token}},Yg=(_g={},(0,Ks.Z)(_g,Qs,(function(t,e){t.token=e})),(0,Ks.Z)(_g,Js,(function(t,e){t.password_email=e})),_g),qg={state:Vg,getters:jg,actions:zg,mutations:Yg},Hg=(Ig={},(0,Ks.Z)(Ig,be,(function(t,e){var n=t.getters,i=t.dispatch,a=e.nomineeId,s=e.fileContent;return $g.createFile(n.nominationID,a,s).then((function(t){t.data;i(xe)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Ig,xe,(function(t){var e=t.commit,n=t.getters;return $g.getFiles(n.nominationID).then((function(t){var n=t.data;e(Xo.SET_FILES,n.Value)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Ig,Ce,(function(t,e){t.commit;var n=t.getters,i=t.dispatch;return $g.deleteFile(n.nominationID,e).then((function(t){t.data;i(xe,e)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Ig,ye,(function(t,e){t.commit;var n=t.getters,i=t.dispatch,a=e.fileId,s=e.fileContent;return $g.updateFile(n.nominationID,a,s).then((function(t){t.data;i(xe)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Ig,we,(function(t,e){t.commit;var n=t.getters;t.dispatch;return $g.downloadFile(n.nominationID,e).then((function(t){var e=t.data,n=e.Value,i=n.FileContent,a=n.Filename;(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i)),a)})).catch((function(t){console.log(t)}))})),Ig),Kg={files:[]},Qg={files:function(t){return t.files},fileById:function(t,e){return function(t){return e.files.find((function(e){return e.Id===t}))}}},Jg=(Ag={},(0,Ks.Z)(Ag,Xo.ADD_FILE,(function(t,e){t.files.push(e)})),(0,Ks.Z)(Ag,Xo.SET_FILES,(function(t,e){t.files=e})),Ag),Xg={state:Kg,getters:Qg,actions:Hg,mutations:Jg},t_=["Nominee","Nomination","Contribution","Preview"],e_={pending:!1,new:!1,submitSuccess:!1,nomination:{},validationErrors:{},pdf:{},addingNomineeError:""},n_=(bg={},(0,Ks.Z)(bg,se,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch;return n(Xo.SUBMIT_SUCCESS,!1),n(Xo.CLEAR_VALIDATION_ERRORS),n(Xo.SET_ADDING_NOMINEE_ERROR,""),$g.getNomination(e).then((function(t){var e=t.data;n(Xo.SET_NOMINATION,e.Value),i.nominationIsSubmitted?a(oe):a(xe)}))})),(0,Ks.Z)(bg,ve,(function(t,e){var n=t.commit;return $g.getNomination(e).then((function(t){var e=t.data;n(Xo.SET_NOMINATION,e.Value)}))})),(0,Ks.Z)(bg,le,(function(t,e){var n=t.commit,i=t.state,a=t.dispatch;return $g.createNominee(i.nomination.Id).then((function(t){var e=t.data;n(Xo.ADD_NOMINEE,e.Value),a(ve,i.nomination.Id)})).catch((function(t){var e=t.response,i=e.data.Messages[0].Message;n(Xo.SET_ADDING_NOMINEE_ERROR,i)}))})),(0,Ks.Z)(bg,ce,(function(t,e){var n=t.commit;t.getters;return $g.deleteNominee(e_.nomination.Id,e).then((function(t){t.data;n(Xo.REMOVE_NOMINEE,e),n(Xo.SET_ADDING_NOMINEE_ERROR,"")}))})),(0,Ks.Z)(bg,ue,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch,s=e.id,r=e.property,o=r.
1name,l=r.value,c=r.notificationName,u=i.nomineeByID(s),d=(0,Ks.Z)({},o,u[o]),p=(0,Ks.Z)({},o,l),m=o+"/"+s;return n(Xo.UPDATE_NOMINEE,{id:s,property:p}),$g.updateNominee(e_.nomination.Id,s,i.nomineeByID(s)).then((function(t){var e=t.data;if(a(Ia,{status:!0,text:"Updated "+c}),e.Messages&&e.Messages.length){var i=e.Messages.find((function(t){return t.AppliesTo===m}));i?n(Xo.ADD_VALIDATION_ERRORS,(0,Ks.Z)({},m,i.Message)):n(Xo.REMOVE_VALIDATION_ERROR,m)}else n(Xo.REMOVE_VALIDATION_ERROR,m)})).catch((function(){n(Xo.UPDATE_NOMINEE,{id:s,property:d}),a(Ia,{status:!1,text:"Failed update "+c})}))})),(0,Ks.Z)(bg,de,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch,s=e.id,r=e.property,o=r.name,l=r.value,c=r.notificationName,u=i.dynamicFieldByID(s),d=(0,Ks.Z)({},o,u[o]),p=(0,Ks.Z)({},o,l),m=W(c);return n(Xo.UPDATE_DYNAMIC_FIELD,{id:s,property:p}),$g.updateNominationDynamicField(e_.nomination.Id,i.dynamicFieldByID(s)).then((function(t){var e=t.data;a(ve,e_.nomination.Id),a(Ia,{status:!0,text:"Updated "+m}),e.Messages&&e.Messages.length?n(Xo.ADD_VALIDATION_ERRORS,(0,Ks.Z)({},s,e.Messages[0].Message)):n(Xo.REMOVE_VALIDATION_ERROR,s)})).catch((function(t){console.log(t),n(Xo.UPDATE_DYNAMIC_FIELD,{id:s,property:d}),a(Ia,{status:!1,text:"Failed update "+m})}))})),(0,Ks.Z)(bg,pe,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch,s=e.nomineeId,r=e.id,o=e.property,l=o.name,c=o.value,u=o.notificationName,d=i.nomineeDynamicFieldByID(s,r),p=(0,Ks.Z)({},l,d[l]),m=(0,Ks.Z)({},l,c),f=W(u);return n(Xo.UPDATE_NOMINEE_DYNAMIC_FIELD,{nomineeId:s,id:r,property:m}),$g.updateNomineeDynamicField(e_.nomination.Id,s,i.nomineeDynamicFieldByID(s,r)).then((function(t){var e=t.data;a(ve,e_.nomination.Id),a(Ia,{status:!0,text:"Updated "+f}),e.Messages&&e.Messages.length?n(Xo.ADD_VALIDATION_ERRORS,(0,Ks.Z)({},r,e.Messages[0].Message)):n(Xo.REMOVE_VALIDATION_ERROR,r)})).catch((function(){n(Xo.UPDATE_NOMINEE_DYNAMIC_FIELD,{nomineeId:s,id:r,property:p}),a(Ia,{status:!1,text:"Failed update "+f})}))})),(0,Ks.Z)(bg,me,(function(t){var e=t.commit;t.getters;return e(Xo.CLEAR_VALIDATION_ERRORS),$g.submitNomination(e_.nomination.Id).then((function(t){t.data;e(Xo.SUBMIT_SUCCESS,!0)})).catch((function(t){var n=t.response.data,i=n.Messages.filter((function(t){return 1===t.Type})).reduce((function(t,e){return t[e.AppliesTo]=e.Message,t}),{});return e(Xo.ADD_VALIDATION_ERRORS,i),n.Messages.filter((function(t){return 1===t.Type}))}))})),(0,Ks.Z)(bg,oe,(function(t){var e=t.commit;t.getters;return e(Xo.SET_NOMINATION_PDF,{}),$g.getNominationPdf(e_.nomination.Id).then((function(t){var n=t.data;e(Xo.SET_NOMINATION_PDF,n.Value)}))})),(0,Ks.Z)(bg,re,(function(t,e){var n=t.commit;t.getters;return n(Xo.SET_NOMINATION_PDF,{}),$g.getNominationPdf(e).then((function(t){return t.data})).catch((function(t){return t.response.data}))})),(0,Ks.Z)(bg,fe,(function(t,e){var n=t.commit,i=t.getters,a=t_.slice(0,e),s=i.fieldsStepMap;return n(Xo.CLEAR_VALIDATION_ERRORS),$g.validateNomination(e_.nomination.Id).catch((function(t){var e=t.response.data,i=e.Messages.filter((function(t){return 1===t.Type})).filter((function(t){return a.includes(s[t.AppliesTo])})).reduce((function(t,e){return t[e.AppliesTo]=e.Message,t}),{});n(Xo.ADD_VALIDATION_ERRORS,i)}))})),(0,Ks.Z)(bg,Ie,(function(t,e){t.commit;return $g.acceptNomination(e)})),bg),i_={nominationID:function(t){return t.nomination.Id},nominationIsSubmitted:function(t){return null!==t.nomination.SubmissionDate},nomineeByID:function(t){return function(e){return t.nomination.NomineesList.find((function(t){return t.Id===e}))}},dynamicFieldByID:function(t){return function(e){return t.nomination.DynamicFieldsList.find((function(t){return t.Id===e}))}},nomineeDynamicFieldByID:function(t){return function(e,n){var i=t.nomination.NomineeFieldsList.find((function(t){return t.Id===e}));return i.DynamicFieldsList.find((function(t){return t.Id===n}))}},fieldsStepMap:function(t){var e={},n=t.nomination.NomineesList||[],i=t.nomination.DynamicFieldsList||[],a=t.nomination.NomineeFieldsList||[];return n.forEach((function(t){Object.keys(t).forEach((function(n){e[n+"/"+t.Id]="Nominee"}))}
1)),i.forEach((function(t){e[t.Id]="Nomination"})),a.forEach((function(t){t.DynamicFieldsList.forEach((function(t){e[t.Id]="Contribution"}))})),e},stepsWithErrors:function(t,e){var n=e.fieldsStepMap,i=Object.keys(t.validationErrors).map((function(t){return n[t]}));return(0,Kt.Z)(new Set(i))}},a_=(xg={},(0,Ks.Z)(xg,Xo.SET_NOMINATION,(function(t,e){t.nomination=e})),(0,Ks.Z)(xg,Xo.ADD_NOMINEE,(function(t,e){t.nomination.NomineesList=[].concat((0,Kt.Z)(t.nomination.NomineesList),[e])})),(0,Ks.Z)(xg,Xo.REMOVE_NOMINEE,(function(t,e){t.nomination.NomineesList=t.nomination.NomineesList.filter((function(t){return t.Id!==e}))})),(0,Ks.Z)(xg,Xo.UPDATE_NOMINEE,(function(t,e){var n=e.id,i=e.property;t.nomination.NomineesList=t.nomination.NomineesList.map((function(t){return t.Id!==n?t:(0,Dt.Z)((0,Dt.Z)({},t),i)}))})),(0,Ks.Z)(xg,Xo.UPDATE_DYNAMIC_FIELD,(function(t,e){var n=e.id,i=e.property;t.nomination.DynamicFieldsList=t.nomination.DynamicFieldsList.map((function(t){return t.Id!==n?t:(0,Dt.Z)((0,Dt.Z)({},t),i)}))})),(0,Ks.Z)(xg,Xo.UPDATE_NOMINEE_DYNAMIC_FIELD,(function(t,e){var n=e.nomineeId,i=e.id,a=e.property;t.nomination.NomineeFieldsList=t.nomination.NomineeFieldsList.map((function(t){return t.Id!==n||(t.DynamicFieldsList=t.DynamicFieldsList.map((function(t){return t.Id!==i?t:(0,Dt.Z)((0,Dt.Z)({},t),a)}))),t}))})),(0,Ks.Z)(xg,Xo.ADD_VALIDATION_ERRORS,(function(t,e){t.validationErrors=(0,Dt.Z)((0,Dt.Z)({},t.validationErrors),e)})),(0,Ks.Z)(xg,Xo.REMOVE_VALIDATION_ERROR,(function(t,e){s["default"]["delete"](t.validationErrors,e)})),(0,Ks.Z)(xg,Xo.CLEAR_VALIDATION_ERRORS,(function(t){t.validationErrors={}})),(0,Ks.Z)(xg,Xo.SUBMIT_SUCCESS,(function(t,e){t.submitSuccess=e})),(0,Ks.Z)(xg,Xo.SET_NOMINATION_PDF,(function(t,e){t.pdf=e})),(0,Ks.Z)(xg,Xo.SET_ADDING_NOMINEE_ERROR,(function(t,e){t.addingNomineeError=e})),xg),s_={files:Xg},r_={state:e_,getters:i_,actions:n_,mutations:a_,modules:s_},o_={list:[],rounds:[],privacyNotice:null,dataAgreement:null,errorMessage:null},l_=(Cg={},(0,Ks.Z)(Cg,Te,(function(t){var e=t.commit;$g.getNominations().then((function(t){var n=t.data;e(Xo.SET_NOMINATION_LIST,n.Value)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Cg,Ne,(function(t,e){t.commit;return $g.createNomination(e).then((function(t){return t.data}))})),(0,Ks.Z)(Cg,Ee,(function(t,e){var n=t.commit;t.dispatch;return $g.deleteNomination(e).then((function(){n(Xo.REMOVE_NOMINATION,e)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Cg,Ae,(function(t,e){var n=t.commit;t.getters;return $g.reopenNomination(e).then((function(t){var e=t.data;e.Success||n(Xo.SET_NOMINATION_ERROR_MESSAGE,e.Messages[0].Message)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Cg,he,(function(t){var e=t.commit;return $g.getRounds().then((function(t){var n=t.data;return e(Xo.SET_NOMINATION_ROUND_LIST,n.Value),n}))})),(0,Ks.Z)(Cg,ge,(function(t){var e=t.commit;return $g.getPrivacyNotice().then((function(t){var n=t.data;return e(Xo.SET_PRIVACY_NOTICE,n.Value),n}))})),(0,Ks.Z)(Cg,_e,(function(t){var e=t.commit;return $g.getDataTransferAgreement().then((function(t){var n=t.data;return e(Xo.SET_DATA_AGREEMENT,n.Value),n}))})),Cg),c_={},u_=(yg={},(0,Ks.Z)(yg,Xo.SET_NOMINATION_LIST,(function(t,e){t.list=e})),(0,Ks.Z)(yg,Xo.ADD_NOMINATION,(function(t,e){t.list.push(e)})),(0,Ks.Z)(yg,Xo.REMOVE_NOMINATION,(function(t,e){t.list=t.list.filter((function(t){return t.Id!==e}))})),(0,Ks.Z)(yg,Xo.SET_NOMINATION_ROUND_LIST,(function(t,e){t.rounds=e})),(0,Ks.Z)(yg,Xo.SET_PRIVACY_NOTICE,(function(t,e){t.privacyNotice=e})),(0,Ks.Z)(yg,Xo.SET_DATA_AGREEMENT,(function(t,e){t.dataAgreement=e})),(0,Ks.Z)(yg,Xo.SET_NOMINATION_ERROR_MESSAGE,(function(t,e){t.errorMessage=e})),yg),d_={state:o_,getters:c_,actions:l_,mutations:u_},p_=(wg={},(0,Ks.Z)(wg,ke,(function(t){var e=t.commit,n=t.dispatch;return $g.getPendingPayment().then((function(t){var i=t.data;return e(Xo.SET_PENDING_PAYMENT_LIST,i.Value||[]),i.Value&&i.Value.length>0?(e(Xo.SET_PENDING_PAYMENT_ID,i.Value[0].Id),n(Oe)):(e(Xo.SET_PENDING_PAYMENT_ID,null),e(Xo.SET_PENDING_PAYMENT,null)),i}))})),(0,Ks.Z)(wg,Oe,(function(t){var e=t.commit,n=t.state;return $g.getPendingPaymentInfo(n.paymentId).then((function(t){var n=t.data;return e(Xo.SET_PENDING_PAYMENT,n.Value),n}))})),(0,Ks.Z)(wg,Fe,(function(t,e){var n=t.state;return $g.updatePendingPaymentInfo(n.paymentId,e)})),wg),m_={paymentId:null,payment:null,paymentList:[]},f_={pendingPaymentDescription:function(t){if(t.paymentId){var e=t.paymentList.find((function(e){return e.Id===t.paymentId}));if(e)return e.Description}return null}},v_=(Tg={},(0,Ks.Z)(Tg,Xo.SET_PENDING_PAYMENT,(function(t,e){t.payment=e})),(0,Ks.Z)(Tg,Xo.SET_PENDING_PAYMENT_ID,(function(t,e){t.paymentId=e})),(0,Ks.Z)(Tg,Xo.SET_PENDING_PAYMENT_LIST,(function(t,e){t.paymentList=e})),Tg),h_={state:m_,getters:f_,actions:p_,mutations:v_},g_={roundsList:[],roundsListLoaded:!1,round:null,nominations:[],nominationsLoaded:!1,nominees:[],review:null,orderBy:"status",orderAsc:!0,dataAgreement:null},__=(Ng={},(0,Ks.Z)(Ng,$e,(function(t){var e=t.commit,n=t.state;return $g.getReviewRounds().then((function(t){var i=t.data;
1e(Rr,i.Value),n.round||e(Lr,i.Value[0])}))})),(0,Ks.Z)(Ng,Ze,(function(t){var e=t.commit;return $g.getReviewDataTransferAgreement().then((function(t){var n=t.data;return e(Dr,n.Value),n}))})),(0,Ks.Z)(Ng,Ge,(function(t,e){t.commit;return $g.acceptReviewDataTransferAgreement(e)})),(0,Ks.Z)(Ng,We,(function(t,e){var n=t.commit,i=t.state,a=i.roundsList.find((function(t){return t.RoundId===e}));a&&n(Lr,a)})),(0,Ks.Z)(Ng,Be,(function(t){var e=t.commit;return $g.getReviewNominations().then((function(t){var n=t.data;e(Mr,n.Value)}))})),(0,Ks.Z)(Ng,Ue,(function(t,e){var n=t.commit;return $g.getReview(e).then((function(t){var e=t.data;return n(Or,e.Value),e.Value}))})),(0,Ks.Z)(Ng,Ve,(function(t,e){t.state;var n=e.reviewId,i=e.nominationId;return new Promise((function(t,e){$g.getReviewPdf(n,i).then((function(e){var n=e.data,i=n.Value,a=i.FileContent,s=i.Filename,r=(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(a)),s);t(r)})).catch((function(t){console.log(t),e(t)}))}))})),(0,Ks.Z)(Ng,ze,(function(t,e){t.state;var n=e.reviewId,i=e.fileId;return $g.getReviewAttachment(n,i).then((function(t){var e=t.data,n=e.Value,i=n.FileContent,a=n.Filename;(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i)),a)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Ng,je,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.scoringId,s=e.data;return $g.updateReviewScore(i,a,s).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated score"}),n(Ue,i),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update score"})}))})),(0,Ks.Z)(Ng,Ye,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.scoringId,s=e.data;return $g.updateReviewComment(i,a,s).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated comment"}),n(Ue,i),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update comment"})}))})),(0,Ks.Z)(Ng,qe,(function(t,e){t.dispatch;return $g.markConflict(e)})),(0,Ks.Z)(Ng,He,(function(t,e){t.dispatch;return $g.markFinished(e)})),(0,Ks.Z)(Ng,Ke,(function(t){var e=t.commit;t.state;return $g.getNominees().then((function(t){return e(Fr,t.data.Value),t.data.Value}))})),(0,Ks.Z)(Ng,Qe,(function(t){var e=t.commit;e(Or,null)})),Ng),I_={reviewNominations:function(t){return t.nominations.sort((function(e,n){var i=e.NomineeFirstName.toLowerCase()>n.NomineeFirstName.toLowerCase();return"status"===t.orderBy?i=!(e.IsFinished||n.IsFinished)||e.NomineeLastName>n.NomineeLastName:"affiliation"===t.orderBy?i=e.Affiliation>n.Affiliation:"score"===t.orderBy?i=e.MyScoreAvg>n.MyScoreAvg:"nomineelastname"===t.orderBy&&(i=e.NomineeLastName.toLowerCase()>n.NomineeLastName.toLowerCase()),t.orderAsc?i?1:-1:i?-1:1}))},reviewNomineeNominations:function(t){return t.nominees.sort((function(e,n){var i=e.NomineeFirstName.toLowerCase()>n.NomineeFirstName.toLowerCase();return"status"===t.orderBy?i=!(e.IsFinished||n.IsFinished)||e.NomineeLastName.toLowerCase()>n.NomineeLastName.toLowerCase():"affiliation"===t.orderBy?i=e.Affiliation>n.Affiliation:"score"===t.orderBy?i=e.AverageScore>n.AverageScore:"nomineelastname"===t.orderBy&&(i=e.NomineeLastName.toLowerCase()>n.NomineeLastName.toLowerCase()),t.orderAsc?i?1:-1:i?-1:1}))}},A_=(Eg={},(0,Ks.Z)(Eg,Rr,(function(t,e){t.roundsList=e,t.roundsListLoaded=!0})),(0,Ks.Z)(Eg,Dr,(function(t,e){t.dataAgreement=e})),(0,Ks.Z)(Eg,Lr,(function(t,e){t.round=e})),(0,Ks.Z)(Eg,Mr,(function(t,e){t.nominations=e,t.nominationsLoaded=!0})),(0,Ks.Z)(Eg,kr,(function(t,e){var n=e.orderBy,i=e.orderAsc;t.orderBy=n,t.orderAsc=i})),(0,Ks.Z)(Eg,Or,(function(t,e){t.review=e})),(0,Ks.Z)(Eg,Fr,(function(t,e){t.nominees=e})),Eg),b_={state:g_,getters:I_,actions:__,mutations:A_},x_={notifications:[]},C_=(0,Ks.Z)({},Ia,(function(t,e){var n=t.commit,i=Math.random();n(Xo.ADD_NOTIFICATION,(0,Dt.Z)((0,Dt.Z)({},e),{},{id:i})),setTimeout((function(){n(Xo.REMOVE_NOTIFICATION,i)}),Nd)})),y_={notification:function(t){return t.notifications[t.notifications.length-1]}},w_=(Pg={},(0,Ks.Z)(Pg,Xo.ADD_NOTIFICATION,(function(t,e){t.notifications.push(e)})),(0,Ks.Z)(Pg,Xo.REMOVE_NOTIFICATION,(function(t,e){t.notifications=t.notifications.filter((function(t){return t.id!==e}))})),Pg),T_={state:x_,getters:y_,actions:C_,mutations:w_},N_=n(66353),E_=(n(40561),n(74806)),P_=n.n(E_),S_=["DynamicFieldPageList","CountryList","InstitutionList","SubjectAreaList"],R_={privacyNotice:null,dataAgreement:null,copyRounds:[],rounds:[],applications:[],orderBy:"round",orderAsc:!0,application:{},project:{Title:null,Summary:null,StartDate:null,EndDate:null,ResearchArea:null,MainField:null,ExpertiseField:null,Institution:null,Institute:null,Department:null,Country:null,InstitutionAddress:null,PostalCode:null,City:null,PhonePrefix:null,Phone:null},applicants:[],files:[],filesImages:[],filesDocuments:[],budgetItems:[],budgetItem:null,validationErrors:[],positionList:[],degreeList:[],genderList:[],filesGrant:[],filesImagesGrant:[],filesDocumentsGrant:[]},D_=(Sg={},(0,Ks.Z)(Sg,Je,(function(t){var e=t.commit;return $g.getApplicationPrivacyNotice().then((function(t){var n=t.data;return e(Xo.SET_APPLICATION_PRIVACY_NOTICE,n.Value),n}))})),(0,Ks.Z)(Sg,Xe,(function(t){var e=t.commit;return $g.getApplicationDataTransferAgreement().then((function(t){var n=t.data;return e(Xo.SET_APPLICATION_DATA_AGREEMENT,n.Value),n}))})),(0,Ks.Z)(Sg,tn,(function(t){var e=t.commit;return $g.getApplications().then((function(t){return e(Xo.SET_APPLICATIONS,t.data.Value),t.data}))}
1)),(0,Ks.Z)(Sg,en,(function(t){var e=t.commit;return $g.getApplicationRounds().then((function(t){e(Xo.SET_APPLICATION_ROUNDS,t.data)}))})),(0,Ks.Z)(Sg,nn,(function(t,e){var n=t.commit;return $g.getApplicationCopyRounds(e).then((function(t){n(Xo.SET_APPLICATION_COPY_ROUNDS,t.data.Value)})).catch((function(t){console.log("error",t),n(Xo.SET_APPLICATION_COPY_ROUNDS,[])}))})),(0,Ks.Z)(Sg,an,(function(t,e){var n=t.commit;return $g.addApplication(e).then((function(t){return n(Xo.SET_APPLICATION,t.data.Value),t.data}))})),(0,Ks.Z)(Sg,sn,(function(t,e){var n=t.commit;return $g.getApplication(e).then((function(t){return n(Xo.SET_APPLICATION,t.data.Value),t.data.Value}))})),(0,Ks.Z)(Sg,rn,(function(t,e){t.commit;return $g.getApplicationPdf(e).then((function(t){var e=t.data.Value.PdfData,n=t.data.Value.FileName;return(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(e)),n),t.data.Value}))})),(0,Ks.Z)(Sg,on,(function(t,e){t.commit;return $g.getApplicationPdf(e).then((function(t){return t.data}))})),(0,Ks.Z)(Sg,ln,(function(t,e){t.commit,e.DynamicFieldPageList,e.CountryList,e.InstitutionList,e.SubjectAreaList;var n=(0,N_.Z)(e,S_);return $g.updateApplication(e.Id,n).then((function(t){return t.data.Value}))})),(0,Ks.Z)(Sg,cn,(function(t,e){var n=t.commit,i=(t.state,e.appId),a=e.roundId;return $g.copyApplication(i,a).then((function(t){return n(Xo.ADD_APPLICATION,t.data.Value),t.data.Value}))})),(0,Ks.Z)(Sg,fn,(function(t,e){t.commit;return $g.withdrawApplication(e).then((function(t){return t.data.Value}))})),(0,Ks.Z)(Sg,vn,(function(t,e){t.commit;return $g.reopenApplication(e).then((function(t){return t.data.Value}))})),(0,Ks.Z)(Sg,mn,(function(t,e){var n=t.commit;t.state;return n(Xo.DELETE_APPLICATION,e),$g.deleteApplication(e)})),(0,Ks.Z)(Sg,dn,(function(t,e){var n=t.commit;return $g.validateApplication(e).then((function(t){return t.data.Success?n(Xo.SET_APPLICATION_VALIDATION_ERRORS,[]):n(Xo.SET_APPLICATION_VALIDATION_ERRORS,t.data.Messages),t.data}
1)).catch((function(t){console.log("api.validateApplication error",t)}))})),(0,Ks.Z)(Sg,pn,(function(t,e){t.commit;return $g.submitApplication(e).then((function(t){return t.data}))})),(0,Ks.Z)(Sg,un,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch,s=e.id,r=e.pageId,o=e.property,l=o.name,c=o.value,u=o.notificationName,d=i.appDynamicFieldByID(r,s),p=(0,Ks.Z)({},l,d[l]),m=(0,Ks.Z)({},l,c),f=W(u);return n(Xo.APPLICATION_UPDATE_DYNAMIC_FIELD,{id:s,pageId:r,property:m}),$g.updateApplicationDynamicField(i.appId,i.appDynamicFieldByID(r,s)).then((function(t){var e=t.data;a(Ia,{status:!0,text:"Updated "+f}),e.Messages&&e.Messages.length?n(Xo.ADD_APPLICATION_VALIDATION_ERRORS,e.Messages[0]):n(Xo.REMOVE_APPLICATION_VALIDATION_ERROR,s)})).catch((function(){n(Xo.APPLICATION_UPDATE_DYNAMIC_FIELD,{id:s,pageId:r,property:p}),a(Ia,{status:!1,text:"Failed update "+f})}))})),(0,Ks.Z)(Sg,hn,(function(t,e){var n=t.commit,i=t.getters;return $g.createApplicationInstitution(i.appId,{Name:e}).then((function(t){return n(Xo.APPLICATION_ADD_INSTITUTION,t.data.Value),t}))})),(0,Ks.Z)(Sg,An,(function(t){var e=t.commit,n=t.getters;return $g.getApplicationFiles(n.appId).then((function(t){e(Xo.APPLICATION_SET_FILES,t.data.Value)}))})),(0,Ks.Z)(Sg,xn,(function(t){var e=t.commit,n=t.getters;return $g.getApplicationDocumentFiles(n.appId).then((function(t){e(Xo.APPLICATION_SET_DOCUMENT_FILES,t.data.Value)}))})),(0,Ks.Z)(Sg,bn,(function(t){var e=t.commit,n=t.getters;return $g.getApplicationImageFiles(n.appId).then((function(t){e(Xo.APPLICATION_SET_IMAGE_FILES,t.data.Value)}))})),(0,Ks.Z)(Sg,gn,(function(t,e){var n=t.commit,i=t.getters;return $g.addApplicationFile(i.appId,e).then((function(t){return n(Xo.APPLICATION_ADD_FILE,e),t.data}))})),(0,Ks.Z)(Sg,_n,(function(t,e){var n=t.commit,i=t.getters;return $g.addApplicationImageFile(i.appId,e).then((function(t){return n(Xo.APPLICATION_ADD_IMAGE_FILE,t.data.Value),t.data}))})),(0,Ks.Z)(Sg,In,(function(t,e){var n=t.commit,i=t.getters;return $g.addApplicationDocumentFile(i.appId,e).then((function(t){return n(Xo.APPLICATION_ADD_DOCUMENT_FILE,t.data.Value),t.data}))})),(0,Ks.Z)(Sg,Cn,(function(t,e){var n=t.commit,i=t.getters;return $g.deleteApplicationFile(i.appId,e).then((function(t){n(Xo.APPLICATION_REMOVE_FILE,e)}))})),(0,Ks.Z)(Sg,yn,(function(t,e){t.commit;var n=t.getters,i=(t.dispatch,e.fileId),a=e.fileContent;return $g.updateApplicationFile(n.appId,i,a).then((function(t){return t.data.Value}))})),(0,Ks.Z)(Sg,wn,(function(t,e){t.commit;var n=t.getters;t.dispatch;return $g.downloadApplicationFile(n.appId,e).then((function(t){var e=t.data,n=e.Value,i=n.FileContent,a=n.Filename;(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i)),a)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Sg,Nn,(function(t){var e=t.commit,n=t.getters;return $g.loadBudget(n.appId).then((function(t){e(Xo.APPLICATION_SET_BUDGET_ITEMS,t.data.Value)}))})),(0,Ks.Z)(Sg,En,(function(t){var e=t.commit,n=t.getters;return $g.loadLatestBudget(n.appId).then((function(t){e(Xo.APPLICATION_SET_LATEST_BUDGET_ITEMS,t.data.Value)}))})),(0,Ks.Z)(Sg,Pn,(function(t){var e=t.commit,n=t.getters;return $g.createBudget(n.appId).then((function(t){return e(Xo.APPLICATION_ADD_BUDGET,t.data.Value),e(Xo.APPLICATION_SET_BUDGET_ITEM,t.data.Value),t.data}))})),(0,Ks.Z)(Sg,Sn,(function(t,e){var n=t.commit,i=t.getters;return e.Id&&delete e.Id,$g.createBudget(i.appId).then((function(t){return $g.updateBudget(i.appId,t.data.Value.Id,e).then((function(t){return n(Xo.APPLICATION_ADD_BUDGET,t.data.Value),n(Xo.APPLICATION_SET_BUDGET_ITEM,t.data.Value),t.data.Value}))}))})),(0,Ks.Z)(Sg,Tn,(function(t,e){var n=t.commit,i=t.getters;return $g.getBudgetItem(i.appId,e).then((function(t){n(Xo.APPLICATION_SET_BUDGET_ITEM,t.data.Value)}))})),(0,Ks.Z)(Sg,Rn,(function(t,e){var n=t.commit,i=t.getters;return $g.deleteBudget(i.appId,e).then((function(t){n(Xo.APPLICATION_REMOVE_BUDGET,e)}))})),(0,Ks.Z)(Sg,Dn,(function(t,e){var n=t.commit,i=t.getters;return $g.updateBudget(i.appId,e.Id,e).then((function(t){n(Xo.APPLICATION_UPDATE_BUDGET,t.data.Value)}))})),(0,Ks.Z)(Sg,Ln,(function(t,e){var n=t.commit,i=t.getters;
1return $g.createApplicant(i.appId,e).then((function(t){if(t.data.Success){var a=t.data.Value;if(e.Role){var s=P_().findKey(a.RoleIdList,P_().partial(P_().isEqual,e.Role));return a.RoleId=s,$g.updateApplicant(i.appId,a.Id,a).then((function(t){return n(Xo.APPLICATION_ADD_APPLICANT,t.data.Value),t.data}))}return e.RoleId?$g.updateApplicant(i.appId,a.Id,e).then((function(t){return n(Xo.APPLICATION_ADD_APPLICANT,t.data.Value),t.data})):(n(Xo.APPLICATION_ADD_APPLICANT,t.data.Value),t.data)}return t.data}))})),(0,Ks.Z)(Sg,Mn,(function(t,e){var n=t.commit,i=t.getters;return $g.getApplicant(i.appId,e).then((function(t){return n(Xo.APPLICATION_SET_APPLICANT,t.data.Value),t.data.Value}))})),(0,Ks.Z)(Sg,kn,(function(t,e){var n=t.commit,i=t.getters;return $g.deleteApplicant(i.appId,e).then((function(t){n(Xo.APPLICATION_REMOVE_APPLICANT,e)}))})),(0,Ks.Z)(Sg,On,(function(t,e){var n=t.commit,i=t.getters;return $g.updateApplicant(i.appId,e.Id,e).then((function(t){return t.data.Success&&n(Xo.APPLICATION_UPDATE_APPLICANT,e),t.data}))})),(0,Ks.Z)(Sg,Fn,(function(t){var e=t.commit,n=t.getters;return $g.loadApplicants(n.appId).then((function(t){e(Xo.APPLICATION_SET_APPLICANTS,t.data.Value)}))})),(0,Ks.Z)(Sg,$n,(function(t,e){t.dispatch;return $g.fetchCity(e)})),(0,Ks.Z)(Sg,ha,(function(t){t.commit,t.getters;return $g.getPositionList().then((function(t){console.log(t.data)}))})),(0,Ks.Z)(Sg,ga,(function(t){t.commit,t.getters;return $g.getDegreeList().then((function(t){console.log(t.data)}))})),(0,Ks.Z)(Sg,_a,(function(t){t.commit,t.getters;return $g.getGenderList().then((function(t){console.log(t.data)}))})),(0,Ks.Z)(Sg,Zn,(function(t,e){t.commit;return $g.acceptCoapplicant(e)})),(0,Ks.Z)(Sg,Gn,(function(t){var e=t.commit,n=t.getters;return $g.createBudgetCR(n.appId).then((function(t){e(Xo.APPLICATION_SET_BUDGET_ITEMS,t.data.Value)}))})),(0,Ks.Z)(Sg,Bn,(function(t){var e=t.commit,n=t.getters;return $g.createAndSubmitBudgetCR(n.appId).then((function(t){e(Xo.APPLICATION_SET_BUDGET_ITEMS,t.data.Value)}))})),(0,Ks.Z)(Sg,Un,(function(t){var e=t.getters;return $g.submitBudgetCR(e.appId)})),(0,Ks.Z)(Sg,Wn,(function(t){var e=t.commit,n=t.getters;return $g.deleteBudgetCR(n.appId).then((function(){e(Xo.APPLICATION_SET_BUDGET_ITEMS,null)}))})),(0,Ks.Z)(Sg,Vn,(function(t,e){t.dispatch;var n=e.appId,i=e.budgetId,a=e.payload;return $g.updateBudgetCR(n,i,a)})),(0,Ks.Z)(Sg,jn,(function(t,e){var n=t.commit,i=(t.getters,e.reportId);return $g.getStatusReportImageFiles(i).then((function(t){n(Xo.STATUSREPORT_SET_IMAGE_FILES,t.data.Value)}))})),(0,Ks.Z)(Sg,Yn,(function(t,e){var n=t.commit,i=(t.getters,e.reportId);return $g.getStatusReportDocumentFiles(i).then((function(t){n(Xo.STATUSREPORT_SET_DOCUMENT_FILES,t.data.Value)}))})),(0,Ks.Z)(Sg,zn,(function(t,e){var n=t.commit,i=t.getters,a=e.reportId,s=e.payload;return $g.addStatusReportImageFile(i.appId,a,s).then((function(t){return n(Xo.STATUSREPORT_ADD_IMAGE_FILE,t.data.Value),t.data}))})),(0,Ks.Z)(Sg,qn,(function(t,e){t.commit,t.getters,t.dispatch;var n=e.reportId,i=e.fileId,a=e.fileContent;return $g.updateStatusReportFile(n,i,a).then((function(t){return t.data.Value}))})),(0,Ks.Z)(Sg,Hn,(function(t,e){var n=t.commit,i=(t.getters,e.reportId),a=e.fileId;return $g.deleteStatusReportFile(i,a).then((function(t){n(Xo.STATUSREPORT_REMOVE_FILE,a)}))})),(0,Ks.Z)(Sg,Kn,(function(t,e){t.commit,t.getters,t.dispatch;var n=e.reportId,i=e.fileId;return $g.downloadStatusReportFile(n,i).then((function(t){var e=t.data,n=e.Value,i=n.FileContent,a=n.Filename;(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i)),a)})).catch((function(t){console.log(t)}))})),(0,Ks.Z)(Sg,Qn,(function(t,e){var n=t.commit,i=t.getters,a=e.reportId,s=e.payload;return $g.addStatusReportDocumentFile(i.appId,a,s).then((function(t){return n(Xo.STATUSREPORT_ADD_DOCUMENT_FILE,t.data.Value),t.data}))})),Sg),L_={applicationList:function(t){return t.applications.sort((function(e,n){var i=e.round>n.round;return i="IsSubmitted"===t.orderBy?e.IsSubmitted>n.IsSubmitted:"deadline"===t.orderBy?e.ApplicationDeadline>n.ApplicationDeadline:"title"===t.orderBy?e.ProjectTitle.toLowerCase()>n.ProjectTitle.toLowerCase():e.RefNo>n.RefNo,t.orderAsc?i?1:-1:i?-1:1}))},appId:function(t){return t.application.Id},appDynamicPageByID:function(t){return function(e){return t.application.DynamicFieldPageList.find((function(t){return t.Id===e}))}},appDynamicFieldByID:function(t,e){return function(t,n){return e.appDynamicPageByID(t).DynamicFieldsList.find((function(t){return t.Id===n}))}},validationErrorsMap:function(t){return t.validationErrors.reduce((function(t,e){return e.AppliesTo?Ed[e.AppliesTo]?t[Ed[e.AppliesTo]]=e.Me
1ssage:Pd[e.AppliesTo]?t[Pd[e.AppliesTo]]=e.Message:t[e.AppliesTo]=e.Message:t.application=e.Message,t}),{})},budgetPostTypeList:function(t){if(t.budgetItem){var e=t.budgetItem.BudgetPostTypeList;return e[0]="- Create optional",e}return{}},budgetYearList:function(t){return t.application?Array(t.application.MaxBudgetYear).fill(1).map((function(t,e){return t+e})):[]},budgetPostTypeArray:function(t,e){return B(e.budgetPostTypeList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}))},institutionList:function(t){if(t.application&&t.application.InstitutionList){var e=t.application.InstitutionList;return e[0]="- Create new -",t.application.InstitutionId&&!e[t.application.InstitutionId]&&(e[t.application.InstitutionId]=t.application.InstitutionName),e}return{}},institutionListArray:function(t,e){var n=B(e.institutionList).sort((function(t,e){return t.text>e.text?1:e.text>t.text?-1:0}));return n.push(n.shift()),n}},M_=(Rg={},(0,Ks.Z)(Rg,Xo.SET_APPLICATIONS,(function(t,e){t.applications=e})),(0,Ks.Z)(Rg,Xo.SET_APPLICATIONS_ORDER,(function(t,e){var n=e.orderBy,i=e.orderAsc;t.orderBy=n,t.orderAsc=i})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION_ROUNDS,(function(t,e){t.rounds=e})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION_COPY_ROUNDS,(function(t,e){t.copyRounds=e})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION,(function(t,e){t.application=e,t.validationErrors=[]})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION_VALIDATION_ERRORS,(function(t,e){t.validationErrors=e})),(0,Ks.Z)(Rg,Xo.ADD_APPLICATION_VALIDATION_ERRORS,(function(t,e){var n=t.validationErrors.findIndex((function(t){return t.AppliesTo===e.AppliesTo}));-1!==n?t.validationErrors[n]=e:t.validationErrors.push(e)})),(0,Ks.Z)(Rg,Xo.REMOVE_APPLICATION_VALIDATION_ERROR,(function(t,e){var n=t.validationErrors.findIndex((function(t){return t.AppliesTo===String(e)}));-1!==n&&t.validationErrors.splice(n,1)})),(0,Ks.Z)(Rg,Xo.ADD_APPLICATION,(function(t,e){t.applications.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_UPDATE_DYNAMIC_FIELD,(function(t,e){var n=e.id,i=e.pageId,a=e.property,s=t.application.DynamicFieldPageList.findIndex((function(t){return t.Id===i}));if(-1!==s){var r=t.application.DynamicFieldPageList[s].DynamicFieldsList.map((function(t){return t.Id!==n?t:(0,Dt.Z)((0,Dt.Z)({},t),a)}));t.application.DynamicFieldPageList[s].DynamicFieldsList=r}})),(0,Ks.Z)(Rg,Xo.DELETE_APPLICATION,(function(t,e){var n=t.applications.findIndex((function(t){return t.Id===e}));-1!==n&&t.applications.splice(n,1)})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_INSTITUTION,(function(t,e){s["default"].set(t.application.InstitutionList,e.Id,e.Name)})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_FILE,(function(t,e){t.files.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_IMAGE_FILE,(function(t,e){t.filesImages.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_DOCUMENT_FILE,(function(t,e){t.filesDocuments.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_REMOVE_FILE,(function(t,e){var n=t.files.findIndex((function(t){return t.Id===e}));-1!==n&&t.files.splice(n,1),n=t.filesImages.findIndex((function(t){return t.Id===e})),-1!==n&&t.filesImages.splice(n,1),n=t.filesDocuments.findIndex((function(t){return t.Id===e})),-1!==n&&t.filesDocuments.splice(n,1)})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_FILES,(function(t,e){t.files=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_IMAGE_FILES,(function(t,e){t.filesImages=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_DOCUMENT_FILES,(function(t,e){t.filesDocuments=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_BUDGET,(function(t,e){t.budgetItems.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_BUDGET_ITEM,(function(t,e){t.budgetItem=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_UPDATE_BUDGET,(function(t,e){var n=t.budgetItems.findIndex((function(t){return t.Id===e.Id}));-1!==n&&t.budgetItems.splice(n,1,e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_BUDGET_ITEMS,(function(t,e){t.budgetItems=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_LATEST_BUDGET_ITEMS,(function(t,e){t.budgetItemsLatest=e})),(0,Ks.Z)(Rg,Xo.APPLICATION_REMOVE_BUDGET,(function(t,e){var n=t.budgetItems.findIndex((function(t){return t.Id===e}));-1!==n&&t.budgetItems.splice(n,1)})),(0,Ks.Z)(Rg,Xo.APPLICATION_ADD_APPLICANT,(function(t,e){t.applicants.push(e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_UPDATE_APPLICANT,(function(t,e){var n=t.applicants.findIndex((function(t){return t.Id===e.Id}));-1!==n&&t.applicants.splice(n,1,e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_APPLICANT,(function(t,e){var n=t.applicants.findIndex((function(t){return t.Id===e.Id}));-1!==n&&t.applicants.splice(n,1,e)})),(0,Ks.Z)(Rg,Xo.APPLICATION_REMOVE_APPLICANT,(function(t,e){var n=t.applicants.findIndex((function(t){return t.Id===e}));-1!==n&&t.applicants.splice(n,1)})),(0,Ks.Z)(Rg,Xo.APPLICATION_SET_APPLICANTS,(function(t,e){t.applicants=e})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION_PRIVACY_NOTICE,(function(t,e){t.privacyNotice=e})),(0,Ks.Z)(Rg,Xo.SET_APPLICATION_DATA_AGREEMENT,(function(t,e){t.dataAgreement=e})),(0,Ks.Z)(Rg,Xo.SET_POSITION_LIST,(function(t,e){t.positionList=e})),(0,Ks.Z)(Rg,Xo.SET_DEGREE_LIST,(function(t,e){t.degreeList=e})),(0,Ks.Z)(Rg,Xo.SET_GENDER_LIST,(function(t,e){t.genderList=e})),(0,Ks.Z)(Rg,Xo.STATUSREPORT_ADD_IMAGE_FILE,(function(t,e){t.filesImagesGrant.push(e)})),(0,Ks.Z)(Rg,Xo.STATUSREPORT_ADD_DOCUMENT_FILE,(function(t,e){t.filesDocumentsGrant.push(e)})),(0,Ks.Z)(Rg,Xo.STATUSREPORT_SET_IMAGE_FILES,(function(t,e){t.filesImagesGrant=e})),(0,Ks.Z)(Rg,Xo.STATUSREPORT_SET_DOCUMENT_FILES,(function(t,e){t.filesDocumentsGrant=e}
1)),(0,Ks.Z)(Rg,Xo.STATUSREPORT_REMOVE_FILE,(function(t,e){var n=t.filesGrant.findIndex((function(t){return t.Id===e}));-1!==n&&t.filesGrant.splice(n,1),n=t.filesImagesGrant.findIndex((function(t){return t.Id===e})),-1!==n&&t.filesImagesGrant.splice(n,1),n=t.filesDocumentsGrant.findIndex((function(t){return t.Id===e})),-1!==n&&t.filesDocumentsGrant.splice(n,1)})),Rg),k_={state:R_,getters:L_,actions:D_,mutations:M_},O_={roundsList:[],roundsListLoaded:!1,round:null,applicationsReview:[],applicationsPreferences:[],applicationsScores:[],applicationScoreStatistics:[],applicationsLoaded:!1,review:null,orderBy:"applicant",orderAsc:!0,dataAgreement:null,ndaAgreement:null},F_=(Dg={},(0,Ks.Z)(Dg,ei,(function(t){var e=t.commit,n=t.state;return $g.getApplicationReviewRounds().then((function(t){var i=t.data;e(Eo,i.Value),n.round||e(Po,i.Value[0])}))})),(0,Ks.Z)(Dg,ni,(function(t){var e=t.commit;return $g.getApplicationReviewDataTransferAgreement().then((function(t){var n=t.data;return e(ko,n.Value),n}))})),(0,Ks.Z)(Dg,ii,(function(t,e){t.commit;return $g.acceptApplicationReviewDataTransferAgreement(e)})),(0,Ks.Z)(Dg,bi,(function(t){var e=t.commit;return $g.getApplicationReviewerNdaAgreement().then((function(t){var n=t.data;return e(Fo,n.Value),n}))})),(0,Ks.Z)(Dg,xi,(function(t,e){t.commit;return $g.acceptApplicationReviewerNdaAgreement(e)})),(0,Ks.Z)(Dg,ai,(function(t,e){var n=t.commit,i=t.state,a=i.roundsList.find((function(t){return t.RoundId===e}));a&&n(Po,a)})),(0,Ks.Z)(Dg,si,(function(t,e){var n=t.commit;return $g.getApplicationReviewPreferences(e).then((function(t){return n(Ro,t.data.Value),t.data}
1)).catch((function(){n(Ro,[])}))})),(0,Ks.Z)(Dg,ri,(function(t,e){var n=t.commit;return $g.getApplicationReviews(e).then((function(t){return n(Do,t.data.Value),t.data})).catch((function(){n(Do,[])}))})),(0,Ks.Z)(Dg,oi,(function(t,e){var n=t.commit;return $g.getApplicationReviewScores(e).then((function(t){return n(Lo,t.data.Value),t.data})).catch((function(){n(Lo,[])}))})),(0,Ks.Z)(Dg,li,(function(t,e){var n=t.commit;return $g.getApplicationReview(e).then((function(t){return n(Mo,t.data.Value),t.data}))})),(0,Ks.Z)(Dg,ci,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.reviewerType;return $g.updateApplicationReviewPreference(i,a).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated preference"}),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update preference"})}))})),(0,Ks.Z)(Dg,ui,(function(t,e){t.commit;var n=e.reviewId,i=e.fileId;return $g.getApplicationReviewFile(n,i).then((function(t){var e=t.data,n=e.Value,i=n.FileContent,a=n.Filename;(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(i)),a)}))})),(0,Ks.Z)(Dg,di,(function(t,e){t.commit;return $g.getApplicationReviewPdf(e).then((function(t){return t.data})).catch((function(t){return t.response.data}))})),(0,Ks.Z)(Dg,pi,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.scoringId,s=e.payload;return $g.updateApplicationReviewScore(i,a,s).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated score"}),n(li,i),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update score"})}))})),(0,Ks.Z)(Dg,mi,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.scoringId,s=e.payload;return $g.updateApplicationReviewComment(i,a,s).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated comment"}),n(li,i),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update comment"})}))})),(0,Ks.Z)(Dg,fi,(function(t,e){var n=t.dispatch,i=e.reviewId,a=e.payload;return $g.updateApplicationReviewMessage(i,a).then((function(t){var e=t.data;return n(Ia,{status:!0,text:"Updated message"}),n(li,i),e})).catch((function(){n(Ia,{status:!1,text:"Failed to update message"})}))})),(0,Ks.Z)(Dg,vi,(function(t,e){t.commit;var n=e.reviewId;return $g.markApplicationReviewConflict(n)})),(0,Ks.Z)(Dg,hi,(function(t,e){t.commit;var n=e.reviewId;return $g.markApplicationReviewFinished(n)})),(0,Ks.Z)(Dg,gi,(function(t,e){t.commit;var n=e.roundId;return $g.markAllFinished(n)})),(0,Ks.Z)(Dg,Ii,(function(t){var e=t.commit;e(Ro,[]),e(Do,[]),e(Lo,[]),e(Oo,[]),e(Mo,null)})),(0,Ks.Z)(Dg,_i,(function(t){var e=t.commit;e(Mo,null)})),(0,Ks.Z)(Dg,Ai,(function(t,e){var n=t.commit,i=t.dispatch;return $g.getApplicationReviewScoreStatistic(e).then((function(t){if(t.data.Success)return n(Oo,t.data.Value),t.data.Value;i(Ia,{status:!1,text:"Failed to get scoredata."}),n(Oo,[])})).catch((function(t){i(Ia,{status:!1,text:"Failed to get scoredata"}),n(Oo,[])}))})),Dg),$_={reviewApplications:function(t){return t.applications.sort((function(e,n){var i=e.NomineeName.toLowerCase()>n.NomineeName.toLowerCase();return"status"===t.orderBy?i=!(e.IsFinished||n.IsFinished)||e.NomineeName>n.NomineeName:"affiliation"===t.orderBy?i=e.Affiliation>n.Affiliation:"score"===t.orderBy?i=e.MyScoreAvg>n.MyScoreAvg:"applicant"===t.orderBy?i=e.ApplicantName.toLowerCase()>n.ApplicantName.toLowerCase():"averageScore"===t.orderBy&&(i=e.AverageScoreAllReviewers>n.AverageScoreAllReviewers),t.orderAsc?i?1:-1:i?-1:1}))}},Z_=(Lg={},(0,Ks.Z)(Lg,Eo,(function(t,e){t.roundsList=e,t.roundsListLoaded=!0})),(0,Ks.Z)(Lg,Po,(function(t,e){t.round=e})),(0,Ks.Z)(Lg,Ro,(function(t,e){t.applicationsPreferences=e,t.applicationsLoaded=!0})),(0,Ks.Z)(Lg,Do,(function(t,e){t.applicationsReview=e,t.applicationsLoaded=!0})),(0,Ks.Z)(Lg,Lo,(function(t,e){t.applicationsScores=e,t.applicationsLoaded=!0})),(0,Ks.Z)(Lg,Mo,(function(t,e){t.review=e})),(0,Ks.Z)(Lg,ko,(function(t,e){t.dataAgreement=e})),(0,Ks.Z)(Lg,So,(function(t,e){var n=e.orderBy,i=e.orderAsc;t.orderBy=n,t.orderAsc=i})),(0,Ks.Z)(Lg,Oo,(function(t,e){t.applicationScoreStatistics=e})),(0,Ks.Z)(Lg,Fo,(function(t,e){t.ndaAgreement=e})),Lg),G_={state:O_,getters:$_,actions:F_,mutations:Z_},B_={grant:null,instituteAdministratorId:null,statusReport:null,paymentDetails:null,paymentRequest:null,installmentWizard:null,accounting:null},U_=(Mg={},(0,Ks.Z)(Mg,Ci,(function(t,e){var n=t.commit;return $g.getApplicationGrant(e).then((function(t){return n(Xo.SET_APPLICATION_GRANT,t.data.Value),t.data}))}
1)),(0,Ks.Z)(Mg,yi,(function(t,e){t.commit;return $g.acceptGrantConditions(e)})),(0,Ks.Z)(Mg,wi,(function(t,e){var n=t.commit,i=t.getters,a=e.administratorId;return $g.getApplicationGrantInstituteAdministrator(i.appId,a).then((function(t){return n(Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR,t.data.Value),n(Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR_ID,a),t.data}))})),(0,Ks.Z)(Mg,Ti,(function(t,e){var n=t.commit,i=t.getters;return $g.updateApplicationGrantInstituteAdministrator(i.appId,i.instituteAdministratorId,e).then((function(t){return n(Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Ni,(function(t,e){var n=t.commit,i=t.getters;return $g.addApplicationGrantInstituteAdministrator(i.appId,e).then((function(t){if(t.data.Success&&t.data.Value){var a=t.data.Value;return $g.updateApplicationGrantInstituteAdministrator(i.appId,a.Id,e).then((function(t){return n(Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR,t.data.Value),t.data}))}return t.data}))})),(0,Ks.Z)(Mg,Ei,(function(t,e){t.commit;var n=t.getters,i=e.administratorId;return $g.deleteApplicationGrantInstituteAdministrator(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Pi,(function(t,e){var n=t.commit,i=t.getters,a=e.reportId;return $g.getApplicationGrantStatusReport(i.appId,a).then((function(t){return n(Xo.SET_APPLICATION_GRANT_STATUS_REPORT,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Xn,(function(t){var e=t.commit,n=t.getters;return $g.getApplicationGrantAccounting(n.appId,B_.installmentWizard.AccountingId).then((function(t){return e(Xo.SET_APPLICATION_GRANT_ACCOUNTING,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Si,(function(t,e){t.commit;var n=t.getters,i=e.reportId;return new Promise((function(t,e){$g.getApplicationGrantStatusReportPdf(n.appId,i).then((function(e){var n=e.data.Value.FileContent,i=e.data.Value.Filename,a=(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(n)),i);t(a)})).catch((function(t){console.log(t),e(t)}))}))})),(0,Ks.Z)(Mg,Jn,(function(t,e){t.commit;var n=t.getters,i=e.reportId;return $g.getApplicationGrantStatusReportPdf(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Ri,(function(t,e){var n=t.commit,i=t.getters,a=t.dispatch,s=e.reportId,r=e.id,o=e.pageId,l=e.property,c=l.name,u=l.value,d=l.notificationName,p=i.appGrantDynamicFieldByID(o,r),m=(0,Ks.Z)({},c,p[c]),f=(0,Ks.Z)({},c,u),v=W(d);return n(Xo.APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD,{id:r,pageId:o,property:f}),$g.updateApplicationGrantDynamicField(i.appId,s,i.appGrantDynamicFieldByID(o,r)).then((function(t){var e=t.data;a(Ia,{status:!0,text:"Updated "+v}),e.Messages&&e.Messages.length?n(Xo.ADD_APPLICATION_VALIDATION_ERRORS,e.Messages[0]):n(Xo.REMOVE_APPLICATION_VALIDATION_ERROR,r)})).catch((function(){n(Xo.APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD,{id:r,pageId:o,property:m}),a(Ia,{status:!1,text:"Failed update "+v})}))})),(0,Ks.Z)(Mg,Di,(function(t,e){t.commit;var n=t.getters,i=e.reportType;return new Promise((function(t,e){$g.addApplicationGrantStatusReport(n.appId,i).then((function(e){t(e.data)})).catch((function(t){e(t)}))}))})),(0,Ks.Z)(Mg,Li,(function(t,e){t.commit;var n=t.getters,i=e.reportId;return $g.submitApplicationGrantStatusReport(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Mi,(function(t,e){t.commit;var n=t.getters,i=e.reportId;return $g.submitApplicationGrantStatusReportWithoutAccounting(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,ti,(function(t){t.commit;var e=t.getters;return $g.submitApplicationGrantAccounting(e.appId,B_.installmentWizard.AccountingId).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,ki,(function(t,e){t.commit;var n=t.getters,i=e.reportId;return $g.deleteApplicationGrantStatusReport(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Oi,(function(t,e){t.commit;var n=t.getters,i=e.accountingId,a=e.amount;return $g.updateApplicationGrantStatusReportAmount(n.appId,B_.installmentWizard.StatusReportId,i,a).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Fi,(function(t,e){t.commit;var n=t.getters,i=e.reportId,a=e.accountingPostId,s=e.description;return $g.updateApplicationGrantStatusReportDescription(n.appId,i,a,s).then((function(t){return t.data}))}
1)),(0,Ks.Z)(Mg,$i,(function(t,e){t.commit;var n=t.getters,i=e.reportId;e.accountingPostId,e.description;return $g.updateApplicationGrantStatusReportResearchfish(n.appId,i).then((function(t){return t.data}))})),(0,Ks.Z)(Mg,Zi,(function(t){var e=t.commit,n=t.getters;return $g.getApplicationGrantPaymentDetails(n.appId).then((function(t){return e(Xo.SET_APPLICATION_GRANT_PAYMENT_DETAILS,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Gi,(function(t,e){var n=t.commit,i=t.getters;return $g.updateApplicationGrantPaymentDetails(i.appId,e).then((function(t){return n(Xo.SET_APPLICATION_GRANT_PAYMENT_DETAILS,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Bi,(function(t,e){var n=t.commit,i=t.getters;return $g.addApplicationGrantPaymentRequest(i.appId,e).then((function(t){n(Xo.SET_APPLICATION_GRANT_PAYMENT_REQUEST,t.data.Value)}))})),(0,Ks.Z)(Mg,Ui,(function(t,e){var n=t.commit,i=t.getters;return $g.getApplicationGrantPaymentRequest(i.appId,e).then((function(t){return n(Xo.SET_APPLICATION_GRANT_PAYMENT_REQUEST,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Wi,(function(t,e){var n=t.getters;return $g.updateApplicationGrantPaymentRequest(n.appId,e.Id,e)})),(0,Ks.Z)(Mg,Vi,(function(t,e){var n=t.getters;return $g.deleteApplicationGrantPaymentRequest(n.appId,e)})),(0,Ks.Z)(Mg,zi,(function(t,e){var n=t.getters;return $g.submitApplicationGrantPaymentRequest(n.appId,e)})),(0,Ks.Z)(Mg,ji,(function(t,e){var n=t.getters;return $g.cancelApplicationGrantPaymentRequest(n.appId,e)})),(0,Ks.Z)(Mg,Yi,(function(t){var e=t.getters,n=t.commit;return $g.getInstallmentWizardStatus(e.appId).then((function(t){return n(Xo.SET_INSTALLMENT_WIZARD,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,qi,(function(t,e){var n=t.getters,i=t.commit;return $g.getInstallmentWizardStatusRate(n.appId,e.rateId).then((function(t){return i(Xo.SET_INSTALLMENT_WIZARD,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Hi,(function(t){var e=t.getters,n=t.commit;return $g.createInstallmentWizard(e.appId,B_.installmentWizard.RateId).then((function(t){return n(Xo.SET_INSTALLMENT_WIZARD,t.data.Value),t.data}))})),(0,Ks.Z)(Mg,Ki,(function(t){var e=t.getters,n=t.commit;return $g.submitInstallmentWizard(e.appId,B_.installmentWizard.RateId).then((function(t){return n(Xo.SET_INSTALLMENT_WIZARD,t.data.Value),t.data}))})),Mg),W_={instituteAdministratorId:function(t){return t.instituteAdministratorId},appGrantDynamicPageByID:function(t){return function(e){return t.statusReport.DynamicFieldPageList.find((function(t){return t.Id===e}))}},appGrantDynamicFieldByID:function(t,e){return function(t,n){return e.appGrantDynamicPageByID(t).DynamicFieldsList.find((function(t){return t.Id===n}))}},paymentDetails:function(t){return t.paymentDetails}},V_=(kg={},(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT,(function(t,e){t.grant=e})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR,(function(t,e){t.instituteAdministrator=e})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_INSTITUTE_ADMINISTRATOR_ID,(function(t,e){t.instituteAdministratorId=e})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_STATUS_REPORT,(function(t,e){t.statusReport=e})),(0,Ks.Z)(kg,Xo.APPLICATION_GRANT_UPDATE_DYNAMIC_FIELD,(function(t,e){var n=e.id,i=e.pageId,a=e.property,s=t.statusReport.DynamicFieldPageList.findIndex((function(t){return t.Id===i}));if(-1!==s){var r=t.statusReport.DynamicFieldPageList[s].DynamicFieldsList.map((function(t){return t.Id!==n?t:(0,Dt.Z)((0,Dt.Z)({},t),a)}));t.statusReport.DynamicFieldPageList[s].DynamicFieldsList=r}})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_PAYMENT_DETAILS,(function(t,e){t.paymentDetails=e})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_PAYMENT_REQUEST,(function(t,e){t.paymentRequest=e})),(0,Ks.Z)(kg,Xo.SET_INSTALLMENT_WIZARD,(function(t,e){t.installmentWizard=e})),(0,Ks.Z)(kg,Xo.SET_APPLICATION_GRANT_ACCOUNTING,(function(t,e){t.accounting=e})),kg),z_={state:B_,getters:W_,actions:U_,mutations:V_},j_={messages:[],applicationMessages:[],nominationMessages:[],nomineeMessages:[],message:null,files:null,thread:null},Y_=(Og={},(0,Ks.Z)(Og,Qi,(function(t){var e=t.commit;return $g.getMessages().then((function(t){return e(Xo.SET_MESSAGES,t.data.Value),t.data}))})),(0,Ks.Z)(Og,Ji,(function(t,e){var n=t.commit;return $g.getApplicationMessages(e).then((function(t){return n(Xo.SET_APPLICATION_MESSAGES,t.data.Value),t.data}))}
1)),(0,Ks.Z)(Og,Xi,(function(t,e){var n=t.commit,i=t.dispatch;return $g.addApplicationMessage(e).then((function(t){return n(Xo.SET_MESSAGE,t.data.Value),i(Ji,e),t.data}))})),(0,Ks.Z)(Og,ta,(function(t,e){var n=t.commit;return $g.getNominationMessages(e).then((function(t){return n(Xo.SET_NOMINATION_MESSAGES,t.data.Value),t.data}))})),(0,Ks.Z)(Og,ea,(function(t,e){var n=t.commit,i=t.dispatch;return $g.addNominationMessage(e).then((function(t){return n(Xo.SET_MESSAGE,t.data.Value),i(ta,e),t.data}))})),(0,Ks.Z)(Og,fa,(function(t,e){var n=t.commit;return $g.getNomineeMessages(e).then((function(t){return n(Xo.SET_NOMINEE_MESSAGES,t.data.Value),t.data}))})),(0,Ks.Z)(Og,va,(function(t,e){var n=t.commit,i=t.dispatch;return $g.addNomineeMessage(e).then((function(t){return n(Xo.SET_MESSAGE,t.data.Value),i(fa,e),t.data}))})),(0,Ks.Z)(Og,na,(function(t,e){var n=t.commit,i=e.threadId;return $g.addThreadMessage(i).then((function(t){return n(Xo.SET_MESSAGE,t.data.Value),t.data}))})),(0,Ks.Z)(Og,ia,(function(t,e){t.commit;var n=e.messageId;return $g.sendMessageDraft(n)})),(0,Ks.Z)(Og,aa,(function(t,e){t.commit;var n=e.messageId;return $g.markMessageRead(n)})),(0,Ks.Z)(Og,sa,(function(t,e){t.commit;var n=e.messageId,i=e.subject;return $g.updateMessageSubject(n,i)})),(0,Ks.Z)(Og,ra,(function(t,e){t.commit;var n=e.messageId,i=e.text;return $g.updateMessage(n,i)})),(0,Ks.Z)(Og,oa,(function(t,e){var n=t.commit,i=e.messageId;return $g.getMessageDraft(i).then((function(t){n(Xo.SET_MESSAGE,t.data.Value)}))})),(0,Ks.Z)(Og,la,(function(t,e){t.commit;var n=e.messageId;return $g.deleteMessageDraft(n)})),(0,Ks.Z)(Og,ca,(function(t,e){t.commit;var n=e.messageId,i=e.fileId;return $g.getMessageFile(n,i).then((function(t){var e=t.data.Value.FileContent,n=t.data.Value.Filename;return(0,xp.saveAs)(j("data:application/octet-stream;base64,".concat(e)),n),t.data.Value}))})),(0,Ks.Z)(Og,ua,(function(t,e){t.commit;var n=e.messageId,i=e.fileId;return $g.deleteMessageFile(n,i)})),(0,Ks.Z)(Og,da,(function(t,e){t.commit;var n=e.messageId,i=e.fileContent;return $g.addMessageFile(n,i)})),(0,Ks.Z)(Og,pa,(function(t,e){var n=t.commit,i=e.messageId;return $g.getMessageFiles(i).then((function(t){return n(Xo.SET_MESSAGE_FILES,t.data.Value),t.data}))})),(0,Ks.Z)(Og,ma,(function(t,e){var n=t.commit,i=e.thread;return n(Xo.SET_MESSAGES_THREAD,i),i})),Og),q_={applicationMessagesInboxThreadById:function(t){return function(e){return t.applicationMessages.InboxMessageThreadList.find((function(t){return t.Id===e}))}},nominationMessagesInboxThreadById:function(t){return function(e){return t.nominationMessages.InboxMessageThreadList.find((function(t){return t.Id===e}))}},nomineeMessagesInboxThreadById:function(t){return function(e){return t.nomineeMessages.InboxMessageThreadList.find((function(t){return t.Id===e}))}}},H_=(Fg={},(0,Ks.Z)(Fg,Xo.SET_MESSAGE,(function(t,e){t.message=e})),(0,Ks.Z)(Fg,Xo.SET_MESSAGES,(function(t,e){t.messages=e})),(0,Ks.Z)(Fg,Xo.SET_APPLICATION_MESSAGES,(function(t,e){t.applicationMessages=e})),(0,Ks.Z)(Fg,Xo.SET_NOMINATION_MESSAGES,(function(t,e){t.nominationMessages=e})),(0,Ks.Z)(Fg,Xo.SET_NOMINEE_MESSAGES,(function(t,e){t.nomineeMessages=e})),(0,Ks.Z)(Fg,Xo.SET_MESSAGE_FILES,(function(t,e){t.files=e})),(0,Ks.Z)(Fg,Xo.SET_MESSAGES_THREAD,(function(t,e){t.thread=e})),Fg),K_={state:j_,getters:q_,actions:Y_,mutations:H_};s["default"].use(Lt.ZP);var Q_=new Lt.ZP.Store({plugins:[(0,Hs.Z)({key:"token",paths:["auth.token","auth.password_email","review.round","review.review","reviewApplications.round","reviewApplications.review"]})],getters:{getField:Xt.rz},mutations:{updateField:Xt.L4},modules:{user:Wg,auth:qg,nomination:r_,nominationList:d_,nominees:h_,review:b_,application:k_,notification:T_,reviewApplications:G_,grants:z_,messages:K_}});Q_.getters.isAuthenticated&&Q_.dispatch(Pe);var J_=Q_;s["default"].use(c()),s["default"].use(es),s["default"].use(o(),{theme:{primary:"#04423B"}});var X_=new s["default"];s["default"].prototype.$events=X_,new s["default"]({el:"#app",store:J_,router:mg,render:function(t){return t(qs)}})},5939:function(t,e,n){"use strict";
1t.exports=n.p+"img/LF_Logo_White.6b9f7531.svg"},34970:function(t,e,n){"use strict";t.exports=n.p+"img/LF_Symbol_DarkGreen.c3906783.svg"},54380:function(t,e,n){"use strict";t.exports=n.p+"img/logo-researchfish.1e0dcbf7.svg"},93414:function(){},70172:function(){},2001:function(){},33779:function(){},66558:function(){},82258:function(){}},e={};function n(i){var a=e[i];if(void 0!==a)return a.exports;var s=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=t,function(){n.amdO={}}(),function(){var t=[];n.O=function(e,i,a,s){if(!i){var r=1/0;for(u=0;u<t.length;u++){i=t[u][0],a=t[u][1],s=t[u][2];for(var o=!0,l=0;l<i.length;l++)(!1&s||r>=s)&&Object.keys(n.O).every((function(t){return n.O[t](i[l])}))?i.splice(l--,1):(o=!1,s<r&&(r=s));if(o){t.splice(u--,1);var c=a();void 0!==c&&(e=c)}}return e}s=s||0;for(var u=t.length;u>0&&t[u-1][2]>s;u--)t[u]=t[u-1];t[u]=[i,a,s]}}(),function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){n.p="/"}(),function(){var t={143:0};n.O.j=function(e){return 0===t[e]};var e=function(e,i){var a,s,r=i[0],o=i[1],l=i[2],c=0;if(r.some((function(e){return 0!==t[e]}))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(l)var u=l(n)}for(e&&e(i);c<r.length;c++)s=r[c],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(u)},i=self["webpackChunklanasnew"]=self["webpackChunklanasnew"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}();var i=n.O(void 0,[998],(function(){return n(42880)}));i=n.O(i)})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.