{"version":3,"sources":["webpack:///./src/pages/tips/Delete.vue?7ff0","webpack:///./src/pages/tips/Delete.vue","webpack:///./src/pages/tips/Delete.vue?3c4d","webpack:///./src/pages/tips/Delete.vue?08c5"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","active","staticClass","on","$event","preventDefault","save","_v","tip","summary","toLowerCase","substr","isLoading","model","value","callback","$$v","confirmation","expression","name","$t","validated","_e","staticRenderFns","component","Base","extend","data","undefined","computed","mounted","gettip","methods","get","$route","params","id","then","delete","$router","push","$emit"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,UAAU,CAACF,EAAG,UAAU,CAACE,MAAM,CAAC,OAASN,EAAIO,OAAO,cAAa,IAAQ,CAACH,EAAG,OAAO,CAACI,YAAY,aAAaC,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,UAAU,CAACR,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,IAAI,CAACI,YAAY,oBAAoB,CAACR,EAAIa,GAAG,uBAAwBb,EAAO,IAAE,CAACI,EAAG,UAAU,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQ,gBAAiBN,EAAIc,IAAIC,QAAQC,cAAcC,OAAO,EAAE,GAAG,iBAAkB,CAACb,EAAG,UAAU,CAACE,MAAM,CAAC,SAAWN,EAAIkB,WAAWC,MAAM,CAACC,MAAOpB,EAAgB,aAAEqB,SAAS,SAAUC,GAAMtB,EAAIuB,aAAaD,GAAKE,WAAW,mBAAmB,IAAI,GAAGpB,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,IAAM,WAAW,GAAK,CAACmB,KAAM,aAAa,MAAQzB,EAAI0B,GAAG,SAAS,YAAY,WAAWtB,EAAG,WAAW,CAACE,MAAM,CAAC,SAAWN,EAAIkB,YAAelB,EAAI2B,UAAU,MAAQ,SAAS,KAAO,YAAY,cAAc,aAAa,IAAI3B,EAAI4B,MAAM,MAAM,IAC1hCC,EAAkB,G,YCgDhBC,EAAYC,EAAA,KAAKC,OAAO,CAC1BC,KAD0B,WAEtB,MAAO,CACH1B,QAAQ,EACRgB,aAAc,GACdT,SAAKoB,IAGbC,SAAU,CACNR,UADM,WAEF,OAAO1B,KAAKsB,eAAiBtB,KAAKa,IAAIC,QAAQC,cAAcC,OAAO,EAAG,KAG9EmB,QAb0B,WActBnC,KAAKM,QAAS,EACdN,KAAKoC,UAETC,QAAS,CACLD,OADK,WACC,WACFpC,KAAKsC,IAAL,eAA+BtC,KAAKuC,OAAOC,OAAOC,KAAMC,MAAK,YAAa,IAAVV,EAAU,EAAVA,KAC5D,EAAKnB,IAAMmB,EAAKA,SAGxBrB,KANK,WAMD,WACIX,KAAK0B,WACL1B,KAAK2C,OAAL,eAAoB3C,KAAKa,IAAI4B,KAAMC,MAAK,WACpC,EAAKE,QAAQC,KAAK,CAAErB,KAAM,cAC1B,EAAKsB,MAAM,iBAOhB,ICnFoY,I,YCO/Y,EAAY,eACd,EACAhD,EACA8B,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-2d207407.d78f5647.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('portal',{attrs:{\"to\":\"modal\"}},[_c('b-modal',{attrs:{\"active\":_vm.active,\"can-cancel\":false}},[_c('form',{staticClass:\"modal-card\",on:{\"submit\":function($event){$event.preventDefault();return _vm.save()}}},[_c('header',{staticClass:\"modal-card-head\"},[_c('p',{staticClass:\"modal-card-title\"},[_vm._v(\" Delete a post \")])]),(_vm.tip)?[_c('section',{staticClass:\"modal-card-body\"},[_c('b-field',{attrs:{\"label\":'Please type \\''+_vm.tip.summary.toLowerCase().substr(0,5)+'\\' to confirm'}},[_c('b-input',{attrs:{\"disabled\":_vm.isLoading},model:{value:(_vm.confirmation),callback:function ($$v) {_vm.confirmation=$$v},expression:\"confirmation\"}})],1)],1),_c('footer',{staticClass:\"modal-card-foot\"},[_c('sp-link',{attrs:{\"tag\":\"b-button\",\"to\":{name: 'tips.list'},\"label\":_vm.$t('close'),\"icon-left\":\"times\"}}),_c('b-button',{attrs:{\"disabled\":_vm.isLoading || ! _vm.validated,\"label\":\"Delete\",\"type\":\"is-danger\",\"native-type\":\"submit\"}})],1)]:_vm._e()],2)])],1)}\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\nimport Base from '@/mixins/Base.vue';\nimport { ITip, ITipResponse } from '@/interfaces/tip';\n\nconst component = Base.extend({\n data() {\n return {\n active: false,\n confirmation: '',\n tip: undefined as any | ITip,\n };\n },\n computed: {\n validated() : boolean {\n return this.confirmation === this.tip.summary.toLowerCase().substr(0, 5);\n },\n },\n mounted() {\n this.active = true;\n this.gettip();\n },\n methods: {\n gettip(): void {\n this.get(`tips/${this.$route.params.id}`).then(({ data }) => {\n this.tip = data.data;\n });\n },\n save(): void {\n if (this.validated) {\n this.delete(`tips/${this.tip.id}`).then(() => {\n this.$router.push({ name: 'tips.list' });\n this.$emit('reload');\n });\n }\n },\n },\n});\n\nexport default component;\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!./Delete.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!./Delete.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=dc1c61a6&\"\nimport script from \"./Delete.vue?vue&type=script&lang=ts&\"\nexport * from \"./Delete.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}