{"version":3,"sources":["webpack:///./src/views/pages/admin/demo-requests.vue?0313","webpack:///src/views/pages/admin/demo-requests.vue","webpack:///./src/views/pages/admin/demo-requests.vue?3b6d","webpack:///./src/views/pages/admin/demo-requests.vue","webpack:///./src/http.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_s","title","_e","items","length","attrs","_l","req","key","id","_f","createdAt","companyName","personName","personEmail","staticRenderFns","components","Layout","data","isBusy","validations","created","load","computed","watch","methods","component","httpClient","axios","create","baseURL","process","headers","getAuthToken","localStorage","getItem","authInterceptor","config","interceptors","request","use","errorInterceptor","error","response","Promise","reject","status","console","message","removeItem","store","dispatch","router","push","responseInterceptor"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACA,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,oEAAoE,CAACF,EAAG,KAAK,CAACE,YAAY,QAAQ,CAACF,EAAG,OAAO,CAACE,YAAY,iBAAiB,CAACN,EAAIO,GAAG,IAAIP,EAAIQ,GAAGR,EAAIS,OAAO,KAAMT,EAAU,OAAEI,EAAG,OAAO,CAACE,YAAY,QAAQ,CAACF,EAAG,IAAI,CAACE,YAAY,4BAA4BN,EAAIU,eAAeN,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACF,EAAG,QAAQ,CAACE,YAAY,6CAA6C,CAACF,EAAG,QAAQ,CAACA,EAAG,KAAK,CAACA,EAAG,KAAK,CAACJ,EAAIO,GAAG,kBAAkBH,EAAG,KAAK,CAACJ,EAAIO,GAAG,eAAeH,EAAG,KAAK,CAACJ,EAAIO,GAAG,mBAAmBH,EAAG,KAAK,CAAC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AAmB,SAAAC,GAGrB,IAAKA,EAAMC,SAET,OAAOC,QAAQC,OAAOH,GAIxB,OAAOA,EAAMC,SAASG,QAClB,KAAK,IACDC,QAAQL,MAAMA,EAAMC,SAASG,OAAQJ,EAAMM,SAE3C,MAEJ,KAAK,IAGDd,aAAae,WAAW,gBACxBC,OAAMC,SAAS,eACfC,OAAOC,KAAK,UACZ,MAEJ,QACIN,QAAQL,MAAMA,EAAMC,SAASG,OAAQJ,EAAMM,SAInD,OAAOJ,QAAQC,OAAOH,IAIpBY,EAAsB,SAAAX,GACxB,OAAOA,EAASG,QACZ,KAAK,IAED,MAEJ,SAIJ,OAAOH,GAGXhB,EAAWW,aAAaK,SAASH,IAAIc,EAAqBb,GAE3Cd","file":"js/chunk-186bdf18.f075a57b.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Layout',[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"page-title-box d-flex align-items-center justify-content-between\"},[_c('h4',{staticClass:\"mb-0\"},[_c('span',{staticClass:\"title-content\"},[_vm._v(\" \"+_vm._s(_vm.title)+\" \"),(_vm.isBusy)?_c('span',{staticClass:\"mr-2\"},[_c('i',{staticClass:\"fa fa-spin fa-spinner\"})]):_vm._e()])])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"table-responsive\"},[_c('table',{staticClass:\"table table-striped table-sm table-hover \"},[_c('thead',[_c('tr',[_c('th',[_vm._v(\" Created At \")]),_c('th',[_vm._v(\" Company \")]),_c('th',[_vm._v(\" Person Name \")]),_c('th',[_vm._v(\" Person Email \")])])]),_c('tbody',[(_vm.items.length === 0)?_c('tr',[_c('td',{attrs:{\"colspan\":\"100\"}},[_c('span',{staticClass:\"text-muted\"},[_vm._v(\"No records found...\")])])]):_vm._e(),_vm._l((_vm.items),function(req){return _c('tr',{key:req.id},[_c('td',[_vm._v(\" \"+_vm._s(_vm._f(\"moment\")(req.createdAt,\"LLL\"))+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(req.companyName)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(req.personName)+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(req.personEmail)+\" \")])])})],2)])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./demo-requests.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./demo-requests.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./demo-requests.vue?vue&type=template&id=14cd8e35&\"\nimport script from \"./demo-requests.vue?vue&type=script&lang=js&\"\nexport * from \"./demo-requests.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 null\n \n)\n\nexport default component.exports","import axios from 'axios';\r\nimport router from './router/index'\r\nimport store from '@/state/store'\r\n\r\nconst httpClient = axios.create({\r\n baseURL: process.env.VUE_APP_BASE_URL,\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n // anything you want to add to the headers\r\n }\r\n});\r\n\r\nconst getAuthToken = () => 'Bearer ' + localStorage.getItem('access_token');\r\n\r\nconst authInterceptor = (config) => {\r\n config.headers['Authorization'] = getAuthToken();\r\n return config;\r\n}\r\n\r\nhttpClient.interceptors.request.use(authInterceptor);\r\n\r\n// interceptor to catch errors\r\nconst errorInterceptor = error => {\r\n \r\n // check if it's a server error\r\n if (!error.response) {\r\n //notify.warn('Network/Server error');\r\n return Promise.reject(error);\r\n }\r\n\r\n // all the other error responses\r\n switch(error.response.status) {\r\n case 400:\r\n console.error(error.response.status, error.message);\r\n // notify.warn('Nothing to display','Data Not Found');\r\n break;\r\n\r\n case 401: // authentication error, logout the user\r\n // debugger; // eslint-disable-line no-debugger\r\n //notify.warn( 'Please login again', 'Session Expired');\r\n localStorage.removeItem('access_token');\r\n store.dispatch('auth/logOut')\r\n router.push('/login');\r\n break;\r\n\r\n default:\r\n console.error(error.response.status, error.message);\r\n //notify.error('Server Error');\r\n\r\n }\r\n return Promise.reject(error);\r\n}\r\n\r\n// Interceptor for responses\r\nconst responseInterceptor = response => {\r\n switch(response.status) {\r\n case 200: \r\n // yay!\r\n break;\r\n // any other cases\r\n default:\r\n // default case\r\n }\r\n\r\n return response;\r\n}\r\n\r\nhttpClient.interceptors.response.use(responseInterceptor, errorInterceptor);\r\n\r\nexport default httpClient;"],"sourceRoot":""}