{"version":3,"sources":["webpack:///./src/components/OBCategoryTemplateForm.vue?4701","webpack:///./src/components/OBCategoryTemplatesTable.vue?769d","webpack:///./src/views/Settings/OBCategoryTemplates.vue?eef0","webpack:///./src/components/OBCategoryTemplatesTable.vue?637e","webpack:///./src/components/OBCategoryTemplateForm.vue?91b6","webpack:///./src/shared/models/obCategoryTemplate.ts","webpack:///./src/components/OBCategoryTemplateForm.vue","webpack:///./src/components/OBCategoryTemplateForm.vue?49d4","webpack:///./src/components/OBCategoryTemplateForm.vue?54b7","webpack:///./src/components/OBCategoryTemplatesTable.vue","webpack:///./src/components/OBCategoryTemplatesTable.vue?8b3f","webpack:///./src/components/OBCategoryTemplatesTable.vue?515d","webpack:///./src/views/Settings/OBCategoryTemplates.vue","webpack:///./src/views/Settings/OBCategoryTemplates.vue?7904","webpack:///./src/views/Settings/OBCategoryTemplates.vue?2e6e","webpack:///./src/views/Settings/OBCategoryTemplates.vue?ccac"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","key","sensitiveKey","class","$vuetify","breakpoint","xsOnly","staticRenderFns","attrs","loading","headers","list","result","count","options","settingsOpen","on","$event","rowDoubleClick","scopedSlots","_u","fn","ref","header","text","stopPropagation","model","value","filters","callback","$$v","$set","expression","item","_g","_b","_v","openItemDetails","_s","$t","deleteItem","length","_e","proxy","addItem","obCategoriesFormOpen","obCategoriesFormCategoryId","load","open","initialForm","templateForm","isFormValid","$emit","theme","dark","saving","isSaveDisabled","save","close","id","templateName","fkey","rules","required","maxLength","_l","$index","oneOrPositive","minPersons","minLowerThanMax","maxPersons","_n","zeroOrPositive","removeItem","requiredIfDifferenceTypeEntered","inputPriceDifference","inputPriceDifferenceIsAbsolute","greaterThanMinus100","priceDifferenceItems","requiredIfPriceEntered","outputPriceDifference","outputPriceDifferenceIsAbsolute","addOBCategoryItem","templateId","language","fresh","old","loadTemplate","templateItems","min","max","priceDifferenceIsAbsolute","undefined","v","num","val","$refs","form","rightDrawer","clickOverlay","obCategoryTemplateItems","update","axios","post","then","$store","dispatch","color","message","timeout","localize","finally","refresh","Function","put","get","res","data","push","isDefault","index","findIndex","x","splice","default","components","NumericInputImproved","RightDrawer","NoData","component","VAlert","VBtn","VCol","VDivider","VForm","VIcon","VProgressLinear","VRow","VSelect","VTextField","VToolbar","active","exportHeaders","sortable","page","itemsPerPage","sortBy","sortDesc","groupBy","groupDesc","multiSort","mustSort","debouncedLoad","initLoaded","params","queryParams","$skip","$top","$orderby","map","$count","excludeBookingFee","e","actions","fun","deleteItemConfirm","delete","deep","GenericPMSTableMenu","SortableHeadersTable","OBCategoryTemplateForm","directives","SortableTable","VList","VListItem","VListItemContent","VListItemIcon","VListItemTitle","VMenu","OBCategoryTemplatesTable","mixins","GlobalFilterSensitiveMixin"],"mappings":"mHAAA,W,oCCAA,W,2FCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,uBAAuB,CAACF,EAAG,2BAA2B,CAACG,IAAIP,EAAIQ,aAAaF,YAAY,4BAA4BG,MAAOT,EAAIU,SAASC,WAAWC,OAAS,UAAW,MAAQ,IACjSC,EAAkB,G,4DCDlB,EAAS,WAAa,IAAIb,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,uBAAuB,CAACF,EAAG,uBAAuB,CAACE,YAAY,2BAA2BQ,MAAM,CAAC,eAAe,GAAG,OAAS,OAAO,WAAW,KAAK,QAAUd,EAAIe,QAAQ,QAAUf,EAAIgB,QAAQ,MAAQhB,EAAIiB,KAAKC,OAAO,sBAAsBlB,EAAIiB,KAAKE,MAAM,QAAUnB,EAAIoB,QAAQ,eAAe,CAAE,yBAA0B,CAAC,GAAI,GAAI,GAAI,MAAO,aAAepB,EAAIqB,aAAa,UAAY,uBAAuBC,GAAG,CAAC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qCA,EAAM2B,aAA3C,KACTuG,QAAS,CACP,CACE3I,KAAM7B,KAAK4C,GAAG,UACd6H,IAAK,WAEH,OADA,EAAKC,kBAAkBpI,IAChB,IAGX,CACET,KAAM7B,KAAK4C,GAAG,UACd6H,IAAK,WACH,OAAO,KAIbvD,QAAS,QA9HA,+BAiIb,YAAwC,WAApBlD,EAAoB,EAApBA,GAClB,OAAI2C,MACDgE,OADH,+BACkC3G,IAC/B6C,MAAK,WACJ,EAAKC,OAAOC,SAAS,mBAAoB,CACvCC,MAAO,UACPC,QAAS,EAAKrE,GAAG,oCACjBsE,QAAS,SAGZE,SAAQ,WACP,EAAKhE,cA5IE,GAAuC,QA4BpD,gBADD,eAAM,UAAW,CAAEwH,MAAM,K,2BAMvB,MAgBD,gBADC,eAAM,UAAW,CAAEA,MAAM,K,2BAMzB,MAtDkB,EAAwB,gBAX5C,eAAU,CACT1C,WAAY,CACV2C,sBAAA,KACAC,uBAAA,KACAC,uBAAA,EACA1C,SAAA,MAEF2C,WAAY,CACVC,cAAA,WAGiB,WCtG8X,I,2ECQ/Y,GAAY,eACd,EACA,EACA,GACA,EACA,KACA,WACA,MAIa,MAAiB,QAahC,IAAkB,GAAW,CAACzC,OAAA,KAAKI,QAAA,KAAMsC,QAAA,KAAMC,YAAA,KAAUC,iBAAA,QAAiBC,iBAAA,KAAcC,eAAA,QAAeC,SAAA,KAAMvC,aAAA,O,iBCZxF,GAAN,qIAAkC,QAA5B,GAAmB,gBARvC,eAAU,CACTd,WAAY,CACVsD,yBAAA,IAEFC,OAAQ,CACNC,GAAA,SAGiB,cCpB2Y,MCQ5Z,I,UAAY,eACd,GACA5L,EACAc,GACA,EACA,KACA,WACA,OAIa,gB,2CCnBf,W","file":"js/chunk-cadc4a46.89f28325.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplateForm.vue?vue&type=style&index=0&id=974f97e0&scoped=true&lang=scss&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplatesTable.vue?vue&type=style&index=0&id=41bbc5f6&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"obCategoryTemplates\"},[_c('OBCategoryTemplatesTable',{key:_vm.sensitiveKey,staticClass:\"obCategoryTemplates-table\",class:(_vm.$vuetify.breakpoint.xsOnly ? 'xs mt-4' :'' )})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"obCategoryTemplates\"},[_c('SortableHeadersTable',{staticClass:\"obCategoryTemplatesTable\",attrs:{\"fixed-header\":\"\",\"height\":\"100%\",\"item-key\":\"id\",\"loading\":_vm.loading,\"headers\":_vm.headers,\"items\":_vm.list.result,\"server-items-length\":_vm.list.count,\"options\":_vm.options,\"footer-props\":{ 'items-per-page-options': [15, 25, 50, 100] },\"settingsOpen\":_vm.settingsOpen,\"tableName\":\"obCategoryTemplates\"},on:{\"update:headers\":function($event){_vm.headers=$event},\"update:options\":function($event){_vm.options=$event},\"update:settingsOpen\":function($event){_vm.settingsOpen=$event},\"update:settings-open\":function($event){_vm.settingsOpen=$event},\"dblclick:row\":_vm.rowDoubleClick},scopedSlots:_vm._u([{key:\"header.templateName\",fn:function(ref){\nvar header = ref.header;\nreturn [_c('v-text-field',{staticClass:\"header-filter\",attrs:{\"label\":header.text},on:{\"click\":function($event){$event.stopPropagation();}},model:{value:(_vm.filters.templateName),callback:function ($$v) {_vm.$set(_vm.filters, \"templateName\", $$v)},expression:\"filters.templateName\"}})]}},{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-menu',{attrs:{\"bottom\":\"\",\"left\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"small\":\"\",\"icon\":\"\"}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\"fal fa-fw fa-ellipsis-v\")])],1)]}}],null,true)},[_c('v-list',[_c('v-list-item',{on:{\"click\":function($event){return _vm.openItemDetails(item)}}},[_c('v-list-item-icon',[_c('v-icon',{staticClass:\"mr-2\",attrs:{\"small\":\"\",\"color\":\"primary\"}},[_vm._v(\"fal fa-pen\")])],1),_c('v-list-item-content',[_c('v-list-item-title',[_vm._v(_vm._s(_vm.$t(\"Edit\")))])],1)],1),_c('v-list-item',{attrs:{\"disabled\":_vm.loading},on:{\"click\":function($event){return _vm.deleteItem(item)}}},[_c('v-list-item-icon',[_c('v-icon',{staticClass:\"mr-2\",attrs:{\"small\":\"\",\"color\":\"red\"}},[_vm._v(\"fal fa-trash\")])],1),_c('v-list-item-content',[_c('v-list-item-title',[_vm._v(_vm._s(_vm.$t(\"Delete\")))])],1)],1)],1)],1)]}},{key:\"body.append\",fn:function(){return [((!_vm.list.result || _vm.list.result.length == 0) && !_vm.loading)?_c('td',{attrs:{\"colspan\":_vm.headers.length}},[_c('NoData',{attrs:{\"icon\":\"fas fa-briefcase\"}})],1):_vm._e()]},proxy:true}])}),_c('v-btn',{staticClass:\"add-button\",attrs:{\"fab\":\"\",\"color\":\"primary\"},on:{\"click\":function($event){return _vm.addItem()}}},[_c('v-icon',[_vm._v(\"fal fa-plus\")])],1),_c('OBCategoryTemplateForm',{attrs:{\"open\":_vm.obCategoriesFormOpen,\"id\":_vm.obCategoriesFormCategoryId},on:{\"update:open\":function($event){_vm.obCategoriesFormOpen=$event},\"callback\":_vm.load}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('RightDrawer',{ref:\"drawer\",staticClass:\"drawer\",attrs:{\"open\":_vm.open,\"initial\":_vm.initialForm,\"watched\":_vm.templateForm,\"is-watched-valid\":_vm.isFormValid},on:{\"update:open\":function($event){return _vm.$emit('update:open', $event)}},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [_c('div',{staticClass:\"ob-category-template-form-actions\",class:{ 'theme--dark': _vm.$vuetify.theme.dark }},[_c('v-btn',{attrs:{\"color\":\"primary\",\"loading\":_vm.saving,\"disabled\":_vm.isSaveDisabled},on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t(\"Save\")))]),_c('v-btn',{on:{\"click\":_vm.close}},[_vm._v(_vm._s(_vm.$t(\"Close\")))])],1)]},proxy:true}])},[_c('v-toolbar',[_c('div',{staticClass:\"ob-category-template-form-title\"},[(!!_vm.templateForm.id)?_c('span',[_vm._v(_vm._s(_vm.$t(\"OBCategoryTemplate.Editing\") + \" - \")+\" \"+_vm._s(_vm.initialForm.templateName))]):_vm._e(),(!_vm.templateForm.id)?_c('span',[_vm._v(_vm._s(_vm.$t(\"OBCategoryTemplate.New\")))]):_vm._e()])]),_c('v-progress-linear',{attrs:{\"indeterminate\":\"\",\"active\":_vm.loading,\"bottom\":\"\"}}),_c('v-form',{key:_vm.fkey,ref:\"form\",staticClass:\"form\",attrs:{\"disabled\":_vm.loading},model:{value:(_vm.isFormValid),callback:function ($$v) {_vm.isFormValid=$$v},expression:\"isFormValid\"}},[_c('div',{staticClass:\"form-items\"},[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-alert',{attrs:{\"outlined\":\"\",\"type\":\"info\",\"border\":\"left\"}},[_vm._v(_vm._s(_vm.$t(\"CategoryTemplatePriceDifference.Info\")))])],1),_c('v-col',{attrs:{\"lg\":\"6\",\"md\":\"6\",\"sm\":\"12\"}},[_c('v-text-field',{attrs:{\"label\":_vm.$t('OBCategoryTemplate.Name') + '*',\"rules\":[_vm.rules.required, _vm.maxLength(128)],\"autofocus\":\"\"},model:{value:(_vm.templateForm.templateName),callback:function ($$v) {_vm.$set(_vm.templateForm, \"templateName\", $$v)},expression:\"templateForm.templateName\"}})],1)],1),_vm._l((_vm.templateItems),function(item,$index){return [_c('div',{key:$index},[_c('v-row',[_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('NumericInputImproved',{attrs:{\"label\":_vm.$t('AccomodationUnitType.PAXCategories.MinPersons') + '*',\"decimalPlaces\":0,\"outlined\":false,\"validateInput\":true,\"rules\":[\n _vm.rules.oneOrPositive(item.minPersons), \n _vm.rules.required(item.minPersons),\n _vm.rules.minLowerThanMax(item.minPersons, item.maxPersons) ]},model:{value:(item.minPersons),callback:function ($$v) {_vm.$set(item, \"minPersons\", _vm._n($$v))},expression:\"item.minPersons\"}})],1),_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('NumericInputImproved',{attrs:{\"label\":_vm.$t('AccomodationUnitType.PAXCategories.MaxPersons') + '*',\"decimalPlaces\":0,\"outlined\":false,\"validateInput\":true,\"rules\":[\n _vm.rules.zeroOrPositive(item.maxPersons),\n _vm.rules.required(item.maxPersons),\n _vm.rules.oneOrPositive(item.maxPersons),\n _vm.rules.minLowerThanMax(item.minPersons, item.maxPersons) ]},scopedSlots:_vm._u([{key:\"append-outer\",fn:function(){return [_c('v-icon',{attrs:{\"small\":\"\",\"color\":\"red\"},on:{\"click\":function($event){return _vm.removeItem(item)}}},[_vm._v(\"fal fa-trash\")])]},proxy:true}],null,true),model:{value:(item.maxPersons),callback:function ($$v) {_vm.$set(item, \"maxPersons\", _vm._n($$v))},expression:\"item.maxPersons\"}})],1)],1),_c('v-row',[(_vm.tenantUsesInputPrice)?_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('NumericInputImproved',{attrs:{\"outlined\":false,\"label\":_vm.$t('OB.LOS.Category.InputPriceDifference'),\"validateInput\":true,\"rules\":[\n _vm.requiredIfDifferenceTypeEntered(item.inputPriceDifference, item.inputPriceDifferenceIsAbsolute),\n _vm.rules.greaterThanMinus100(item.inputPriceDifference, item.inputPriceDifferenceIsAbsolute)\n ]},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [(item.inputPriceDifferenceIsAbsolute === false)?_c('span',[_vm._v(\"%\")]):_vm._e()]},proxy:true}],null,true),model:{value:(item.inputPriceDifference),callback:function ($$v) {_vm.$set(item, \"inputPriceDifference\", $$v)},expression:\"item.inputPriceDifference\"}})],1):_vm._e(),(_vm.tenantUsesInputPrice)?_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('v-select',{attrs:{\"label\":_vm.$t('OB.LOS.Category.InputPriceDifferenceType'),\"items\":_vm.priceDifferenceItems,\"rules\":[_vm.requiredIfPriceEntered(item.inputPriceDifference, item.inputPriceDifferenceIsAbsolute)],\"clearable\":\"\",\"item-value\":\"value\"},model:{value:(item.inputPriceDifferenceIsAbsolute),callback:function ($$v) {_vm.$set(item, \"inputPriceDifferenceIsAbsolute\", $$v)},expression:\"item.inputPriceDifferenceIsAbsolute\"}})],1):_vm._e(),_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('NumericInputImproved',{attrs:{\"outlined\":false,\"label\":_vm.$t('OB.LOS.Category.OutputPriceDifference'),\"validateInput\":true,\"rules\":[\n _vm.requiredIfDifferenceTypeEntered(item.outputPriceDifference, item.outputPriceDifferenceIsAbsolute),\n _vm.rules.greaterThanMinus100(item.outputPriceDifference, item.outputPriceDifferenceIsAbsolute)\n ]},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [(item.outputPriceDifferenceIsAbsolute === false)?_c('span',[_vm._v(\"%\")]):_vm._e()]},proxy:true}],null,true),model:{value:(item.outputPriceDifference),callback:function ($$v) {_vm.$set(item, \"outputPriceDifference\", $$v)},expression:\"item.outputPriceDifference\"}})],1),_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"6\"}},[_c('v-select',{attrs:{\"label\":_vm.$t('OB.LOS.Category.OutputPriceDifferenceType'),\"rules\":[_vm.requiredIfPriceEntered(item.outputPriceDifference, item.outputPriceDifferenceIsAbsolute)],\"items\":_vm.priceDifferenceItems,\"clearable\":\"\",\"item-value\":\"value\"},model:{value:(item.outputPriceDifferenceIsAbsolute),callback:function ($$v) {_vm.$set(item, \"outputPriceDifferenceIsAbsolute\", $$v)},expression:\"item.outputPriceDifferenceIsAbsolute\"}})],1)],1),_c('v-divider',{staticClass:\"my-3\"})],1)]}),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-btn',{attrs:{\"text\":\"\",\"small\":\"\"},on:{\"click\":function($event){return _vm.addOBCategoryItem()}}},[_vm._v(\" \"+_vm._s(_vm.$t(\"OBCategoryTemplate.AddItem\"))+\" \")])],1)],1)],2),_c('v-btn',{staticClass:\"d-none\",attrs:{\"type\":\"submit\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export type OBCategoryTemplateView = {\n id: number;\n templateName: string;\n status: boolean;\n}\n\nexport class OBCategoryTemplateModel {\n id = 0;\n templateName = \"\";\n\n obCategoryTemplateItems = [] as OBCategoryTemplateItem[];\n}\n\nexport class OBCategoryTemplateItem{\n id = 0;\n templateId = 0;\n minPersons = null as number | null;\n maxPersons= null as number | null;\n inputPriceDifference = null as number | null;\n inputPriceDifferenceIsAbsolute = null as boolean | null;\n outputPriceDifference = null as number | null;\n outputPriceDifferenceIsAbsolute = null as boolean | null;\n\n isDefault = false;\n\n constructor(templateId = 0){\n this.templateId = templateId;\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\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\nimport { Component, Vue, Watch, Prop, Ref } from \"vue-property-decorator\";\nimport RightDrawer from \"@/components/misc/RightDrawer.vue\";\nimport * as _ from \"lodash\";\nimport NoData from \"@/components/misc/NoData.vue\";\nimport {\n OBCategoryTemplateItem,\n OBCategoryTemplateModel,\n} from \"@/shared/models/obCategoryTemplate\";\nimport { Getter } from \"vuex-class\";\nimport NumericInputImproved from \"@/components/numbers/NumericInputImproved.vue\";\n\n@Component({\n components: {\n NumericInputImproved,\n RightDrawer,\n NoData,\n },\n})\nexport default class OBCategoryTemplateForm extends Vue {\n @Prop({ default: false }) open!: boolean;\n @Prop() id?: number | null;\n @Prop() callback!: () => any;\n\n @Getter(\"appParams/tenantUsesInputPrice\") tenantUsesInputPrice?: boolean;\n\n @Getter(\"language/language\") language?: string;\n get internalLanguage() {\n return this.language ?? \"hr-HR\";\n }\n\n fkey = 0;\n\n loading = false;\n saving = false;\n initialForm = new OBCategoryTemplateModel();\n templateForm = new OBCategoryTemplateModel();\n templateItems: OBCategoryTemplateItem[] =[];\n\n @Watch(\"open\")\n async openWatch(fresh: boolean, old: boolean) {\n if (fresh && !old) {\n this.fkey++;\n }\n if (fresh && this.id) {\n await this.loadTemplate();\n this.initialForm = _.cloneDeep(this.templateForm);\n } else {\n this.templateForm = new OBCategoryTemplateModel();\n this.initialForm = _.cloneDeep(this.templateForm);\n this.templateItems = [new OBCategoryTemplateItem()];\n }\n }\n\n get priceDifferenceItems() {\n return [\n {\n text: this.$t(\"OB.LOS.Category.IsPriceDifferenceAbsolute\"),\n value: true,\n },\n {\n text: this.$t(\"OB.LOS.Category.IsPriceDifferencePercentage\"),\n value: false,\n },\n ];\n }\n\n get isSaveDisabled(){\n return !this.isFormValid || this.saving;\n }\n\n get rules() {\n return {\n required: (value: any) =>\n !!value || value === 0 || this.$t(\"Validation.Required\"),\n oneOrPositive: (value: any) =>\n +value >= 1 || this.$t(\"Validation.MustBeOneOrPositive\"),\n zeroOrPositive: (value: any) =>\n +value >= 0 || this.$t(\"Validation.MustBeZeroOrPositive\"),\n minLowerThanMax: (min: number | null, max: number | null) =>\n min === null ||\n max === null ||\n min <= max ||\n max === 0 || // 0 == infinite\n this.$t(\n \"AccomodationUnitType.OBCategories.MinPersonsGreaterThanMaxPersons\"\n ),\n greaterThanMinus100: (value: number | null, priceDifferenceIsAbsolute: boolean) =>\n value === null ||\n value === undefined ||\n value > -100 || \n priceDifferenceIsAbsolute ||\n this.$t(\"Validation.MinValue\"),\n };\n }\n maxLength(max: number) {\n return (v: string) =>\n v.length <= max ? true : this.$t(\"Validation.MaxLength\", { count: max });\n }\n\n requiredIfPriceEntered(num: number, val: boolean){\n if (num && (val === undefined || val === null)){\n return this.$t(\"Validation.RequiredIfPriceEntered\")\n } else {\n return true;\n }\n }\n\n requiredIfDifferenceTypeEntered(num: number, val: boolean) {\n if (val !== undefined && val !== null && (num === null || num === undefined)){\n return this.$t(\"Validation.RequiredIfPriceEntered\")\n } else {\n return true;\n }\n }\n\n isFormValid = false;\n get submitDisabled(): boolean {\n return this.isFormValid && !this.loading;\n }\n\n get form(): Vue & { validate: () => boolean } {\n return this.$refs.form as Vue & { validate: () => boolean };\n }\n\n @Ref(\"drawer\") rightDrawer?: RightDrawer;\n\n close() {\n this.rightDrawer?.clickOverlay();\n }\n\n async save() {\n if (this.isFormValid){\n this.templateForm.obCategoryTemplateItems = this.templateItems;\n if (this.templateForm.id) {\n await this.update();\n return;\n }\n await this.axios\n .post(\"/OBCategoryTemplates\", {... this.templateForm })\n .then(() => {\n this.initialForm = _.cloneDeep(this.templateForm);\n this.$store.dispatch(\"showNotification\", {\n color: \"success\",\n message: this.$t(\"OBCategoryTemplate.SaveSuccess\"),\n timeout: 5000,\n localize: true,\n });\n this.$emit(\"update:open\", false);\n this.$emit(\"callback\");\n })\n .finally(() => {\n this.refresh();\n });\n }\n }\n\n refresh() {\n if (this.callback instanceof Function) {\n this.callback();\n }\n }\n\n async update() {\n await this.axios\n .put(`/OBCategoryTemplates/${this.id}`, this.templateForm)\n .then(() => {\n this.$store.dispatch(\"showNotification\", {\n color: \"success\",\n message: this.$t(\"OBCategoryTemplate.SaveSuccess\"),\n timeout: 5000,\n localize: true,\n });\n this.$emit(\"update:open\", false);\n this.$emit(\"callback\");\n })\n .finally(() => {\n this.refresh();\n });\n }\n\n async loadTemplate() {\n this.loading = true;\n await Vue.axios\n .get(\"/OBCategoryTemplates/\" + this.id)\n .then((res) => {\n this.templateForm = res.data;\n this.initialForm = _.cloneDeep(this.templateForm);\n this.templateItems = res.data[\"obCategoryTemplateItems\"];\n })\n .finally(() => {\n this.loading = false;\n });\n }\n\n addOBCategoryItem() {\n this.templateItems.push({\n id: 0,\n templateId: this.templateForm.id,\n minPersons: null,\n maxPersons: null,\n inputPriceDifference: null,\n inputPriceDifferenceIsAbsolute: null,\n outputPriceDifference: null,\n outputPriceDifferenceIsAbsolute: null,\n isDefault: false\n });\n }\n\n removeItem(item: OBCategoryTemplateItem) {\n const index = this.templateItems.findIndex((x) => x == item);\n if (index != -1) {\n this.templateItems.splice(index, 1);\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplateForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplateForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./OBCategoryTemplateForm.vue?vue&type=template&id=974f97e0&scoped=true&\"\nimport script from \"./OBCategoryTemplateForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./OBCategoryTemplateForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./OBCategoryTemplateForm.vue?vue&type=style&index=0&id=974f97e0&scoped=true&lang=scss&\"\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 \"974f97e0\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAlert } from 'vuetify/lib/components/VAlert';\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressLinear } from 'vuetify/lib/components/VProgressLinear';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\ninstallComponents(component, {VAlert,VBtn,VCol,VDivider,VForm,VIcon,VProgressLinear,VRow,VSelect,VTextField,VToolbar})\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\nimport { Component, Vue, Watch } from \"vue-property-decorator\";\nimport GenericPMSTableMenu from \"@/components/generic-pms-table/GenericPMSTableMenu.vue\";\nimport { SortableTableHeader } from \"@/components/generic-pms-table/SortableTableDirective\";\nimport SortableTable from \"@/components/generic-pms-table/SortableTableDirective\";\nimport SortableHeadersTable from \"@/components/generic-pms-table/SortableHeadersTable.vue\";\nimport OBCategoryTemplateForm from \"@/components/OBCategoryTemplateForm.vue\";\nimport { ListModel } from \"@/shared/models/listModel\";\nimport { DataOptions } from \"vuetify\";\nimport { formatOrderbyArray } from \"@/shared/sortHelperFunctions\";\nimport { Notification } from \"../store/modules/notifications\";\nimport * as _ from \"lodash\";\nimport NoData from \"@/components/misc/NoData.vue\";\nimport { OBCategoryTemplateView } from \"@/shared/models/obCategoryTemplate\";\n\n@Component({\n components: {\n GenericPMSTableMenu,\n SortableHeadersTable,\n OBCategoryTemplateForm,\n NoData\n },\n directives: {\n SortableTable,\n },\n})\nexport default class OBCategoryTemplatesTable extends Vue {\n settingsOpen = false;\n\nheaders: SortableTableHeader[] = [\n {\n text: \"OBCategoryTemplate.Name\",\n value: \"templateName\",\n active: true,\n default: false,\n class: \"resize-header\",\n exportHeaders: [],\n },\n {\n text: \"Actions\",\n value: \"actions\",\n sortable: false,\n active: true,\n default: true,\n class: \"resize-header\",\n exportHeaders: [],\n }\n];\n\nfilters = {\n id: 0,\n templateName: \"\",\n};\n@Watch(\"filters\", { deep: true })\n watchFilters(val: any, old: any) {\n if (_.isEqual(val, old)) {\n this.options.page = 1;\n this.debouncedLoad();\n }\n }\n debouncedLoad = _.debounce(this.load, 500);\n\n options: DataOptions = {\n page: 1,\n itemsPerPage: 15,\n sortBy: [\"id\"],\n sortDesc: [],\n groupBy: [],\n groupDesc: [],\n multiSort: false,\n mustSort: true,\n };\n\n initLoaded = false;\n @Watch(\"options\", { deep: true })\n watchOptions(fresh: DataOptions, old: DataOptions) {\n if (!this.initLoaded || !_.isEqual(fresh, old)) {\n this.initLoaded = true;\n this.load();\n }\n }\n\n loading = true;\n list: ListModel = {\n count: 0,\n result: [],\n };\n\n async load(): Promise> {\n this.loading = true;\n\n return (\n this.axios\n .get>(\"/OBCategoryTemplates\", {\n params: this.queryParams,\n })\n .then((res) => {\n this.list = res.data;\n return this.list;\n })\n .finally(() => (this.loading = false))\n );\n }\n\n get queryParams() {\n return {\n $skip: this.options.itemsPerPage * (this.options.page - 1),\n $top: this.options.itemsPerPage,\n $orderby: formatOrderbyArray(\n this.options.sortBy,\n this.options.sortDesc.map((x) => !x)\n ),\n $count: true,\n ...this.filters,\n excludeBookingFee: true\n };\n }\n\n obCategoriesFormCategoryId: number | null = null;\n obCategoriesFormOpen = false;\n rowDoubleClick(e: MouseEvent, { item }: { item: OBCategoryTemplateView }) {\n this.openItemDetails(item);\n }\n\n openItemDetails(item: OBCategoryTemplateView) {\n this.obCategoriesFormCategoryId = item.id;\n this.obCategoriesFormOpen = true;\n }\n addItem() {\n this.obCategoriesFormCategoryId = null;\n this.obCategoriesFormOpen = true;\n }\n\n deleteItem(item: OBCategoryTemplateView) {\n this.$store.dispatch(\"showNotification\", {\n color: \"warning\",\n message: this.$t(\"DeleteConfirmation\") + ` '${item?.templateName}'`,\n actions: [\n {\n text: this.$t(\"Delete\"),\n fun: () => {\n this.deleteItemConfirm(item);\n return true;\n },\n },\n {\n text: this.$t(\"Cancel\"),\n fun: () => {\n return true;\n },\n },\n ],\n timeout: 30000,\n } as Notification);\n }\n deleteItemConfirm({ id }: { id: number }) {\n Vue.axios\n .delete(`/OBCategoryTemplates/${id}`)\n .then(() => {\n this.$store.dispatch(\"showNotification\", {\n color: \"success\",\n message: this.$t(\"OBCategoryTemplate.DeleteSuccess\"),\n timeout: 5000,\n } as Notification);\n })\n .finally(() => {\n this.load();\n });\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplatesTable.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplatesTable.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./OBCategoryTemplatesTable.vue?vue&type=template&id=41bbc5f6&scoped=true&\"\nimport script from \"./OBCategoryTemplatesTable.vue?vue&type=script&lang=ts&\"\nexport * from \"./OBCategoryTemplatesTable.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./OBCategoryTemplatesTable.vue?vue&type=style&index=0&id=41bbc5f6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"41bbc5f6\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\nimport { VListItemContent } from 'vuetify/lib/components/VList';\nimport { VListItemIcon } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VIcon,VList,VListItem,VListItemContent,VListItemIcon,VListItemTitle,VMenu,VTextField})\n","\n\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\nimport OBCategoryTemplatesTable from \"@/components/OBCategoryTemplatesTable.vue\";\nimport GlobalFilterSensitiveMixin from '@/mixins/GlobalFilterSensitiveMixin';\n\n@Component({\n components: {\n OBCategoryTemplatesTable\n },\n mixins: [\n GlobalFilterSensitiveMixin\n ]\n})\nexport default class OBCategoryTemplates extends Vue {}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplates.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplates.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./OBCategoryTemplates.vue?vue&type=template&id=4d83c33e&scoped=true&\"\nimport script from \"./OBCategoryTemplates.vue?vue&type=script&lang=ts&\"\nexport * from \"./OBCategoryTemplates.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./OBCategoryTemplates.vue?vue&type=style&index=0&id=4d83c33e&scoped=true&lang=scss&\"\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 \"4d83c33e\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OBCategoryTemplates.vue?vue&type=style&index=0&id=4d83c33e&scoped=true&lang=scss&\""],"sourceRoot":""}