/home/ivoiecob/email.hirewise-va.com/adminpanel/js/7735.a26c8d4f.js
"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[7735],{87735:(e,s,t)=>{t.r(s),t.d(s,{default:()=>M});var o=t(61758),l=t(29104),i=t(58790);const n={class:"q-pa-lg"},a={class:"row q-mb-md"},c={class:"col text-h5"},r={class:"row q-mb-md"},d={class:"col-2 q-my-sm"},u={class:"col-5"},h={class:"row q-mb-md"},E={class:"col-2 q-my-sm"},m={class:"col-5"},g={class:"row q-mb-md"},L={class:"col-2 q-my-sm"},S={class:"col-5"},b={class:"row q-mb-md"},v=(0,o.Lk)("div",{class:"col-2 q-my-sm"},null,-1),A={class:"col-8"},k={class:"row q-mb-md"},p={class:"col-2 q-my-sm"},R={class:"col-5"},y={class:"row q-mb-md"},T=(0,o.Lk)("div",{class:"col-2 q-my-sm"},null,-1),_={class:"col-8"},C={class:"row q-mb-md"},F={class:"col-2 q-my-sm"},K={class:"col-5"},I={class:"row q-mb-xl"},O=(0,o.Lk)("div",{class:"col-2 q-my-sm"},null,-1),q={class:"col-5"},N={class:"q-pt-md text-right"};function f(e,s,t,f,w,G){const x=(0,o.g2)("q-input"),V=(0,o.g2)("q-item-label"),P=(0,o.g2)("q-btn"),B=(0,o.g2)("q-card-section"),U=(0,o.g2)("q-card"),$=(0,o.g2)("q-linear-progress"),Q=(0,o.g2)("q-inner-loading"),W=(0,o.g2)("q-scroll-area"),j=(0,o.gN)("t");return(0,o.uX)(),(0,o.Wv)(W,{class:"full-height full-width"},{default:(0,o.k6)((()=>[(0,o.Lk)("div",n,[(0,o.Lk)("div",a,[(0,o.bo)((0,o.Lk)("div",c,null,512),[[j,"S3FILESTORAGE.HEADING_SETTINGS_TAB"]])]),(0,o.bF)(U,{flat:"",bordered:"",class:"card-edit-settings"},{default:(0,o.k6)((()=>[(0,o.bF)(B,null,{default:(0,o.k6)((()=>[(0,o.Lk)("div",r,[(0,o.bo)((0,o.Lk)("div",d,null,512),[[j,"S3FILESTORAGE.LABEL_ACCESS_KEY"]]),(0,o.Lk)("div",u,[(0,o.bF)(x,{outlined:"",dense:"","bg-color":"white",modelValue:w.accessKey,"onUpdate:modelValue":s[0]||(s[0]=e=>w.accessKey=e),onKeyup:(0,l.jR)(G.save,["enter"])},null,8,["modelValue","onKeyup"])])]),(0,o.Lk)("div",h,[(0,o.bo)((0,o.Lk)("div",E,null,512),[[j,"S3FILESTORAGE.LABEL_SECRET_KEY"]]),(0,o.Lk)("div",m,[(0,o.bF)(x,{outlined:"",dense:"","bg-color":"white",modelValue:w.secretKey,"onUpdate:modelValue":s[1]||(s[1]=e=>w.secretKey=e),onKeyup:(0,l.jR)(G.save,["enter"])},null,8,["modelValue","onKeyup"])])]),(0,o.Lk)("div",g,[(0,o.bo)((0,o.Lk)("div",L,null,512),[[j,"S3FILESTORAGE.LABEL_REGION"]]),(0,o.Lk)("div",S,[(0,o.bF)(x,{outlined:"",dense:"","bg-color":"white",modelValue:w.region,"onUpdate:modelValue":s[2]||(s[2]=e=>w.region=e),onKeyup:(0,l.jR)(G.save,["enter"])},null,8,["modelValue","onKeyup"])])]),(0,o.Lk)("div",b,[v,(0,o.Lk)("div",A,[(0,o.bF)(V,{caption:""},{default:(0,o.k6)((()=>[(0,o.eW)((0,i.v_)(e.$t("S3FILESTORAGE.INFO_REGION")),1)])),_:1})])]),(0,o.Lk)("div",k,[(0,o.bo)((0,o.Lk)("div",p,null,512),[[j,"S3FILESTORAGE.LABEL_HOST"]]),(0,o.Lk)("div",R,[(0,o.bF)(x,{outlined:"",dense:"","bg-color":"white",modelValue:w.host,"onUpdate:modelValue":s[3]||(s[3]=e=>w.host=e),onKeyup:(0,l.jR)(G.save,["enter"])},null,8,["modelValue","onKeyup"])])]),(0,o.Lk)("div",y,[T,(0,o.Lk)("div",_,[(0,o.bF)(V,{caption:""},{default:(0,o.k6)((()=>[(0,o.eW)((0,i.v_)(e.$t("S3FILESTORAGE.INFO_HOST")),1)])),_:1})])]),(0,o.Lk)("div",C,[(0,o.bo)((0,o.Lk)("div",F,null,512),[[j,"S3FILESTORAGE.LABEL_BUCKET_PREFIX"]]),(0,o.Lk)("div",K,[(0,o.bF)(x,{outlined:"",dense:"","bg-color":"white",modelValue:w.bucketPrefix,"onUpdate:modelValue":s[4]||(s[4]=e=>w.bucketPrefix=e),onKeyup:(0,l.jR)(G.save,["enter"])},null,8,["modelValue","onKeyup"])])]),(0,o.Lk)("div",I,[O,(0,o.Lk)("div",q,[(0,o.bF)(P,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:e.$t("S3FILESTORAGE.BUTTON_TEST_CONNECTION"),onClick:G.testConnection},null,8,["label","onClick"])])])])),_:1})])),_:1}),(0,o.Lk)("div",N,[(0,o.bF)(P,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",onClick:G.save,label:e.$t("COREWEBCLIENT.ACTION_SAVE")},null,8,["onClick","label"])])]),(0,o.bF)(Q,{style:{"justify-content":"flex-start"},showing:w.saving},{default:(0,o.k6)((()=>[(0,o.bF)($,{query:""})])),_:1},8,["showing"])])),_:1})}var w=t(36720),G=t(38176),x=t(79134),V=t(58985);const P={name:"S3FilestorageAdminSettings",mounted(){this.populate()},beforeRouteLeave(e,s,t){this.$root.doBeforeRouteLeave(e,s,t)},data(){return{saving:!1,accessKey:"",secretKey:"",region:"",host:"",bucketPrefix:"",testingConnection:!1}},methods:{hasChanges(){const e=V.A.getS3FilestorageSettings();return this.accessKey!==e.accessKey||this.secretKey!==e.secretKey||this.region!==e.region||this.host!==e.host||this.bucketPrefix!==e.bucketPrefix},revertChanges(){this.populate()},save(){if(!this.saving){this.saving=!0;const e={AccessKey:this.accessKey,SecretKey:this.secretKey,Region:this.region,Host:this.host,BucketPrefix:this.bucketPrefix};x.A.sendRequest({moduleName:"S3Filestorage",methodName:"UpdateS3Settings",parameters:e}).then((e=>{this.saving=!1,!0===e?(V.A.saveS3FilestorageSettings({accessKey:this.accessKey,secretKey:this.secretKey,region:this.region,host:this.host,bucketPrefix:this.bucketPrefix}),this.populate(),G.A.showReport(this.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS"))):G.A.showError(this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(e=>{this.saving=!1,G.A.showError(w.A.getTextFromResponse(e,this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}},populate(){const e=V.A.getS3FilestorageSettings();this.accessKey=e.accessKey,this.secretKey=e.secretKey,this.region=e.region,this.host=e.host,this.bucketPrefix=e.bucketPrefix},testConnection(){if(!this.testingConnection){this.testingConnection=!0;const e={AccessKey:this.accessKey,SecretKey:this.secretKey,Region:this.region,Host:this.host};x.A.sendRequest({moduleName:"S3Filestorage",methodName:"TestConnection",parameters:e}).then((e=>{this.testingConnection=!1,!0===e?G.A.showReport(this.$t("S3FILESTORAGE.REPORT_CONNECT_SUCCESSFUL")):G.A.showError(this.$t("S3FILESTORAGE.ERROR_CONNECT_FAILED"))}),(e=>{this.testingConnection=!1,G.A.showError(w.A.getTextFromResponse(e,this.$t("S3FILESTORAGE.ERROR_CONNECT_FAILED")))}))}}}};var B=t(12807),U=t(48958),$=t(23316),Q=t(44189),W=t(39270),j=t(13796),D=t(56384),H=t(39035),X=t(35859),Y=t(98582),z=t.n(Y);const J=(0,B.A)(P,[["render",f]]),M=J;z()(P,"components",{QScrollArea:U.A,QCard:$.A,QCardSection:Q.A,QInput:W.A,QItemLabel:j.A,QBtn:D.A,QInnerLoading:H.A,QLinearProgress:X.A})}}]);