{"version":3,"sources":["webpack:///./src/views/Account/Components/PaymentsComponents/SubscriptionPlanOverview.vue?7d15","webpack:///./src/services/api/subscription-plan.service.ts","webpack:///./src/views/Account/Components/PaymentsComponents/SubscriptionPlanOverview.vue","webpack:///./src/views/Account/Components/PaymentsComponents/SubscriptionPlanOverview.vue?e85f","webpack:///./src/views/Account/Components/PaymentsComponents/SubscriptionPlanOverview.vue?f6c8","webpack:///./src/views/Account/Components/PaymentsComponents/SubscriptionPlanOverview.vue?7873"],"names":["controller","SubscriptionPlansService","ApiService","constructor","super","process","GetAllOffert","this","getAll","GetById","roleId","GetExpiration","subscriptionPlansService","staticClass","_c","attrs","on","_vm","href","text","$tc","current","model","value","toggle","callback","$$v","expression","subscriptionPlan","staticStyle","_v","_s","descrOffert","firstSupport","secondSupport","_l","staticRenderFns","authModule","getModule","AuthModule","store","overlayModule","OverlayModule","SubscriptionPlanOverview","Vue","required","offertID","nameOffert","price","monthlyBeneficiaries","totalSubjects","freeTrial","expiration","priceMonthID","priceYearID","yearPrice","key","iconName","subscriptionPlans","data","profileRoleID","duration","userService","SubscriptionDuration","showOverlay","downgrade","paymentsService","GetChangedPlan","GetSubscription","parse","split","subscriptionExpired","Date","getTime","back","$emit","openConfirmPlan","plan","Component","component"],"mappings":"kHAAA,W,2DCCA,kDAEA,MAAMA,EAAa,oBAEnB,MAAMC,UAAiCC,gBACrCC,cACEC,MAAMC,SAGRC,eACE,OAAOC,KAAKC,OAA4BR,EAAH,WAGvCS,QAAQC,GACN,OAAOH,KAAKC,OACV,GAAGR,oBAA6BU,KAIpCC,gBACE,OAAOJ,KAAKC,OAAkBR,EAAH,mBAIxB,MAAMY,EAA2B,IAAIX,G,6FCzB6C,EAAU,W,IAA2BY,OAAqBC,EAAG,QAAQ,GAAY,EAAC,MAAb,Y,OAA2B,SAAO,WAAR,oBAAe,CAACA,EAAG,QAAkBC,YAAM,O,MAAC,CAAoB,KAAO,OAAWC,CAAE,EAAC,kB,MAAC,CAAD,kBAAqB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pCC,QADoC,wCAET,IAFS,6BAGtC,GAHsC,6BAItC,GAJsC,+BAKpC,GALoC,iCAMnC,GANmC,2CAOzB,GAPyB,uCASZ,CACzCC,SAAU,EACVC,WAAY,GACZf,YAAa,GACbgB,MAAO,GACPC,qBAAsB,GACtBC,cAAe,GACfjB,cAAc,EACdC,eAAe,EACfiB,UAAW,GACXC,WAAY,GACZ1C,OAAQ,EACR2C,aAAc,GACdC,YAAa,GACbC,UAAW,KAvB0C,8BAuDd,CACvC,CACEC,IAAK,EACLC,SAAU,GACVtC,KAAMZ,KAAKa,IAAI,qBAEjB,CACEoC,IAAK,EACLC,SAAU,GACVtC,KAAMZ,KAAKa,IAAI,sBAtCE,gBACnBb,KAAKmD,yBACG9C,OAAyBN,gBAC/BqD,KACFpD,KAAKG,OAAS2B,EAAWuB,cACzBrD,KAAKsD,gBAAkBC,OAAYC,wBAAwBJ,KAC3DlB,EAAcuB,cACdzD,KAAK0D,iBAAmBC,OAAgBC,kBAAkBR,KAC1DpD,KAAKqB,wBAA0BkC,OAAYM,mBAAmBT,KAC9D,IAAIU,EAAQ9D,KAAKqB,iBAAiBwB,WAAWkB,MAAM,KACnD/D,KAAKgE,oBACH,IAAIC,KAAKH,EAAM,GAAK,IAAMA,EAAM,GAAK,IAAMA,EAAM,IAAII,WACrD,IAAID,MAAOC,UAGPC,OACNnE,KAAKoE,MAAM,QAGLC,gBAAgBC,GACtBtE,KAAKoE,MAAM,kBAAmBE,EAAMtE,KAAKiB,UA9CxBmB,EAAwB,gBAD5CmC,QACoBnC,WCjBob,I,wBCQrcoC,EAAY,eACd,EACA,EACA3C,GACA,EACA,KACA,WACA,MAIa,aAAA2C,E","file":"js/chunk-6797ce24.1c4a0647.js","sourcesContent":["export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionPlanOverview.vue?vue&type=style&index=0&id=4fe4d208&prod&scoped=true&lang=css&\"","import { PromotionPlans } from \"@/models/entities/subscription-plan.interface\";\r\nimport { ApiService } from \"@zelando/vuelando\";\r\n\r\nconst controller = \"subscriptionplans\";\r\n\r\nclass SubscriptionPlansService extends ApiService {\r\n constructor() {\r\n super(process.env.VUE_APP_API_ENDPOINT);\r\n }\r\n\r\n GetAllOffert() {\r\n return this.getAll(`${controller}/getall`);\r\n }\r\n\r\n GetById(roleId: number) {\r\n return this.getAll(\r\n `${controller}/getbyid?roleId=${roleId}`\r\n );\r\n }\r\n\r\n GetExpiration() {\r\n return this.getAll(`${controller}/getexpiration`);\r\n }\r\n}\r\n\r\nexport const subscriptionPlansService = new SubscriptionPlansService();\r\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('v-container',[_c('v-row',{staticClass:\"pb-0\"},[_c('v-col',{staticClass:\"pb-0\",attrs:{\"cols\":\"12\"}},[_c('z-plain-button',{attrs:{\"icon\":\"arrow-left\",\"type\":\"neutral\"},on:{\"click\":_vm.back}},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Back\"))+\" \")])],1),_c('v-col',{staticClass:\"pt-0 pl-0\"},[_c('z-breadcrumb',{staticClass:\"py-0\",attrs:{\"breadcrumb\":[\n {\n text: _vm.$tc('payments.Title'),\n href: { path: '/account/payments/home' },\n },\n { text: _vm.$tc('payments.ChangeSubscription'), current: true },\n ]}})],1)],1),_c('v-row',{staticClass:\"pt-0\",attrs:{\"align\":\"center\"}},[_c('v-col',[_c('span',[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.PlansOverviewInfo\"))+\" \")])]),_c('v-col',{staticClass:\"pt-0 pr-0\",attrs:{\"cols\":\"auto\"}},[_c('z-segmented-button',{attrs:{\"mandatory\":\"\",\"buttons\":_vm.buttons,\"primaryActive\":\"\"},model:{value:(_vm.toggle),callback:function ($$v) {_vm.toggle=$$v},expression:\"toggle\"}})],1)],1),_c('v-row',{staticClass:\"mt-6 mb-2\"},[_c('v-col',{staticClass:\"min-width\"}),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID},[_c('v-row',{class:_vm.roleId != subscriptionPlan.roleId ||\n _vm.duration == 3 ||\n _vm.duration == 0 ||\n _vm.subscriptionExpired\n ? 'row1 ml-1'\n : 'selected ml-1',staticStyle:{\"height\":\"250px\",\"padding\":\"32px 24px\",\"max-width\":\"300px\",\"text-align\":\"center\"}},[_c('v-col',{staticClass:\"text-on-background z-body-bold-small\",attrs:{\"cols\":\"12\"}},[_vm._v(\" \"+_vm._s(subscriptionPlan.nameOffert)+\" \")]),_c('v-col',{staticClass:\"custom-title-h4 pb-0\",attrs:{\"cols\":\"12\"}},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Euro\"))+\" \"+_vm._s(_vm.toggle === 0 ? subscriptionPlan.price : subscriptionPlan.yearPrice)+\" \")]),_c('v-col',{staticClass:\"custom-title-h5 pt-0\",attrs:{\"cols\":\"12\"}},[_vm._v(\" \"+_vm._s(_vm.toggle === 0 ? _vm.$tc(\"payments.Month\") : _vm.$tc(\"payments.Year\"))+\" \"+_vm._s(_vm.$tc(\"payments.IVA\"))+\" \")]),_c('v-col',{staticClass:\"z-label-regular text-on-background\",attrs:{\"cols\":\"12\"}},[_vm._v(\" \"+_vm._s(subscriptionPlan.descrOffert)+\" \")])],1)],1)})],2),_c('v-row',{staticClass:\"cell\",attrs:{\"align\":\"center\"}},[_c('v-col',{staticClass:\"text-on-background z-body-regular min-width\"},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.BeneficiaryMonthlyDescr\"))+\" \")]),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID,staticClass:\"z-body-bold\",attrs:{\"align\":\"center\"}},[_vm._v(\" \"+_vm._s(subscriptionPlan.monthlyBeneficiaries != \"-1\" ? subscriptionPlan.monthlyBeneficiaries : _vm.$tc(\"payments.Unlimited\"))+\" \")])})],2),_c('v-row',{staticClass:\"cell row1 z-body-regular text-on-background\",attrs:{\"align\":\"center\"}},[_c('v-col',{staticClass:\"min-width\"},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.OrderingSubject\"))+\" \")]),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID,staticClass:\"z-body-bold\",attrs:{\"align\":\"center\"}},[_vm._v(_vm._s(subscriptionPlan.totalSubjects != \"-1\" ? subscriptionPlan.totalSubjects : _vm.$tc(\"payments.Unlimited\"))+\" \")])})],2),_c('v-row',{staticClass:\"cell\",attrs:{\"align\":\"center\"}},[_c('v-col',{staticClass:\"min-width\",attrs:{\"align\":\"left\"}},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Help2\"))+\" \")]),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID,staticClass:\"z-body-bold\",attrs:{\"align\":\"center\"}},[(subscriptionPlan.firstSupport)?_c('z-icon',{attrs:{\"name\":\"check\",\"fill\":\"var(--z-icon-success-default)\"}}):_vm._e()],1)})],2),_c('v-row',{staticClass:\"cell row1 text-on-background z-body-regular\",attrs:{\"align\":\"center\"}},[_c('v-col',{staticClass:\"min-width\"},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Help4\"))+\" \")]),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID,staticClass:\"z-body-bold\",attrs:{\"align\":\"center\"}},[(subscriptionPlan.secondSupport)?_c('z-icon',{attrs:{\"name\":\"check\",\"fill\":\"var(--z-icon-success-default)\"}}):_vm._e()],1)})],2),(!_vm.downgrade)?_c('v-row',{staticClass:\"mt-8\",attrs:{\"align\":\"center\"}},[_c('v-col',{staticClass:\"min-width\"}),_vm._l((_vm.subscriptionPlans),function(subscriptionPlan){return _c('v-col',{key:subscriptionPlan.offertID,attrs:{\"align\":\"center\"}},[(\n _vm.roleId != subscriptionPlan.roleId ||\n _vm.duration == 3 ||\n _vm.duration == 0 ||\n _vm.subscriptionExpired\n )?_c('z-basic-button',{attrs:{\"type\":\"primary-color\"},on:{\"click\":function($event){return _vm.openConfirmPlan(subscriptionPlan.roleId)}}},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Choose\"))+\" \"+_vm._s(subscriptionPlan.nameOffert)+\" \")]):_c('span',{staticClass:\"text-on-background z-body-regular-small\"},[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.PlanActive\"))+\" \")])],1)})],2):_c('v-row',[_c('v-col',[_vm._v(\" \"+_vm._s(_vm.$tc(\"payments.Downgrading\"))+\" \")])],1),_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-divider')],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\nimport { required } from \"@/helpers/rules\";\r\nimport { SegmentedButtonItem } from \"@zelando/vuelando\";\r\nimport { subscriptionPlansService } from \"@/services/api/subscription-plan.service\";\r\nimport { PromotionPlans } from \"@/models/entities/subscription-plan.interface\";\r\nimport { getModule } from \"vuex-module-decorators\";\r\nimport AuthModule from \"@/store/modules/auth.module\";\r\nimport store from \"@/store\";\r\nimport { userService } from \"@/services/api/user.service\";\r\nimport OverlayModule from \"@/store/modules/overlay.module\";\r\nimport { paymentsService } from \"@/services/api/payments.service\";\r\n\r\nconst authModule = getModule(AuthModule, store);\r\nconst overlayModule = getModule(OverlayModule, store);\r\n\r\n@Component\r\nexport default class SubscriptionPlanOverview extends Vue {\r\n private required = required;\r\n private subscriptionPlans: PromotionPlans[] = [];\r\n private roleId = 0;\r\n private toggle = 0;\r\n private duration = 0;\r\n private downgrade = false;\r\n private subscriptionExpired = false;\r\n\r\n private subscriptionPlan: PromotionPlans = {\r\n offertID: 0,\r\n nameOffert: \"\",\r\n descrOffert: \"\",\r\n price: \"\",\r\n monthlyBeneficiaries: \"\",\r\n totalSubjects: \"\",\r\n firstSupport: false,\r\n secondSupport: false,\r\n freeTrial: \"\",\r\n expiration: \"\",\r\n roleId: 0,\r\n priceMonthID: \"\",\r\n priceYearID: \"\",\r\n yearPrice: \"\",\r\n };\r\n\r\n private async created() {\r\n this.subscriptionPlans = (\r\n await subscriptionPlansService.GetAllOffert()\r\n ).data;\r\n this.roleId = authModule.profileRoleID;\r\n this.duration = (await userService.SubscriptionDuration()).data;\r\n overlayModule.showOverlay();\r\n this.downgrade = (await paymentsService.GetChangedPlan()).data;\r\n this.subscriptionPlan = (await userService.GetSubscription()).data;\r\n var parse = this.subscriptionPlan.expiration.split(\"/\");\r\n this.subscriptionExpired =\r\n new Date(parse[1] + \"/\" + parse[0] + \"/\" + parse[2]).getTime() <\r\n new Date().getTime();\r\n }\r\n\r\n private back() {\r\n this.$emit(\"back\");\r\n }\r\n\r\n private openConfirmPlan(plan) {\r\n this.$emit(\"openConfirmPlan\", plan, this.toggle);\r\n }\r\n\r\n // private showPrice(search: number): boolean {\r\n // const found = this.toggle === search);\r\n // if (found !== null && found !== undefined) return found === search;\r\n // return false;\r\n // }\r\n\r\n private buttons: SegmentedButtonItem[] = [\r\n {\r\n key: 0,\r\n iconName: \"\",\r\n text: this.$tc(\"payments.Monthly\"),\r\n },\r\n {\r\n key: 1,\r\n iconName: \"\",\r\n text: this.$tc(\"payments.Annual\"),\r\n },\r\n ];\r\n}\r\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!./SubscriptionPlanOverview.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!./SubscriptionPlanOverview.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SubscriptionPlanOverview.vue?vue&type=template&id=4fe4d208&scoped=true&\"\nimport script from \"./SubscriptionPlanOverview.vue?vue&type=script&lang=ts&\"\nexport * from \"./SubscriptionPlanOverview.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SubscriptionPlanOverview.vue?vue&type=style&index=0&id=4fe4d208&prod&scoped=true&lang=css&\"\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 \"4fe4d208\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}