{"version":3,"file":"NotificationUtil.cd558b8c.js","sources":["../../app/javascript/app/utils/NotificationUtil.js"],"sourcesContent":["// import Vue from 'vue'\n\nexport default class NotificationUtil {\n error(errorData) {\n alert(this.parseErrorData(errorData))\n // Vue.notify({\n // title: 'Error',\n // text: this.parseErrorData(errorData),\n // type: 'error'\n // })\n }\n\n success(message) {\n alert(message)\n // Vue.notify({\n // title: 'Success',\n // text: message,\n // type: 'success'\n // })\n }\n\n parseErrorData(errorData) {\n const errorTypes = Object.keys(errorData)\n\n for( let i = 0; i < errorTypes.length; i++ ) {\n let errorType = errorTypes[i]\n let errorMessages = errorData[errorType]\n let userErrorMessage = errorType + ' ' + errorMessages[0]\n console.log('userErrorMessage: ' + userErrorMessage)\n return userErrorMessage\n }\n\n return errorData\n }\n}"],"names":["NotificationUtil","errorData","message","errorTypes","i","errorType","errorMessages","userErrorMessage"],"mappings":"AAEe,MAAMA,CAAiB,CAClC,MAAMC,EAAW,CACb,MAAM,KAAK,eAAeA,CAAS,CAAC,CAMvC,CAED,QAAQC,EAAS,CACb,MAAMA,CAAO,CAMhB,CAED,eAAeD,EAAW,CACtB,MAAME,EAAa,OAAO,KAAKF,CAAS,EAExC,QAASG,EAAI,EAAGA,EAAID,EAAW,OAAQC,IAAM,CACzC,IAAIC,EAAYF,EAAWC,CAAC,EACxBE,EAAgBL,EAAUI,CAAS,EACnCE,EAAmBF,EAAY,IAAMC,EAAc,CAAC,EACxD,eAAQ,IAAI,qBAAuBC,CAAgB,EAC5CA,CACV,CAED,OAAON,CACV,CACL"}