(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[26],{"80c3":function(t,a,o){"use strict";o.r(a);var e=function(){var t=this,a=t.$createElement,o=t._self._c||a;return o("q-scroll-area",{staticClass:"full-height full-width"},[o("div",{staticClass:"q-pa-lg "},[o("div",{staticClass:"row q-mb-md"},[o("div",{staticClass:"col text-h5"},[t._v(t._s(t.$t("MAILWEBCLIENT.HEADING_SETTINGS_TAB")))])]),o("q-card",{staticClass:"card-edit-settings",attrs:{flat:"",bordered:""}},[o("q-card-section",[o("div",{staticClass:"row"},[o("div",{staticClass:"col-5"},[o("q-checkbox",{attrs:{dense:"",label:t.$t("MAILWEBCLIENT.LABEL_ALLOW_AUTO_PROVISIONING_NEW_USERS")},model:{value:t.autocreateMailAccountOnNewUserFirstLogin,callback:function(a){t.autocreateMailAccountOnNewUserFirstLogin=a},expression:"autocreateMailAccountOnNewUserFirstLogin"}})],1)]),o("div",{staticClass:"row q-mt-sm q-mb-lg"},[o("div",{staticClass:"col-10"},[o("q-item-label",{attrs:{caption:""},domProps:{innerHTML:t._s(t.$t("MAILWEBCLIENT.LABEL_HINT_ALLOW_AUTO_PROVISIONING_NEW_USERS_HTML"))}})],1)]),t.allowMultiAccounts?o("div",{staticClass:"row"},[o("div",{staticClass:"col-5"},[o("q-checkbox",{attrs:{dense:"",label:t.$t("MAILWEBCLIENT.LABEL_ALLOW_USERS_ADD_MAILBOXES")},model:{value:t.allowAddAccounts,callback:function(a){t.allowAddAccounts=a},expression:"allowAddAccounts"}})],1)]):t._e(),o("div",{directives:[{name:"show",rawName:"v-show",value:t.allowHorizontalLayout,expression:"allowHorizontalLayout"}],staticClass:"row q-mt-md"},[o("div",{directives:[{name:"t",rawName:"v-t",value:"MAILWEBCLIENT.LABEL_DEFAULT_LAYOUT",expression:"'MAILWEBCLIENT.LABEL_DEFAULT_LAYOUT'"}],staticClass:"col-2 q-mt-sm"}),o("div",{staticClass:"col-5"},[o("q-select",{attrs:{outlined:"",dense:"","bg-color":"white","emit-value":"","map-options":"",options:t.layoutOptions},model:{value:t.horizontalLayoutByDefault,callback:function(a){t.horizontalLayoutByDefault=a},expression:"horizontalLayoutByDefault"}})],1)])])],1),o("div",{staticClass:"q-pt-md text-right"},[o("q-btn",{staticClass:"q-px-sm",attrs:{unelevated:"","no-caps":"",dense:"",ripple:!1,color:"primary",label:t.$t("COREWEBCLIENT.ACTION_SAVE")},on:{click:t.save}})],1)],1),o("q-inner-loading",{staticStyle:{"justify-content":"flex-start"},attrs:{showing:t.saving}},[o("q-linear-progress",{attrs:{query:""}})],1)],1)},s=[],l=o("4245"),i=o("21ac"),n=o("e539"),c=o("635f"),r={name:"MailAdminSettings",data:function(){return{autocreateMailAccountOnNewUserFirstLogin:!0,allowMultiAccounts:!1,allowAddAccounts:!1,allowHorizontalLayout:!1,horizontalLayoutByDefault:!1,layoutOptions:[{label:this.$t("MAILWEBCLIENT.LABEL_VERT_SPLIT_LAYOUT"),value:!1},{label:this.$t("MAILWEBCLIENT.LABEL_HORIZ_SPLIT_LAYOUT"),value:!0}],saving:!1}},beforeRouteLeave:function(t,a,o){this.doBeforeRouteLeave(t,a,o)},mounted:function(){this.saving=!1,this.populate()},methods:{populate:function(){var t=c["a"].getEditableByAdmin();this.autocreateMailAccountOnNewUserFirstLogin=t.autocreateMailAccountOnNewUserFirstLogin,this.allowMultiAccounts=t.allowMultiAccounts,this.allowAddAccounts=t.allowAddAccounts,this.allowHorizontalLayout=t.allowHorizontalLayout,this.horizontalLayoutByDefault=t.horizontalLayoutByDefault},hasChanges:function(){var t=c["a"].getEditableByAdmin();return this.autocreateMailAccountOnNewUserFirstLogin!==t.autocreateMailAccountOnNewUserFirstLogin||this.allowAddAccounts!==t.allowAddAccounts||this.allowHorizontalLayout!==t.allowHorizontalLayout||this.horizontalLayoutByDefault!==t.horizontalLayoutByDefault},revertChanges:function(){this.populate()},save:function(){var t=this;if(!this.saving){this.saving=!0;var a={AutocreateMailAccountOnNewUserFirstLogin:this.autocreateMailAccountOnNewUserFirstLogin,AllowAddAccounts:this.allowAddAccounts,HorizontalLayoutByDefault:this.horizontalLayoutByDefault};n["a"].sendRequest({moduleName:"Mail",methodName:"UpdateSettings",parameters:a}).then((function(o){t.saving=!1,!0===o?(c["a"].saveEditableByAdmin({autocreateMailAccountOnNewUserFirstLogin:a.AutocreateMailAccountOnNewUserFirstLogin,allowAddAccounts:a.AllowAddAccounts,horizontalLayoutByDefault:a.HorizontalLayoutByDefault}),t.populate(),i["a"].showReport(t.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS"))):i["a"].showError(t.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(function(a){t.saving=!1,i["a"].showError(l["a"].getTextFromResponse(a,t.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}}}},u=r,L=o("2877"),A=o("4983"),d=o("f09f"),E=o("a370"),w=o("8f8e"),h=o("0170"),v=o("ddd8"),_=o("9c40"),I=o("74f7"),N=o("6b1d"),f=o("eebe"),y=o.n(f),C=Object(L["a"])(u,e,s,!1,null,"05432a0a",null);a["default"]=C.exports;y()(C,"components",{QScrollArea:A["a"],QCard:d["a"],QCardSection:E["a"],QCheckbox:w["a"],QItemLabel:h["a"],QSelect:v["a"],QBtn:_["a"],QInnerLoading:I["a"],QLinearProgress:N["a"]})}}]);