{"version":3,"sources":["webpack:///./src/mixins/pointage.js","webpack:///./src/services/pointage.js","webpack:///./src/pages/Reclamation/Reclamation.vue?991a","webpack:///./src/services/employee.js","webpack:///./src/pages/Reclamation/reclamation.js","webpack:///./src/pages/Reclamation/reclamation.js?bef8","webpack:///./src/pages/Reclamation/Reclamation.vue"],"names":["platform","require","data","support","reason","undefined","title","message","profile","isSubmitting","computed","mapGetters","isLoading","device","description","split","browser","created","this","getChargePlanning","getLastestScan","methods","today","Date","year","getFullYear","month","getMonth","date","getDate","start","getTime","end","pointageService","pointings","vue","profileService","then","response","success","resetData","httpClient","get","getVitaphone","getCode","render","_vm","_h","$createElement","_c","_self","staticClass","_v","_s","$t","attrs","_e","errorMasterReclamation","domProps","email","directives","name","rawName","value","expression","reasons","model","callback","$$v","$set","errors","has","first","on","$event","preventDefault","submitReclamation","apply","arguments","staticRenderFns","employeeService","checkReclaimation","submitReclaimation","post","agency","isReset","mixins","Utils","pointage","checkIfAllowed","getMyAgency","init","appVersion","mapActions","send","$validator","validateAll","result","isSent","firstName","messages","versionApp","agencyName","pkAdv","callToaster","setTimeout","reset","agencyService","getAgence","res","catch","err","component"],"mappings":"kzBAGA,IAAIA,EAAWC,EAAQ,QAER,QACbC,KADa,WAEX,MAAO,CACLC,QAAS,CACPC,YAAQC,EACRC,MAAO,KACPC,QAAS,MAEXC,aAASH,EACTI,cAAc,IAGlBC,SAAU,EAAF,KACHC,eAAW,CACZC,UAAW,eAFP,IAINC,OAJQ,WAKN,OAAOb,EAASc,YAAYC,MAAM,MAAM,IAE1CC,QAPQ,WAQN,OAAOhB,EAASc,YAAYC,MAAM,MAAM,MAGtCE,QAvBO,uKAwBLC,KAAKC,oBAxBA,uBAyBLD,KAAKE,iBAzBA,wGA2BbC,QAAS,CACDD,eADC,kLAECE,EAAQ,IAAIC,KACZC,EAAOF,EAAMG,cACbC,EAAQJ,EAAMK,WACdC,EAAON,EAAMO,UAEfD,EAAO,IACTE,EAAQ,IAAIP,KAAKC,E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AAK/F,QAAQ+F,MACpBrE,UAAW,EAAKA,YAEdgE,GACF,EAAKM,YACH,EAAKlD,GAAG,oCAEVmD,YAAW,WACT,EAAKV,WAAWW,QAChB,EAAKlE,cACJ,KACH,EAAK/B,cAAe,IAEpB,EAAK+F,YACH,EAAKlD,GAAG,uCAEV,EAAK7C,cAAe,QAKtBiF,YAzCC,WAAF,yJA0CGvD,EAAMjB,KA1CT,SA2CGyF,OACHC,YACAvE,MAAK,SAACwE,GACL1E,EAAIiD,OAASyB,EAAI3G,KAAKkF,QAAU,MAEjC0B,OAAM,SAACC,OAhDP,qGAAE,GAoDDtB,eApDC,WAAF,yJAqDGtD,EAAMjB,KArDT,SAsDG8D,EACHC,oBACA5C,MAAK,SAACwE,GACDA,EAAItE,UACNJ,EAAIsB,wBAAyB,MAGhCqD,OAAM,SAACC,GACN5E,EAAIsB,wBAAyB,KA9D9B,qGAAE,MCxBqR,I,YCO5RuD,EAAY,eACd,EACAnE,EACAkC,GACA,EACA,KACA,KACA,MAIa,aAAAiC,E","file":"js/chunk-071b624b.053348f0.js","sourcesContent":["import { mapGetters } from \"vuex\";\nimport pointageService from \"@/services/pointage\";\nimport profileService from \"@/services/profile\";\nvar platform = require('platform');\n\nexport default {\n data() {\n return {\n support: {\n reason: undefined,\n title: null,\n message: null\n },\n profile: undefined,\n isSubmitting: false,\n };\n },\n computed: {\n ...mapGetters({\n isLoading: \"isLoading\",\n }),\n device() {\n return platform.description.split('on')[1]\n },\n browser() {\n return platform.description.split('on')[0]\n },\n },\n async created() {\n await this.getChargePlanning();\n await this.getLastestScan();\n },\n methods: {\n async getLastestScan() {\n const today = new Date()\n const year = today.getFullYear()\n const month = today.getMonth()\n const date = today.getDate()\n let start, end;\n if (date > 10) {\n start = new Date(year, month, 1, 0, 0, 0).getTime();\n end = new Date(year, month + 1, 0, 23, 59, 59).getTime();\n } else {\n start = new Date(year, month - 1, 1, 0, 0, 0).getTime();\n end = new Date(year, month, date, 23, 59, 59).getTime();\n }\n try {\n const { data } = await pointageService.getLastestScan(start, end)\n this.pointings = data\n } catch (error) {\n this.pointings = [];\n }\n },\n getChargePlanning() {\n const vue = this;\n profileService\n .getChargePlanning()\n .then(function (response) {\n if (response.success) {\n vue.profile = response.data;\n }\n })\n },\n resetData() {\n this.support = {\n reason: undefined,\n title: undefined,\n message: undefined\n }\n }\n },\n};\n","import httpClient from './httpClient';\n\nexport const pointageService = {\n getLastestScan (start, end) {\n return httpClient.get(`/api/adv/telegestion/pointage/history/${start}/${end}`).then(\n )\n },\n\n getVitaphone () {\n return httpClient.get('/api/adv/telegestion/vitaphone').then(\n )\n },\n\n getCode () {\n return httpClient.get('/api/adv/telegestion/vitaphone/code').then(\n )\n }\n}\n\nexport default pointageService;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"pt-4 mb-4\"},[_c('h1',{staticClass:\"h3 mb-4\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('claim'))+\"\\n \")]),(_vm.isLoading && !_vm.isSubmitting)?_c('b-card',{staticClass:\"p-4 mb-4 bg-white rounded shadow\"},[_c('div',{staticClass:\"text-center\"},[(_vm.isLoading && !_vm.isSubmitting)?_c('b-spinner',{attrs:{\"variant\":\"primary\",\"label\":\"Large Spinner\"}}):_vm._e()],1)]):_vm._e(),(_vm.errorMasterReclamation && !_vm.isLoading)?_c('b-card',{staticClass:\"p-4 mb-4 bg-white rounded shadow\"},[_c('b-media',[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.$t('complain-via-form'))}})])],1):_vm._e(),(!_vm.errorMasterReclamation && !_vm.isLoading)?_c('div',[_c('p',{staticClass:\"p-4 mb-4 bg-white rounded shadow\"},[_vm._v(\"\\n Le formulaire de réclamation vous permet d’effectuer une alerte\\n concernant un risque professionnel ou une réclamation. C'est un outil\\n que vous devez utiliser dans un second temps. En effet, votre premier\\n interlocuteur reste votre agence. Si vous avez déjà formulé une demande\\n écrite auprès de votre agence mais n’avez pas reçu de réponse sous un\\n délai de 15 jours, vous pouvez utiliser cet outil.\\n \")]),(!_vm.isLoading)?_c('b-card',{staticClass:\"mb-4 shadow\"},[_c('b-form-group',{attrs:{\"id\":\"reclamation-email\",\"label\":_vm.$t('nature-email')+' :',\"label-for\":\"reclamation-email\"}},[(_vm.profile)?_c('span',{staticClass:\"text-black-50\"},[_vm._v(_vm._s(_vm.profile.email))]):_vm._e()]),_c('b-form-group',{attrs:{\"id\":\"reclamation-probleme\",\"label\":_vm.$t('nature-problem')+' : *',\"label-for\":\"reclamation-probleme\"}},[_c('b-form-select',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],attrs:{\"id\":\"reclamation-probleme\",\"name\":\"reclamation-probleme\",\"options\":_vm.reasons},model:{value:(_vm.support.reason),callback:function ($$v) {_vm.$set(_vm.support, \"reason\", $$v)},expression:\"support.reason\"}})],1),(_vm.errors.has('reclamation-probleme'))?_c('small',{staticClass:\"font-weight-bold alert-light text-danger\"},[_vm._v(_vm._s(_vm.$t('state-problem')))]):_vm._e(),_c('b-form-group',{attrs:{\"id\":\"reclamation-title\",\"label\":_vm.$t('mission-title')+' : *',\"label-for\":\"reclamation-title\"},model:{value:(_vm.support.title),callback:function ($$v) {_vm.$set(_vm.support, \"title\", $$v)},expression:\"support.title\"}},[_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],attrs:{\"name\":\"reclamation-title\"},model:{value:(_vm.support.title),callback:function ($$v) {_vm.$set(_vm.support, \"title\", $$v)},expression:\"support.title\"}})],1),(_vm.errors.has('reclamation-title'))?_c('small',{staticClass:\"font-weight-bold alert-light text-danger\"},[_vm._v(_vm._s(_vm.$t('title-is-mandatory')))]):_vm._e(),_c('b-form-group',{attrs:{\"id\":\"message\",\"label\":_vm.$t('your-message')+' : *',\"label-for\":\"message\"}},[_c('b-form-textarea',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|min:10'),expression:\"'required|min:10'\"}],attrs:{\"name\":\"message\",\"rows\":10,\"max-rows\":15},model:{value:(_vm.support.message),callback:function ($$v) {_vm.$set(_vm.support, \"message\", $$v)},expression:\"support.message\"}})],1),(_vm.errors.has('message'))?_c('small',{staticClass:\"font-weight-bold alert-light text-danger\"},[_vm._v(_vm._s(_vm.errors.first(\"message\")))]):_vm._e(),_c('div',{staticClass:\"text-center mb-3\"},[(_vm.isLoading)?_c('b-spinner',{staticClass:\"text-center mb-3\",attrs:{\"variant\":\"primary\"}}):_vm._e(),(!_vm.isLoading)?_c('b-button',{attrs:{\"type\":\"submit\",\"variant\":\"primary\"},on:{\"click\":function($event){$event.preventDefault();return _vm.submitReclamation.apply(null, arguments)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('submit-claim'))+\"\\n \")]):_vm._e()],1)],1):_vm._e()],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import httpClient from './httpClient';\n\nexport const employeeService = {\n checkReclaimation() {\n return httpClient.get('/api/adv/reclamation/check');\n },\n submitReclaimation(data) {\n return httpClient.post('/api/adv/reclamation', data);\n }\n}\n\nexport default employeeService;","import { mapGetters, mapActions } from \"vuex\";\nimport Utils from \"@/mixins/Utils\";\nimport pointage from \"@/mixins/pointage\";\nimport employeeService from \"@/services/employee\";\nimport agencyService from \"@/services/agency\";\n\nexport default {\n data: () => ({\n errorMasterReclamation: false,\n agency: {},\n isReset: true\n }),\n mixins: [Utils, pointage],\n async created() {\n await this.checkIfAllowed();\n this.getMyAgency()\n this.init();\n },\n computed: {\n ...mapGetters('hrSupport', {\n reasons: 'reasons',\n appVersion: 'appVersion'\n }),\n },\n methods: {\n ...mapActions('hrSupport', {\n init: 'init',\n send: 'send'\n }),\n submitReclamation() {\n this.isSubmitting = true;\n this.$validator.validateAll().then((result) => {\n if (result) {\n const isSent = this.send({\n firstName: this.profile.firstName,\n name: this.profile.name,\n email: this.profile.email,\n reason: this.support.reason ? this.support.reason : '',\n title: this.support.title,\n messages: this.support.message,\n versionApp: this.appVersion,\n agencyName: this.agency.name || '',\n device: this.device,\n browser: this.browser,\n pkAdv: this.profile.pkAdv,\n pointings: this.pointings\n })\n if (isSent) {\n this.callToaster(\n this.$t('hr-claim-form-view-sent-message')\n );\n setTimeout(() => {\n this.$validator.reset();\n this.resetData();\n }, 100);\n this.isSubmitting = false;\n } else {\n this.callToaster(\n this.$t('claim-form-view-sent-error-message')\n );\n this.isSubmitting = false;\n }\n }\n });\n },\n async getMyAgency() {\n const vue = this;\n await agencyService\n .getAgence()\n .then((res) => {\n vue.agency = res.data.agency || {};\n })\n .catch((err) => {\n // Handler error\n });\n },\n async checkIfAllowed() {\n const vue = this;\n await employeeService\n .checkReclaimation()\n .then((res) => {\n if (res.success) {\n vue.errorMasterReclamation = false;\n }\n })\n .catch((err) => {\n vue.errorMasterReclamation = true;\n });\n }\n },\n};\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/eslint-loader/index.js??ref--13-0!./reclamation.js?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/eslint-loader/index.js??ref--13-0!./reclamation.js?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Reclamation.vue?vue&type=template&id=6376de5f&\"\nimport script from \"./reclamation.js?vue&type=script&lang=js&\"\nexport * from \"./reclamation.js?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"],"sourceRoot":""}