(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["DepotpositionsLimit"],{"0f30":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("BaseModal",{ref:"modalError",attrs:{modalTitle:"Hinweis",labelButtonConfirm:"Ok",labelButtonCancel:"Änderungen verwerfen"},on:{onCancelButton:t.confirmError,onConfirmButton:t.resetError,onCloseButton:t.resetError}},[i("div",{staticClass:"mb-3"},[t._v("Diese Fehler müssen korrigiert werden um speichern zu können:")]),i("span",{domProps:{innerHTML:t._s(t.sanitize(t.errorText))}})])],1)},a=[],n=i("b20b"),o=i("a871"),r={props:{errorText:{type:String,default:""}},components:{BaseModal:o["a"]},methods:{sanitize:function(t){return Object(n["b"])(t)},open:function(){this.$refs.modalError.open()},confirmError:function(){this.$emit("closeLimit")},resetError:function(){this.$emit("resetError")}}},l=r,c=i("2877"),u=Object(c["a"])(l,s,a,!1,null,null,null);e["a"]=u.exports},"16bf":function(t,e,i){"use strict";i("8715")},"36fa":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",[t.hasRoles([t.VIEW_ROLES.VIEW_BROKER])?i("OptionMenu",{attrs:{id:t.$appNavigation.currentOptionMenuId,defaultMenu:t.$appNavigation.currentOptionMenu}}):i("OptionMenu",{attrs:{id:t.$appNavigation.parentOptionMenuId,defaultMenu:t.$appNavigation.parentOptionMenu}}),i("PageHeaderTitleNavigation",{attrs:{title:"Depotpositionslimit",id:t.$appNavigation.currentOptionMenuId,defaultMenu:t.optionsMenu,actions:t.headerActions},on:{"action-REMOVE":function(e){return t.loschen()},"action-RESET":function(e){return t.zuruckSetzen()}}}),i("div",{staticClass:"box__container limits-box"},[i("span",{staticClass:"box__title"},[t._v(t._s(t.fondsName))]),i("br"),t.limits?[t.limits&&null!==t.limits.id?[t.limits&&t.limits.data&&!t.limits.isError?[i("div",{staticClass:"container-fluid"},t._l(t.limits.data.labels,(function(e,s){return i("div",{key:"row-"+s,staticClass:"row"},[i("p",{staticClass:"col-12"},[t._v(t._s(e))])])})),0),i("form",[i("div",{staticClass:"form-group container-fluid"},[i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Interne Depotpositionsnummer")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.begleitscheinNr))])]),i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("ISIN")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.id))])]),i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Währung")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.limits.data.currency))])]),i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Aktueller Kurs")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(" "+t._s(t._f("currency")(t.limits.data.kurs,2,t.limits.data.currency)))])]),i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Kursdatum")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.limits.data.kursDate))])]),i("div",{staticClass:"row mb-2"},[i("InputField",{attrs:{label:"Ausgangswert (Anteilspreis)",type:"currency",foreign_currency:t.limits.data.currency},model:{value:t.price,callback:function(e){t.price=e},expression:"price"}})],1),i("div",{staticClass:"row mb-2"},[i("InputField",{attrs:{label:"Abweichung nach unten",type:"number"},model:{value:t.low,callback:function(e){t.low=e},expression:"low"}}),i("ComboBox",{attrs:{label:" ",values:t.untenOptionComboOptions},model:{value:t.lowRelative,callback:function(e){t.lowRelative=e},expression:"lowRelative"}})],1),i("div",{staticClass:"row mb-2"},[i("InputField",{attrs:{label:"Abweichung nach oben",type:"number"},model:{value:t.high,callback:function(e){t.high=e},expression:"high"}}),i("ComboBox",{attrs:{label:" ",values:t.untenOptionComboOptions},model:{value:t.highRelative,callback:function(e){t.highRelative=e},expression:"highRelative"}})],1),i("div",{staticClass:"row mb-2"},[i("InputToggleSwitch",{attrs:{label:"Dynamik"},model:{value:t.dynamic,callback:function(e){t.dynamic=e},expression:"dynamic"}})],1),i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Ausgangswert für Dynamik")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t._f("number")(t.limits.data.dynamicValue)))])]),t.limits.data.changeDate?i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Letzte Änderung")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.limits.data.changeDate))])]):t._e(),t.limits.data.dateOutofLimit?i("div",{staticClass:"row mb-2"},[i("div",{staticClass:"col-12 col-md-6 col-lg-2"},[t._v("Datum der Überschreitung")]),i("div",{staticClass:"col-12 col-md-6 col-lg-10"},[t._v(t._s(t.limits.data.dateOutofLimit))])]):t._e(),t.isBroker||t.isByPass?i("div",{staticClass:"row mb-2 w-394"},[i("div",{staticClass:"col-12"},[i("InputTextArea",{attrs:{label:"Bemerkung"},model:{value:t.comment,callback:function(e){t.comment=e},expression:"comment"}})],1)]):t._e()])])]:t._e()]:t._e()]:t._e()],2)],1),i("BaseModal",{ref:"modalRef",attrs:{modalTitle:"Limit löschen?",labelButtonConfirm:"Ja",labelButtonCancel:"Nein"},on:{onConfirmButton:function(e){return t.action(!0)},onCancelButton:function(e){return t.action(!1)}}}),i("LimitErrorModal",{ref:"modalError",attrs:{errorText:t.errorFromService},on:{closeLimit:t.confirmError,resetError:t.resetError}}),i("BaseModal",{ref:"saveOrReset",attrs:{labelButtonCancel:"Verwerfen",labelButtonConfirm:"Speichern"},on:{onCancelButton:t.handleReset,onConfirmButton:t.speichern},scopedSlots:t._u([{key:"modalTitle",fn:function(){return[t._v(" Möchte Sie Ihre Änderungen speichern? ")]},proxy:!0}])})],1)},a=[],n=i("5530"),o=(i("99af"),i("ac1f"),i("5319"),i("4d63"),i("25f0"),i("a9e3"),i("b680"),i("d3b7"),i("04bc")),r=i("2f62"),l=i("642f"),c=i("64c5"),u=i("8e41"),d=i("a871"),h=i("8103"),m=i("3931"),f=i("d9f5"),p=i("c704"),b=i("9131"),v=i("9aaa"),g=i("0f30"),w=i("4e5f"),C={props:{},data:function(){return{params:{},breadcrumbs:[],id:"",isBreadcrumbsFinal:!1,begleitscheinNr:"",fondsName:"",errorFromService:"",resetting:!1,showModal:!1,price:"",highRelative:"PROZENTUAL",lowRelative:"PROZENTUAL",dynamic:"",high:"",low:"",comment:"",isLeavingRoute:!1,nextCallback:null,previousData:{}}},computed:Object(n["a"])(Object(n["a"])({},Object(r["b"])({limits:l["default"].GETTERS.LIMITS,isBroker:c["default"].GETTERS.IS_BROKER,isByPass:c["default"].GETTERS.IS_BYPASS,depotid:l["default"].GETTERS.DEPOT_ID,hasRoles:c["default"].GETTERS.HAS_ROLES})),{},{optionsMenu:function(){return[{path:"/home/vermogensubersicht/wertpapiere/limits/".concat(this.id,"/").concat(this.begleitscheinNr),label:"Depotpositionslimit",textBold:!0},{path:"/home/vermogensubersicht/wertpapiere/limits200/".concat(this.id,"/").concat(this.begleitscheinNr),label:"200 Tage Limit"}]},headerActions:function(){return[Object(w["h"])("REMOVE","Löschen"),Object(w["h"])("RESET","Zurücksetzen")]},untenOptionComboOptions:function(){return[{value:"ABSOLUT",label:"absolut"},{value:"PROZENTUAL",label:"prozentual (relativ)"}]},isChanged:function(){return this.previousData&&JSON.stringify(this.previousData)!==JSON.stringify(this.formData())}}),watch:{"$route.params.id":function(t){this.id=t},"$route.params.begleitscheinNr":function(t){this.begleitscheinNr=t},high:function(t){t<0&&(this.high=-t)},low:function(t){t<0&&(this.low=-t)},limits:function(t,e){if(t.data.errorStr)return this.errorFromService=t.data.errorStr.replace(new RegExp("\n","g"),"<br/>"),void this.$refs.modalError.open();!this.errorFromService&&this.isLeavingRoute&&this.isLeavingRoute(),t.action&&t.action==LimitsActions.ActionTypes.setLimitsSuccess&&(this.$store.dispatch(l["default"].ACTIONS.RETRIEVE_DEPOTPOSITIONS,{depotid:this.depotid}),this.$store.dispatch(l["default"].ACTIONS.GET_LIMITS,{begleitscheinNr:this.begleitscheinNr}),this.clearPreviousValues(),this.navigateTo("/home/vermogensubersicht/depot?backAction=true")),t.data&&t.data.input&&(this.fondsName=t.data.fondsName,this.begleitscheinNr==t.data.input.bgsNr&&(this.price=t.data.input.price,this.highRelative=t.data.input.highRelative,this.lowRelative=t.data.input.lowRelative,this.dynamic=t.data.input.dynamic,this.high=t.data.input.high,this.low=t.data.input.low,this.comment=t.data.input.comment)),null!=this.price&&""!=this.price||!t.data.kurs||(this.price=t.data.kurs),this.resetting=!1,this.previousData=this.formData()}},mounted:function(){this.errorFromService=null,this.isLeavingRoute=!1,this.id=this.$route.params.id,this.begleitscheinNr=this.$route.params.begleitscheinNr,this.$store.dispatch(l["default"].ACTIONS.GET_LIMITS,{begleitscheinNr:this.begleitscheinNr})},methods:{confirmError:function(){this.isLeavingRoute&&this.isLeavingRoute()},resetError:function(){this.errorFromService=null},clearPreviousValues:function(){this.price=null,this.highRelative=null,this.lowRelative=null,this.dynamic=!1,this.high=null,this.low=null,this.comment=null,this.errorFromService=null},speichern:function(){var t={price:Number(Object(u["b"])(this.price)),highRelative:this.highRelative,lowRelative:this.lowRelative,dynamic:this.dynamic,bgsNr:this.begleitscheinNr,high:Number(Object(u["b"])(this.high)),low:Number(Object(u["b"])(this.low)),comment:this.comment};this.$store.dispatch(l["default"].ACTIONS.SET_LIMITS,t),this.nextCallback&&this.nextCallback()},zuruckSetzen:function(){this.$store.dispatch(l["default"].ACTIONS.RESET_LIMITS,{bgsNr:this.begleitscheinNr})},loschen:function(){this.$refs.modalRef.open()},confirmDelete:function(){this.$store.dispatch(l["default"].ACTIONS.DELETE_LIMITS,{begleitscheinNr:this.begleitscheinNr}),this.$store.dispatch(l["default"].ACTIONS.RETRIEVE_DEPOTPOSITIONS,{depotid:this.depotid,disableCache:!0}),this.$store.dispatch(l["default"].ACTIONS.GET_LIMITS,{begleitscheinNr:this.begleitscheinNr}),this.navigateTo("/home/vermogensubersicht?backAction=true")},action:function(t){this.hideModal(),t&&this.confirmDelete()},back:function(){this.navigateTo("/home/vermogensubersicht/depot?backAction=true")},backToForm:function(){this.$store.dispatch(l["default"].ACTIONS.GET_LIMITS,{begleitscheinNr:this.begleitscheinNr})},zuruck:function(){this.$store.dispatch(l["default"].ACTIONS.GET_LIMITS,{begleitscheinNr:this.begleitscheinNr})},navigateTo:function(t){this.$router.push({path:"".concat(t)})},hideModal:function(){this.showModal=!1},formData:function(){return{price:Number(Object(u["b"])(this.price)),highRelative:this.highRelative,lowRelative:this.lowRelative,dynamic:this.dynamic,bgsNr:this.begleitscheinNr,high:Number(Object(u["b"])(this.high)),low:Number(Object(u["b"])(this.low)),comment:this.comment}},saveOrReset:function(t,e){this.isChanged?(this.nextCallback=e,this.$refs.saveOrReset.open()):e()},handleReset:function(){this.$refs.saveOrReset.close(),this.nextCallback&&this.nextCallback()}},filters:{number:function(t){if(isNaN(t))return t;var e=(t/1).toFixed(2).replace(".",",");return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}},beforeRouteLeave:function(t,e,i){this.saveOrReset("save",i)},mixins:[],components:{BaseButton:o["default"],BaseModal:d["a"],PageHeaderTitleNavigation:h["a"],OptionMenu:m["a"],InputTextArea:f["default"],InputField:p["default"],ComboBox:b["default"],InputToggleSwitch:v["default"],LimitErrorModal:g["a"]}},_=C,O=(i("cdb5"),i("16bf"),i("2877")),T=Object(O["a"])(_,s,a,!1,null,"14913917",null);e["default"]=T.exports},"53fa":function(t,e,i){var s=i("8f94");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var a=i("499e").default;a("345e6f66",s,!0,{sourceMap:!1,shadowMode:!1})},8715:function(t,e,i){var s=i("9893");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var a=i("499e").default;a("7c433d96",s,!0,{sourceMap:!1,shadowMode:!1})},"8e41":function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return a}));i("d3b7"),i("3ca3"),i("ddb0"),i("2b3d"),i("a15b"),i("ac1f"),i("1276"),i("e260");function s(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text/csv;charset=utf-8;",s={type:i},a=new File([e],t,s),n=document.createElement("a"),o=URL.createObjectURL(a);n.setAttribute("href",o),void 0!==n.download?n.setAttribute("download",t):n.target="_blank",n.style.visibility="hidden",document.body.appendChild(n),n.click(),setTimeout((function(){return document.body.removeChild(n)}),0)}function a(t){if(t){t=String(t);var e=String(t).lastIndexOf(".");t.lastIndexOf(",")>e&&(e=t.lastIndexOf(","));var i="",s="";return e>0?(i=t.substring(0,e).split(",").join("").split(".").join(""),s=t.substring(e+1,t.length),s.indexOf(",")>0&&(e=t.lastIndexOf(","),s=t.substring(e+1,t.length))):i=t,[i,s].join(".")}return t}},"8f94":function(t,e,i){var s=i("24fb");e=s(!1),e.push([t.i,".btn-group button[data-v-14913917]{margin-right:10px}.modal-footer[data-v-14913917]{min-width:150px}.antrag-action-button__container[data-v-14913917]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.error-message[data-v-14913917]{color:var(--color-danger)}",""]),t.exports=e},9893:function(t,e,i){var s=i("24fb");e=s(!1),e.push([t.i,".limits-box .input-forms__label-content{display:block}.w-394 textarea{width:440px;max-width:100%}",""]),t.exports=e},cdb5:function(t,e,i){"use strict";i("53fa")}}]);