{"version":3,"sources":["webpack:///./src/utils/Defaults.ts","webpack:///./src/components/vModal.vue?f088","webpack:///./src/assets/Admin/assets/img/dashboard/chef.jpg","webpack:///./src/utils/API/CouponsRepository.ts","webpack:///./src/views/Admin/Coupons.vue","webpack:///./src/models/Coupon/Coupon.ts","webpack:///./src/views/Admin/Coupons.vue?fdd1","webpack:///./src/views/Admin/Coupons.vue?8d62","webpack:///./src/views/Admin/Coupons.vue?1528","webpack:///./src/views/Admin/Coupons.vue?03d4","webpack:///./src/components/vModal.vue","webpack:///./src/components/vModal.vue?9dbe","webpack:///./src/components/vModal.vue?4636","webpack:///./src/components/vModal.vue?1836","webpack:///./src/utils/API/PartnersRepository.ts"],"names":["NA","dateTimeDisplayFormat","dateDisplayFormat","module","exports","resource","fetchCoupons","listRequest","Repository","post","concat","withCredentials","createCoupon","updateCoupon","deleteCoupons","deleteCoupon","checkCoupon","couponCode","DiscountType","CouponStatus","CouponType","render","_vm","this","_c","_self","_setupProxy","staticClass","staticStyle","attrs","require","_v","_s","translations","get","on","prepareAddMode","tableHeaders","selectErase","transformCoupons","couponsState","count","totalCount","pageSize","searchable","editableTable","tableLoading","changePage","search","prepareEditMode","prepareDeletePrompt","order","showModal","modalTitle","resetState","$event","preventDefault","submit","apply","arguments","class","errors","has","editMode","directives","name","rawName","value","expression","domProps","target","composing","$set","first","_e","disabledDates","couponType","model","expiryDate","callback","$$v","discountType","_q","usageLimit","partners","partner","slot","isActive","showRemovePrompt","removePromptTitle","confirmDelete","staticRenderFns","Coupons","_Vue","_this","_classCallCheck","_len","length","args","Array","_key","_callSuper","_defineProperty","coupons","page","filters","orders","field","orderType","OrderType","Asc","partnerId","Absolute","Individual","id","removeList","address","phone","email","couponsCount","to","Date","_inherits","_createClass","key","orderings","push","_objectSpread","requestCoupons","ListRequest","_toConsumableArray","ordering","searchString","sortable","toggleModal","found","find","c","temp","ids","_this2","$snotify","async","Promise","resolve","reject","CouponsRepository","then","body","catch","error","message","response","data","errorMessages","userVisibleMessage","timeout","closeOnClick","_this3","$validator","validateAll","result","submitUpdate","submitNew","_this4","coupon","simple","Partner","_this5","_this6","map","element","e1","code","e2","e3","createdOn","$moment","format","e4","component","props","html","e5","e6","e7","e8","e9","e10","numberOfUsages","meta","link","_this7","_this8","request","$store","getters","getListRequest","dispatch","PARTNERS_REDIRECT","PartnersRepository","fetchPartners","TRANSLATIONS_FETCH","category","collections","document","title","localizationState","Vue","__decorate","Component","components","vTable","vModal","vToggleSwitch","computed","mapState","state","LocalizationModule","show","modalId","size","cancelModal","_t","htmlBodyElement","getElementsByTagName","classList","add","$emit","remove","addEventListener","e","keyCode","Prop","Watch","newPartner","updatePartner","deletePartner","deletePartners"],"mappings":"kHAAA,sGAAO,IAAMA,EAAK,GACLC,EAAwB,wBACxBC,EAAoB,e,oCCFjC,W,gDCAAC,EAAOC,QAAU,IAA0B,yB,oCCA3C,gBAOMC,EAAW,WAEF,QACbC,aAAY,SAACC,GACX,OAAOC,OAAWC,KAAK,GAADC,OAAIL,EAAQ,gBAAgBE,EAAa,CAAEI,iBAAiB,KAEpFC,aAAY,SAACA,GACX,OAAOJ,OAAWC,KAAK,GAADC,OAAIL,EAAQ,iBAAiBO,EAAc,CAAED,iBAAiB,KAEtFE,aAAY,SAACA,GACX,OAAOL,OAAWC,KAAK,GAADC,OAAIL,EAAQ,iBAAiBQ,EAAc,CAAEF,iBAAiB,KAEtFG,cAAa,SAACC,GACZ,OAAOP,OAAWC,KAAK,GAADC,OAAIL,EAAQ,kBAAkBU,EAAc,CAAEJ,iBAAiB,KAEvFK,YAAW,SAACC,GACV,OAAOT,OAAWC,KAAK,GAADC,OAAIL,EAAQ,iBAAiB,CAAEY,cAAc,CAAEN,iBAAiB,O,kECvB1F,ICkBYO,EAIAC,EAIAC,ED1BRC,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAOF,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACH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C,CAAAzG,IAAA,YAAAzD,MAED,WACE5C,KAAK6M,MAAM,eACZ,CAAAxG,IAAA,cAAAzD,MAED,WACE5C,KAAK6M,MAAM,iBACZ,CAAAxG,IAAA,UAAAzD,MAED,WAAO,IAAAyE,EAAA,KACLiE,SAASyB,iBAAiB,WAAW,SAACC,GAChC3F,EAAK+E,MAAqB,IAAbY,EAAEC,SACjB5F,EAAKkF,qBA9Bc,CAASd,QAC1BC,eAAA,CAAPwB,kB,2BACOxB,eAAA,CAAPwB,kB,iCACOxB,eAAA,CAAPwB,kB,2BACOxB,eAAA,CAAPwB,kB,8BAGDxB,eAAA,CADCyB,eAAM,S,8BANYrB,EAAMJ,eAAA,CAD1BC,QACoBG,WCJ2W,I,wBCQ5XjC,EAAY,eACd,EACA/J,EACAsE,GACA,EACA,KACA,WACA,MAIa,OAAAyF,E,2CCnBf,gBAMM/K,EAAW,YAEF,QACXoM,cAAa,SAAClM,GACV,OAAOC,OAAWC,KAAK,GAADC,OAAIL,EAAQ,iBAAiBE,EAAa,CAACI,iBAAiB,KAEtFgO,WAAU,SAACA,GACP,OAAOnO,OAAWC,KAAK,GAADC,OAAIL,EAAQ,kBAAkBsO,EAAY,CAAChO,iBAAiB,KAEtFiO,cAAa,SAACA,GACV,OAAOpO,OAAWC,KAAK,GAADC,OAAIL,EAAQ,kBAAkBuO,EAAe,CAACjO,iBAAiB,KAEzFkO,cAAa,SAACC,GACV,OAAOtO,OAAWC,KAAK,GAADC,OAAIL,EAAQ,mBAAmByO,EAAgB,CAACnO,iBAAiB","file":"js/chunk-fffd2608.54119385.js","sourcesContent":["export const NA = '';\r\nexport const dateTimeDisplayFormat = 'DD MMM YYYY - hh:mm A'; // https://momentjs.com/docs/#/parsing/\r\nexport const dateDisplayFormat = 'DD MMM YYYY';","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.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!./vModal.vue?vue&type=style&index=0&id=88baf142&prod&scoped=true&lang=css\"","module.exports = __webpack_public_path__ + \"img/chef.43804cf3.jpg\";","import Repository from './Repository';\r\nimport ListRequest from '@/models/ListRequest';\r\nimport DeleteCoupons from '@/models/Coupon/DeleteCoupons';\r\nimport UpdateCoupon from '@/models/Coupon/UpdateCoupon';\r\nimport CreateCoupon from '@/models/Coupon/CreateCoupon';\r\n\r\n\r\nconst resource = '/coupons';\r\n\r\nexport default {\r\n fetchCoupons(listRequest: ListRequest) {\r\n return Repository.post(`${resource}/listcoupons`, listRequest, { withCredentials: true });\r\n },\r\n createCoupon(createCoupon: CreateCoupon) {\r\n return Repository.post(`${resource}/createcoupon`, createCoupon, { withCredentials: true });\r\n },\r\n updateCoupon(updateCoupon: UpdateCoupon) {\r\n return Repository.post(`${resource}/updatecoupon`, updateCoupon, { withCredentials: true });\r\n },\r\n deleteCoupons(deleteCoupon: DeleteCoupons) {\r\n return Repository.post(`${resource}/deletecoupons`, deleteCoupon, { withCredentials: true });\r\n },\r\n checkCoupon(couponCode: string) {\r\n return Repository.post(`${resource}/RedeemCoupon`, { couponCode }, { withCredentials: true });\r\n }\r\n};\r\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"page-content-wrapper\"},[_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"container-fluid container-fixed-lg\"},[_c('h2',[_c('img',{staticClass:\"img-thumbnail img-circle\",staticStyle:{\"width\":\"75px\"},attrs:{\"src\":require(\"../../assets/Admin/assets/img/dashboard/chef.jpg\"),\"alt\":\"\"}}),_vm._v(\"\\n \"+_vm._s(_vm.translations.get(\"coupons_title\"))+\"\\n \")])]),_c('div',{staticClass:\"container-fluid container-fixed-lg\"},[_c('div',{staticClass:\"row\",staticStyle:{\"margin-bottom\":\"20px\"}},[_c('div',{staticClass:\"col-md-12\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"add-btn col-md-9\"},[_c('div',[_c('span',{staticClass:\"btn btn-sm btn-primary btn-fix\",on:{\"click\":_vm.prepareAddMode}},[_c('i',{staticClass:\"fa fa-plus\",attrs:{\"aria-hidden\":\"true\"}}),_vm._v(\"\\n \"+_vm._s(_vm.translations.get(\"coupons_addbutton\"))+\"\\n \")])])])])])])]),_c('div',{staticClass:\"container-fluid container-fixed-lg\"},[_c('div',{staticClass:\"card card-default\"},[_c('div',{staticClass:\"card-header\"},[_c('div',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.translations.get(\"coupons_table_title\")))]),_c('div',{staticClass:\"clearfix\"})]),_c('div',{staticClass:\"card-body\"},[_c('vTable',{attrs:{\"table-headers\":_vm.tableHeaders,\"select-erase\":_vm.selectErase,\"results\":_vm.transformCoupons,\"total\":_vm.couponsState.count,\"total-count\":_vm.couponsState.totalCount,\"page-size\":_vm.couponsState.pageSize,\"searchable\":_vm.searchable,\"editable\":_vm.editableTable,\"loading\":_vm.couponsState.tableLoading},on:{\"changePage\":_vm.changePage,\"search\":_vm.search,\"edit\":_vm.prepareEditMode,\"remove\":_vm.prepareDeletePrompt,\"order\":_vm.order}})],1)])]),_c('vModal',{attrs:{\"show\":_vm.showModal,\"modal-title\":_vm.modalTitle},on:{\"cancelModal\":_vm.resetState}},[_c('form',{staticClass:\"p-t-15\",attrs:{\"role\":\"form\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('div',{staticClass:\"form-group\",class:{'has-error':_vm.errors.has('couponName')}},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_coupon_name')))]),(!_vm.editMode)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.name),expression:\"couponsState.createCoupon.name\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('couponName')},attrs:{\"type\":\"text\",\"placeholder\":_vm.translations.get('coupons_modal_coupon_name_placeholder'),\"name\":\"couponName\",\"data-vv-as\":_vm.translations.get('coupons_modal_coupon_name')},domProps:{\"value\":(_vm.couponsState.createCoupon.name)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.createCoupon, \"name\", $event.target.value)}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.name),expression:\"couponsState.updateCoupon.name\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('couponName')},attrs:{\"type\":\"text\",\"placeholder\":_vm.translations.get('coupons_modal_coupon_name_placeholder'),\"name\":\"couponName\",\"data-vv-as\":_vm.translations.get('coupons_modal_coupon_name')},domProps:{\"value\":(_vm.couponsState.updateCoupon.name)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.updateCoupon, \"name\", $event.target.value)}}}),(_vm.errors.has('couponName'))?_c('span',{staticClass:\"error col-12\"},[_vm._v(_vm._s(_vm.errors.first('couponName')))]):_vm._e()])]),_c('div',{staticClass:\"col-md-6\"},[_c('div',{staticClass:\"form-group\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_expiry_date')))]),(!_vm.editMode)?_c('datepicker',{attrs:{\"bootstrap-styling\":\"\",\"typeable\":\"\",\"calendar-button-icon\":\"fa fa-calendar\",\"calendar-button\":\"\",\"monday-first\":\"\",\"disabled-dates\":_vm.disabledDates,\"disabled\":_vm.couponsState.createCoupon.couponType === 1},model:{value:(_vm.couponsState.createCoupon.expiryDate),callback:function ($$v) {_vm.$set(_vm.couponsState.createCoupon, \"expiryDate\", $$v)},expression:\"couponsState.createCoupon.expiryDate\"}}):_c('datepicker',{attrs:{\"bootstrap-styling\":\"\",\"typeable\":\"\",\"calendar-button-icon\":\"fa fa-calendar\",\"calendar-button\":\"\",\"monday-first\":\"\",\"disabled-dates\":_vm.disabledDates,\"disabled\":_vm.couponsState.updateCoupon.couponType === 1},model:{value:(_vm.couponsState.updateCoupon.expiryDate),callback:function ($$v) {_vm.$set(_vm.couponsState.updateCoupon, \"expiryDate\", $$v)},expression:\"couponsState.updateCoupon.expiryDate\"}})],1)])]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_discount_type')))]),(!_vm.editMode)?_c('div',[_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.discountType),expression:\"couponsState.createCoupon.discountType\"}],attrs:{\"id\":\"discountTypeAbsolute\",\"type\":\"radio\"},domProps:{\"value\":0,\"checked\":_vm._q(_vm.couponsState.createCoupon.discountType,0)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.createCoupon, \"discountType\", 0)}}}),_c('label',{attrs:{\"for\":\"discountTypeAbsolute\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_discounttype_absolute\")))])]),_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.discountType),expression:\"couponsState.createCoupon.discountType\"}],attrs:{\"id\":\"discountTypePercentage\",\"type\":\"radio\"},domProps:{\"value\":1,\"checked\":_vm._q(_vm.couponsState.createCoupon.discountType,1)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.createCoupon, \"discountType\", 1)}}}),_c('label',{attrs:{\"for\":\"discountTypePercentage\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_discounttype_percentage\")))])])]):_c('div',[_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.discountType),expression:\"couponsState.updateCoupon.discountType\"}],attrs:{\"id\":\"discountTypeAbsolute\",\"type\":\"radio\"},domProps:{\"value\":0,\"checked\":_vm._q(_vm.couponsState.updateCoupon.discountType,0)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.updateCoupon, \"discountType\", 0)}}}),_c('label',{attrs:{\"for\":\"discountTypeAbsolute\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_discounttype_absolute\")))])]),_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.discountType),expression:\"couponsState.updateCoupon.discountType\"}],attrs:{\"id\":\"discountTypePercentage\",\"type\":\"radio\"},domProps:{\"value\":1,\"checked\":_vm._q(_vm.couponsState.updateCoupon.discountType,1)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.updateCoupon, \"discountType\", 1)}}}),_c('label',{attrs:{\"for\":\"discountTypePercentage\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_discounttype_percentage\")))])])])]),_c('div',{staticClass:\"form-group col-md-6\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_discount_value')))]),(!_vm.editMode)?[(_vm.couponsState.createCoupon.discountType === 0)?_c('div',{staticClass:\"input-group\"},[_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text primary\"},[_vm._v(\"$\")])]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.value),expression:\"couponsState.createCoupon.value\"}],staticClass:\"form-control\",attrs:{\"min\":0,\"type\":\"number\",\"placeholder\":_vm.translations.get('coupons_modal_value_absolute_placeholder')},domProps:{\"value\":(_vm.couponsState.createCoupon.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.createCoupon, \"value\", $event.target.value)}}})]):_vm._e(),(_vm.couponsState.createCoupon.discountType === 1)?_c('div',{staticClass:\"input-group\"},[_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text primary\"},[_vm._v(\"%\")])]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.value),expression:\"couponsState.createCoupon.value\"},{name:\"validate\",rawName:\"v-validate\",value:('min_value:0|max_value:100'),expression:\"'min_value:0|max_value:100'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('perValue')},attrs:{\"type\":\"number\",\"min\":0,\"max\":100,\"placeholder\":_vm.translations.get('coupons_modal_value_percentage_placeholder'),\"name\":\"perValue\",\"data-vv-as\":_vm.translations.get('coupons_modal_discount_value')},domProps:{\"value\":(_vm.couponsState.createCoupon.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.createCoupon, \"value\", $event.target.value)}}}),(_vm.errors.has('perValue'))?_c('span',{staticClass:\"error col-12\"},[_vm._v(_vm._s(_vm.errors.first('perValue')))]):_vm._e()]):_vm._e()]:[(_vm.couponsState.updateCoupon.discountType === 0)?_c('div',{staticClass:\"input-group\"},[_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text primary\"},[_vm._v(\"$\")])]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.value),expression:\"couponsState.updateCoupon.value\"}],staticClass:\"form-control\",attrs:{\"min\":0,\"type\":\"number\",\"placeholder\":_vm.translations.get('coupons_modal_value_absolute_placeholder')},domProps:{\"value\":(_vm.couponsState.updateCoupon.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.updateCoupon, \"value\", $event.target.value)}}})]):_vm._e(),(_vm.couponsState.updateCoupon.discountType === 1)?_c('div',{staticClass:\"input-group\"},[_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text primary\"},[_vm._v(\"%\")])]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.value),expression:\"couponsState.updateCoupon.value\"},{name:\"validate\",rawName:\"v-validate\",value:('min_value:0|max_value:100'),expression:\"'min_value:0|max_value:100'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('perValue')},attrs:{\"type\":\"number\",\"min\":0,\"max\":100,\"placeholder\":_vm.translations.get('coupons_modal_value_percentage_placeholder'),\"name\":\"perValue\",\"data-vv-as\":_vm.translations.get('coupons_modal_discount_value')},domProps:{\"value\":(_vm.couponsState.updateCoupon.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.updateCoupon, \"value\", $event.target.value)}}}),(_vm.errors.has('perValue'))?_c('span',{staticClass:\"error col-12\"},[_vm._v(_vm._s(_vm.errors.first('perValue')))]):_vm._e()]):_vm._e()]],2)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('div',{staticClass:\"form-group\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_usage_limit')))]),(!_vm.editMode)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.usageLimit),expression:\"couponsState.createCoupon.usageLimit\"},{name:\"validate\",rawName:\"v-validate\",value:('required|min_value:0'),expression:\"'required|min_value:0'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('couponsNum')},attrs:{\"type\":\"number\",\"placeholder\":_vm.translations.get('coupons_modal_usage_limit_placeholder'),\"min\":0,\"name\":\"couponsNum\",\"data-vv-as\":_vm.translations.get('coupons_modal_usage_limit')},domProps:{\"value\":(_vm.couponsState.createCoupon.usageLimit)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.createCoupon, \"usageLimit\", $event.target.value)}}}):_vm._e(),(_vm.editMode)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.usageLimit),expression:\"couponsState.updateCoupon.usageLimit\"},{name:\"validate\",rawName:\"v-validate\",value:('required|min_value:0'),expression:\"'required|min_value:0'\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('couponsNum')},attrs:{\"type\":\"number\",\"placeholder\":_vm.translations.get('coupons_modal_usage_limit_placeholder'),\"min\":0,\"name\":\"couponsNum\",\"data-vv-as\":_vm.translations.get('coupons_modal_usage_limit')},domProps:{\"value\":(_vm.couponsState.updateCoupon.usageLimit)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.couponsState.updateCoupon, \"usageLimit\", $event.target.value)}}}):_vm._e(),(_vm.errors.has('couponsNum'))?_c('span',{staticClass:\"error col-12\"},[_vm._v(_vm._s(_vm.errors.first('couponsNum')))]):_vm._e()])]),_c('div',{staticClass:\"form-group col-md-6\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('coupons_modal_coupon_type')))]),(!_vm.editMode)?_c('div',[_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.couponType),expression:\"couponsState.createCoupon.couponType\"}],attrs:{\"id\":\"couponTypeIndividual\",\"type\":\"radio\"},domProps:{\"value\":0,\"checked\":_vm._q(_vm.couponsState.createCoupon.couponType,0)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.createCoupon, \"couponType\", 0)}}}),_c('label',{attrs:{\"for\":\"couponTypeIndividual\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_coupontype_individual\")))])]),_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.createCoupon.couponType),expression:\"couponsState.createCoupon.couponType\"}],attrs:{\"id\":\"couponTypePartner\",\"type\":\"radio\"},domProps:{\"value\":1,\"checked\":_vm._q(_vm.couponsState.createCoupon.couponType,1)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.createCoupon, \"couponType\", 1)}}}),_c('label',{attrs:{\"for\":\"couponTypePartner\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_coupontype_partner\")))])])]):_c('div',[_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.couponType),expression:\"couponsState.updateCoupon.couponType\"}],attrs:{\"id\":\"couponTypeIndividual\",\"type\":\"radio\"},domProps:{\"value\":0,\"checked\":_vm._q(_vm.couponsState.updateCoupon.couponType,0)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.updateCoupon, \"couponType\", 0)}}}),_c('label',{attrs:{\"for\":\"couponTypeIndividual\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_coupontype_individual\")))])]),_c('div',{staticClass:\"radio radio-primary\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.couponsState.updateCoupon.couponType),expression:\"couponsState.updateCoupon.couponType\"}],attrs:{\"id\":\"couponTypePartner\",\"type\":\"radio\"},domProps:{\"value\":1,\"checked\":_vm._q(_vm.couponsState.updateCoupon.couponType,1)},on:{\"change\":function($event){return _vm.$set(_vm.couponsState.updateCoupon, \"couponType\", 1)}}}),_c('label',{attrs:{\"for\":\"couponTypePartner\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_coupontype_partner\")))])])])])]),(!_vm.editMode && _vm.couponsState.createCoupon.couponType === 1)?_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-12\"},[_c('label',{attrs:{\"for\":\"partnersDropdown\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_partners_dropdown_title\")))]),_c('v-select',{attrs:{\"label\":\"name\",\"options\":_vm.couponsState.partners},model:{value:(_vm.couponsState.partner),callback:function ($$v) {_vm.$set(_vm.couponsState, \"partner\", $$v)},expression:\"couponsState.partner\"}},[_c('span',{attrs:{\"slot\":\"no-options\"},slot:\"no-options\"},[_vm._v(_vm._s(_vm.translations.get(\"no_options\")))])])],1)]):_vm._e(),(_vm.editMode && _vm.couponsState.updateCoupon.couponType === 1)?_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-12\"},[_c('label',{attrs:{\"for\":\"partnersDropdown\"}},[_vm._v(_vm._s(_vm.translations.get(\"coupons_partners_dropdown_title\")))]),_c('v-select',{attrs:{\"label\":\"name\",\"options\":_vm.couponsState.partners},model:{value:(_vm.couponsState.partner),callback:function ($$v) {_vm.$set(_vm.couponsState, \"partner\", $$v)},expression:\"couponsState.partner\"}},[_c('span',{attrs:{\"slot\":\"no-options\"},slot:\"no-options\"},[_vm._v(_vm._s(_vm.translations.get(\"no_options\")))])])],1)]):_vm._e(),(_vm.editMode)?_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6\"},[_c('label',[_vm._v(_vm._s(_vm.translations.get('enabled')))]),_c('div',[_c('vToggleSwitch',{on:{\"toggled\":function($event){_vm.couponsState.updateCoupon.isActive = !_vm.couponsState.updateCoupon.isActive}},model:{value:(_vm.couponsState.updateCoupon.isActive),callback:function ($$v) {_vm.$set(_vm.couponsState.updateCoupon, \"isActive\", $$v)},expression:\"couponsState.updateCoupon.isActive\"}})],1)])]):_vm._e(),_c('div',{staticClass:\"form-row\"},[(!_vm.editMode)?_c('button',{staticClass:\"btn btn-primary btn-cons m-t-10\",attrs:{\"type\":\"submit\"}},[_vm._v(_vm._s(_vm.translations.get(\"submit\")))]):_vm._e(),(_vm.editMode)?_c('button',{staticClass:\"btn btn-primary btn-cons m-t-10\",attrs:{\"type\":\"submit\"}},[_vm._v(_vm._s(_vm.translations.get(\"save\")))]):_vm._e(),_c('button',{staticClass:\"btn btn-cons m-t-10\",attrs:{\"type\":\"reset\"},on:{\"click\":_vm.resetState}},[_vm._v(_vm._s(_vm.translations.get(\"cancel\")))])])])]),_c('vModal',{attrs:{\"show\":_vm.showRemovePrompt,\"modal-title\":_vm.removePromptTitle},on:{\"cancelModal\":_vm.resetState}},[_c('form',{staticClass:\"p-t-15\",attrs:{\"role\":\"form\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.confirmDelete.apply(null, arguments)}}},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6\"},[_c('button',{staticClass:\"btn btn-primary btn-cons m-t-10\",attrs:{\"type\":\"submit\"}},[_vm._v(_vm._s(_vm.translations.get(\"yes\")))]),_c('button',{staticClass:\"btn btn-cons m-t-10\",attrs:{\"type\":\"reset\"},on:{\"click\":_vm.resetState}},[_vm._v(_vm._s(_vm.translations.get(\"cancel\")))])])])])])],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Partner from '../Partner/Partner';\r\n\r\nexport default interface Coupon {\r\n partner: Partner;\r\n isActive: boolean;\r\n partnerId: any;\r\n usageLimit: number;\r\n expiryDate: any;\r\n value: number;\r\n discountType: DiscountType;\r\n couponType: CouponType;\r\n name: string;\r\n code: string;\r\n createdOn: any;\r\n id: number;\r\n numberOfUsages: number\r\n}\r\n\r\nexport enum DiscountType {\r\n Absolute, Percentage\r\n}\r\n\r\nexport enum CouponStatus {\r\n Active, Inactive\r\n}\r\n\r\nexport enum CouponType {\r\n Individual, Partner\r\n}","\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\n\r\nimport ListRequest, { Filter, Ordering, OrderType } from \"@/models/ListRequest\";\r\nimport Coupon, {\r\n DiscountType,\r\n CouponType,\r\n} from \"@/models/Coupon/Coupon\";\r\nimport CreateCoupon from \"@/models/Coupon/CreateCoupon\";\r\nimport UpdateCoupon from \"@/models/Coupon/UpdateCoupon\";\r\nimport { mapState } from \"vuex\";\r\nimport CouponsRepository from \"@/utils/API/CouponsRepository\";\r\nimport { TRANSLATIONS_FETCH, PARTNERS_REDIRECT } from \"@/store/ActionTypes\";\r\nimport Partner from \"@/models/Partner/Partner\";\r\nimport PartnersRepository from \"@/utils/API/PartnersRepository\";\r\nimport { dateDisplayFormat, dateTimeDisplayFormat } from \"@/utils/Defaults\";\r\n\r\nimport vTable from \"@/components/vTable.vue\";\r\nimport vModal from \"@/components/vModal.vue\";\r\nimport vToggleSwitch from \"@/components/vToggleSwitch.vue\";\r\n\r\ninterface CouponsState {\r\n /**\r\n * Number of packages displayed on the grid\r\n */\r\n count: number;\r\n /**\r\n * Total entries in the grid\r\n */\r\n totalCount: number;\r\n /**\r\n * List of coupons in the system determined by page and page size\r\n */\r\n coupons: Coupon[];\r\n /**\r\n * Current page on the grid\r\n */\r\n page: number;\r\n /**\r\n * Maximum visible rows in the grid\r\n */\r\n pageSize: number;\r\n /**\r\n * List of filters\r\n */\r\n filters: Filter[];\r\n /**\r\n * Ordering\r\n */\r\n orders: Ordering;\r\n\r\n /**\r\n * Model for coupon creation\r\n */\r\n createCoupon: CreateCoupon;\r\n /**\r\n * Model for coupon edit\r\n */\r\n updateCoupon: UpdateCoupon;\r\n /**\r\n * List of coupon ids to be removed\r\n */\r\n removeList: number[];\r\n\r\n /**\r\n * List of partners for creating partner coupon\r\n */\r\n partners: Partner[];\r\n\r\n /**\r\n * Chosen partner for creating partner coupon\r\n */\r\n partner: Partner;\r\n\r\n /**\r\n * Is the grid loading?\r\n */\r\n tableLoading: boolean;\r\n}\r\n\r\n@Component({\r\n components: {\r\n vTable,\r\n vModal,\r\n vToggleSwitch,\r\n },\r\n computed: {\r\n ...mapState({\r\n localizationState: (state: any) => state.LocalizationModule\r\n })\r\n }\r\n})\r\nclass Coupons extends Vue {\r\n localizationState: any;\r\n\r\n couponsState: CouponsState = {\r\n count: 0,\r\n totalCount: 0,\r\n coupons: [],\r\n page: 1,\r\n pageSize: 25,\r\n filters: [],\r\n orders: { field: \"\", orderType: OrderType.Asc },\r\n createCoupon: {\r\n partnerId: 0,\r\n name: \"\",\r\n usageLimit: 0,\r\n expiryDate: null,\r\n value: 0,\r\n discountType: DiscountType.Absolute,\r\n couponType: CouponType.Individual\r\n },\r\n updateCoupon: {\r\n id: 0,\r\n name: \"\",\r\n discountType: DiscountType.Absolute,\r\n couponType: CouponType.Individual,\r\n isActive: false,\r\n partnerId: 0,\r\n usageLimit: 0,\r\n expiryDate: null,\r\n value: 0\r\n },\r\n removeList: [],\r\n\r\n partners: [],\r\n partner: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n phone: \"\",\r\n email: \"\",\r\n couponsCount: 0\r\n },\r\n\r\n tableLoading: false\r\n };\r\n\r\n // Properties for vTable grid\r\n selectErase = true;\r\n searchable = true;\r\n editableTable = true;\r\n\r\n // Modal properties\r\n showModal = false;\r\n modalTitle = \"\";\r\n showRemovePrompt = false;\r\n removePromptTitle = \"\";\r\n\r\n editMode = false;\r\n\r\n // Datepicker option object to disable dates before today\r\n disabledDates = {\r\n to: new Date()\r\n };\r\n\r\n /**\r\n * Method used by the grid after catching the 'changePage'\r\n * event from vTable\r\n *\r\n * @param {any} args\r\n */\r\n changePage(args: any) {\r\n const orderings: Ordering[] = [];\r\n orderings.push({ ...args[3] });\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: args[0],\r\n pageSize: this.couponsState.pageSize,\r\n filters: args[2],\r\n orders: orderings\r\n })\r\n );\r\n this.couponsState.page = args[0];\r\n this.couponsState.orders = { ...args[3] };\r\n this.couponsState.filters = [...args[2]];\r\n }\r\n\r\n /**\r\n * Method used by the grid after catching the 'search'\r\n * event from vTable\r\n *\r\n * @param {Filter[]} filters\r\n * @param {Ordering} ordering\r\n */\r\n search(filters: Filter[], ordering: Ordering) {\r\n const orderings: Ordering[] = [];\r\n orderings.push({ ...ordering });\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: 1,\r\n pageSize: this.couponsState.pageSize,\r\n filters: filters,\r\n orders: orderings\r\n })\r\n );\r\n\r\n this.couponsState.page = 1;\r\n this.couponsState.orders = { ...ordering };\r\n this.couponsState.filters = [...filters];\r\n }\r\n\r\n /**\r\n * Method used by the grid after catching the 'order'\r\n * event from vTable\r\n *\r\n * @param {Filter[]} filters\r\n * @param {Ordering} ordering\r\n */\r\n order(filters: Filter[], ordering: Ordering) {\r\n const orderings: Ordering[] = [];\r\n orderings.push({ ...ordering });\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: this.couponsState.page,\r\n pageSize: this.couponsState.pageSize,\r\n filters: filters,\r\n orders: orderings\r\n })\r\n );\r\n\r\n this.couponsState.orders = { ...ordering };\r\n this.couponsState.filters = [...filters];\r\n }\r\n\r\n /**\r\n * Method that resets most variables and closes all modals.\r\n */\r\n resetState() {\r\n this.showModal = false;\r\n this.editMode = false;\r\n this.modalTitle = this.translations.get(\"coupons_modal_title_add\");\r\n\r\n this.showRemovePrompt = false;\r\n this.removePromptTitle = \"\";\r\n\r\n this.couponsState.updateCoupon = {\r\n id: 0,\r\n name: \"\",\r\n discountType: DiscountType.Absolute,\r\n couponType: CouponType.Individual,\r\n isActive: false,\r\n partnerId: 0,\r\n usageLimit: 0,\r\n expiryDate: null,\r\n value: 0\r\n };\r\n\r\n this.couponsState.createCoupon = {\r\n partnerId: 0,\r\n name: \"\",\r\n usageLimit: 0,\r\n expiryDate: null,\r\n value: 0,\r\n discountType: DiscountType.Absolute,\r\n couponType: CouponType.Individual\r\n };\r\n\r\n this.couponsState.partner = {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n phone: \"\",\r\n email: \"\",\r\n couponsCount: 0\r\n };\r\n }\r\n\r\n /**\r\n * Method for edit / add package modal toggling\r\n */\r\n toggleModal() {\r\n this.showModal = !this.showModal;\r\n }\r\n\r\n /**\r\n * Getter for grid headers. Done this way because headers are translatable and async\r\n */\r\n get tableHeaders() {\r\n return [\r\n {\r\n name: this.translations.get(\"coupons_table_header_name\"),\r\n key: \"Name\",\r\n searchable: true,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_code\"),\r\n key: \"Code\",\r\n searchable: true,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_partner\"),\r\n key: \"Partner\",\r\n searchable: true,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_created_date\"),\r\n key: \"CreatedOn\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_status\"),\r\n key: \"IsActive\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_type\"),\r\n key: \"CouponType\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_expiry_date\"),\r\n key: \"ExpiryDate\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_discount_type\"),\r\n key: \"DiscountType\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_value\"),\r\n key: \"Value\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_header_limit\"),\r\n key: \"UsageLimit\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n },\r\n {\r\n name: this.translations.get(\"coupons_table_used_coupons\"),\r\n key: \"NumberOfUsages\",\r\n searchable: false,\r\n searchString: \"\",\r\n sortable: true\r\n }\r\n ];\r\n }\r\n\r\n /**\r\n * Setting modal title for Adding new coupon and toggling the modal\r\n */\r\n prepareAddMode() {\r\n this.modalTitle = this.translations.get(\"coupons_modal_title_add\");\r\n\r\n this.toggleModal();\r\n }\r\n\r\n /**\r\n * Populating form and toggling the modal for editing coupon.\r\n * Sets the edit mode to true and toggling the modal\r\n *\r\n * @param {number} id Id of the package\r\n */\r\n prepareEditMode(id: number) {\r\n this.editMode = true;\r\n this.modalTitle = this.translations.get(\"coupons_modal_title_edit\");\r\n\r\n let found = this.couponsState.coupons.find((c) => c.id === id);\r\n\r\n if (typeof found !== \"undefined\") {\r\n let temp: UpdateCoupon = {\r\n id: found.id,\r\n name: found.name,\r\n discountType: found.discountType,\r\n couponType: found.couponType,\r\n isActive: found.isActive,\r\n partnerId: found.partnerId,\r\n usageLimit: found.usageLimit,\r\n expiryDate: found.expiryDate,\r\n value: found.value\r\n };\r\n\r\n this.couponsState.updateCoupon = { ...temp };\r\n this.couponsState.partner = { ...found.partner };\r\n\r\n this.toggleModal();\r\n }\r\n }\r\n\r\n /**\r\n * Method for displaying prompt message for selected coupons to be deleted\r\n *\r\n * @param {number[]} ids Package ids\r\n */\r\n prepareDeletePrompt(ids: number[]) {\r\n this.couponsState.removeList = ids;\r\n this.removePromptTitle = this.translations.get(\r\n \"coupons_delete_prompt_message\",\r\n ids.length\r\n );\r\n this.showRemovePrompt = true;\r\n }\r\n\r\n /**\r\n * Method for deleting selected coupons and refreshing the grid.\r\n */\r\n confirmDelete() {\r\n // @ts-ignore\r\n this.$snotify.async(\r\n this.translations.get(\r\n \"coupons_toastr_deleting\",\r\n this.couponsState.removeList.length\r\n ),\r\n () =>\r\n new Promise((resolve, reject) => {\r\n CouponsRepository.deleteCoupons({\r\n coupons: this.couponsState.removeList\r\n })\r\n .then(() => {\r\n resolve({\r\n body: this.translations.get(\r\n \"coupons_toastr_deleted\",\r\n this.couponsState.removeList.length\r\n )\r\n });\r\n\r\n this.couponsState.page = 1;\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: this.couponsState.page,\r\n pageSize: this.couponsState.pageSize,\r\n filters: this.couponsState.filters,\r\n orders: [this.couponsState.orders]\r\n })\r\n );\r\n })\r\n .catch((error) => {\r\n let message = \"\";\r\n if (error.response) {\r\n message =\r\n error.response.data.errorMessages[0].userVisibleMessage;\r\n }\r\n else {\r\n message = this.translations.get(\"network_error\");\r\n }\r\n reject({ body: message });\r\n });\r\n }),\r\n {\r\n timeout: 3000,\r\n closeOnClick: true\r\n }\r\n );\r\n this.resetState();\r\n }\r\n\r\n /**\r\n * Router method for submitting to API\r\n */\r\n submit() {\r\n this.$validator.validateAll().then((result) => {\r\n if (result) {\r\n if (this.editMode) {\r\n this.submitUpdate();\r\n }\r\n else {\r\n this.submitNew();\r\n }\r\n return;\r\n }\r\n this.$snotify.error(this.translations.get(\"validation-error-message\"));\r\n });\r\n }\r\n\r\n /**\r\n * Method for submitting edit to api and refreshing the grid\r\n */\r\n submitUpdate() {\r\n let coupon = this.couponsState.coupons.find(\r\n (coupon) => coupon.id === this.couponsState.updateCoupon.id\r\n );\r\n\r\n if (\r\n typeof coupon !== \"undefined\" &&\r\n (coupon.name !== this.couponsState.updateCoupon.name ||\r\n coupon.discountType !== this.couponsState.updateCoupon.discountType ||\r\n coupon.couponType !== this.couponsState.updateCoupon.couponType ||\r\n coupon.isActive !== this.couponsState.updateCoupon.isActive ||\r\n coupon.partnerId !== this.couponsState.partner.id ||\r\n coupon.usageLimit !== this.couponsState.updateCoupon.usageLimit ||\r\n coupon.expiryDate !== this.couponsState.updateCoupon.expiryDate ||\r\n coupon.value !== this.couponsState.updateCoupon.value)\r\n ) {\r\n if (this.couponsState.updateCoupon.couponType === CouponType.Partner) {\r\n this.couponsState.updateCoupon.expiryDate = null;\r\n this.couponsState.updateCoupon.partnerId = this.couponsState.partner.id;\r\n }\r\n else {\r\n this.couponsState.updateCoupon.partnerId = null;\r\n }\r\n // @ts-ignore\r\n this.$snotify.async(\r\n this.translations.get(\"coupons_toastr_updating\"),\r\n () =>\r\n new Promise((resolve, reject) => {\r\n CouponsRepository.updateCoupon(this.couponsState.updateCoupon)\r\n .then((response) => {\r\n resolve({\r\n body: this.translations.get(\r\n \"coupons_toastr_updated\",\r\n this.couponsState.updateCoupon.name\r\n )\r\n });\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: this.couponsState.page,\r\n pageSize: this.couponsState.pageSize,\r\n filters: this.couponsState.filters,\r\n orders: [this.couponsState.orders]\r\n })\r\n );\r\n\r\n this.resetState();\r\n })\r\n .catch((error) => {\r\n let message = \"\";\r\n if (error.response) {\r\n message =\r\n error.response.data.errorMessages[0].userVisibleMessage;\r\n }\r\n else {\r\n message = this.translations.get(\"network_error\");\r\n }\r\n reject({ body: message });\r\n });\r\n }),\r\n {\r\n timeout: 3000,\r\n closeOnClick: true\r\n }\r\n );\r\n }\r\n else {\r\n this.$snotify.simple(this.translations.get(\"toastr_nochanges\"));\r\n this.resetState();\r\n }\r\n }\r\n\r\n /**\r\n * Method for submitting new coupon to api and refreshing the grid\r\n */\r\n submitNew() {\r\n if (this.couponsState.createCoupon.couponType === CouponType.Partner) {\r\n this.couponsState.createCoupon.expiryDate = null;\r\n this.couponsState.createCoupon.partnerId = this.couponsState.partner.id;\r\n }\r\n else {\r\n this.couponsState.createCoupon.partnerId = null;\r\n }\r\n\r\n // @ts-ignore\r\n this.$snotify.async(\r\n this.translations.get(\"coupons_toastr_adding\"),\r\n () =>\r\n new Promise((resolve, reject) => {\r\n CouponsRepository.createCoupon(this.couponsState.createCoupon)\r\n .then(() => {\r\n resolve({\r\n body: this.translations.get(\r\n \"coupons_toastr_added\",\r\n this.couponsState.createCoupon.name\r\n )\r\n });\r\n\r\n this.requestCoupons(\r\n new ListRequest({\r\n page: this.couponsState.page,\r\n pageSize: this.couponsState.pageSize,\r\n filters: this.couponsState.filters,\r\n orders: [this.couponsState.orders]\r\n })\r\n );\r\n\r\n this.resetState();\r\n })\r\n .catch((error) => {\r\n let message = \"\";\r\n if (error.response) {\r\n message =\r\n error.response.data.errorMessages[0].userVisibleMessage;\r\n }\r\n else {\r\n message = this.translations.get(\"network_error\");\r\n }\r\n reject({ body: message });\r\n });\r\n }),\r\n {\r\n timeout: 3000,\r\n closeOnClick: true\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Getter method to transform the list of coupons to grid data (vTable)\r\n */\r\n get transformCoupons() {\r\n return this.couponsState.coupons.map((element: Coupon) => {\r\n return {\r\n e1: element.code,\r\n e2: element.partnerId ? element.partner.name : \"\",\r\n e3: element.createdOn\r\n ? this.$moment(element.createdOn).format(dateTimeDisplayFormat)\r\n : \"\",\r\n e4: element.isActive\r\n ? {\r\n component: \"div\",\r\n props: { class: \"label label-success text-center\" },\r\n html: this.translations.get(\"active\")\r\n }\r\n : {\r\n component: \"div\",\r\n props: { class: \"label label-danger text-center\" },\r\n html: this.translations.get(\"inactive\")\r\n },\r\n e5:\r\n element.couponType === CouponType.Individual\r\n ? this.translations.get(\"coupons_type_individual\")\r\n : this.translations.get(\"coupons_type_partner\"),\r\n e6: element.expiryDate\r\n ? this.$moment(element.expiryDate).format(dateDisplayFormat) // element.expiryDate // this.$moment(this.testDate).format('YYYY')\r\n : this.translations.get(\"unlimited\"),\r\n e7:\r\n element.discountType === DiscountType.Absolute\r\n ? this.translations.get(\"coupons_discounttype_absolute\")\r\n : this.translations.get(\"coupons_discounttype_percentage\"),\r\n e8: element.value,\r\n e9: element.usageLimit,\r\n e10: element.numberOfUsages,\r\n meta: {\r\n id: element.id,\r\n link: element.name\r\n }\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Method for fetching coupons based on list request\r\n *\r\n * @param {ListRequest} listRequest\r\n */\r\n requestCoupons(listRequest: ListRequest) {\r\n this.couponsState.tableLoading = true;\r\n CouponsRepository.fetchCoupons(listRequest)\r\n .then((response) => {\r\n this.couponsState.count = response.data.count;\r\n this.couponsState.totalCount = response.data.totalCount;\r\n this.couponsState.coupons = response.data.result;\r\n\r\n this.couponsState.tableLoading = false;\r\n })\r\n .catch((error) => {\r\n if (error.response)\r\n this.$snotify.error(\r\n error.response.errorMessages[0].userVisibleMessage\r\n );\r\n else this.$snotify.error(this.translations.get(\"network-error\"));\r\n this.couponsState.tableLoading = false;\r\n });\r\n }\r\n\r\n mounted() {\r\n let request: ListRequest = { ...this.$store.getters.getListRequest };\r\n this.requestCoupons(request);\r\n // Reset redirect info if redirected from Partners\r\n this.$store.dispatch(\r\n PARTNERS_REDIRECT,\r\n new ListRequest({ page: 1, pageSize: 25 })\r\n );\r\n\r\n PartnersRepository.fetchPartners(\r\n new ListRequest({ page: 1, pageSize: 999 })\r\n )\r\n .then((response) => {\r\n this.couponsState.partners = response.data.result;\r\n })\r\n .catch((error) => {\r\n if (error.response)\r\n this.$snotify.error(\r\n error.response.errorMessages[0].userVisibleMessage\r\n );\r\n else this.$snotify.error(this.translations.get(\"network-error\"));\r\n });\r\n }\r\n\r\n created() {\r\n this.$store.dispatch(TRANSLATIONS_FETCH, {\r\n category: \"pages\",\r\n collections: [\"coupons\", \"common\"]\r\n });\r\n\r\n document.title = 'Coupons | MenuSano';\r\n }\r\n\r\n get translations() {\r\n return this.localizationState.translations;\r\n }\r\n}\r\nexport default Coupons;\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Coupons.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Coupons.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Coupons.vue?vue&type=template&id=4d07bceb&scoped=true\"\nimport script from \"./Coupons.vue?vue&type=script&lang=ts\"\nexport * from \"./Coupons.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Coupons.vue?vue&type=style&index=0&id=4d07bceb&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4d07bceb\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.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!./Coupons.vue?vue&type=style&index=0&id=4d07bceb&prod&scoped=true&lang=css\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('transition',{attrs:{\"name\":\"modal\",\"role\":\"dialog\"}},[(_vm.show)?_c('div',{staticClass:\"modal-mask\"},[_c('div',{staticClass:\"modal-wrapper\",attrs:{\"id\":_vm.modalId}},[_c('div',{staticClass:\"modal-dialog\",class:{'modal-small':_vm.size === 's', 'modal-medium':_vm.size==='m' || typeof _vm.size === 'undefined', 'modal-large':_vm.size === 'l', 'modal-x-large':_vm.size === 'xl'}},[_c('div',{staticClass:\"modal-content\"},[_c('div',{staticClass:\"modal-header\"},[_c('h3',{staticClass:\"modal-title\"},[_vm._v(_vm._s(_vm.modalTitle))]),_c('button',{staticClass:\"close\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.cancelModal}},[_c('span',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"×\")])])]),_c('div',{staticClass:\"modal-body\"},[_vm._t(\"default\")],2)])])])]):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport { Vue, Component, Prop, Watch } from \"vue-property-decorator\";\r\n\r\n@Component\r\nexport default class vModal extends Vue {\r\n @Prop() show!: boolean;\r\n @Prop() modalTitle!: string;\r\n @Prop() size?: string;\r\n @Prop() modalId?: string;\r\n\r\n @Watch(\"show\")\r\n showModal() {\r\n let htmlBodyElement = document.getElementsByTagName(\"body\")[0];\r\n if (this.show) {\r\n htmlBodyElement.classList.add(\"modalOpen\");\r\n this.$emit(\"openModal\");\r\n }\r\n\r\n else {\r\n htmlBodyElement.classList.remove(\"modalOpen\");\r\n }\r\n }\r\n\r\n hideModal() {\r\n this.$emit(\"hideModal\");\r\n }\r\n\r\n cancelModal() {\r\n this.$emit(\"cancelModal\");\r\n }\r\n\r\n mounted() {\r\n document.addEventListener(\"keydown\", (e) => {\r\n if (this.show && e.keyCode == 27) {\r\n this.cancelModal();\r\n }\r\n });\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./vModal.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./vModal.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./vModal.vue?vue&type=template&id=88baf142&scoped=true\"\nimport script from \"./vModal.vue?vue&type=script&lang=ts\"\nexport * from \"./vModal.vue?vue&type=script&lang=ts\"\nimport style0 from \"./vModal.vue?vue&type=style&index=0&id=88baf142&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"88baf142\",\n null\n \n)\n\nexport default component.exports","import Repository from './Repository';\r\nimport ListRequest from '@/models/ListRequest';\r\nimport NewPartner from '@/models/Partner/NewPartner';\r\nimport UpdatePartner from '@/models/Partner/UpdatePartner';\r\nimport DeletePartners from '@/models/Partner/DeletePartners';\r\n\r\nconst resource = '/partners';\r\n\r\nexport default {\r\n fetchPartners(listRequest: ListRequest) {\r\n return Repository.post(`${resource}/listpartners`, listRequest, {withCredentials: true});\r\n },\r\n newPartner(newPartner: NewPartner) {\r\n return Repository.post(`${resource}/createPartner`, newPartner, {withCredentials: true});\r\n },\r\n updatePartner(updatePartner: UpdatePartner) {\r\n return Repository.post(`${resource}/updatePartner`, updatePartner, {withCredentials: true});\r\n },\r\n deletePartner(deletePartners: DeletePartners) {\r\n return Repository.post(`${resource}/deletePartners`, deletePartners, {withCredentials: true});\r\n },\r\n};\r\n"],"sourceRoot":""}