{"version":3,"sources":["webpack:///./src/components/general/SelectMultipleChips.vue?070b","webpack:///./src/components/general/SelectMultipleChip.vue?d260","webpack:///./src/components/general/SelectMultipleChip.vue","webpack:///./src/components/general/SelectMultipleChip.vue?fc79","webpack:///./src/components/general/SelectMultipleChip.vue?a1ae","webpack:///./src/components/general/SelectMultipleChips.vue","webpack:///./src/components/general/SelectMultipleChips.vue?3894","webpack:///./src/components/general/SelectMultipleChips.vue?04a9","webpack:///./src/components/SubscriptionEditorQualityData.vue?68cc","webpack:///./src/services/SubscriptionsService.ts","webpack:///./src/store/modules/adminSubscriptionCustomers.ts","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./src/models/Subscriptions/SubscriptionQualityDataFrequency.ts","webpack:///./src/store/modules/adminSubscriptions.ts","webpack:///./src/components/SubscriptionEditorModal.vue?6cc7","webpack:///./src/store/modules/adminSubscriptionsHistory.ts","webpack:///./src/components/general/SelectMultipleChip.vue?fbe8","webpack:///./src/components/SubscriptionEditorQualityData.vue?d8b2","webpack:///./src/models/ParameterPulpType.ts","webpack:///./src/models/Revolutions.ts","webpack:///./src/store/modules/adminSubscriptionQualityData.ts","webpack:///./src/store/modules/subscriptionQualityData.ts","webpack:///./src/components/SubscriptionEditorQualityData.vue","webpack:///./src/components/SubscriptionEditorQualityData.vue?2863","webpack:///./src/components/SubscriptionEditorQualityData.vue?54b0","webpack:///./src/components/SubscriptionEditorModal.vue?1594","webpack:///./src/components/SubscriptionEditorModal.vue","webpack:///./src/components/SubscriptionEditorModal.vue?a6ba","webpack:///./src/components/SubscriptionEditorModal.vue?05fa","webpack:///./src/models/QualityData/PulpType.ts","webpack:///./src/services/AdminSubscriptionsService.ts","webpack:///./src/models/Subscriptions/SubscriptionType.ts","webpack:///./src/store/modules/subscriptions.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","allOption","disabled","doNotShowSelectedWhenDisabled","allSelected","on","onAllOptionClick","_e","_l","option","index","key","values","onOptionClick","staticRenderFns","staticClass","class","backgroundColor","onClick","_v","_s","text","selected","some","value","isSelected","$emit","required","default","component","$t","toString","theValues","val","selectedIndex","findIndex","splice","push","immediate","deep","components","SelectMultipleChip","SubscriptionsService","get","then","response","data","catch","error","Promise","reject","customerIds","model","post","id","put","subscriptionType","delete","type","subscriptionsService","AdminSubscriptionCustomersModule","common","getDataFor","payload","setLoading","setLoadingComplete","setLoadingError","userAzureAdId","hasFreshDataFor","resolve","item","currentlyLoadingPromise","isCurrentlyLoading","debugLog","loadingPromise","getUserCustomers","commitSetLoadingComplete","debugWarn","commitSetLoadingError","commitSetLoading","clearData","namespaced","name","dynamic","store","adminSubscriptionCustomersModule","_arrayWithoutHoles","arr","Array","isArray","arrayLikeToArray","_iterableToArray","iter","Symbol","iterator","Object","from","_nonIterableSpread","TypeError","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","SubscriptionQualityDataFrequency","AdminSubscriptionsModule","loading","search","setLoadedDate","clearLoadedDate","clearLoading","setLoadingPromise","loadingId","sortBy","sortAsc","pageIndex","pageSize","filterCustomerIds","sort","join","filterSubscriptionTypes","filterUserAzureAdIds","force","loadingPromiseForId","needToReLoad","commitClearData","getSubscriptions","results","commitSetData","commitSetLoadedDate","commitClearLoading","commitSetLoadingPromise","createSubscription","subscriptionInfoDetails","updateSubscription","subscriptionDetails","commitRemoveItemsForUserSubscription","userSubscriptionId","changeActiveStatusForSubscription","adminSubscriptionsModule","getId","AdminSubscriptionsHistoryModule","items","filter","startsWith","removeDataFor","getSubscriptionHistory","sendCopyOfQualityDataSubscriptionSendOut","userSubscriptionSendOutId","recipient","reSendQualityDataSubscriptionSendOut","setQualityDataSubscriptionSendOutHandledStatus","isHandled","adminSubscriptionsHistoryModule","ParameterPulpType","isLoading","errorLoading","errorNoProducts","frequency","frequencyOptions","canEdit","onFrequencyInput","isSmiCustomersSelected","Invoice","enableForSpecificProductNames","productOptions","enableForAllMyProducts","onSelectedProducts","onAllProductsSelected","hasBothTypesOfProducts","enableForSpecificPaperParameterIds","paperParameterOptions","anySelectedPaperProduct","enableForAllMyPaperParameters","onSelectedPaperParameters","onAllPaperParametersSelected","pfiRevolutions","pfiRevolutionsSelectOptions","onPfiRevolutionsInput","enableForSpecificTextileParameterIds","textileParameterOptions","anySelectedTextileProduct","enableForAllMyTextileParameters","onSelectedTextileParameters","onAllTextileParametersSelected","domProps","listName","onListNameInput","Revolutions","Consoler","getSubscriptionQualityDataInfo","commitSetSearch","adminSubscriptionQualityDataModule","subscriptionQualityDataModule","Rev2K","Delivery","undefined","adminModeForUserAzureAdId","subscriptionQualityDataInfo","products","parameters","p","pulpType","PulpType","Composite","Paper","Textile","hasPaperProducts","hasTextileProducts","enableForSpecificProducts","enableForSpecificPaperParameters","predicted","relevantPaperParameters","map","productName","find","parameterId","relevantProducts","anySelectedPredictedParameter","length","enableForSpecificParameters","enabledForPaperPulp","enabledForTextilePulp","newName","oldName","subscriptionInfoSpecificPaperParameterIds","newId","oldId","subscriptionInfoSpecificTextileParameterIds","qualityData","possibleRevolutions","Set","reduce","a","b","i","has","revolutions","product","displayName","parameter","label","subscriptionDefaultForType","productAvailable","parameterAvailable","dispatchMethod","dispatchLoad","enableForSpecificCustomerIds","$nextTick","finally","updateModel","event","target","anyPfiRevolutions","valid","anyChanges","createNotUpdate","DefaultPfiRevolutions","loadQualityDataInformationforCustomers","initializeDefaultSpecificParameterIds","filterValidSpecificProductsAndParameterIds","Modal","CustomersTreeSelect","TreeSelect","SelectMultipleChips","SelectBox","ref","scopedSlots","_u","fn","customers","onCustomersFilterSelect","isAnySelectedCustomerSmi","onSubscriptionEditorQualityDataUpdate","proxy","$event","errorInvalid","errorSaving","directives","rawName","expression","saving","isInvoiceSelected","isSubscriptionTypeQualityData","qualityDataInfo","preventDefault","onSubmit","apply","arguments","onCancelClick","editableSubscriptionTypes","SubscriptionType","QualityData","CustomersRelevantForSubscriptionTypes","$refs","subscriptionEditorQualityData","Permissions","hasPermission","PermissionType","IsAllowedToEditSubscriptions","enableForAllMyCustomers","c","isSmiCustomer","includes","cu","isCustomersRelevant","adminSubscriptionCustomers","userProfile","selectedCustomer","modal","showModal","loadCustomersForAdminModeUser","initialize","hideModal","customerId","subscriptions","dispatchCreate","dispatchUpdate","adminSubscriptions","every","customersChanged","SubscriptionEditorQualityData","AdminSubscriptionsService","params","adminSubscriptionsService","SubscriptionsModule","subscription","isExpanded","subscriptionInfoIndex","s","subscriptionInfoDetailsIndex","subscriptionId","commitSetSubscriptions","commitClearSubscriptions","commitUpdateSubscriptionInfoDetails","deleteSubscription","subscriptionInfo","commitDeleteSubscriptionInfoDetails","restoreSubscription","subscriptionsModule"],"mappings":"8HAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAAEJ,EAAiB,cAAEI,EAAG,qBAAqB,CAACE,MAAM,CAAC,OAASN,EAAIO,UAAU,SAAWP,EAAIQ,SAAS,8BAAgCR,EAAIS,8BAA8B,SAAWT,EAAIU,aAAaC,GAAG,CAAC,MAAQX,EAAIY,oBAAoBZ,EAAIa,KAAKb,EAAIc,GAAId,EAAW,SAAE,SAASe,EAAOC,GAAO,OAAOZ,EAAG,qBAAqB,CAACa,IAAID,EAAMV,MAAM,CAAC,OAASS,EAAO,OAASf,EAAIkB,OAAO,SAAWlB,EAAIQ,SAAS,8BAAgCR,EAAIS,8BAA8B,YAAcT,EAAIU,aAAaC,GAAG,CAAC,MAAQX,EAAImB,qBAAoB,IAClnBC,EAAkB,G,8JCDlB,EAAS,WAAa,IAAIpB,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,O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AC1BmR,eAAgB5Q,EAAQT,QAG3BP,OAAM,SAACC,GAEN,OADA,OAAS6B,UAAU,6BAA8B7B,GAC1CC,QAAQC,OAAOF,OAfrB,2CAhPT,gJAoQS,WAAsBe,GAAtB,0GAIE,OACJmR,oBAAoBnR,EAAQT,GAAIS,EAAQX,OACxCR,MAAK,SAACoS,GACL,OAASvQ,SAAS,+BAAgCuQ,MAEnDjS,OAAM,SAACC,GAEN,OADA,OAAS6B,UAAU,8BAA+B7B,GAC3CC,QAAQC,OAAOF,OAXrB,2CApQT,+DAAkC,QAiBtB,gBAAT,Q,qCASA,MAES,gBAAT,Q,kDA0CA,MAES,gBAAT,Q,kDAgCA,MAES,gBAAT,Q,uCAEA,MAGS,gBAAT,Q,kCAEA,MACS,gBAAT,Q,oCAEA,MACS,gBAAT,Q,oCAEA,MACS,gBAAT,Q,+BAEA,MACS,gBAAT,Q,iCAEA,MACS,gBAAT,Q,sCAKA,MAOD,gBADC,Q,2BAkCA,MAGD,gBADC,Q,6BAqBA,MAGD,gBADC,Q,6BAsBA,MAGD,gBADC,Q,yCAiBA,MAGD,gBADC,Q,6BAkBA,MAGD,gBADC,Q,8BAcA,MAjRGqR,EAAmB,gBANxB,eAAO,CACNpP,YAAY,EACZC,KAAM,gBACNC,SAAS,EACTC,MAAA,UAEIiP,GAoRC,IAAMc,EAAsB,eAAUd","file":"js/admin~qdata~sustainability.4643b24a.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.showAllOption)?_c('SelectMultipleChip',{attrs:{\"option\":_vm.allOption,\"disabled\":_vm.disabled,\"doNotShowSelectedWhenDisabled\":_vm.doNotShowSelectedWhenDisabled,\"selected\":_vm.allSelected},on:{\"click\":_vm.onAllOptionClick}}):_vm._e(),_vm._l((_vm.options),function(option,index){return _c('SelectMultipleChip',{key:index,attrs:{\"option\":option,\"values\":_vm.values,\"disabled\":_vm.disabled,\"doNotShowSelectedWhenDisabled\":_vm.doNotShowSelectedWhenDisabled,\"allSelected\":_vm.allSelected},on:{\"click\":_vm.onOptionClick}})})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"o-chip select-multiple-chip\",class:_vm.backgroundColor,attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.onClick}},[_vm._v(\" \"+_vm._s(_vm.option.text)+\" \")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop } from 'vue-property-decorator';\r\nimport { SelectMultipleChipOption } from './SelectMultipleChips.vue';\r\n\r\n@Component\r\nexport default class SelectMultipleChip extends Vue {\r\n @Prop({ required: true }) private option!: SelectMultipleChipOption;\r\n @Prop({ required: false, default: () => [] }) private values!: any[];\r\n @Prop({ required: false, default: () => false }) private disabled!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private doNotShowSelectedWhenDisabled!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private allSelected!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private selected!: boolean;\r\n\r\n private get isSelected(): boolean {\r\n return (\r\n this.selected || this.values.some((value) => value === this.option.value)\r\n );\r\n }\r\n\r\n private get backgroundColor(): string {\r\n if (this.disabled && this.doNotShowSelectedWhenDisabled) {\r\n return 'u-background-color-light-grey u-color-sodra-black-20';\r\n } else if (\r\n this.allSelected ||\r\n (this.isSelected && this.disabled && !this.doNotShowSelectedWhenDisabled)\r\n ) {\r\n return 'u-background-color-blue-20';\r\n } else if (this.isSelected) {\r\n return 'u-background-color-blue-50';\r\n } else {\r\n return 'u-background-color-light-grey';\r\n }\r\n }\r\n\r\n private onClick() {\r\n this.$emit('click', this.option);\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!./SelectMultipleChip.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!./SelectMultipleChip.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SelectMultipleChip.vue?vue&type=template&id=7b94c178&scoped=true&\"\nimport script from \"./SelectMultipleChip.vue?vue&type=script&lang=ts&\"\nexport * from \"./SelectMultipleChip.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SelectMultipleChip.vue?vue&type=style&index=0&id=7b94c178&lang=scss&scoped=true&\"\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 \"7b94c178\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop, Watch } from 'vue-property-decorator';\r\nimport SelectMultipleChip from './SelectMultipleChip.vue';\r\n\r\nexport interface SelectMultipleChipOption {\r\n value: any;\r\n text: string;\r\n}\r\n\r\n@Component({\r\n components: {\r\n SelectMultipleChip,\r\n },\r\n})\r\nexport default class SelectMultipleChips extends Vue {\r\n @Prop({ required: true }) private values!: any[];\r\n @Prop({ required: true }) private options!: SelectMultipleChipOption[];\r\n @Prop({ required: false, default: () => false }) private disabled!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private doNotShowSelectedWhenDisabled!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private showAllOption!: boolean;\r\n @Prop({ required: false, default: () => false })\r\n private allSelected!: boolean;\r\n\r\n private theValues: any[] = [];\r\n\r\n private allOption: SelectMultipleChipOption = {\r\n value: 'SelectMultipleChipsAllValue',\r\n text: this.$t('selectMultipleChips.all').toString(),\r\n };\r\n\r\n private created(): void {\r\n this.theValues = this.values;\r\n }\r\n\r\n // Watch value change\r\n @Watch('values', { immediate: false, deep: true })\r\n private onValueChange(val: any[]) {\r\n this.theValues = val;\r\n }\r\n\r\n private onOptionClick(option: SelectMultipleChipOption) {\r\n const selectedIndex = this.theValues.findIndex(\r\n (value) => value === option.value\r\n );\r\n if (selectedIndex >= 0) {\r\n this.theValues.splice(selectedIndex, 1);\r\n } else {\r\n this.theValues.push(option.value);\r\n }\r\n\r\n this.$emit('selected', this.theValues);\r\n\r\n if (this.allSelected) {\r\n this.$emit('allSelected', !this.allSelected);\r\n }\r\n }\r\n\r\n private onAllOptionClick() {\r\n if (!this.allSelected) {\r\n this.$emit('selected', []);\r\n }\r\n\r\n this.$emit('allSelected', !this.allSelected);\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!./SelectMultipleChips.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!./SelectMultipleChips.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SelectMultipleChips.vue?vue&type=template&id=e945729c&\"\nimport script from \"./SelectMultipleChips.vue?vue&type=script&lang=ts&\"\nexport * from \"./SelectMultipleChips.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","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionEditorQualityData.vue?vue&type=style&index=0&id=db0e76f6&lang=scss&scoped=true&\"","import { ChangeActiveStatusForSubscription } from '@/models/Subscriptions/ChangeActiveStatusForSubscription';\r\nimport { CreateOrUpdateSubscription } from '@/models/Subscriptions/CreateOrUpdateSubscription';\r\nimport { SubscriptionInfo } from '@/models/Subscriptions/SubscriptionInfo';\r\nimport { SubscriptionInfoDetails } from '@/models/Subscriptions/SubscriptionInfoDetails';\r\nimport { SubscriptionQualityDataInfo } from '@/models/Subscriptions/SubscriptionQualityDataInfo';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\nimport { arrayParamsSerializer, BaseServiceDefinition } from './BaseService';\r\n\r\nclass SubscriptionsService extends BaseServiceDefinition {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async getSubscriptions(): Promise {\r\n return this.get('/api/v1/subscriptions')\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public getSubscriptionQualityDataInfo(\r\n customerIds: number[]\r\n ): Promise {\r\n return this.get(\r\n '/api/v1/subscriptions/qualityData',\r\n { customerIds },\r\n arrayParamsSerializer\r\n )\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async createSubscription(\r\n model: CreateOrUpdateSubscription\r\n ): Promise {\r\n return this.post('/api/v1/subscriptions', model)\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async updateSubscription(\r\n id: number,\r\n model: CreateOrUpdateSubscription\r\n ): Promise {\r\n return this.put(`/api/v1/subscriptions/${id}`, model)\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async restoreSubscription(\r\n id: number,\r\n model: SubscriptionInfo\r\n ): Promise {\r\n return this.put(`/api/v1/subscriptions/${id}/restore`, model).catch(\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n );\r\n }\r\n\r\n public async changeActiveStatusForSubscription(\r\n id: number,\r\n model: ChangeActiveStatusForSubscription\r\n ): Promise {\r\n return this.put(`/api/v1/subscriptions/${id}/active`, model).catch(\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n );\r\n }\r\n\r\n public async deleteSubscription(\r\n id: number,\r\n subscriptionType: SubscriptionType\r\n ): Promise {\r\n return this.delete(`/api/v1/subscriptions/${id}`, {\r\n type: subscriptionType,\r\n }).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n\r\nconst subscriptionsService: SubscriptionsService = new SubscriptionsService();\r\n\r\nexport default subscriptionsService;\r\n","import { Consoler } from '@/utils/Consoler';\r\nimport { store } from '@/store';\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport { CommonArrayStore } from '../commonArrayStore';\r\nimport { Customer } from '@/models/Customer';\r\nimport adminSubscriptionsService from '@/services/AdminSubscriptionsService';\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'adminSubscriptionCustomers',\r\n dynamic: true,\r\n store,\r\n})\r\nclass AdminSubscriptionCustomersModule extends VuexModule {\r\n private common = new CommonArrayStore(20); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get item() {\r\n return (id: string) => this.common.getDataFor(id);\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation private commitSetLoading(payload: {\r\n id: string;\r\n loadingPromise: Promise;\r\n clearData?: boolean;\r\n }) {\r\n this.common.setLoading(payload);\r\n }\r\n @Mutation private commitSetLoadingComplete(payload: {\r\n id: string;\r\n data: Customer[];\r\n }) {\r\n this.common.setLoadingComplete(payload);\r\n }\r\n @Mutation private commitSetLoadingError(payload: {\r\n id: string;\r\n error?: any;\r\n clearData?: boolean;\r\n }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(userAzureAdId: string): Promise {\r\n // If recently loaded, return\r\n if (this.common.hasFreshDataFor(userAzureAdId)) {\r\n return Promise.resolve(this.item(userAzureAdId)!);\r\n }\r\n\r\n const currentlyLoadingPromise =\r\n this.common.isCurrentlyLoading(userAzureAdId);\r\n if (currentlyLoadingPromise) {\r\n Consoler.debugLog(\r\n 'Already loading, waiting for existing load to finish',\r\n 'adminSubscriptionCustomers'\r\n );\r\n return currentlyLoadingPromise;\r\n }\r\n\r\n const loadingPromise = adminSubscriptionsService\r\n .getUserCustomers(userAzureAdId)\r\n .then((response) => {\r\n this.commitSetLoadingComplete({\r\n id: userAzureAdId,\r\n data: response,\r\n });\r\n Consoler.debugLog('Load adminSubscriptionCustomers success', response);\r\n return Promise.resolve(response);\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Load adminSubscriptionCustomers failed', error);\r\n this.commitSetLoadingError({ id: userAzureAdId, error });\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoading({\r\n id: userAzureAdId,\r\n loadingPromise,\r\n clearData: true,\r\n });\r\n\r\n return loadingPromise;\r\n }\r\n}\r\n\r\nexport const adminSubscriptionCustomersModule = getModule(\r\n AdminSubscriptionCustomersModule\r\n);\r\n","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","export enum SubscriptionQualityDataFrequency {\r\n Delivery = 'Delivery',\r\n Invoice = 'Invoice',\r\n}\r\n","import { CommonStore } from '@/store/common';\r\nimport { store } from '@/store';\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport adminSubscriptionsService from '@/services/AdminSubscriptionsService';\r\nimport { PaginatedResult } from '@/models/PaginatedResult{T}';\r\nimport { SubscriptionDetails } from '@/models/AdminSubscriptions/SubscriptionDetails';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport { SubscriptionsSortBy } from '@/models/AdminSubscriptions/SubscriptionsSortBy';\r\nimport { CreateOrUpdateSubscription } from '@/models/Subscriptions/CreateOrUpdateSubscription';\r\nimport { ChangeActiveStatusForSubscription } from '@/models/Subscriptions/ChangeActiveStatusForSubscription';\r\nimport { adminSubscriptionsHistoryModule } from './adminSubscriptionsHistory';\r\nimport { AdminCreateOrUpdateSubscriptionForUser } from '@/models/AdminSubscriptions/AdminCreateOrUpdateSubscriptionForUser';\r\n\r\ninterface Search {\r\n sortBy: SubscriptionsSortBy;\r\n sortAsc: boolean;\r\n pageIndex: number;\r\n pageSize: number;\r\n filterCustomerIds: number[];\r\n filterSubscriptionTypes: SubscriptionType[];\r\n filterUserAzureAdIds: string[];\r\n results: PaginatedResult;\r\n}\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'adminSubscriptions',\r\n dynamic: true,\r\n store,\r\n})\r\nclass AdminSubscriptionsModule extends VuexModule {\r\n public search: Search | null = null;\r\n\r\n private common = new CommonStore(5); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get loading() {\r\n return this.common.loading;\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation public commitSetData(payload: Search) {\r\n this.search = payload;\r\n }\r\n\r\n @Mutation public commitClearData() {\r\n this.search = null;\r\n }\r\n\r\n // From common:\r\n @Mutation private commitSetLoadedDate() {\r\n this.common.setLoadedDate();\r\n }\r\n @Mutation private commitClearLoadedDate() {\r\n this.common.clearLoadedDate();\r\n }\r\n @Mutation private commitSetLoadingError(payload: { error: any }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n @Mutation private commitSetLoading() {\r\n this.common.setLoading();\r\n }\r\n @Mutation private commitClearLoading() {\r\n this.common.clearLoading();\r\n }\r\n @Mutation private commitSetLoadingPromise(payload: {\r\n loadingPromise: Promise;\r\n loadingPromiseForId: any;\r\n }) {\r\n this.common.setLoadingPromise(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(payload: {\r\n sortBy: SubscriptionsSortBy;\r\n sortAsc: boolean;\r\n pageIndex: number;\r\n pageSize: number;\r\n filterCustomerIds: number[];\r\n filterSubscriptionTypes: SubscriptionType[];\r\n filterUserAzureAdIds: string[];\r\n force?: boolean;\r\n }): Promise {\r\n const loadingId = `${payload.sortBy}|${payload.sortAsc}|${\r\n payload.pageIndex\r\n }|${payload.pageSize}|${payload.filterCustomerIds\r\n .sort()\r\n .join(',')}|${payload.filterSubscriptionTypes\r\n .sort()\r\n .join(',')}|${payload.filterUserAzureAdIds.sort().join(',')}\r\n }`;\r\n\r\n if (\r\n !payload.force &&\r\n this.search !== null &&\r\n this.loading.loadingPromiseForId === loadingId &&\r\n !this.common.needToReLoad()\r\n ) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (this.common.isCurrentlyLoading(loadingId)) {\r\n return this.common.loading.loadingPromise;\r\n }\r\n\r\n this.commitSetLoading();\r\n this.commitClearData();\r\n\r\n const loadingPromise = adminSubscriptionsService\r\n .getSubscriptions(\r\n payload.sortBy,\r\n payload.sortAsc,\r\n payload.pageIndex,\r\n payload.pageSize,\r\n payload.filterCustomerIds,\r\n payload.filterSubscriptionTypes,\r\n payload.filterUserAzureAdIds\r\n )\r\n .then((response) => {\r\n const search: Search = {\r\n sortBy: payload.sortBy,\r\n sortAsc: payload.sortAsc,\r\n pageIndex: payload.pageIndex,\r\n pageSize: payload.pageSize,\r\n filterCustomerIds: payload.filterCustomerIds,\r\n filterSubscriptionTypes: payload.filterSubscriptionTypes,\r\n filterUserAzureAdIds: payload.filterUserAzureAdIds,\r\n results: response,\r\n };\r\n this.commitSetData(search);\r\n this.commitSetLoadedDate();\r\n this.commitClearLoading();\r\n Consoler.debugLog('Load adminSubscriptions success', response);\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Load adminSubscriptions failed', error);\r\n this.commitSetLoadingError({ error });\r\n\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoadingPromise({\r\n loadingPromise,\r\n loadingPromiseForId: loadingId,\r\n });\r\n\r\n return loadingPromise;\r\n }\r\n\r\n @Action\r\n public async dispatchCreate(payload: {\r\n model: AdminCreateOrUpdateSubscriptionForUser;\r\n }): Promise {\r\n Consoler.debugLog(payload.model);\r\n return adminSubscriptionsService\r\n .createSubscription(payload.model)\r\n .then((subscriptionInfoDetails) => {\r\n Consoler.debugLog(\r\n 'Create subscription success',\r\n subscriptionInfoDetails\r\n );\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Create subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchUpdate(payload: {\r\n id: number;\r\n userAzureAdId: string;\r\n model: CreateOrUpdateSubscription;\r\n }): Promise {\r\n return adminSubscriptionsService\r\n .updateSubscription(payload.id, payload.userAzureAdId, payload.model)\r\n .then((subscriptionDetails) => {\r\n Consoler.debugLog('Update subscription success', subscriptionDetails);\r\n adminSubscriptionsHistoryModule.commitRemoveItemsForUserSubscription({\r\n userSubscriptionId: payload.id,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Update subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchChangeActiveStatus(payload: {\r\n id: number;\r\n userAzureAdId: string;\r\n model: ChangeActiveStatusForSubscription;\r\n }): Promise {\r\n return adminSubscriptionsService\r\n .changeActiveStatusForSubscription(\r\n payload.id,\r\n payload.userAzureAdId,\r\n payload.model\r\n )\r\n .then(() => {\r\n Consoler.debugLog('Change active status for subscription success');\r\n adminSubscriptionsHistoryModule.commitRemoveItemsForUserSubscription({\r\n userSubscriptionId: payload.id,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Change active status for subscription failed',\r\n error\r\n );\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n\r\nexport const adminSubscriptionsModule = getModule(AdminSubscriptionsModule);\r\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionEditorModal.vue?vue&type=style&index=0&id=6ce7997e&lang=scss&scoped=true&\"","import { store } from '@/store';\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport { CommonArrayStore } from '../commonArrayStore';\r\nimport adminSubscriptionsService from '@/services/AdminSubscriptionsService';\r\nimport { SubscriptionHistoryItem } from '@/models/AdminSubscriptions/SubscriptionHistoryItem';\r\nimport { SubscriptionHistorySortBy } from '@/models/AdminSubscriptions/SubscriptionHistorySortBy';\r\nimport { PaginatedResult } from '@/models/PaginatedResult{T}';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\n\r\nexport interface SubscriptionsHistorySearch {\r\n userSubscriptionId: number;\r\n sortBy: SubscriptionHistorySortBy;\r\n sortAsc: boolean;\r\n pageIndex: number;\r\n pageSize: number;\r\n results: PaginatedResult;\r\n}\r\n\r\nfunction getId(\r\n userSubscriptionId: number,\r\n sortBy: SubscriptionHistorySortBy,\r\n sortAsc: boolean,\r\n pageIndex: number,\r\n pageSize: number\r\n) {\r\n return `${userSubscriptionId}|${sortBy}|${sortAsc}|${pageIndex}|${pageSize}`;\r\n}\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'adminSubscriptionsHistory',\r\n dynamic: true,\r\n store,\r\n})\r\nclass AdminSubscriptionsHistoryModule extends VuexModule {\r\n private common = new CommonArrayStore(5); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get item() {\r\n return (\r\n userSubscriptionId: number,\r\n sortBy: SubscriptionHistorySortBy,\r\n sortAsc: boolean,\r\n pageIndex: number,\r\n pageSize: number\r\n ) => {\r\n return this.common.getDataFor(\r\n getId(userSubscriptionId, sortBy, sortAsc, pageIndex, pageSize)\r\n );\r\n };\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation public commitRemoveItemsForUserSubscription(payload: {\r\n userSubscriptionId: number;\r\n }) {\r\n const items = this.common.items.filter((item) =>\r\n item.id.startsWith(`${payload.userSubscriptionId}|`)\r\n );\r\n\r\n for (const item of items) {\r\n this.common.removeDataFor(item.id);\r\n }\r\n }\r\n @Mutation private commitSetLoading(payload: {\r\n id: string;\r\n loadingPromise: Promise>;\r\n clearData?: boolean;\r\n }) {\r\n this.common.setLoading(payload);\r\n }\r\n @Mutation private commitSetLoadingComplete(payload: {\r\n id: string;\r\n data: SubscriptionsHistorySearch;\r\n }) {\r\n this.common.setLoadingComplete(payload);\r\n }\r\n @Mutation private commitSetLoadingError(payload: {\r\n id: string;\r\n error?: any;\r\n clearData?: boolean;\r\n }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(payload: {\r\n userSubscriptionId: number;\r\n userAzureAdId: string;\r\n sortBy: SubscriptionHistorySortBy;\r\n sortAsc: boolean;\r\n pageIndex: number;\r\n pageSize: number;\r\n }): Promise {\r\n const id = getId(\r\n payload.userSubscriptionId,\r\n payload.sortBy,\r\n payload.sortAsc,\r\n payload.pageIndex,\r\n payload.pageSize\r\n );\r\n\r\n // If recently loaded, return\r\n if (this.common.hasFreshDataFor(id)) {\r\n return Promise.resolve(\r\n this.item(\r\n payload.userSubscriptionId,\r\n payload.sortBy,\r\n payload.sortAsc,\r\n payload.pageIndex,\r\n payload.pageSize\r\n )!.results\r\n );\r\n }\r\n\r\n const currentlyLoadingPromise = this.common.isCurrentlyLoading(id);\r\n if (currentlyLoadingPromise) {\r\n Consoler.debugLog(\r\n 'Already loading, waiting for existing load to finish',\r\n 'adminSubscriptionsHistory',\r\n payload\r\n );\r\n return currentlyLoadingPromise;\r\n }\r\n\r\n const loadingPromise = adminSubscriptionsService\r\n .getSubscriptionHistory(\r\n payload.userSubscriptionId,\r\n payload.userAzureAdId,\r\n payload.sortBy,\r\n payload.sortAsc,\r\n payload.pageIndex,\r\n payload.pageSize\r\n )\r\n .then((response) => {\r\n const search: SubscriptionsHistorySearch = {\r\n userSubscriptionId: payload.userSubscriptionId,\r\n sortBy: payload.sortBy,\r\n sortAsc: payload.sortAsc,\r\n pageIndex: payload.pageIndex,\r\n pageSize: payload.pageSize,\r\n results: response,\r\n };\r\n\r\n this.commitSetLoadingComplete({\r\n id: id,\r\n data: search,\r\n });\r\n Consoler.debugLog(\r\n 'Load adminSubscriptionsHistory success',\r\n payload,\r\n response\r\n );\r\n return Promise.resolve(response);\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Load adminSubscriptionsHistory failed',\r\n payload,\r\n error\r\n );\r\n this.commitSetLoadingError({ id: id, error });\r\n\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoading({\r\n id: id,\r\n loadingPromise,\r\n });\r\n\r\n return loadingPromise;\r\n }\r\n\r\n @Action\r\n public async dispatchSendCopyOfQualityDataSubscriptionSendOut(payload: {\r\n userSubscriptionId: number;\r\n userSubscriptionSendOutId: number;\r\n userAzureAdId: string;\r\n subscriptionType: SubscriptionType;\r\n recipient: string;\r\n }): Promise {\r\n return adminSubscriptionsService\r\n .sendCopyOfQualityDataSubscriptionSendOut(\r\n payload.userSubscriptionId,\r\n payload.userSubscriptionSendOutId,\r\n payload.userAzureAdId,\r\n { type: payload.subscriptionType, recipient: payload.recipient }\r\n )\r\n .then(() => {\r\n Consoler.debugLog(\r\n 'Send copy of quality data subscription send out success'\r\n );\r\n this.commitRemoveItemsForUserSubscription({\r\n userSubscriptionId: payload.userSubscriptionId,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Send copy of quality data subscription send out failed',\r\n error\r\n );\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchReSendQualityDataSubscriptionSendOut(payload: {\r\n userSubscriptionId: number;\r\n userSubscriptionSendOutId: number;\r\n userAzureAdId: string;\r\n subscriptionType: SubscriptionType;\r\n }): Promise {\r\n return adminSubscriptionsService\r\n .reSendQualityDataSubscriptionSendOut(\r\n payload.userSubscriptionId,\r\n payload.userSubscriptionSendOutId,\r\n payload.userAzureAdId,\r\n { type: payload.subscriptionType }\r\n )\r\n .then(() => {\r\n Consoler.debugLog('Re-send quality data subscription send out success');\r\n this.commitRemoveItemsForUserSubscription({\r\n userSubscriptionId: payload.userSubscriptionId,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Re-send quality data subscription send out failed',\r\n error\r\n );\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchSetQualityDataSubscriptionSendOutHandledStatus(payload: {\r\n userSubscriptionId: number;\r\n userSubscriptionSendOutId: number;\r\n userAzureAdId: string;\r\n subscriptionType: SubscriptionType;\r\n isHandled: boolean;\r\n }): Promise {\r\n return adminSubscriptionsService\r\n .setQualityDataSubscriptionSendOutHandledStatus(\r\n payload.userSubscriptionId,\r\n payload.userSubscriptionSendOutId,\r\n payload.userAzureAdId,\r\n { type: payload.subscriptionType },\r\n payload.isHandled\r\n )\r\n .then(() => {\r\n Consoler.debugLog(\r\n 'Changing quality data subscription send out handled status success'\r\n );\r\n this.commitRemoveItemsForUserSubscription({\r\n userSubscriptionId: payload.userSubscriptionId,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Changing quality data subscription send out handled status failed',\r\n error\r\n );\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n\r\nexport const adminSubscriptionsHistoryModule = getModule(\r\n AdminSubscriptionsHistoryModule\r\n);\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SelectMultipleChip.vue?vue&type=style&index=0&id=7b94c178&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.errorLoading)?_c('div',{staticClass:\"c-alert c-alert--red mb-3\"},[_c('span',{staticClass:\"c-alert__text\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.errorLoading'))+\" \")])]):_vm._e(),(_vm.errorNoProducts)?_c('div',{staticClass:\"c-alert c-alert--yellow mb-3\"},[_c('span',{staticClass:\"c-alert__text\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.noProducts'))+\" \")])]):_vm._e(),(_vm.isLoading)?_c('div',{staticClass:\"d-flex align-items-center justify-content-center u-min-height-300\"},[_c('span',{staticClass:\"o-loader\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.loadingData')))])]):_vm._e(),(!_vm.isLoading && !_vm.errorLoading && !_vm.errorNoProducts)?[_c('div',{staticClass:\"mb-2\"},[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.emailFrequency'))+\" \")]),_c('div',[_c('TreeSelect',{staticClass:\"subscription-frequency-tree-select tree-select--light-grey\",attrs:{\"value\":_vm.frequency,\"multiple\":false,\"options\":_vm.frequencyOptions,\"disabled\":!_vm.canEdit},on:{\"input\":_vm.onFrequencyInput}})],1)]),(\n _vm.isSmiCustomersSelected &&\n _vm.frequency === _vm.SubscriptionQualityDataFrequency.Invoice\n )?_c('div',{staticClass:\"o-feedback o-feedback--invalid u-position-relative\"},[_vm._v(\" \"+_vm._s(_vm.$t('subscriptionEditorQualityData.noInvoiceSmi'))+\" \")]):_vm._e(),_c('div',{staticClass:\"mb-2\"},[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.products')))]),_c('SelectMultipleChips',{attrs:{\"values\":_vm.enableForSpecificProductNames,\"options\":_vm.productOptions,\"showAllOption\":true,\"allSelected\":_vm.enableForAllMyProducts,\"disabled\":!_vm.canEdit},on:{\"selected\":_vm.onSelectedProducts,\"allSelected\":_vm.onAllProductsSelected}})],1),(_vm.hasPaperProducts)?_c('div',{staticClass:\"mb-2\"},[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t( (\"subscriptionEditorQualityData.\" + (_vm.hasBothTypesOfProducts ? 'paperParameters' : 'parameters')) )))]),_c('SelectMultipleChips',{attrs:{\"values\":_vm.enableForSpecificPaperParameterIds,\"options\":_vm.paperParameterOptions,\"disabled\":!_vm.anySelectedPaperProduct || !_vm.canEdit,\"doNotShowSelectedWhenDisabled\":!_vm.anySelectedPaperProduct,\"showAllOption\":true,\"allSelected\":_vm.enableForAllMyPaperParameters},on:{\"selected\":_vm.onSelectedPaperParameters,\"allSelected\":_vm.onAllPaperParametersSelected}}),(_vm.hasPredictedParameter)?_c('p',{staticClass:\"t-body-regular-small mt-1 mb-2\"},[_vm._v(\" \"+_vm._s(_vm.$t('subscriptionEditorQualityData.predictedParameter'))+\" \")]):_vm._e(),(_vm.anyPfiRevolutions)?_c('div',[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.pfi')))]),_c('SelectBox',{staticClass:\"o-select--light-grey\",attrs:{\"value\":_vm.pfiRevolutions,\"options\":_vm.pfiRevolutionsSelectOptions,\"disabled\":!_vm.canEdit},on:{\"input\":_vm.onPfiRevolutionsInput}})],1):_vm._e()],1):_vm._e(),(_vm.hasTextileProducts)?_c('div',{staticClass:\"mb-2\"},[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t( (\"subscriptionEditorQualityData.\" + (_vm.hasBothTypesOfProducts ? 'textileParameters' : 'parameters')) )))]),_c('SelectMultipleChips',{attrs:{\"values\":_vm.enableForSpecificTextileParameterIds,\"options\":_vm.textileParameterOptions,\"disabled\":!_vm.anySelectedTextileProduct || !_vm.canEdit,\"doNotShowSelectedWhenDisabled\":!_vm.anySelectedTextileProduct,\"showAllOption\":true,\"allSelected\":_vm.enableForAllMyTextileParameters},on:{\"selected\":_vm.onSelectedTextileParameters,\"allSelected\":_vm.onAllTextileParametersSelected}})],1):_vm._e(),_c('div',[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorQualityData.name')))]),_c('div',[_c('input',{staticClass:\"subscription-name-input o-text-input o-text-input--light-grey u-full-width\",attrs:{\"type\":\"text\",\"required\":true,\"disabled\":!_vm.canEdit},domProps:{\"value\":_vm.listName},on:{\"input\":_vm.onListNameInput}})])])]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export enum ParameterPulpType {\r\n Paper = 'Paper',\r\n Textile = 'Textile',\r\n}\r\n","export enum Revolutions {\r\n Rev0 = 0,\r\n Rev1K = 1000,\r\n Rev2K = 2000,\r\n Rev3K = 3000,\r\n Rev4K = 4000,\r\n Rev9K = 9000,\r\n}\r\n","import { CommonStore } from '@/store/common';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport { store } from '@/store';\r\n\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport { SubscriptionQualityDataInfo } from '@/models/Subscriptions/SubscriptionQualityDataInfo';\r\nimport adminSubscriptionsService from '@/services/AdminSubscriptionsService';\r\n\r\nexport interface Search {\r\n userAzureAdId: string;\r\n customerIds: number[];\r\n data: SubscriptionQualityDataInfo;\r\n}\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'adminSubscriptionQualityData',\r\n dynamic: true,\r\n store,\r\n})\r\nclass AdminSubscriptionQualityDataModule extends VuexModule {\r\n public search: Search | null = null;\r\n\r\n private common = new CommonStore(20); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get loading() {\r\n return this.common.loading;\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation public commitSetSearch(payload: Search) {\r\n this.search = payload;\r\n }\r\n\r\n @Mutation public commitClearSearch() {\r\n this.search = null;\r\n }\r\n\r\n // From common:\r\n @Mutation private commitSetLoadedDate() {\r\n this.common.setLoadedDate();\r\n }\r\n @Mutation private commitClearLoadedDate() {\r\n this.common.clearLoadedDate();\r\n }\r\n @Mutation private commitSetLoadingError(payload: { error: any }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n @Mutation private commitSetLoading() {\r\n this.common.setLoading();\r\n }\r\n @Mutation private commitClearLoading() {\r\n this.common.clearLoading();\r\n }\r\n @Mutation private commitSetLoadingPromise(payload: {\r\n loadingPromise: Promise;\r\n loadingPromiseForId: any;\r\n }) {\r\n this.common.setLoadingPromise(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(payload: {\r\n userAzureAdId: string;\r\n customerIds: number[];\r\n }): Promise {\r\n const loadingId = `${payload.userAzureAdId}|${payload.customerIds\r\n .sort()\r\n .join(',')}`;\r\n\r\n if (\r\n this.search !== null &&\r\n this.common.loading.loadingPromiseForId === loadingId &&\r\n !this.common.needToReLoad()\r\n ) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (this.common.isCurrentlyLoading(loadingId)) {\r\n Consoler.debugLog(\r\n 'Already loading, waiting for existing load to finish',\r\n 'adminSubscriptionQualityData'\r\n );\r\n return this.common.loading.loadingPromise;\r\n }\r\n\r\n this.commitSetLoading();\r\n\r\n const loadingPromise = adminSubscriptionsService\r\n .getSubscriptionQualityDataInfo(\r\n payload.userAzureAdId,\r\n payload.customerIds\r\n )\r\n .then((response) => {\r\n Consoler.debugLog(\r\n 'Load adminSubscriptionQualityData success',\r\n response\r\n );\r\n this.commitSetSearch({\r\n userAzureAdId: payload.userAzureAdId,\r\n customerIds: payload.customerIds,\r\n data: response,\r\n });\r\n this.commitSetLoadedDate();\r\n this.commitClearLoading();\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Load adminSubscriptionQualityData failed', error);\r\n this.commitSetLoadingError({ error });\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoadingPromise({\r\n loadingPromise,\r\n loadingPromiseForId: loadingId,\r\n });\r\n return loadingPromise;\r\n }\r\n}\r\n\r\nexport const adminSubscriptionQualityDataModule = getModule(\r\n AdminSubscriptionQualityDataModule\r\n);\r\n","import { CommonStore } from '@/store/common';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport { store } from '@/store';\r\n\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport subscriptionsService from '@/services/SubscriptionsService';\r\nimport { SubscriptionQualityDataInfo } from '@/models/Subscriptions/SubscriptionQualityDataInfo';\r\n\r\nexport interface Search {\r\n customerIds: number[];\r\n data: SubscriptionQualityDataInfo;\r\n}\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'subscriptionQualityData',\r\n dynamic: true,\r\n store,\r\n})\r\nclass SubscriptionQualityDataModule extends VuexModule {\r\n public search: Search | null = null;\r\n\r\n private common = new CommonStore(20); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get loading() {\r\n return this.common.loading;\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation public commitSetSearch(payload: Search) {\r\n this.search = payload;\r\n }\r\n\r\n @Mutation public commitClearSearch() {\r\n this.search = null;\r\n }\r\n\r\n // From common:\r\n @Mutation private commitSetLoadedDate() {\r\n this.common.setLoadedDate();\r\n }\r\n @Mutation private commitClearLoadedDate() {\r\n this.common.clearLoadedDate();\r\n }\r\n @Mutation private commitSetLoadingError(payload: { error: any }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n @Mutation private commitSetLoading() {\r\n this.common.setLoading();\r\n }\r\n @Mutation private commitClearLoading() {\r\n this.common.clearLoading();\r\n }\r\n @Mutation private commitSetLoadingPromise(payload: {\r\n loadingPromise: Promise;\r\n loadingPromiseForId: any;\r\n }) {\r\n this.common.setLoadingPromise(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(payload: { customerIds: number[] }): Promise {\r\n const loadingId = payload.customerIds.sort().join(',');\r\n\r\n if (\r\n this.search !== null &&\r\n this.common.loading.loadingPromiseForId === loadingId &&\r\n !this.common.needToReLoad()\r\n ) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (this.common.isCurrentlyLoading(loadingId)) {\r\n Consoler.debugLog(\r\n 'Already loading, waiting for existing load to finish',\r\n 'subscriptionQualityData'\r\n );\r\n return this.common.loading.loadingPromise;\r\n }\r\n\r\n this.commitSetLoading();\r\n\r\n const loadingPromise = subscriptionsService\r\n .getSubscriptionQualityDataInfo(payload.customerIds)\r\n .then((response) => {\r\n Consoler.debugLog('Load subscriptionQualityData success', response);\r\n this.commitSetSearch({\r\n customerIds: payload.customerIds,\r\n data: response,\r\n });\r\n this.commitSetLoadedDate();\r\n this.commitClearLoading();\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Load subscriptionQualityData failed', error);\r\n this.commitSetLoadingError({ error });\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoadingPromise({\r\n loadingPromise,\r\n loadingPromiseForId: loadingId,\r\n });\r\n return loadingPromise;\r\n }\r\n}\r\n\r\nexport const subscriptionQualityDataModule = getModule(\r\n SubscriptionQualityDataModule\r\n);\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Prop, Vue } from 'vue-property-decorator';\r\nimport Modal from '@/components/general/Modal.vue';\r\nimport CustomersTreeSelect from '@/components/CustomersTreeSelect.vue';\r\nimport TreeSelect, { TreeSelectNode } from './general/TreeSelect.vue';\r\nimport { Product } from '@/models/Subscriptions/Product';\r\nimport { Parameter } from '@/models/Subscriptions/Parameter';\r\nimport SelectMultipleChips, {\r\n SelectMultipleChipOption,\r\n} from './general/SelectMultipleChips.vue';\r\nimport { SubscriptionQualityDataInfo } from '@/models/Subscriptions/SubscriptionQualityDataInfo';\r\nimport { ParameterId } from '@/models/ParameterId';\r\nimport { PulpType } from '@/models/QualityData/PulpType';\r\nimport { ParameterPulpType } from '@/models/ParameterPulpType';\r\nimport SelectBox, { SelectOption } from './general/SelectBox.vue';\r\nimport { Revolutions } from '@/models/Revolutions';\r\nimport { SubscriptionQualityDataFrequency } from '@/models/Subscriptions/SubscriptionQualityDataFrequency';\r\nimport { SubscriptionInfoDetails } from '@/models/Subscriptions/SubscriptionInfoDetails';\r\nimport { adminSubscriptionQualityDataModule } from '@/store/modules/adminSubscriptionQualityData';\r\nimport { subscriptionQualityDataModule } from '@/store/modules/subscriptionQualityData';\r\nimport { Consoler } from '@/utils/Consoler';\r\n\r\nexport interface SubscriptionEditorQualityDataInfo {\r\n enableForAllMyProducts: boolean;\r\n enableForAllMyPaperParameters: boolean;\r\n enableForAllMyTextileParameters: boolean;\r\n enableForSpecificProductNames: string[];\r\n enableForSpecificPaperParameterIds: ParameterId[];\r\n enableForSpecificTextileParameterIds: ParameterId[];\r\n pfiRevolutions: Revolutions | undefined;\r\n listName: string;\r\n frequency: SubscriptionQualityDataFrequency;\r\n\r\n valid: boolean;\r\n anyChanges: boolean;\r\n}\r\n\r\n@Component({\r\n components: {\r\n Modal,\r\n CustomersTreeSelect,\r\n TreeSelect,\r\n SelectMultipleChips,\r\n SelectBox,\r\n },\r\n})\r\nexport default class SubscriptionEditorQualityData extends Vue {\r\n @Prop({ required: true })\r\n private subscriptionInfoDetails!: SubscriptionInfoDetails | null;\r\n @Prop({ required: true })\r\n private enableForSpecificCustomerIds!: number[];\r\n @Prop({ required: false, default: () => false })\r\n private isSmiCustomersSelected!: boolean;\r\n @Prop({ required: true })\r\n private canEdit!: boolean;\r\n @Prop({ required: false, default: () => undefined })\r\n private adminModeForUserAzureAdId!: string | undefined;\r\n\r\n // Give template access to enum\r\n SubscriptionQualityDataFrequency = SubscriptionQualityDataFrequency;\r\n\r\n private readonly DefaultPfiRevolutions: Revolutions = Revolutions.Rev2K;\r\n\r\n private isLoading: boolean = false;\r\n private errorLoading: boolean = false;\r\n private errorNoProducts: boolean = false;\r\n\r\n private enableForAllMyProducts: boolean = false;\r\n private enableForAllMyPaperParameters: boolean = false;\r\n private enableForAllMyTextileParameters: boolean = false;\r\n private enableForSpecificProductNames: string[] = [];\r\n private enableForSpecificPaperParameterIds: ParameterId[] = [];\r\n private enableForSpecificTextileParameterIds: ParameterId[] = [];\r\n private pfiRevolutions: Revolutions | null = null;\r\n private listName: string = '';\r\n private frequency: SubscriptionQualityDataFrequency =\r\n SubscriptionQualityDataFrequency.Delivery;\r\n\r\n private get subscriptionQualityDataInfo(): SubscriptionQualityDataInfo | null {\r\n return this.adminModeForUserAzureAdId !== undefined\r\n ? adminSubscriptionQualityDataModule?.search?.data ?? null\r\n : subscriptionQualityDataModule.search?.data ?? null;\r\n }\r\n\r\n private get products(): Product[] {\r\n return this.subscriptionQualityDataInfo?.products ?? [];\r\n }\r\n\r\n private get parameters(): Parameter[] {\r\n return this.subscriptionQualityDataInfo?.parameters ?? [];\r\n }\r\n\r\n private get hasPaperProducts(): boolean {\r\n return this.products.some(\r\n (p) => p.pulpType === PulpType.Composite || p.pulpType === PulpType.Paper\r\n );\r\n }\r\n private get hasTextileProducts(): boolean {\r\n return this.products.some(\r\n (p) =>\r\n p.pulpType === PulpType.Composite || p.pulpType === PulpType.Textile\r\n );\r\n }\r\n private get hasBothTypesOfProducts(): boolean {\r\n return this.hasPaperProducts && this.hasTextileProducts;\r\n }\r\n\r\n private get relevantProducts(): Product[] {\r\n return this.enableForAllMyProducts\r\n ? this.products\r\n : this.enableForSpecificProducts;\r\n }\r\n\r\n private get relevantPaperParameters(): Parameter[] {\r\n return this.enableForAllMyPaperParameters\r\n ? this.parameters.filter((p) =>\r\n p.pulpType.some((pulpType) => pulpType === ParameterPulpType.Paper)\r\n )\r\n : this.enableForSpecificPaperParameters;\r\n }\r\n\r\n private get hasPredictedParameter(): boolean {\r\n return this.parameters.some((p) => p.predicted);\r\n }\r\n\r\n private get anySelectedPredictedParameter(): boolean {\r\n return this.relevantPaperParameters.some((p) => p.predicted);\r\n }\r\n\r\n private get enableForSpecificProducts(): Product[] {\r\n return this.enableForSpecificProductNames\r\n .map((productName) => this.products.find((p) => p.name === productName))\r\n .filter((p) => p !== undefined)\r\n .map((p) => p!);\r\n }\r\n\r\n private get enableForSpecificPaperParameters(): Parameter[] {\r\n return this.enableForSpecificPaperParameterIds\r\n .map((parameterId) => this.parameters.find((p) => p.id === parameterId))\r\n .filter((p) => p !== undefined)\r\n .map((p) => p!);\r\n }\r\n\r\n private get anySelectedPaperProduct(): boolean {\r\n return this.relevantProducts.some(\r\n (p) => p.pulpType === PulpType.Composite || p.pulpType === PulpType.Paper\r\n );\r\n }\r\n\r\n private get anySelectedTextileProduct(): boolean {\r\n return this.relevantProducts.some(\r\n (p) =>\r\n p.pulpType === PulpType.Composite || p.pulpType === PulpType.Textile\r\n );\r\n }\r\n\r\n private get anyPfiRevolutions(): boolean {\r\n return (\r\n this.anySelectedPredictedParameter &&\r\n this.pfiRevolutionsSelectOptions.length > 0\r\n );\r\n }\r\n\r\n private get subscriptionInfoSpecificPaperParameterIds(): ParameterId[] {\r\n return (\r\n this.subscriptionInfoDetails?.enableForSpecificParameters\r\n .filter((p) => p.enabledForPaperPulp)\r\n .map((p) => p.parameterId) ?? []\r\n );\r\n }\r\n\r\n private get subscriptionInfoSpecificTextileParameterIds(): ParameterId[] {\r\n return (\r\n this.subscriptionInfoDetails?.enableForSpecificParameters\r\n .filter((p) => p.enabledForTextilePulp)\r\n .map((p) => p.parameterId) ?? []\r\n );\r\n }\r\n\r\n private get anyChanges(): boolean {\r\n return (\r\n this.subscriptionInfoDetails !== null &&\r\n (this.enableForAllMyProducts !==\r\n (this.subscriptionInfoDetails.enableForAllMyProducts ?? false) ||\r\n this.enableForAllMyPaperParameters !==\r\n (this.subscriptionInfoDetails.enableForAllMyPaperParameters ??\r\n false) ||\r\n this.enableForAllMyTextileParameters !==\r\n (this.subscriptionInfoDetails.enableForAllMyTextileParameters ??\r\n false) ||\r\n this.enableForSpecificProductNames.length !==\r\n this.subscriptionInfoDetails.enableForSpecificProductNames.length ||\r\n this.enableForSpecificProductNames.some(\r\n (newName) =>\r\n !this.subscriptionInfoDetails?.enableForSpecificProductNames.some(\r\n (oldName) => newName === oldName\r\n )\r\n ) ||\r\n this.enableForSpecificPaperParameterIds.length !==\r\n this.subscriptionInfoSpecificPaperParameterIds.length ||\r\n this.enableForSpecificPaperParameterIds.some(\r\n (newId) =>\r\n !this.subscriptionInfoSpecificPaperParameterIds.some(\r\n (oldId) => newId === oldId\r\n )\r\n ) ||\r\n this.enableForSpecificTextileParameterIds.length !==\r\n this.subscriptionInfoSpecificTextileParameterIds.length ||\r\n this.enableForSpecificTextileParameterIds.some(\r\n (newId) =>\r\n !this.subscriptionInfoSpecificTextileParameterIds.some(\r\n (oldId) => newId === oldId\r\n )\r\n ) ||\r\n this.listName !== (this.subscriptionInfoDetails.name ?? '') ||\r\n this.frequency !==\r\n this.subscriptionInfoDetails.qualityData?.frequency ||\r\n this.pfiRevolutions !==\r\n this.subscriptionInfoDetails.qualityData?.pfiRevolutions)\r\n );\r\n }\r\n\r\n private get valid(): boolean {\r\n return (\r\n (this.enableForAllMyProducts ||\r\n (this.enableForSpecificProductNames !== undefined &&\r\n this.enableForSpecificProductNames.length > 0)) &&\r\n (!this.anySelectedPaperProduct ||\r\n this.enableForAllMyPaperParameters ||\r\n (this.enableForSpecificPaperParameterIds !== undefined &&\r\n this.enableForSpecificPaperParameterIds.length > 0)) &&\r\n (!this.anySelectedTextileProduct ||\r\n this.enableForAllMyTextileParameters ||\r\n (this.enableForSpecificTextileParameterIds !== undefined &&\r\n this.enableForSpecificTextileParameterIds.length > 0)) &&\r\n this.listName.length > 0 &&\r\n this.frequency !== undefined\r\n );\r\n }\r\n\r\n private get pfiRevolutionsSelectOptions(): SelectOption[] {\r\n // Filter relevant products of Paper pulp, that has at least one possible revolution\r\n const products = this.relevantProducts.filter(\r\n (p) =>\r\n (p.pulpType === PulpType.Composite || p.pulpType === PulpType.Paper) &&\r\n p.possibleRevolutions.length > 0\r\n );\r\n\r\n if (products.length === 0) {\r\n return [];\r\n }\r\n\r\n // Get an intersection of the products possible revolutions\r\n return Array.from(\r\n products\r\n .map((p) => new Set(p.possibleRevolutions))\r\n .reduce((a, b) => new Set(Array.from(a).filter((i) => b.has(i))))\r\n )\r\n .sort()\r\n .map((revolutions) => ({\r\n value: revolutions,\r\n text: this.$t(\r\n 'subscriptionEditorQualityData.pfiRevolutionsSelectText',\r\n [revolutions]\r\n ).toString(),\r\n }));\r\n }\r\n\r\n private get productOptions(): SelectMultipleChipOption[] {\r\n return this.products.map((product) => ({\r\n value: product.name,\r\n text: this.hasBothTypesOfProducts\r\n ? this.$t('subscriptionEditorQualityData.productNameWithPulpType', [\r\n product.displayName,\r\n this.$t(\r\n `subscriptionEditorQualityData.pulpType.${product.pulpType}`\r\n ),\r\n ]).toString()\r\n : product.displayName,\r\n }));\r\n }\r\n\r\n private get paperParameterOptions(): SelectMultipleChipOption[] {\r\n return this.parameters\r\n .filter((parameter) =>\r\n parameter.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Paper\r\n )\r\n )\r\n .map((parameter) => ({\r\n value: parameter.id,\r\n text: parameter.displayName + (parameter.predicted ? '*' : ''),\r\n }));\r\n }\r\n\r\n private get textileParameterOptions(): SelectMultipleChipOption[] {\r\n return this.parameters\r\n .filter((parameter) =>\r\n parameter.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Textile\r\n )\r\n )\r\n .map((parameter) => ({\r\n value: parameter.id,\r\n text: parameter.displayName,\r\n }));\r\n }\r\n\r\n private get frequencyOptions(): TreeSelectNode[] {\r\n return [\r\n SubscriptionQualityDataFrequency.Delivery,\r\n SubscriptionQualityDataFrequency.Invoice,\r\n ].map((value) => ({\r\n id: value,\r\n label: this.$t(\r\n `userSubscriptionQualityDataFrequency.${value}`\r\n ).toString(),\r\n }));\r\n }\r\n\r\n private initializeDefaultSpecificParameterIds(): void {\r\n this.enableForSpecificPaperParameterIds = this.parameters\r\n .filter(\r\n (parameter) =>\r\n parameter.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Paper\r\n ) &&\r\n parameter.subscriptionDefaultForType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Paper\r\n )\r\n )\r\n .map((parameter) => parameter.id);\r\n this.enableForSpecificTextileParameterIds = this.parameters\r\n .filter(\r\n (parameter) =>\r\n parameter.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Textile\r\n ) &&\r\n parameter.subscriptionDefaultForType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Textile\r\n )\r\n )\r\n .map((parameter) => parameter.id);\r\n }\r\n\r\n private filterValidSpecificProductsAndParameterIds(): void {\r\n this.enableForSpecificProductNames = [\r\n ...this.enableForSpecificProductNames.filter((productName) => {\r\n const productAvailable = this.products.some(\r\n (p) => p.name === productName\r\n );\r\n if (!productAvailable) {\r\n Consoler.debugLog(\r\n `Product with name ${productName} is not available anymore, removed from list.`\r\n );\r\n }\r\n return productAvailable;\r\n }),\r\n ];\r\n this.enableForSpecificPaperParameterIds = this.hasPaperProducts\r\n ? [\r\n ...this.enableForSpecificPaperParameterIds.filter((parameterId) => {\r\n const parameterAvailable = this.parameters.some(\r\n (p) =>\r\n p.id === parameterId &&\r\n p.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Paper\r\n )\r\n );\r\n if (!parameterAvailable) {\r\n Consoler.debugLog(\r\n `Paper parameter with id ${parameterId} is not available anymore, removed from list.`\r\n );\r\n }\r\n return parameterAvailable;\r\n }),\r\n ]\r\n : [];\r\n this.enableForSpecificTextileParameterIds = this.hasTextileProducts\r\n ? [\r\n ...this.enableForSpecificTextileParameterIds.filter((parameterId) => {\r\n const parameterAvailable = this.parameters.some(\r\n (p) =>\r\n p.id === parameterId &&\r\n p.pulpType.some(\r\n (pulpType) => pulpType === ParameterPulpType.Textile\r\n )\r\n );\r\n if (!parameterAvailable) {\r\n Consoler.debugLog(\r\n `Textile parameter with id ${parameterId} is not available anymore, removed from list.`\r\n );\r\n }\r\n return parameterAvailable;\r\n }),\r\n ]\r\n : [];\r\n }\r\n\r\n private loadQualityDataInformationforCustomers(): Promise {\r\n this.isLoading = true;\r\n this.errorLoading = false;\r\n this.errorNoProducts = false;\r\n\r\n const dispatchMethod =\r\n this.adminModeForUserAzureAdId !== undefined\r\n ? adminSubscriptionQualityDataModule.dispatchLoad({\r\n userAzureAdId: this.adminModeForUserAzureAdId,\r\n customerIds: this.enableForSpecificCustomerIds,\r\n })\r\n : subscriptionQualityDataModule.dispatchLoad({\r\n customerIds: this.enableForSpecificCustomerIds,\r\n });\r\n\r\n return dispatchMethod\r\n .then(() => {\r\n this.$nextTick(() => {\r\n if (this.products.length === 0) {\r\n this.errorNoProducts = true;\r\n }\r\n });\r\n })\r\n .catch(() => {\r\n this.errorLoading = true;\r\n })\r\n .finally(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n private onSelectedProducts(values: string[]) {\r\n this.enableForSpecificProductNames = values;\r\n this.updateModel();\r\n }\r\n private onAllProductsSelected(allSelected: boolean) {\r\n this.enableForAllMyProducts = allSelected;\r\n this.updateModel();\r\n }\r\n\r\n private onSelectedPaperParameters(values: ParameterId[]) {\r\n this.enableForSpecificPaperParameterIds = values;\r\n this.updateModel();\r\n }\r\n private onAllPaperParametersSelected(allSelected: boolean) {\r\n this.enableForAllMyPaperParameters = allSelected;\r\n this.updateModel();\r\n }\r\n\r\n private onSelectedTextileParameters(values: ParameterId[]) {\r\n this.enableForSpecificTextileParameterIds = values;\r\n this.updateModel();\r\n }\r\n private onAllTextileParametersSelected(allSelected: boolean) {\r\n this.enableForAllMyTextileParameters = allSelected;\r\n this.updateModel();\r\n }\r\n\r\n private onPfiRevolutionsInput(pfiRevolutions: Revolutions) {\r\n this.pfiRevolutions = pfiRevolutions;\r\n this.updateModel();\r\n }\r\n\r\n private onListNameInput(event: InputEvent): void {\r\n this.listName = (event.target as HTMLInputElement).value;\r\n this.updateModel();\r\n }\r\n\r\n private onFrequencyInput(frequency: SubscriptionQualityDataFrequency): void {\r\n this.frequency = frequency;\r\n this.updateModel();\r\n }\r\n\r\n private updateModel(): void {\r\n this.$nextTick(() => {\r\n let model: SubscriptionEditorQualityDataInfo | null = null;\r\n\r\n if (!this.errorLoading && !this.errorNoProducts) {\r\n model = {\r\n enableForAllMyProducts: this.enableForAllMyProducts,\r\n enableForAllMyPaperParameters: this.enableForAllMyPaperParameters,\r\n enableForAllMyTextileParameters: this.enableForAllMyTextileParameters,\r\n enableForSpecificProductNames: !this.enableForAllMyProducts\r\n ? this.enableForSpecificProductNames\r\n : [],\r\n enableForSpecificPaperParameterIds:\r\n !this.enableForAllMyPaperParameters && this.anySelectedPaperProduct\r\n ? this.enableForSpecificPaperParameterIds\r\n : [],\r\n enableForSpecificTextileParameterIds:\r\n !this.enableForAllMyTextileParameters &&\r\n this.anySelectedTextileProduct\r\n ? this.enableForSpecificTextileParameterIds\r\n : [],\r\n pfiRevolutions: this.anyPfiRevolutions\r\n ? this.pfiRevolutions ?? undefined\r\n : undefined,\r\n listName: this.listName,\r\n frequency: this.frequency,\r\n\r\n valid: this.valid,\r\n anyChanges: this.anyChanges,\r\n };\r\n }\r\n\r\n this.$emit('update', model);\r\n });\r\n }\r\n\r\n public async initialize(createNotUpdate: boolean): Promise {\r\n if (!createNotUpdate && this.subscriptionInfoDetails !== null) {\r\n this.enableForAllMyProducts =\r\n this.subscriptionInfoDetails.enableForAllMyProducts ?? false;\r\n this.enableForAllMyPaperParameters =\r\n this.subscriptionInfoDetails.enableForAllMyPaperParameters ?? false;\r\n this.enableForAllMyTextileParameters =\r\n this.subscriptionInfoDetails.enableForAllMyTextileParameters ?? false;\r\n this.enableForSpecificProductNames = [\r\n ...this.subscriptionInfoDetails.enableForSpecificProductNames,\r\n ];\r\n this.enableForSpecificPaperParameterIds = [\r\n ...this.subscriptionInfoSpecificPaperParameterIds,\r\n ];\r\n this.enableForSpecificTextileParameterIds = [\r\n ...this.subscriptionInfoSpecificTextileParameterIds,\r\n ];\r\n\r\n this.listName = this.subscriptionInfoDetails.name ?? '';\r\n this.frequency =\r\n this.subscriptionInfoDetails.qualityData?.frequency ??\r\n SubscriptionQualityDataFrequency.Delivery;\r\n this.pfiRevolutions =\r\n this.subscriptionInfoDetails.qualityData?.pfiRevolutions ?? null;\r\n } else {\r\n this.enableForAllMyProducts = true;\r\n this.enableForAllMyPaperParameters = false;\r\n this.enableForAllMyTextileParameters = false;\r\n this.enableForSpecificProductNames = [];\r\n this.enableForSpecificPaperParameterIds = [];\r\n this.enableForSpecificTextileParameterIds = [];\r\n\r\n this.listName = '';\r\n this.frequency = SubscriptionQualityDataFrequency.Delivery;\r\n this.pfiRevolutions = this.DefaultPfiRevolutions;\r\n }\r\n\r\n await this.loadQualityDataInformationforCustomers().finally(() => {\r\n if (!createNotUpdate) {\r\n this.filterValidSpecificProductsAndParameterIds();\r\n } else {\r\n this.initializeDefaultSpecificParameterIds();\r\n }\r\n\r\n this.updateModel();\r\n });\r\n }\r\n\r\n public customersChanged(createNotUpdate: boolean = true): void {\r\n this.enableForAllMyProducts = true;\r\n\r\n this.loadQualityDataInformationforCustomers().finally(() => {\r\n if (!createNotUpdate) {\r\n this.filterValidSpecificProductsAndParameterIds();\r\n } else {\r\n this.initializeDefaultSpecificParameterIds();\r\n }\r\n\r\n this.updateModel();\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!./SubscriptionEditorQualityData.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!./SubscriptionEditorQualityData.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SubscriptionEditorQualityData.vue?vue&type=template&id=db0e76f6&scoped=true&\"\nimport script from \"./SubscriptionEditorQualityData.vue?vue&type=script&lang=ts&\"\nexport * from \"./SubscriptionEditorQualityData.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SubscriptionEditorQualityData.vue?vue&type=style&index=0&id=db0e76f6&lang=scss&scoped=true&\"\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 \"db0e76f6\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{ref:\"modal\",attrs:{\"id\":\"subscriptionEditorModal\",\"title\":_vm.$t(\n (\"subscriptionEditorModal.title.\" + (_vm.createNotUpdate ? 'create' : 'update'))\n ),\"showFooter\":true,\"isLarge\":true,\"closeableByOutsideClickAndEscKey\":!_vm.canEdit},scopedSlots:_vm._u([{key:\"body\",fn:function(){return [_c('p',[_vm._v(\" \"+_vm._s(_vm.$t((\"subscriptionTypes.\" + _vm.subscriptionType + \".modalDescription\")))+\" \")]),(_vm.isCustomersRelevant)?_c('div',{staticClass:\"mb-2\"},[_c('label',{staticClass:\"o-label u-bold\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.customers.title'))+\" \")]),_c('div',[_c('CustomersTreeSelect',{staticClass:\"subscription-customers-tree-select tree-select--light-grey\",attrs:{\"value\":_vm.enableForSpecificCustomerIds,\"customers\":_vm.customers,\"placeholder\":_vm.$t('subscriptionEditorModal.customers.placeholder'),\"clearable\":true,\"multiple\":true,\"disabled\":_vm.isLoading || !_vm.canEdit},on:{\"select\":_vm.onCustomersFilterSelect}})],1)]):_vm._e(),(!_vm.isLoading && !_vm.errorLoading)?[(_vm.isSubscriptionTypeQualityData)?_c('SubscriptionEditorQualityData',{ref:\"subscriptionEditorQualityData\",attrs:{\"subscriptionInfoDetails\":_vm.subscriptionInfoDetails,\"enableForSpecificCustomerIds\":_vm.enableForSpecificCustomerIds,\"isSmiCustomersSelected\":_vm.isAnySelectedCustomerSmi,\"canEdit\":_vm.canEdit,\"adminModeForUserAzureAdId\":_vm.adminModeForUserAzureAdId},on:{\"update\":_vm.onSubscriptionEditorQualityDataUpdate}}):_vm._e()]:_vm._e()]},proxy:true},{key:\"footer\",fn:function(){return [(_vm.errorInvalid)?_c('div',{staticClass:\"c-alert c-alert--red mb-3\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorInvalid\"}},[_c('span',{staticClass:\"c-alert__text\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.errorInvalid'))+\" \")]),_c('span',{staticClass:\"js-toggle-hidden c-alert__close\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorInvalid\"},on:{\"click\":function($event){_vm.errorInvalid = false}}})]):_vm._e(),(_vm.errorLoading)?_c('div',{staticClass:\"c-alert c-alert--red mb-3\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorLoading\"}},[_c('span',{staticClass:\"c-alert__text\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.errorLoading'))+\" \")]),_c('span',{staticClass:\"js-toggle-hidden c-alert__close\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorLoading\"},on:{\"click\":function($event){_vm.errorLoading = false}}})]):_vm._e(),(_vm.errorSaving)?_c('div',{staticClass:\"c-alert c-alert--red mb-3\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorSaving\"}},[_c('span',{staticClass:\"c-alert__text\"},[(_vm.createNotUpdate)?[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.errorCreating')))]:[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.errorUpdating')))]],2),_c('span',{staticClass:\"js-toggle-hidden c-alert__close\",attrs:{\"data-element-id\":\"subscriptionEditorModal-errorSaving\"},on:{\"click\":function($event){_vm.errorSaving = false}}})]):_vm._e(),(_vm.isLoading)?_c('div',{staticClass:\"d-flex align-items-center justify-content-center u-min-height-300\"},[_c('span',{staticClass:\"o-loader\"},[_vm._v(_vm._s(_vm.$t('subscriptionEditorModal.loadingData')))])]):_vm._e(),(_vm.canEdit)?_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isLoading),expression:\"!isLoading\"}]},[_c('button',{staticClass:\"o-button o-button--lime-green mr-2\",attrs:{\"disabled\":!_vm.anyChanges ||\n _vm.saving ||\n _vm.errorLoading ||\n (_vm.isAnySelectedCustomerSmi && _vm.isInvoiceSelected) ||\n (_vm.isSubscriptionTypeQualityData && _vm.qualityDataInfo === null)},on:{\"click\":function($event){$event.preventDefault();return _vm.onSubmit.apply(null, arguments)}}},[_vm._v(\" \"+_vm._s(_vm.$t( (\"subscriptionEditorModal.okButton.\" + (_vm.createNotUpdate ? 'create' : 'update')) ))+\" \")]),_c('button',{staticClass:\"o-button o-button--white mr-2\",attrs:{\"disabled\":_vm.saving},on:{\"click\":_vm.onCancelClick}},[_vm._v(\" \"+_vm._s(_vm.$t('subscriptionEditorModal.cancel'))+\" \")])]):_vm._e()]},proxy:true}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Prop, Vue } from 'vue-property-decorator';\r\nimport Modal from '@/components/general/Modal.vue';\r\nimport CustomersTreeSelect from '@/components/CustomersTreeSelect.vue';\r\nimport { Customer } from '@/models/Customer';\r\nimport { userProfileModule } from '@/store/modules/userProfile';\r\nimport TreeSelect from './general/TreeSelect.vue';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport SelectMultipleChips from './general/SelectMultipleChips.vue';\r\nimport { CreateOrUpdateSubscription } from '@/models/Subscriptions/CreateOrUpdateSubscription';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\nimport { SubscriptionInfoDetails } from '@/models/Subscriptions/SubscriptionInfoDetails';\r\nimport { subscriptionsModule } from '@/store/modules/subscriptions';\r\nimport { adminSubscriptionCustomersModule } from '@/store/modules/adminSubscriptionCustomers';\r\nimport SelectBox from './general/SelectBox.vue';\r\nimport { adminSubscriptionsModule } from '@/store/modules/adminSubscriptions';\r\nimport { Permissions } from '@/utils/Permissions';\r\nimport { PermissionType } from '@/models/UserProfile/PermissionType';\r\nimport SubscriptionEditorQualityData, {\r\n SubscriptionEditorQualityDataInfo,\r\n} from './SubscriptionEditorQualityData.vue';\r\nimport { SubscriptionQualityDataFrequency } from '@/models/Subscriptions/SubscriptionQualityDataFrequency';\r\n\r\nexport const editableSubscriptionTypes: SubscriptionType[] = [\r\n // The other subscription types can only be created/deleted\r\n SubscriptionType.QualityData,\r\n];\r\n\r\n@Component({\r\n components: {\r\n Modal,\r\n CustomersTreeSelect,\r\n TreeSelect,\r\n SelectMultipleChips,\r\n SelectBox,\r\n SubscriptionEditorQualityData,\r\n },\r\n})\r\nexport default class SubscriptionEditorModal extends Vue {\r\n @Prop({ required: true })\r\n private subscriptionType!: SubscriptionType;\r\n @Prop({ required: true })\r\n private subscriptionInfoDetails!: SubscriptionInfoDetails | null;\r\n @Prop({ required: true }) private createNotUpdate!: boolean;\r\n @Prop({ required: false, default: () => undefined })\r\n private adminModeForUserAzureAdId!: string | undefined;\r\n\r\n private readonly CustomersRelevantForSubscriptionTypes: SubscriptionType[] = [\r\n SubscriptionType.QualityData,\r\n ];\r\n\r\n private enableForAllMyCustomers: boolean = false;\r\n private enableForSpecificCustomerIds: number[] = [];\r\n private qualityDataInfo: SubscriptionEditorQualityDataInfo | null = null;\r\n\r\n private isLoading: boolean = false;\r\n private saving: boolean = false;\r\n private errorInvalid: boolean = false;\r\n private errorLoading: boolean = false;\r\n private errorSaving: boolean = false;\r\n\r\n private get isCustomersRelevant(): boolean {\r\n return this.CustomersRelevantForSubscriptionTypes.some(\r\n (type) => type === this.subscriptionType\r\n );\r\n }\r\n\r\n private get subscriptionEditorQualityData():\r\n | SubscriptionEditorQualityData\r\n | undefined {\r\n return this.$refs\r\n .subscriptionEditorQualityData as SubscriptionEditorQualityData;\r\n }\r\n\r\n private get canEdit(): boolean {\r\n return Permissions.hasPermission(\r\n PermissionType.IsAllowedToEditSubscriptions\r\n );\r\n }\r\n\r\n private get isSubscriptionTypeQualityData(): boolean {\r\n return this.subscriptionType === SubscriptionType.QualityData;\r\n }\r\n\r\n private get isAnySelectedCustomerSmi(): boolean {\r\n return this.enableForAllMyCustomers\r\n ? this.customers.some((c) => c.isSmiCustomer) ?? false\r\n : this.customers\r\n .filter((c) => this.enableForSpecificCustomerIds.includes(c.id))\r\n .some((cu) => cu.isSmiCustomer) ?? false;\r\n }\r\n\r\n private get isInvoiceSelected(): boolean {\r\n return (\r\n this.qualityDataInfo?.frequency ===\r\n SubscriptionQualityDataFrequency.Invoice\r\n );\r\n }\r\n\r\n private get valid(): boolean {\r\n if (\r\n this.isCustomersRelevant &&\r\n !this.enableForAllMyCustomers &&\r\n (this.enableForSpecificCustomerIds === undefined ||\r\n this.enableForSpecificCustomerIds.length === 0)\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.isSubscriptionTypeQualityData &&\r\n (this.qualityDataInfo === null || !this.qualityDataInfo.valid)\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private get anyChanges(): boolean {\r\n if (this.createNotUpdate) {\r\n return true;\r\n } else if (this.subscriptionInfoDetails === null) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.isCustomersRelevant &&\r\n (this.enableForAllMyCustomers !==\r\n (this.subscriptionInfoDetails.enableForAllMyCustomers ?? false) ||\r\n this.enableForSpecificCustomerIds.length !==\r\n this.subscriptionInfoDetails.enableForSpecificCustomerIds.length ||\r\n this.enableForSpecificCustomerIds.some(\r\n (newId) =>\r\n !this.subscriptionInfoDetails?.enableForSpecificCustomerIds.some(\r\n (oldId) => newId === oldId\r\n )\r\n ))\r\n ) {\r\n return true;\r\n }\r\n\r\n if (\r\n this.isSubscriptionTypeQualityData &&\r\n this.qualityDataInfo !== null &&\r\n this.qualityDataInfo.anyChanges\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private get customers(): Customer[] {\r\n if (this.adminModeForUserAzureAdId !== undefined) {\r\n return (\r\n adminSubscriptionCustomersModule.item(this.adminModeForUserAzureAdId) ??\r\n []\r\n );\r\n } else {\r\n return userProfileModule.data?.userProfile.customers ?? [];\r\n }\r\n }\r\n\r\n private get selectedCustomer(): Customer | null {\r\n return userProfileModule.selectedCustomer;\r\n }\r\n\r\n public async show(): Promise {\r\n this.errorInvalid = false;\r\n this.errorLoading = false;\r\n this.errorSaving = false;\r\n\r\n (this.$refs.modal as Modal).showModal();\r\n\r\n if (this.adminModeForUserAzureAdId !== undefined) {\r\n await this.loadCustomersForAdminModeUser().then(async () => {\r\n await this.initialize();\r\n });\r\n } else {\r\n await this.initialize();\r\n }\r\n }\r\n\r\n private hideModal(): void {\r\n (this.$refs.modal as Modal).hideModal();\r\n }\r\n\r\n private async initialize(): Promise {\r\n if (this.isCustomersRelevant) {\r\n if (!this.createNotUpdate && this.subscriptionInfoDetails !== null) {\r\n this.enableForAllMyCustomers =\r\n this.subscriptionInfoDetails.enableForAllMyCustomers;\r\n this.enableForSpecificCustomerIds.splice(\r\n 0,\r\n this.enableForSpecificCustomerIds.length,\r\n ...this.subscriptionInfoDetails.enableForSpecificCustomerIds.filter(\r\n (customerId) => this.customers.some((c) => c.id === customerId)\r\n )\r\n );\r\n } else {\r\n this.enableForAllMyCustomers = true;\r\n if (this.selectedCustomer) {\r\n this.enableForSpecificCustomerIds = [this.selectedCustomer.id];\r\n } else {\r\n this.enableForSpecificCustomerIds = [];\r\n }\r\n }\r\n } else {\r\n this.enableForAllMyCustomers = false;\r\n this.enableForSpecificCustomerIds = [];\r\n }\r\n\r\n if (this.isSubscriptionTypeQualityData) {\r\n await this.subscriptionEditorQualityData?.initialize(\r\n this.createNotUpdate\r\n );\r\n }\r\n }\r\n\r\n private loadCustomersForAdminModeUser(): Promise {\r\n if (this.adminModeForUserAzureAdId === undefined) {\r\n return Promise.reject();\r\n }\r\n\r\n this.isLoading = true;\r\n this.errorLoading = false;\r\n\r\n return adminSubscriptionCustomersModule\r\n .dispatchLoad(this.adminModeForUserAzureAdId)\r\n .then(() => {\r\n // Do nothing\r\n })\r\n .catch(() => {\r\n this.errorLoading = true;\r\n })\r\n .finally(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n private onSubmit() {\r\n if (!this.valid) {\r\n this.errorInvalid = true;\r\n return;\r\n } else {\r\n this.errorInvalid = false;\r\n }\r\n\r\n const model: CreateOrUpdateSubscription = {\r\n type: this.subscriptionType,\r\n name: this.qualityDataInfo?.listName,\r\n enableForAllMyCustomers: this.enableForAllMyCustomers,\r\n enableForSpecificCustomerIds: !this.enableForAllMyCustomers\r\n ? this.enableForSpecificCustomerIds\r\n : [],\r\n enableForAllMyProducts: this.qualityDataInfo?.enableForAllMyProducts,\r\n enableForAllMyPaperParameters:\r\n this.qualityDataInfo?.enableForAllMyPaperParameters,\r\n enableForAllMyTextileParameters:\r\n this.qualityDataInfo?.enableForAllMyTextileParameters,\r\n enableForSpecificProductNames:\r\n this.qualityDataInfo?.enableForSpecificProductNames,\r\n enableForSpecificPaperParameterIds:\r\n this.qualityDataInfo?.enableForSpecificPaperParameterIds,\r\n enableForSpecificTextileParameterIds:\r\n this.qualityDataInfo?.enableForSpecificTextileParameterIds,\r\n qualityData:\r\n this.qualityDataInfo !== null\r\n ? {\r\n frequency: this.qualityDataInfo.frequency,\r\n pfiRevolutions: this.qualityDataInfo.pfiRevolutions,\r\n }\r\n : undefined,\r\n };\r\n\r\n let dispatchMethod: Promise | undefined;\r\n if (this.createNotUpdate) {\r\n dispatchMethod = subscriptionsModule.dispatchCreate({ model });\r\n } else if (!this.createNotUpdate && this.subscriptionInfoDetails !== null) {\r\n if (this.adminModeForUserAzureAdId === undefined) {\r\n dispatchMethod = subscriptionsModule.dispatchUpdate({\r\n id: this.subscriptionInfoDetails.id,\r\n model,\r\n });\r\n } else {\r\n dispatchMethod = adminSubscriptionsModule.dispatchUpdate({\r\n id: this.subscriptionInfoDetails.id,\r\n userAzureAdId: this.subscriptionInfoDetails.userAzureAdId,\r\n model,\r\n });\r\n }\r\n }\r\n\r\n if (dispatchMethod === undefined) {\r\n return;\r\n }\r\n\r\n Consoler.debugLog(\r\n `${\r\n this.createNotUpdate ? 'Create' : 'Update'\r\n } subscription model to send`,\r\n model\r\n );\r\n\r\n this.saving = true;\r\n this.errorSaving = false;\r\n\r\n dispatchMethod\r\n .then(() => {\r\n this.$emit(this.createNotUpdate ? 'created' : 'updated');\r\n (this.$refs.modal as Modal).hideModal();\r\n })\r\n .catch(() => {\r\n this.errorSaving = true;\r\n })\r\n .finally(() => {\r\n this.saving = false;\r\n });\r\n }\r\n\r\n private onCustomersFilterSelect(customers: number[]) {\r\n if (\r\n !this.enableForAllMyCustomers &&\r\n this.enableForSpecificCustomerIds.length === customers.length &&\r\n customers.every((c) =>\r\n this.enableForSpecificCustomerIds.some((customerId) => c === customerId)\r\n )\r\n ) {\r\n // Same customers, do nothing\r\n return;\r\n }\r\n\r\n this.enableForAllMyCustomers = customers.length === 0;\r\n\r\n this.enableForSpecificCustomerIds.splice(\r\n 0,\r\n this.enableForSpecificCustomerIds.length,\r\n ...customers\r\n );\r\n\r\n if (this.isSubscriptionTypeQualityData) {\r\n this.subscriptionEditorQualityData?.customersChanged(\r\n this.createNotUpdate\r\n );\r\n }\r\n }\r\n\r\n private onSubscriptionEditorQualityDataUpdate(\r\n qualityDataInfo: SubscriptionEditorQualityDataInfo | null\r\n ): void {\r\n this.qualityDataInfo = qualityDataInfo;\r\n }\r\n\r\n private onCancelClick() {\r\n this.hideModal();\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!./SubscriptionEditorModal.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!./SubscriptionEditorModal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SubscriptionEditorModal.vue?vue&type=template&id=6ce7997e&scoped=true&\"\nimport script from \"./SubscriptionEditorModal.vue?vue&type=script&lang=ts&\"\nexport * from \"./SubscriptionEditorModal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SubscriptionEditorModal.vue?vue&type=style&index=0&id=6ce7997e&lang=scss&scoped=true&\"\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 \"6ce7997e\",\n null\n \n)\n\nexport default component.exports","export enum PulpType {\r\n Composite = 'Composite',\r\n Paper = 'Paper',\r\n Textile = 'Textile',\r\n}\r\n","import { ReSendSendOut } from '@/models/AdminSubscriptions/ReSendSendOut';\r\nimport { HandledSendOut } from '@/models/AdminSubscriptions/HandledSendOut';\r\nimport { SendCopyOfSendOut } from '@/models/AdminSubscriptions/SendCopyOfSendOut';\r\nimport { Subscriber } from '@/models/AdminSubscriptions/Subscriber';\r\nimport { SubscriptionDetails } from '@/models/AdminSubscriptions/SubscriptionDetails';\r\nimport { SubscriptionHistoryItem } from '@/models/AdminSubscriptions/SubscriptionHistoryItem';\r\nimport { SubscriptionHistorySortBy } from '@/models/AdminSubscriptions/SubscriptionHistorySortBy';\r\nimport { SubscriptionsSortBy } from '@/models/AdminSubscriptions/SubscriptionsSortBy';\r\nimport { PaginatedResult } from '@/models/PaginatedResult{T}';\r\nimport { ChangeActiveStatusForSubscription } from '@/models/Subscriptions/ChangeActiveStatusForSubscription';\r\nimport { CreateOrUpdateSubscription } from '@/models/Subscriptions/CreateOrUpdateSubscription';\r\nimport { AdminCreateOrUpdateSubscriptionForUser } from '@/models/AdminSubscriptions/AdminCreateOrUpdateSubscriptionForUser';\r\nimport { SubscriptionQualityDataInfo } from '@/models/Subscriptions/SubscriptionQualityDataInfo';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\nimport { Customer } from '@/models/Customer';\r\nimport { arrayParamsSerializer, BaseServiceDefinition } from './BaseService';\r\nimport { SubscriptionInfoDetails } from '@/models/Subscriptions/SubscriptionInfoDetails';\r\n\r\nclass AdminSubscriptionsService extends BaseServiceDefinition {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async getSubscriptions(\r\n sortBy: SubscriptionsSortBy,\r\n sortAsc: boolean,\r\n pageIndex: number,\r\n pageSize: number,\r\n filterCustomerIds?: number[],\r\n filterSubscriptionTypes?: SubscriptionType[],\r\n filterUserAzureAdIds?: string[]\r\n ): Promise> {\r\n return this.get(\r\n '/api/v1/admin/subscriptions',\r\n {\r\n sortBy,\r\n sortAsc,\r\n pageIndex,\r\n pageSize,\r\n filterCustomerIds,\r\n filterSubscriptionTypes,\r\n filterUserAzureAdIds,\r\n },\r\n arrayParamsSerializer\r\n )\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public getSubscriptionQualityDataInfo(\r\n userAzureAdId: string,\r\n customerIds: number[]\r\n ): Promise {\r\n return this.get(\r\n `/api/v1/admin/subscriptions/qualityData/${userAzureAdId}`,\r\n { customerIds },\r\n arrayParamsSerializer\r\n )\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public getSubscribers(): Promise {\r\n return this.get('/api/v1/admin/subscriptions/subscribers')\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public getUserCustomers(userAzureAdId: string): Promise {\r\n return this.get(`/api/v1/admin/subscriptions/customers/${userAzureAdId}`)\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async createSubscription(\r\n model: AdminCreateOrUpdateSubscriptionForUser\r\n ): Promise {\r\n return this.post('/api/v1/admin/subscriptions', model)\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async updateSubscription(\r\n id: number,\r\n userAzureAdId: string,\r\n model: CreateOrUpdateSubscription\r\n ): Promise {\r\n return this.put(`/api/v1/admin/subscriptions/${id}`, model, {\r\n userAzureAdId,\r\n }).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async changeActiveStatusForSubscription(\r\n id: number,\r\n userAzureAdId: string,\r\n model: ChangeActiveStatusForSubscription\r\n ): Promise {\r\n return this.put(`/api/v1/admin/subscriptions/${id}/active`, model, {\r\n userAzureAdId,\r\n }).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async getSubscriptionHistory(\r\n userSubscriptionId: number,\r\n userAzureAdId: string,\r\n sortBy: SubscriptionHistorySortBy,\r\n sortAsc: boolean,\r\n pageIndex: number,\r\n pageSize: number\r\n ): Promise> {\r\n return this.get(\r\n `/api/v1/admin/subscriptions/${userSubscriptionId}/history`,\r\n {\r\n userAzureAdId,\r\n sortBy,\r\n sortAsc,\r\n pageIndex,\r\n pageSize,\r\n }\r\n )\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async sendCopyOfQualityDataSubscriptionSendOut(\r\n userSubscriptionId: number,\r\n userSubscriptionSendOutId: number,\r\n userAzureAdId: string,\r\n model: SendCopyOfSendOut\r\n ): Promise {\r\n return this.post(\r\n `/api/v1/admin/subscriptions/${userSubscriptionId}/history/sendOuts/${userSubscriptionSendOutId}/sendCopy`,\r\n model,\r\n {\r\n params: { userAzureAdId },\r\n }\r\n ).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async reSendQualityDataSubscriptionSendOut(\r\n userSubscriptionId: number,\r\n userSubscriptionSendOutId: number,\r\n userAzureAdId: string,\r\n model: ReSendSendOut\r\n ): Promise {\r\n return this.post(\r\n `/api/v1/admin/subscriptions/${userSubscriptionId}/history/sendOuts/${userSubscriptionSendOutId}/reSend`,\r\n model,\r\n {\r\n params: { userAzureAdId },\r\n }\r\n ).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n public async setQualityDataSubscriptionSendOutHandledStatus(\r\n userSubscriptionId: number,\r\n userSubscriptionSendOutId: number,\r\n userAzureAdId: string,\r\n model: HandledSendOut,\r\n isHandled: boolean\r\n ): Promise {\r\n return this.post(\r\n `/api/v1/admin/subscriptions/${userSubscriptionId}/history/sendOuts/${userSubscriptionSendOutId}/handledStatus`,\r\n model,\r\n {\r\n params: { userAzureAdId, isHandled },\r\n }\r\n ).catch((error) => {\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n\r\nconst adminSubscriptionsService: AdminSubscriptionsService =\r\n new AdminSubscriptionsService();\r\n\r\nexport default adminSubscriptionsService;\r\n","export enum SubscriptionType {\r\n Sustainability = 'Sustainability',\r\n OrderFlow = 'OrderFlow',\r\n QualityData = 'QualityData',\r\n Invoices = 'Invoices',\r\n}\r\n","import { CommonStore } from '@/store/common';\r\nimport { Consoler } from '@/utils/Consoler';\r\nimport { store } from '@/store';\r\n\r\nimport {\r\n Module,\r\n VuexModule,\r\n Mutation,\r\n Action,\r\n getModule,\r\n} from 'vuex-module-decorators';\r\nimport subscriptionsService from '@/services/SubscriptionsService';\r\nimport { SubscriptionInfo } from '@/models/Subscriptions/SubscriptionInfo';\r\nimport { SubscriptionType } from '@/models/Subscriptions/SubscriptionType';\r\nimport { CreateOrUpdateSubscription } from '@/models/Subscriptions/CreateOrUpdateSubscription';\r\nimport { SubscriptionInfoDetails } from '@/models/Subscriptions/SubscriptionInfoDetails';\r\nimport { ChangeActiveStatusForSubscription } from '@/models/Subscriptions/ChangeActiveStatusForSubscription';\r\n\r\n@Module({\r\n namespaced: true,\r\n name: 'subscriptions',\r\n dynamic: true,\r\n store,\r\n})\r\nclass SubscriptionsModule extends VuexModule {\r\n public subscriptions: SubscriptionInfo[] | null = null;\r\n\r\n private common = new CommonStore(10); // reLoadMinMinutesInterval\r\n\r\n // ---------------\r\n // ### Getters ###\r\n // ---------------\r\n\r\n public get loading() {\r\n return this.common.loading;\r\n }\r\n\r\n // -----------------\r\n // ### Mutations ###\r\n // -----------------\r\n\r\n @Mutation public commitSetSubscriptions(subscriptions: SubscriptionInfo[]) {\r\n for (\r\n let subscription = 0;\r\n subscription < subscriptions.length;\r\n subscription++\r\n ) {\r\n subscriptions[subscription].isExpanded = true;\r\n }\r\n this.subscriptions = subscriptions;\r\n }\r\n\r\n @Mutation public commitUpdateSubscriptionInfoDetails(payload: {\r\n subscriptionType: SubscriptionType;\r\n subscriptionInfoDetails: SubscriptionInfoDetails;\r\n createNotUpdate: boolean;\r\n }) {\r\n if (!this.subscriptions) {\r\n return;\r\n }\r\n\r\n const subscriptionInfoIndex = this.subscriptions.findIndex(\r\n (s) => s.type === payload.subscriptionType\r\n );\r\n if (subscriptionInfoIndex < 0) {\r\n Consoler.debugWarn(\r\n 'commitUpdateSubscriptionInfoDetails: Could not update subscription, could not find subscription info of the type.'\r\n );\r\n return;\r\n }\r\n\r\n if (payload.createNotUpdate) {\r\n this.subscriptions[subscriptionInfoIndex].subscriptions.push(\r\n payload.subscriptionInfoDetails\r\n );\r\n } else {\r\n const subscriptionInfoDetailsIndex = this.subscriptions[\r\n subscriptionInfoIndex\r\n ].subscriptions.findIndex(\r\n (s) => s.id === payload.subscriptionInfoDetails.id\r\n );\r\n if (subscriptionInfoDetailsIndex < 0) {\r\n Consoler.debugWarn(\r\n `commitUpdateSubscriptionInfoDetails: Could not update subscription, could not find subscription info details for id '${payload.subscriptionInfoDetails.id}'.`\r\n );\r\n return;\r\n }\r\n\r\n this.subscriptions[subscriptionInfoIndex].subscriptions.splice(\r\n subscriptionInfoDetailsIndex,\r\n 1,\r\n payload.subscriptionInfoDetails\r\n );\r\n }\r\n }\r\n\r\n @Mutation public commitDeleteSubscriptionInfoDetails(payload: {\r\n subscriptionType: SubscriptionType;\r\n subscriptionId: number;\r\n }) {\r\n if (!this.subscriptions) {\r\n return;\r\n }\r\n\r\n const subscriptionInfoIndex = this.subscriptions.findIndex(\r\n (s) => s.type === payload.subscriptionType\r\n );\r\n if (subscriptionInfoIndex < 0) {\r\n Consoler.debugWarn(\r\n 'commitDeleteSubscriptionInfoDetails: Could not delete subscription, could not find subscription info of the type.'\r\n );\r\n return;\r\n }\r\n\r\n const subscriptionInfoDetailsIndex = this.subscriptions[\r\n subscriptionInfoIndex\r\n ].subscriptions.findIndex((s) => s.id === payload.subscriptionId);\r\n if (subscriptionInfoDetailsIndex < 0) {\r\n Consoler.debugWarn(\r\n `commitDeleteSubscriptionInfoDetails: Could not delete subscription, could not find subscription info details for id '${payload.subscriptionId}'.`\r\n );\r\n return;\r\n }\r\n\r\n this.subscriptions[subscriptionInfoIndex].subscriptions.splice(\r\n subscriptionInfoDetailsIndex,\r\n 1\r\n );\r\n }\r\n\r\n @Mutation public commitClearSubscriptions() {\r\n this.subscriptions = null;\r\n }\r\n\r\n // From common:\r\n @Mutation private commitSetLoadedDate() {\r\n this.common.setLoadedDate();\r\n }\r\n @Mutation private commitClearLoadedDate() {\r\n this.common.clearLoadedDate();\r\n }\r\n @Mutation private commitSetLoadingError(payload: { error: any }) {\r\n this.common.setLoadingError(payload);\r\n }\r\n @Mutation private commitSetLoading() {\r\n this.common.setLoading();\r\n }\r\n @Mutation private commitClearLoading() {\r\n this.common.clearLoading();\r\n }\r\n @Mutation private commitSetLoadingPromise(payload: {\r\n loadingPromise: Promise;\r\n loadingPromiseForId: any;\r\n }) {\r\n this.common.setLoadingPromise(payload);\r\n }\r\n\r\n // ---------------\r\n // ### Actions ###\r\n // ---------------\r\n\r\n @Action\r\n public async dispatchLoad(data?: { force: boolean }): Promise {\r\n // If recently loaded, return\r\n if ((!data || (data && !data.force)) && !this.common.needToReLoad()) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (this.common.isCurrentlyLoading()) {\r\n Consoler.debugLog(\r\n 'Already loading, waiting for existing load to finish',\r\n 'subscriptions'\r\n );\r\n return this.common.loading.loadingPromise;\r\n }\r\n\r\n this.commitSetLoading();\r\n\r\n const loadingPromise = subscriptionsService\r\n .getSubscriptions()\r\n .then((subscriptions) => {\r\n this.commitSetSubscriptions(subscriptions);\r\n this.commitSetLoadedDate();\r\n this.commitClearLoading();\r\n Consoler.debugLog('Load subscriptions success', subscriptions);\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Load subscriptions failed', error);\r\n this.commitSetLoadingError({ error });\r\n this.commitClearSubscriptions();\r\n return Promise.reject(error);\r\n });\r\n\r\n this.commitSetLoadingPromise({ loadingPromise, loadingPromiseForId: null });\r\n return loadingPromise;\r\n }\r\n\r\n @Action\r\n public async dispatchCreate(payload: {\r\n model: CreateOrUpdateSubscription;\r\n }): Promise {\r\n return subscriptionsService\r\n .createSubscription(payload.model)\r\n .then((subscriptionInfoDetails) => {\r\n Consoler.debugLog(\r\n 'Create subscription success',\r\n subscriptionInfoDetails\r\n );\r\n this.commitUpdateSubscriptionInfoDetails({\r\n subscriptionType: payload.model.type,\r\n subscriptionInfoDetails: subscriptionInfoDetails,\r\n createNotUpdate: true,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Create subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchUpdate(payload: {\r\n id: number;\r\n model: CreateOrUpdateSubscription;\r\n }): Promise {\r\n return subscriptionsService\r\n .updateSubscription(payload.id, payload.model)\r\n .then((subscriptionInfoDetails) => {\r\n Consoler.debugLog(\r\n 'Update subscription success',\r\n subscriptionInfoDetails\r\n );\r\n this.commitUpdateSubscriptionInfoDetails({\r\n subscriptionType: payload.model.type,\r\n subscriptionInfoDetails: subscriptionInfoDetails,\r\n createNotUpdate: false,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Update subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchChangeActiveStatus(payload: {\r\n id: number;\r\n model: ChangeActiveStatusForSubscription;\r\n }): Promise {\r\n return subscriptionsService\r\n .changeActiveStatusForSubscription(payload.id, payload.model)\r\n .then(() => {\r\n Consoler.debugLog('Change active status for subscription success');\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn(\r\n 'Change active status for subscription failed',\r\n error\r\n );\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchDelete(payload: {\r\n id: number;\r\n subscriptionType: SubscriptionType;\r\n }): Promise {\r\n return subscriptionsService\r\n .deleteSubscription(payload.id, payload.subscriptionType)\r\n .then((subscriptionInfo) => {\r\n Consoler.debugLog('Delete subscription success', subscriptionInfo);\r\n this.commitDeleteSubscriptionInfoDetails({\r\n subscriptionType: payload.subscriptionType,\r\n subscriptionId: payload.id,\r\n });\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Delete subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n @Action\r\n public async dispatchRestore(payload: {\r\n id: number;\r\n model: SubscriptionInfo;\r\n }): Promise {\r\n return subscriptionsService\r\n .restoreSubscription(payload.id, payload.model)\r\n .then((subscriptionInfo) => {\r\n Consoler.debugLog('Restore subscription success', subscriptionInfo);\r\n })\r\n .catch((error) => {\r\n Consoler.debugWarn('Restore subscription failed', error);\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n\r\nexport const subscriptionsModule = getModule(SubscriptionsModule);\r\n"],"sourceRoot":""}