{"version":3,"sources":["webpack:///./src/views/Account/Components/AdministrationComponents/MonthlyDownloadsDialog.vue","webpack:///./src/views/Account/Components/AdministrationComponents/MonthlyDownloadsDialog.vue?4ff6","webpack:///./src/views/Account/Components/AdministrationComponents/MonthlyDownloadsDialog.vue?f00f","webpack:///./src/views/Account/Components/AdministrationComponents/MonthlyDownloadsDialog.vue?fe44"],"names":["render","_vm","this","_c","_self","_setupProxy","attrs","cancelMonthlyDownloadsActions","cancelMonthlyDownloadsDescription","cancelMonthlyDownloadsTitle","on","closeDialog","model","value","isCancelMonthlyDownloadsOpen","callback","$$v","expression","staticRenderFns","snackbarModule","getModule","SnackbarModule","store","MonthlyDownloadsDialog","Vue","defActions","slotText","$tc","plainType","key","action","type","disabled","userMonthlyDownloadsCount","cancelMonthlyDownloadsSubmit","pop","userMonthlyDownloadsEmail","length","res","downloadXmlService","clearMonthDownload","selectedUserId","showSnackbar","message","status","timer","$emit","__decorate","VModel","required","default","Boolean","Prop","String","Number","Component","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAOF,EAAG,WAAW,CAACG,MAAM,CAAC,QAAUL,EAAIM,8BAA8B,YAAcN,EAAIO,kCAAkC,MAAQP,EAAIQ,4BAA4B,WAAa,GAAG,SAAW,SAASC,GAAG,CAAC,KAAOT,EAAIU,aAAaC,MAAM,CAACC,MAAOZ,EAAIa,6BAA8BC,SAAS,SAAUC,GAAMf,EAAIa,6BAA6BE,GAAKC,WAAW,mCAEpbC,EAAkB,G,oFCKtB,MAAMC,EAAiBC,eAAUC,oBAAgBC,QAGjD,IAAqBC,EAArB,cAAoDC,OAAG,sPAyBpB,oCAC/B,MAAMC,EAAa,CACjB,CACEC,SAAUxB,KAAKyB,IAAI,yBACnBC,UAAW,UACXC,IAAK,SACLC,OAAQ,IAAM5B,KAAKS,eAErB,CACEe,SAAUxB,KAAKyB,IAAI,mDACnBI,KAAM,gBACNF,IAAK,OACLG,UAAW9B,KAAK+B,0BAChBH,OAAQ,IAAM5B,KAAKgC,iCAMvB,OAHMhC,KAAK+B,0BAA4B,GACrCR,EAAWU,MAENV,EAEsB,kCACU,MAAvC,OAAIvB,KAAKY,8BACA,UAAAZ,KAAKkC,iCAAL,eAAgCC,QAAS,EAC5CnC,KAAKkC,0BACLlC,KAAKyB,IAAI,mCAER,GAE4B,wCACnC,OAAIzB,KAAKY,8BAAgCZ,KAAK+B,0BAE1C/B,KAAKyB,IAAI,oDACTzB,KAAK+B,0BAGA/B,KAAKyB,IAAI,0DAKpBhB,cACET,KAAKY,8BAA+B,EAEJ,qCAChC,MAAMwB,QAAYC,OAAmBC,mBACnCtC,KAAKuC,gBAEPtB,EAAeuB,aAAa,CAC1BC,QACiB,MAAfL,EAAIM,OACA1C,KAAKyB,IAAI,2CACTzB,KAAKyB,IAAI,2CACfI,KAAqB,MAAfO,EAAIM,OAAiB,UAAY,QACvCC,MAAO,MAET3C,KAAKS,cACLT,KAAK4C,MAAM,YA/EbC,gBADCC,eAAO,CAAEC,UAAU,EAAMC,SAAS,EAAOnB,KAAMoB,WAChD,mDAOAJ,gBALCK,eAAK,CACJH,UAAU,EACVC,QAAS,EACTnB,KAAMsB,UAER,gDAMAN,gBALCK,eAAK,CACJH,UAAU,EACVC,QAAS,EACTnB,KAAMuB,UAER,gDAMAP,gBALCK,eAAK,CACJH,UAAU,EACVC,QAAS,EACTnB,KAAMuB,UAER,qCAtBmB/B,EAAsB,gBAD1CgC,QACoBhC,WCVkb,I,YCOnciC,EAAY,eACd,EACAxD,EACAkB,GACA,EACA,KACA,KACA,MAIa,aAAAsC,E","file":"js/chunk-2d22c888.e39364bd.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('z-dialog',{attrs:{\"actions\":_vm.cancelMonthlyDownloadsActions,\"description\":_vm.cancelMonthlyDownloadsDescription,\"title\":_vm.cancelMonthlyDownloadsTitle,\"persistent\":\"\",\"maxWidth\":\"600px\"},on:{\"undo\":_vm.closeDialog},model:{value:(_vm.isCancelMonthlyDownloadsOpen),callback:function ($$v) {_vm.isCancelMonthlyDownloadsOpen=$$v},expression:\"isCancelMonthlyDownloadsOpen\"}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Component, Prop, VModel, Vue } from \"vue-property-decorator\";\nimport store from \"@/store\";\nimport { getModule } from \"vuex-module-decorators\";\nimport { SnackbarModule } from \"@zelando/vuelando\";\nimport { downloadXmlService } from \"@/services/api/generate-xml.service\";\n\nconst snackbarModule = getModule(SnackbarModule, store);\n\n@Component\nexport default class MonthlyDownloadsDialog extends Vue {\n // ------> Props\n @VModel({ required: true, default: false, type: Boolean })\n isCancelMonthlyDownloadsOpen: boolean;\n\n @Prop({\n required: true,\n default: 0,\n type: String,\n })\n userMonthlyDownloadsEmail: string;\n @Prop({\n required: true,\n default: 0,\n type: Number,\n })\n userMonthlyDownloadsCount: number;\n @Prop({\n required: true,\n default: 0,\n type: Number,\n })\n selectedUserId: number;\n\n // ------> Getters\n get cancelMonthlyDownloadsActions(): unknown[] {\n const defActions = [\n {\n slotText: this.$tc(\"administration.Cancel\"),\n plainType: \"primary\",\n key: \"cancel\",\n action: () => this.closeDialog(),\n },\n {\n slotText: this.$tc(\"administration.CancelMonthlyDownloadsBtnConfirm\"),\n type: \"primary-color\",\n key: \"save\",\n disabled: !this.userMonthlyDownloadsCount,\n action: () => this.cancelMonthlyDownloadsSubmit(),\n },\n ];\n if (!(this.userMonthlyDownloadsCount > 0)) {\n defActions.pop();\n }\n return defActions;\n }\n get cancelMonthlyDownloadsTitle(): string {\n if (this.isCancelMonthlyDownloadsOpen) {\n return this.userMonthlyDownloadsEmail?.length > 0\n ? this.userMonthlyDownloadsEmail\n : this.$tc(\"administration.ErrorNoUserEmail\");\n }\n return \"\";\n }\n get cancelMonthlyDownloadsDescription(): string {\n if (this.isCancelMonthlyDownloadsOpen && this.userMonthlyDownloadsCount) {\n return (\n this.$tc(\"administration.CancelMonthlyDownloadsDescription\") +\n this.userMonthlyDownloadsCount\n );\n } else {\n return this.$tc(\"administration.CancelMonthlyDownloadsDescriptionNoData\");\n }\n }\n\n // ------> Functions\n closeDialog(): void {\n this.isCancelMonthlyDownloadsOpen = false;\n }\n async cancelMonthlyDownloadsSubmit(): Promise<void> {\n const res = await downloadXmlService.clearMonthDownload(\n this.selectedUserId\n );\n snackbarModule.showSnackbar({\n message:\n res.status === 200\n ? this.$tc(\"administration.CancelMonthlyDownloadsOK\")\n : this.$tc(\"administration.CancelMonthlyDownloadsKO\"),\n type: res.status === 200 ? \"success\" : \"error\",\n timer: 5000,\n });\n this.closeDialog();\n this.$emit(\"reload\");\n }\n}\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MonthlyDownloadsDialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MonthlyDownloadsDialog.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./MonthlyDownloadsDialog.vue?vue&type=template&id=e82cc576&\"\nimport script from \"./MonthlyDownloadsDialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./MonthlyDownloadsDialog.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}