text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"363f":function(e,t,i){"use strict";var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.errorList.length?i("div",{staticClass:"row"},[i("q-card",{staticClass:"error-card q-mt-md bg-red-1",attrs:{flat:"",bordered:""}},[i("q-toolbar",{staticClass:"bg-red-1"},[i("q-icon",{attrs:{name:"error",size:"32px",color:"red"}}),i("q-toolbar-title",[e._v(e._s(e.$t("backend_error_header")))])],1),i("q-list",{attrs:{bordered:""}},e._l(e.errorList,(function(t){return i("q-item",{key:t,staticClass:"q-my-xs error-item"},[i("q-item-section",[i("q-item-label",[e._v(" "+e._s(t)+" ")])],1)],1)})),1)],1)],1):e._e()},o=[],a={props:{errorList:Array}},n=a,l=(i("4ffb"),i("2877")),s=i("f09f"),c=i("65c6"),p=i("0016"),d=i("6ac5"),m=i("1c1c"),u=i("66e5"),f=i("4074"),g=i("0170"),b=i("eebe"),h=i.n(b),_=Object(l["a"])(n,r,o,!1,null,null,null);t["a"]=_.exports;h()(_,"components",{QCard:s["a"],QToolbar:c["a"],QIcon:p["a"],QToolbarTitle:d["a"],QList:m["a"],QItem:u["a"],QItemSection:f["a"],QItemLabel:g["a"]})},"4ffb":function(e,t,i){"use strict";i("af64")},"6cb8":function(e,t,i){"use strict";i.r(t);var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("q-page",{attrs:{padding:""}},[i("q-card",{staticClass:"input-card"},[i("form",{on:{submit:function(t){return t.preventDefault(),e.submitForm(t)}}},[i("input",{ref:"inputImageFileSelection",style:{display:"none"},attrs:{id:"inputImageFileSelection",type:"file",accept:"image/*"},on:{change:e.upload}}),i("div",{staticClass:"row q-mb-md"},[i("q-banner",{staticClass:"bg-grey-3 col",scopedSlots:e._u([{key:"avatar",fn:function(){return[i("q-icon",{attrs:{name:"portrait",color:"primary"}})]},proxy:!0}])},[e._v("\n          "+e._s(e.$t("profile_profilePicture_title"))+"\n        ")])],1),i("div",{staticClass:"row q-mb-md items-start"},[i("q-btn",{attrs:{color:"primary",icon:"cloud_upload",label:e.getActiveProfileImageContent?e.$t("profile_profilePicture_button_changeFile_label"):e.$t("profile_profilePicture_button_selectFile_label"),disable:e.getFileProcessingStatusWithTemporaryFileId(e.temporaryFileId)},on:{click:function(t){return e.$refs.inputImageFileSelection.click()}}}),i("q-btn",{staticClass:"q-ml-md",attrs:{color:"secondary",icon:"delete_forever",label:e.$t("profile_profilePicture_button_deleteFile_label"),disable:!e.getActiveProfileImageId||e.getFileProcessingStatusWithTemporaryFileId(e.temporaryFileId)},on:{click:function(t){e.showConfirmDelete=!0}}})],1),e.localFileContent?i("div",{staticClass:"row q-mb-md"},[i("q-img",{staticStyle:{"max-height":"200px","max-width":"200px"},attrs:{src:e.localFileContent,"spinner-color":"white"}},[e.getFileProcessingStatusWithTemporaryFileId(e.temporaryFileId)?i("div",{staticClass:"absolute-full flex flex-center"},[i("q-spinner",{attrs:{color:"primary",size:"3em"}})],1):e._e()])],1):e._e(),!e.localFileContent&&e.getActiveProfileImageContent?i("div",{staticClass:"row q-mb-md"},[i("q-img",{staticStyle:{"max-height":"200px","max-width":"200px"},attrs:{src:e.getActiveProfileImageContent,"spinner-color":"white"}},[e.getFileProcessingStatusWithTemporaryFileId(e.temporaryFileId)?i("div",{staticClass:"absolute-full flex flex-center"},[i("q-spinner",{attrs:{color:"primary",size:"3em"}})],1):e._e()])],1):e._e(),i("confirm-yes-no",{key:e.showConfirmDelete,attrs:{propShow:e.showConfirmDelete,propConfirmMessage:e.m("app_confirm_Really_delete_recordname",{recordname_nominativSingular:e.$t("recordname_profilePicture_nominativSingular")}),propIconMessage:"mdi-account-question-outline",propOkButtonLabel:e.$t("app_button_Delete")},on:{confirmed:e.deleteImage,hide:function(t){e.showConfirmDelete=!1}}}),i("error-row-card",{attrs:{errorList:e.getFileErrorlist}})],1)])],1)},o=[],a=i("ded3"),n=i.n(a),l=i("2f62"),s=i("7429"),c=i("363f"),p=i("d671"),d=i("a40e"),m=i("82ab"),u={name:"ProfilePicture",data(){return{localFileContent:"",temporaryFileId:null,showConfirmDelete:!1}},methods:n()(n()(n()({upload(e){if(e.target.files.length){this.fileUploadInitialize();const t=e.target.files[0];this.temporaryFileId=Date.now(),t.temporaryFileId=this.temporaryFileId,t.isProfileImage=!0;const i=new FileReader;i.readAsDataURL(t),i.onload=e=>{const i=t;i.temporaryFileId=t.temporaryFileId,i.nameWithExtension=t.name,i.filecontent=e.target.result,i.isProcessing=!0,i.isProfileImage=!1,this.fileAddTemporaryFile(i),this.localFileContent=e.target.result,this[d["f"]]({file:t,filecontent:this.localFileContent,profileId:this.$store.state.profile.activeProfile&&this.$store.state.profile.activeProfile.id,temporaryFileId:this.temporaryFileId,isProfileImage:!0,oldProfileImageId:this.getActiveProfileImageId,token:this.getUserToken,onSuccessNotification:this.m("backend_notification_recordname_uploaded_sucessfully",{recordname_singular:this.m("recordname_profilePicture_singular")}),onSuccessNotificationParameter:{recordname_profilePicture_singular:""}})}}},deleteImage(){this.getActiveProfileImageId&&(this.fileUploadInitialize(),this.temporaryFileId=null,this.localFileContent="",this[d["c"]]({fileId:this.getActiveProfileImageId,token:this.getUserToken,onSuccessNotification:this.m("backend_notification_recordname_deleted_sucessfully",{recordname_singular:this.m("recordname_profilePicture_singular")}),onSuccessNotificationParameter:{recordname_profilePicture_singular:""}}))}},Object(l["b"])(["fileAddTemporaryFile","fileUploadInitialize"])),Object(s["b"])([d["f"],d["c"]])),{},{m:m["a"]}),computed:n()({},Object(l["c"])(["getFileErrorlist","getUserToken","getFileProcessingStatusWithTemporaryFileId","getActiveProfileImageContent","getActiveProfileImageId"])),created(){this.fileUploadInitialize()},components:{"confirm-yes-no":p["a"],"error-row-card":c["a"]}},f=u,g=(i("72b5"),i("2877")),b=i("9989"),h=i("f09f"),_=i("54e1"),I=i("0016"),v=i("9c40"),y=i("068f"),C=i("0d59"),F=i("eebe"),P=i.n(F),q=Object(g["a"])(f,r,o,!1,null,null,null);t["default"]=q.exports;P()(q,"components",{QPage:b["a"],QCard:h["a"],QBanner:_["a"],QIcon:I["a"],QBtn:v["a"],QImg:y["a"],QSpinner:C["a"]})},"72b5":function(e,t,i){"use strict";i("ad5b")},ad5b:function(e,t,i){},af64:function(e,t,i){},d671:function(e,t,i){"use strict";var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("q-dialog",{attrs:{persistent:""},on:{hide:function(t){return e.$emit("hide")}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[i("q-card",[i("q-card-section",{staticClass:"row items-center"},[i("q-avatar",{attrs:{icon:e.iconMessage,color:"primary","text-color":"white"}}),i("span",{staticClass:"q-ml-sm"},[e._v("\n        "+e._s(e.propConfirmMessage)+"\n      ")])],1),i("q-card-actions",{attrs:{align:"right"}},[i("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{flat:"",label:e.okButtonLabel,color:"negative"},on:{click:function(t){return e.$emit("confirmed")}}}),i("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{flat:"",label:e.cancelButtonLabel,color:"positive"}})],1)],1)],1)},o=[],a={props:{propShow:Boolean,propConfirmMessage:String,propIconMessage:String,propOkButtonLabel:String,propCancelButtonLabel:String},data(){return{okButtonLabel:this.propOkButtonLabel||this.$t("app_button_Yes"),cancelButtonLabel:this.propCancelButtonLabel||this.$t("app_button_No"),iconMessage:this.propIconMessage||"mdi-account-question-outline",show:this.propShow}}},n=a,l=i("2877"),s=i("24e8"),c=i("f09f"),p=i("a370"),d=i("cb32"),m=i("4b7e"),u=i("9c40"),f=i("7f67"),g=i("eebe"),b=i.n(g),h=Object(l["a"])(n,r,o,!1,null,null,null);t["a"]=h.exports;b()(h,"components",{QDialog:s["a"],QCard:c["a"],QCardSection:p["a"],QAvatar:d["a"],QCardActions:m["a"],QBtn:u["a"]}),b()(h,"directives",{ClosePopup:f["a"]})}}]);