%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/insurance.js.map |
{"version":3,"file":"components/insurance.js","sources":["webpack:///./components/slots/Block.vue?a39f","webpack:///./components/slots/Block.vue","webpack:///./components/slots/Block.vue?8d1a","webpack:///./components/slots/Block.vue?1f5b","webpack:///./assets/images/icons/pdf-icon.svg","webpack:///./components/blocks/Account/verification/Insurance.vue","webpack:///./components/blocks/Account/verification/Insurance.vue?7a90","webpack:///./components/blocks/Account/verification/Insurance.vue?7c93","webpack:///./components/blocks/Account/verification/Insurance.vue?61d1"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8\"},[_vm._ssrNode(\"<div class=\\\"max-w-xl mx-auto w-full\\\"><header class=\\\"text-center mb-10\\\"><h2\"+(_vm._ssrClass(\"text-2xl sm:text-3xl font-bold\",_vm.description ? 'mb-8' : ''))+\">\"+_vm._ssrEscape(_vm._s(_vm.title))+\"</h2> \"+((_vm.description)?(\"<p class=\\\"text-sm sm:text-base\\\">\"+_vm._ssrEscape(_vm._s(_vm.description))+\"</p>\"):\"<!---->\")+\"</header></div> \"),_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"mx-auto w-full\",_vm.width ? _vm.width : 'max-w-xl'))+\">\",\"</div>\",[_vm._t(\"default\")],2)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n props: {\n title: {\n type: String,\n required: true\n },\n description: {\n type: String,\n required: false\n },\n width: {\n type: String,\n required: false,\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Block.vue?vue&type=template&id=0e972406&\"\nimport script from \"./Block.vue?vue&type=script&lang=js&\"\nexport * from \"./Block.vue?vue&type=script&lang=js&\"\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 \"127f880a\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Header: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/Header.vue').default})\n","module.exports = __webpack_public_path__ + \"img/pdf-icon.c2fee35.svg\";","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n data() {\n return {\n working: false,\n\n insurance: {\n name: '',\n renewal_date: '',\n file: '',\n file_preview: {\n name: null,\n type: null,\n url: null\n }\n }\n }\n },\n\n async mounted() {\n this.$axios.$post('/account/verification/insurance').then((response) => {\n this.insurance = response.data;\n })\n },\n\n methods: {\n handleFileInput(e) {\n let fileData = this.$refs.insurancefile.files[0];\n\n this.insurance.file = fileData;\n this.insurance.file_preview.name = fileData.name;\n this.insurance.file_preview.type = fileData.type;\n this.insurance.file_preview.url = URL.createObjectURL(fileData);\n },\n\n async saveInsurance() {\n this.$refs.form.validate().then(success => {\n if (!success) {\n return;\n }\n \n this.working = true;\n\n let formData = new FormData();\n formData.append('file', this.insurance.file);\n formData.append('existing_file', JSON.stringify(this.insurance.file_preview));\n formData.append('name', this.insurance.name);\n formData.append('date', this.insurance.renewal_date);\n\n this.$axios.$post('/account/verification/insurance/create', formData, {\n headers: { 'Content-Type': 'multipart/form-data' }\n }).then((response) => {\n this.insurance = response.data;\n this.$toast.success('Successfully saved your insurance').goAway(1500);\n this.working = false;\n }).catch(error => {\n this.working = false;\n this.$refs.form.setErrors(error.response.data.errors);\n })\n })\n },\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{\"title\":\"Insurance\",\"description\":\"Please provide valid details of professional insurance. Please upload a copy by using the choose file button\",\"width\":\"max-w-3xl\"}},[_c('ValidationObserver',{ref:\"form\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.saveInsurance($event)}}},[_c('div',{staticClass:\"grid grid-cols-2 gap-x-8\"},[_c('t-input-group',{attrs:{\"label\":\"Insurer\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"insurer\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input',{attrs:{\"name\":\"insurance-name\",\"id\":\"'insurance-name\",\"placeholder\":\"e.g. Premierline\"},model:{value:(_vm.insurance.name),callback:function ($$v) {_vm.$set(_vm.insurance, \"name\", $$v)},expression:\"insurance.name\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(\" \"),_c('t-input-group',{attrs:{\"label\":\"Renewal Date\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"date\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-datepicker',{model:{value:(_vm.insurance.renewal_date),callback:function ($$v) {_vm.$set(_vm.insurance, \"renewal_date\", $$v)},expression:\"insurance.renewal_date\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1)],1),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"\",\"vid\":\"file_url\"},scopedSlots:_vm._u([{key:\"default\",fn:function(x){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.insurance.file_preview.name),expression:\"insurance.file_preview.name\"}],attrs:{\"type\":\"hidden\",\"name\":\"file_url\"},domProps:{\"value\":(_vm.insurance.file_preview.name)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.insurance.file_preview, \"name\", $event.target.value)}}})]}}])}),_vm._v(\" \"),_c('ValidationProvider',{ref:\"fileProvider\",attrs:{\"rules\":\"required_if:file_url,null|size:10000\",\"name\":\"file\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar validate = ref.validate;\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"mb-6\"},[(_vm.insurance.file_preview.name)?_c('div',{staticClass:\"flex items-center\"},[(_vm.insurance.file_preview.type == 'application/pdf' || _vm.insurance.file_preview.type == 'pdf')?_c('img',{staticClass:\"w-12 mr-5\",attrs:{\"src\":require(\"assets/images/icons/pdf-icon.svg\"),\"alt\":\"PDF\"}}):_c('img',{staticClass:\"w-12 mr-5\",attrs:{\"src\":require(\"assets/images/icons/pdf-icon.svg\"),\"alt\":\"PDF\"}}),_vm._v(\" \"),_c('div',{staticClass:\"relative\"},[_c('span',{staticClass:\"block text-md font-medium\"},[_vm._v(_vm._s(_vm.insurance.file_preview.name))]),_vm._v(\" \"),_c('label',{staticClass:\"uppercase text-blue-light text-sm cursor-pointer\",attrs:{\"for\":\"insurancefile\"}},[_vm._v(\"\\n Replace\\n \"),_c('input',{ref:\"insurancefile\",staticClass:\"hidden\",attrs:{\"type\":\"file\",\"id\":\"insurancefile\"},on:{\"change\":function($event){return _vm.handleFileInput()}}})])])]):_c('div',[_c('label',{staticClass:\"block w-full p-4 border border-dashed border-black border-opacity-20 rounded-md hover:bg-black hover:bg-opacity-10 hover:text-black transition cursor-pointer text-center\",attrs:{\"for\":\"insurancefile\"}},[_c('input',{ref:\"insurancefile\",staticClass:\"hidden\",attrs:{\"type\":\"file\",\"id\":\"insurancefile\"},on:{\"change\":function($event){return _vm.handleFileInput()}}}),_vm._v(\" \"),_c('span',{staticClass:\"text-sm text-black\"},[_vm._v(\"Click here to choose file\")])])]),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()])]}}])}),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center mb-10\"},[_c('button',{staticClass:\"btn btn-small btn-primary rounded-full\",attrs:{\"disabled\":_vm.working == true,\"type\":\"submit\"}},[(_vm.working == false)?_c('span',[_vm._v(\"Save Details\")]):_c('span',{staticClass:\"flex items-center justify-center\"},[_c('svg',{staticClass:\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\"}},[_c('circle',{staticClass:\"opacity-25\",attrs:{\"cx\":\"12\",\"cy\":\"12\",\"r\":\"10\",\"stroke\":\"currentColor\",\"stroke-width\":\"4\"}}),_vm._v(\" \"),_c('path',{staticClass:\"opacity-75\",attrs:{\"fill\":\"currentColor\",\"d\":\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"}})]),_vm._v(\" \"),_c('span',[_vm._v(\"Processing\")])])])])],1)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Insurance.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Insurance.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Insurance.vue?vue&type=template&id=6cd2752c&\"\nimport script from \"./Insurance.vue?vue&type=script&lang=js&\"\nexport * from \"./Insurance.vue?vue&type=script&lang=js&\"\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 \"60da2899\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Block: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/slots/Block.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AATA;AADA;;AClBA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAJA;AAHA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApCA;AAxBA;;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}