{"version":3,"sources":["webpack:///./src/helpers/firebaseDB.js","webpack:///./node_modules/firebase/storage/dist/index.esm.js","webpack:///./src/models/UploadedFile.js","webpack:///./src/components/alerts/Alert.vue?0e74","webpack:///./src/components/alerts/Alert.vue?08ff","webpack:///src/components/alerts/Alert.vue","webpack:///./src/components/alerts/Alert.vue?ca38","webpack:///./src/components/alerts/Alert.vue","webpack:///./src/store/common/moduleCommonState.js","webpack:///./src/store/common/moduleCommonMutations.js","webpack:///./src/store/common/moduleCommonActions.js","webpack:///./src/store/common/moduleCommonGetters.js","webpack:///./src/store/common/moduleCommon.js","webpack:///./src/models/UploadFile.js","webpack:///./src/helpers/commons.js","webpack:///./src/assets/images/pages/not-authorized.png"],"names":["firebase","database","uploadFileToFirebase","filed","path","that","this","user","User","getUser","userInfo","Promise","resolve","reject","storageRef","storage","ref","file","metadata","contentType","type","uniqueId","Date","getTime","uploadTask","child","company_id","name","put","on","TaskEvent","STATE_CHANGED","snapshot","progress","bytesTransferred","totalBytes","progressPercent","state","TaskState","PAUSED","RUNNING","error","code","getDownloadURL","then","downloadURL","urls","bucketPath","downloadFileFromFirebase","starsRef","url","catch","updateFirebaseMessage","message","key","resource_id","set","deleteFireabseMessage","remove","sendFirebaseResourceNotifications","notification","resourceId","eventId","uploadCompanyLogo","deleteFileToFirebase","fileName","desertRef","delete","Error","removeFileFromFirebase","listAllFilesFromFirebaseFolder","folderName","listRef","listAll","listFiles","items","length","UploadedFile","added_on","bucket_path","category_id","category_json_base","category_name","id","is_public","original_name","process_state","typology_id","typology_name","update_on","UploadFile","render","_vm","_h","$createElement","_c","_self","staticClass","class","size","attrs","_e","titleColor","_v","_s","title","staticRenderFns","component","countries","countries_sitidata","cities","departments","dataSelectVisitPoint","config_list","role","status","category","typology","ADD_COMPANY","item","resources","unshift","SET_DATA_SELECTS","data","SET_CITIES","SET_COUNTRIES","SET_COUNTRIES_SITIDATA","SET_DEPARTMENTS","REMOVE_RESOURCE","itemId","ItemIndex","findIndex","p","splice","SET_CATEGORIES","categories","SET_ROLES_STATUS_CATEGORIES_TYPOLOGIES","fetchDataListResource","commit","Api","get","res","err","getCountries","payload","country","department","city","world_code","only","fields","post","getCountriesByTokenSitiData","getDepartments","getDepartmentsByCityCountry","getAllCities","getCitiesByDeparment","departament","fetchResourceById","fetchDataSelectVisitPoint","fetchDataRoleStatusCategoryTypology","isRegistered","namespaced","mutations","actions","getters","role_id","job_id","upload_type","object_type","url_file","uploadFile","IndexedDB","save","getAll","filename","text","element","document","createElement","setAttribute","encodeURIComponent","style","display","body","appendChild","click","removeChild","fetch","resp","blob","window","URL","createObjectURL","a","href","download","revokeObjectURL","openLoadingDiv","divId","colorDivLoading","$vs","loading","color","container","scale","closeLoadingDiv","close","openLoadingButton","btnId","backgroundBtnLoading","colorBtnLoading","background","closeLoadingButton","generateSelectOptios","propLabel","propValue","map","d","label","value","manageError","moduleName","methodName","Array","isArray","reason","validatorMessage","includes","$t","reasonMessage","absolute_path","replaceAll","toUpperCase","keys","Object","hasOwnProperty","call","join","notify","time","icon","manageErrorValidator","findText","searhStr","str","search","messageValidator","validator","patter","undefined","findErrorNamePropertyValidator","expresion","foundMatch","match","replace","findErrorNameProperty","generateSelectOptionsAdditionalData","propValueAdditional","valueAdditional","module","exports"],"mappings":"ooCAIiBA,IAASC,WAA1B,IAoBMC,EAAoB,yDAAG,WAAgBC,EAAOC,GAAvB,kGACtBC,EAAOC,KACPC,EAAO,IAAIC,OAFW,SAGLD,EAAKE,UAHA,cAGtBC,EAHsB,yBAIrB,IAAIC,SAAQ,SAAUC,EAASC,GAErC,IAAMC,EAAad,IAASe,UAAUC,MAEhCC,EAAOd,EAEPe,EAAW,CAChBC,YAAaF,EAAKG,MAGbC,GAAW,IAAIC,MAAOC,UAEtBC,EAAaV,EACjBW,MADiB,UACRf,EAASgB,YADD,OACctB,GADd,OACqBiB,EADrB,YACiCJ,EAAKU,OACvDC,IAAIX,EAAMC,GAEZM,EAAWK,GACV7B,IAASe,QAAQe,UAAUC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BrD,EAAO1K,KAAK+N,GAAG,wDAEf5H,EAAQnG,KAAK+N,GAAG,qCAChBrD,EAAO1K,KAAK+N,GAAG,qCAEhB,MAAO,CAAC5H,QAAOuE,SAEhB2E,+BA7Sc,WA8Sb,OAAO,SAASH,EAAU/M,GACzB,GAAIuL,MAAMC,QAAQxL,EAAMkF,KAAKuG,OAAO,IACnC,OAAOsB,EAAU/M,EAAMkF,KAAKuG,OAAO,GAAG,IAEvC,IAAMK,EAAgB9L,EAAMkF,KAAKuG,OAAO,GAAGK,cAAc,GACzD,GAAsB,oBAAlBA,EAAqC,CACxC,IAAIlL,EAAUZ,EAAMkF,KAAKuG,OAAO,GAAG7K,QAC7BuM,EAAY,WACZC,EAAaxM,EAAQyM,MAAMF,GACjC,OAAInN,EAAMkF,KAAKuG,OAAO,GAAGK,cAAc3J,OAAS,EACxCnC,EAAMkF,KAAKuG,OAAO,GAAGK,cAAc,GAEpCsB,EAAaA,EAAW,GAAGE,QAAQ,KAAM,IAAM1M,EAEtD,OAAOkL,IAIVyB,sBAhUc,WAiUb,OAAO,SAAmBvN,GACzB,IAAKA,EAAMmM,eAAe,WACzB,MAAO,GAER,IAAMvL,EAAUZ,EAAMY,QACtB,GAAIA,EAAS,CACZ,IAAMuM,EAAY,cACZC,EAAaxM,EAAQyM,MAAMF,GACjC,OAAOC,EAAaA,EAAW,GAAGE,QAAQ,WAAY,IAAM1M,EAE5D,OAAOA,IAIV4M,oCA/Uc,SA+UsBtI,EAAM4F,EAAWC,EAAW0C,GAC/D,OAAOvI,EAAK8F,KAAI,SAACC,GAChB,MAAO,CAACC,MAAOD,EAAEH,GAAYK,MAAOF,EAAEF,GAAY2C,gBAAiBzC,EAAEwC,U,qBCjVxEE,EAAOC,QAAU,IAA0B","file":"js/chunk-41419c9e.9454c903.js","sourcesContent":["import firebase from \"firebase/app\";\nimport \"firebase/storage\";\nimport User from \"@/models/User.js\";\n\nconst database = firebase.database();\nconst settings = {\n\ttimestampsInSnapshots: true,\n};\nconst loadFirestore = () => {\n\tvar db = firebase.firestore();\n\treturn db.collection(\"cerberus_PositionRecord\").get();\n};\nconst getResourceTracking = async (positionrecordId, companyId) => {\n\tconst starCountRef = database.ref(\"tracking/\" + companyId + \"/\" + positionrecordId);\n\tstarCountRef.on(\"value\", (snapshot) => {\n\t\tconst data = snapshot.val();\n\t});\n};\n/**\n *\n * @param {File} filed is file to got forn input type file\n * @param {*} path is the directory path of the firebase\n * @returns\n */\nconst uploadFileToFirebase = async function (filed, path) {\n\tconst that = this;\n\tconst user = new User();\n\tconst userInfo = await user.getUser();\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst storageRef = firebase.storage().ref();\n\t\t// File or Blob named mountains.jpg\n\t\tconst file = filed;\n\t\t// Create the file metadata\n\t\tconst metadata = {\n\t\t\tcontentType: file.type,\n\t\t};\n\t\t// create unique identify date\n\t\tconst uniqueId = new Date().getTime();\n\t\t// Upload file and metadata to the object 'images/mountains.jpg'\n\t\tconst uploadTask = storageRef\n\t\t\t.child(`${userInfo.company_id}${path}${uniqueId}-${file.name}`)\n\t\t\t.put(file, metadata);\n\t\t// Listen for state changes, errors, and completion of the upload.\n\t\tuploadTask.on(\n\t\t\tfirebase.storage.TaskEvent.STATE_CHANGED, // or 'state_changed'\n\t\t\tfunction (snapshot) {\n\t\t\t\t// Get task progress, including the number of bytes uploaded and the total number of bytes to be uploaded\n\t\t\t\tlet progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;\n\t\t\t\tthat.progressPercent = progress;\n\t\t\t\tswitch (snapshot.state) {\n\t\t\t\t\tcase firebase.storage.TaskState.PAUSED: // or 'paused'\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase firebase.storage.TaskState.RUNNING: // or 'running'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction (error) {\n\t\t\t\t// A full list of error codes is available at\n\t\t\t\t// https://firebase.google.com/docs/storage/web/handle-errors\n\t\t\t\tswitch (error.code) {\n\t\t\t\t\tcase \"storage/unauthorized\":\n\t\t\t\t\t\t// User doesn't have permission to access the object\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/canceled\":\n\t\t\t\t\t\t// User canceled the upload\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unknown\":\n\t\t\t\t\t\t// Unknown error occurred, inspect error.serverResponse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treject(error);\n\t\t\t},\n\t\t\tfunction () {\n\t\t\t\t// Upload completed successfully, now we can get the download URL\n\t\t\t\tuploadTask.snapshot.ref.getDownloadURL().then(function (downloadURL) {\n\t\t\t\t\tconst urls = {\n\t\t\t\t\t\tdownloadURL,\n\t\t\t\t\t\tbucketPath: `${userInfo.company_id}${path}${uniqueId}-${file.name}`,\n\t\t\t\t\t};\n\t\t\t\t\tresolve(urls);\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t});\n};\nconst downloadFileFromFirebase = async function (path) {\n\tconst user = new User();\n\tconst userInfo = await user.getUser();\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst storageRef = firebase.storage().ref();\n\t\t// Create a reference to the file we want to download\n\t\tconst starsRef = storageRef.child(path);\n\t\t// Get the download URL\n\t\tstarsRef\n\t\t\t.getDownloadURL()\n\t\t\t.then(function (url) {\n\t\t\t\t// Insert url into an tag to \"download\"\n\t\t\t\tresolve(url);\n\t\t\t})\n\t\t\t.catch(function (error) {\n\t\t\t\t// A full list of error codes is available at\n\t\t\t\t// https://firebase.google.com/docs/storage/web/handle-errors\n\t\t\t\tswitch (error.code) {\n\t\t\t\t\tcase \"storage/object-not-found\":\n\t\t\t\t\t\t// File doesn't exist\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unauthorized\":\n\t\t\t\t\t\t// User doesn't have permission to access the object\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/canceled\":\n\t\t\t\t\t\t// User canceled the upload\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unknown\":\n\t\t\t\t\t\t// Unknown error occurred, inspect the server response\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treject(error);\n\t\t\t});\n\t});\n};\nconst downloadFileFromStorage = function (gsPath) {\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tvar storage = firebase.storage();\n\t\t// Create a reference from a Google Cloud Storage URI\n\t\tvar gsReference = storage.refFromURL(gsPath);\n\t\t// Get the download URL\n\t\tgsReference\n\t\t\t.getDownloadURL()\n\t\t\t.then(function (url) {\n\t\t\t\t// Insert url into an tag to \"download\"\n\t\t\t\tresolve(url);\n\t\t\t})\n\t\t\t.catch(function (error) {\n\t\t\t\t// A full list of error codes is available at\n\t\t\t\t// https://firebase.google.com/docs/storage/web/handle-errors\n\t\t\t\tswitch (error.code) {\n\t\t\t\t\tcase \"storage/object-not-found\":\n\t\t\t\t\t\t// File doesn't exist\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unauthorized\":\n\t\t\t\t\t\t// User doesn't have permission to access the object\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/canceled\":\n\t\t\t\t\t\t// User canceled the upload\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unknown\":\n\t\t\t\t\t\t// Unknown error occurred, inspect the server response\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treject(error);\n\t\t\t});\n\t});\n};\nconst getFirebaseMessageByResourceId = function (resourceid) {\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst database = firebase.database();\n\t\tconst starCountRef = database.ref(`messages/${resourceid}`).orderByChild(\"date\");\n\t\ttry {\n\t\t\tstarCountRef.once(\"value\", (snapshot) => {\n\t\t\t\tconst messages = [];\n\t\t\t\tsnapshot.forEach((childSnapshot) => {\n\t\t\t\t\t// key will be \"ada\" the first time and \"alan\" the second time\n\t\t\t\t\tlet key = childSnapshot.key;\n\t\t\t\t\t// childData will be the actual contents of the child\n\t\t\t\t\tlet childData = {...childSnapshot.val(), id: key};\n\t\t\t\t\tmessages.push(childData);\n\t\t\t\t});\n\t\t\t\tresolve(messages);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};\nconst updateFirebaseMessage = async function (message) {\n\tconst user = new User();\n\tconst userInfo = await user.getUser();\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst {key} = {...message};\n\t\tdelete message.key;\n\t\tconst database = firebase.database();\n\t\tdatabase.ref(`messages/${userInfo.company_id}/${message.resource_id}/${key}`).set(message);\n\t\t//ref(\"PIN/`-KrnO...Ho/PIN\").set(30);\n\t\ttry {\n\t\t\tresolve({message});\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};\nconst deleteFireabseMessage = async function (message) {\n\tconst user = new User();\n\tconst userInfo = await user.getUser();\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst {key} = {...message};\n\t\tdelete message.key;\n\t\tconst database = firebase.database();\n\t\tdatabase\n\t\t\t.ref(`messages/${userInfo.company_id}/${message.resource_id}/${key}`)\n\t\t\t.remove()\n\t\t\t.then(function () {\n\t\t\t\tresolve({message: \"Remove succeeded.\"});\n\t\t\t})\n\t\t\t.catch(function (error) {\n\t\t\t\treject(error);\n\t\t\t});\n\t});\n};\nconst sendFirebaseResourceNotifications = function (notification, resourceId, eventId) {\n\treturn new Promise(async function (resolve, reject) {\n\t\ttry {\n\t\t\tconst user = new User();\n\t\t\tconst userInfo = await user.getUser();\n\t\t\tawait firebase\n\t\t\t\t.database()\n\t\t\t\t.ref(`notification/${userInfo.company_id}/movil/${resourceId}/${eventId}`)\n\t\t\t\t.set(notification);\n\t\t\tresolve({notification});\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};\nconst uploadCompanyLogo = async function (filed, path) {\n\tconst that = this;\n\n\treturn new Promise(function (resolve, reject) {\n\t\t// Create a root reference\n\t\tconst storageRef = firebase.storage().ref();\n\t\t// File or Blob named mountains.jpg\n\t\tconst file = filed;\n\t\t// Create the file metadata\n\t\tconst metadata = {\n\t\t\tcontentType: file.type,\n\t\t};\n\t\t// create unique identify date\n\t\tconst uniqueId = new Date().getTime();\n\t\t// Upload file and metadata to the object 'images/mountains.jpg'\n\t\tconst uploadTask = storageRef.child(`${path}${uniqueId}-${file.name}`).put(file, metadata);\n\t\t// Listen for state changes, errors, and completion of the upload.\n\t\tuploadTask.on(\n\t\t\tfirebase.storage.TaskEvent.STATE_CHANGED, // or 'state_changed'\n\t\t\tfunction (snapshot) {\n\t\t\t\t// Get task progress, including the number of bytes uploaded and the total number of bytes to be uploaded\n\t\t\t\tlet progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;\n\t\t\t\tthat.progressPercent = progress;\n\t\t\t\tswitch (snapshot.state) {\n\t\t\t\t\tcase firebase.storage.TaskState.PAUSED: // or 'paused'\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase firebase.storage.TaskState.RUNNING: // or 'running'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction (error) {\n\t\t\t\t// A full list of error codes is available at\n\t\t\t\t// https://firebase.google.com/docs/storage/web/handle-errors\n\t\t\t\tswitch (error.code) {\n\t\t\t\t\tcase \"storage/unauthorized\":\n\t\t\t\t\t\t// User doesn't have permission to access the object\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/canceled\":\n\t\t\t\t\t\t// User canceled the upload\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"storage/unknown\":\n\t\t\t\t\t\t// Unknown error occurred, inspect error.serverResponse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treject(error);\n\t\t\t},\n\t\t\tfunction () {\n\t\t\t\t// Upload completed successfully, now we can get the download URL\n\t\t\t\tuploadTask.snapshot.ref.getDownloadURL().then(function (downloadURL) {\n\t\t\t\t\tconst urls = {\n\t\t\t\t\t\tdownloadURL,\n\t\t\t\t\t\tbucketPath: `${path}${uniqueId}-${file.name}`,\n\t\t\t\t\t};\n\t\t\t\t\tresolve(urls);\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t});\n};\n\nconst deleteFileToFirebase = async function (path, fileName) {\n\tconst user = new User();\n\tconst userInfo = await user.getUser();\n\tconst storageRef = firebase.storage().ref();\n\t// Create a reference to the file to delete\n\tconst desertRef = await storageRef.child(`${userInfo.company_id}${path}${fileName}`);\n\tawait desertRef.getDownloadURL().then(() => {\n\t\tdesertRef\n\t\t\t.delete()\n\t\t\t.then(() => {\n\t\t\t\treturn {message: \"Remove succeeded.\"};\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tthrow new Error(error);\n\t\t\t});\n\t});\n};\n\nconst removeFileFromFirebase = function (bucketPath) {\n\treturn new Promise(async (resolve, reject) => {\n\t\tconst storageRef = firebase.storage().ref();\n\t\t// Create a reference to the file to delete\n\t\tconst desertRef = storageRef.child(bucketPath);\n\t\ttry {\n\t\t\t// Delete the file\n\t\t\tawait desertRef.delete();\n\t\t\tresolve(\"File deleted\");\n\t\t} catch (error) {\n\t\t\treject(new Error(\"Error delete\"));\n\t\t}\n\t});\n};\n\nconst listAllFilesFromFirebaseFolder = (folderName) => {\n\treturn new Promise(async (resolve, reject) => {\n\t\tconst storageRef = firebase.storage().ref();\n\t\t// Create a reference under which you want to list\n\t\tconst listRef = storageRef.child(folderName);\n\t\ttry {\n\t\t\t// Find all the prefixes and items.\n\t\t\tconst listFiles = await listRef.listAll();\n\t\t\tif (listFiles.items.length > 0) {\n\t\t\t\tresolve(listFiles.items);\n\t\t\t} else {\n\t\t\t\tresolve([]);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(new Error(\"Error delete\"));\n\t\t}\n\t});\n};\n\nexport {\n\tloadFirestore,\n\tgetResourceTracking,\n\tuploadFileToFirebase,\n\tdownloadFileFromFirebase,\n\tdownloadFileFromStorage,\n\tgetFirebaseMessageByResourceId,\n\tupdateFirebaseMessage,\n\tdeleteFireabseMessage,\n\tsendFirebaseResourceNotifications,\n\tuploadCompanyLogo,\n\tdeleteFileToFirebase,\n\tremoveFileFromFirebase,\n\tlistAllFilesFromFirebaseFolder,\n};\n","import '@firebase/storage';\n//# sourceMappingURL=index.esm.js.map\n","import UploadFile from \"./UploadFile\";\n\nexport default class UploadedFile extends UploadFile {\n\tconstructor({\n\t\tadded_on,\n\t\tbucket_path,\n\t\tcategory_id,\n\t\tcategory_json_base,\n\t\tcategory_name,\n\t\tcompany_id,\n\t\tid,\n\t\tis_public,\n\t\toriginal_name,\n\t\tprocess_state,\n\t\tresource_id,\n\t\ttypology_id,\n\t\ttypology_name,\n\t\tupdate_on,\n\t}) {\n\t\tsuper({bucket_path, id, is_public, original_name, typology_id});\n\t\tthis.added_on = added_on || \"\";\n\t\tthis.category_id = category_id || 0;\n\t\tthis.category_json_base = category_json_base || {};\n\t\tthis.category_name = category_name || \"\";\n\t\tthis.company_id = company_id || 0;\n\t\tthis.process_state = process_state || \"\";\n\t\tthis.resource_id = resource_id || 0;\n\t\tthis.typology_name = typology_name || \"\";\n\t\tthis.update_on = update_on || \"\";\n\t}\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=style&index=0&id=17dd258e&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex w-full bg-img\",class:{'h-screen': _vm.size === 'large'}},[_c('div',{staticClass:\"vx-col flex items-center justify-center flex-col mx-auto text-center\"},[(_vm.image)?_c('img',{staticClass:\"mx-auto mb-4\",class:{\n\t\t\t\t'img-size': _vm.size === 'large',\n\t\t\t\t'img-small': _vm.size === 'small',\n\t\t\t},attrs:{\"src\":require(\"@/assets/images/pages/not-authorized.png\"),\"alt\":\"graphic-not-authorized\"}}):_vm._e(),_c('h1',{staticClass:\"sm:mx-0 mx-4 sm:mb-5 mb-1 d-theme-heading-color text-2xl\",class:_vm.titleColor},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.title)+\"\\n\\t\\t\")]),_c('p',{staticClass:\"sm:mx-0 mx-4 sm:mb-12 mb-8\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.message)+\"\\n\\t\\t\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.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!./Alert.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Alert.vue?vue&type=template&id=17dd258e&scoped=true&\"\nimport script from \"./Alert.vue?vue&type=script&lang=js&\"\nexport * from \"./Alert.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Alert.vue?vue&type=style&index=0&id=17dd258e&lang=scss&scoped=true&\"\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 \"17dd258e\",\n null\n \n)\n\nexport default component.exports","/*=========================================================================================\n File Name: moduleCompanyState.js\n Description: Calendar Module State\n ----------------------------------------------------------------------------------------\n Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template\n Author: Pixinvent\n Author URL: http://www.themeforest.net/user/pixinvent\n==========================================================================================*/\n\nexport default {\n\tcountries: [],\n\tcountries_sitidata: [],\n\tcities: [],\n\tdepartments: [],\n\tdataSelectVisitPoint: [],\n\tconfig_list: [],\n\trole: [],\n\tstatus: [],\n\tcategory: [],\n\ttypology: [],\n};\n","/*=========================================================================================\n File Name: moduleCompanyMutations.js\n Description: Company Module Mutations\n ----------------------------------------------------------------------------------------\n Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template\n Author: Pixinvent\n Author URL: http://www.themeforest.net/user/pixinvent\n==========================================================================================*/\n\nexport default {\n\tADD_COMPANY(state, item) {\n\t\tstate.resources.unshift(item);\n\t},\n\tSET_DATA_SELECTS(state, data) {\n\t\tstate.dataSelectVisitPoint = data;\n\t},\n\tSET_CITIES(state, data) {\n\t\tstate.cities = data;\n\t},\n\tSET_COUNTRIES(state, data) {\n\t\tstate.countries = data;\n\t},\n\tSET_COUNTRIES_SITIDATA(state, data) {\n\t\tstate.countries_sitidata = data;\n\t},\n\tSET_DEPARTMENTS(state, data) {\n\t\tstate.departments = data;\n\t},\n\tREMOVE_RESOURCE(state, itemId) {\n\t\tconst ItemIndex = state.resources.findIndex((p) => p.id === itemId);\n\t\tstate.resources.splice(ItemIndex, 1);\n\t},\n\t// categories\n\tSET_CATEGORIES(state, categories) {\n\t\t//state.categories = categories\n\t},\n\t// categories\n\tSET_ROLES_STATUS_CATEGORIES_TYPOLOGIES(state, data) {\n\t\tconst {role, status, category, typology} = data;\n\t\tstate.role = role ? role : [];\n\t\tstate.status = status ? status : [];\n\t\tstate.category = category ? category : [];\n\t\tstate.typology = typology ? typology : [];\n\t},\n};\n","/*=========================================================================================\n File Name: moduleCommonActions.js\n Description: Calendar Module Actions\n ----------------------------------------------------------------------------------------\n Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template\n Author: Pixinvent\n Author URL: http://www.themeforest.net/user/pixinvent\n==========================================================================================*/\n\nimport Api from \"@/helpers/api.js\";\n\nexport default {\n\tfetchDataListResource({commit}) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.get(\"/resource\")\n\t\t\t\t.then((res) => {\n\t\t\t\t\tcommit(\"SET_RESOURCES\", res.data);\n\t\t\t\t\tresolve(res);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\t/**\n\t *\n\t * @param {*} param0\n\t */\n\tgetCountries({commit}) {\n\t\tconst payload = {\n\t\t\tcountry: \"\",\n\t\t\tdepartment: \"\",\n\t\t\tcity: \"\",\n\t\t\tworld_code: \"\",\n\t\t\tonly: \"country_name\",\n\t\t\tfields: [],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_COUNTRIES\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\tgetCountriesByTokenSitiData({commit}) {\n\t\tconst payload = {\n\t\t\tcountry: \"\",\n\t\t\tdepartment: \"\",\n\t\t\tcity: \"\",\n\t\t\tworld_code: \"\",\n\t\t\tonly: \"country_name_sitidata\",\n\t\t\tfields: [],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_COUNTRIES_SITIDATA\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\tgetDepartments({commit}, country) {\n\t\tconst payload = {\n\t\t\tcountry: country.name,\n\t\t\tdepartment: \"\",\n\t\t\tcity: \"\",\n\t\t\tonly: \"department_name\",\n\t\t\tworld_code: \"\",\n\t\t\tfields: [],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_DEPARTMENTS\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\tgetDepartmentsByCityCountry({commit}, data) {\n\t\tconst payload = {\n\t\t\tcountry: data.country,\n\t\t\tdepartment: \"\",\n\t\t\tcity: data.city,\n\t\t\tonly: \"department_name\",\n\t\t\tworld_code: \"\",\n\t\t\tfields: [],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_DEPARTMENTS\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\t/**\n\t *\n\t * @param {*} param0\n\t * @param {*} resourceId\n\t */\n\tgetAllCities({commit}, country) {\n\t\tconst payload = {\n\t\t\tcountry: country.name,\n\t\t\tdepartment: \"\",\n\t\t\tcity: \"\",\n\t\t\tworld_code: \"\",\n\t\t\tfields: [\"city_name\", \"city_id\", \"country_name\"],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_CITIES\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\t/**\n\t * @description Request a divipola para obtener las ciudades por departamento\n\t * @param {*} param0\n\t * @param {*} departament\n\t */\n\tgetCitiesByDeparment({commit}, departament) {\n\t\tconst payload = {\n\t\t\tcountry: departament.country || \"\",\n\t\t\tdepartment: departament.name,\n\t\t\tcity: \"\",\n\t\t\tworld_code: \"\",\n\t\t\tonly: \"city_name\",\n\t\t\tfields: [\"city_name\", \"department_name\"],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(`/divipola`, payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t\tcommit(\"SET_CITIES\", res.data);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\tfetchResourceById({commit}, resourceId) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.get(`/resource/${resourceId}`)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tresolve(res);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\tfetchDataSelectVisitPoint({commit}) {\n\t\tconst payload = {\n\t\t\trole: [],\n\t\t\tstatus: [],\n\t\t\tcategory: \"VISIT_POINT\",\n\t\t\ttypology: [],\n\t\t};\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(\"/role/status/category/typology\", payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tcommit(\"SET_DATA_SELECTS\", res.data);\n\t\t\t\t\tresolve(res);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n\t/**\n\t *\n\t * @param {*} param0\n\t * @param {*} category \"RESOURCE\", \"VISIT_POINT\",\n\t */\n\tfetchDataRoleStatusCategoryTypology({commit}, payload = {role: [], status: [], category: \"\", typology: []}) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tApi.post(\"/role/status/category/typology\", payload)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tcommit(\"SET_ROLES_STATUS_CATEGORIES_TYPOLOGIES\", res.data);\n\t\t\t\t\tresolve(res);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t},\n};\n","/*=========================================================================================\n File Name: moduleCompanyGetters.js\n Description: Company Module Getters\n ----------------------------------------------------------------------------------------\n Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template\n Author: Pixinvent\n Author URL: http://www.themeforest.net/user/pixinvent\n==========================================================================================*/\n\nexport default {\n\t//getItem: state => (companyId) => state.companies.find((company) => company.id == companyId),\n\t//getAllItem: state => () => state.companies,\n};\n","import state from \"./moduleCommonState.js\";\nimport mutations from \"./moduleCommonMutations.js\";\nimport actions from \"./moduleCommonActions.js\";\nimport getters from \"./moduleCommonGetters.js\";\n\nexport default {\n\tisRegistered: false,\n\tnamespaced: true,\n\tstate,\n\tmutations,\n\tactions,\n\tgetters,\n};\n","import IndexedDB from \"@/helpers/IndexedDB.js\";\n\nexport default class UploadFile {\n\tconstructor({\n\t\tid,\n\t\tbucket_path,\n\t\toriginal_name,\n\t\ttypology_id,\n\t\tis_public,\n\t\trole_id,\n\t\tjob_id,\n\t\tupload_type,\n\t\tobject_type,\n\t\turl_file,\n\t}) {\n\t\tthis.id = id || 0;\n\t\tthis.upload_type = upload_type || \"\";\n\t\tthis.object_type = object_type || \"\";\n\t\tthis.url_file = url_file || \"\";\n\t\tthis.bucket_path = bucket_path || \"\";\n\t\tthis.original_name = original_name || \"\";\n\t\tthis.typology_id = typology_id || 0;\n\t\tthis.is_public = is_public || 0;\n\n\t\tif (this.upload_type === \"RESOURCE\") this.role_id = role_id || 0;\n\t\tif (this.upload_type === \"LAYER\") this.job_id = job_id || \"\";\n\t}\n\n\tasync saveToIndexedDB() {\n\t\tlet uploadFile = this;\n\t\ttry {\n\t\t\tawait IndexedDB.save(\"upload_files\", uploadFile, uploadFile.id);\n\t\t} catch (error) {\n\t\t\tthrow new Error(error);\n\t\t}\n\t}\n\n\tgetUploadedFiles() {\n\t\treturn IndexedDB.getAll(\"upload_files\");\n\t}\n\n\tdownloadFileTxt(filename, text) {\n\t\tlet element = document.createElement(\"a\");\n\t\telement.setAttribute(\"href\", \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text));\n\t\telement.setAttribute(\"download\", filename);\n\t\telement.style.display = \"none\";\n\t\tdocument.body.appendChild(element);\n\t\telement.click();\n\t\tdocument.body.removeChild(element);\n\t}\n\n\tdownloadFile(filename, url) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tfetch(url)\n\t\t\t\t.then((resp) => {\n\t\t\t\t\tif (resp.status === 404) {\n\t\t\t\t\t\tthrow new Error(\"Something was wrong\");\n\t\t\t\t\t}\n\t\t\t\t\treturn resp.blob();\n\t\t\t\t})\n\t\t\t\t.then((blob) => {\n\t\t\t\t\tconst url = window.URL.createObjectURL(blob);\n\t\t\t\t\tconst a = document.createElement(\"a\");\n\t\t\t\t\ta.style.display = \"none\";\n\t\t\t\t\ta.href = url;\n\t\t\t\t\t// the filename you want\n\t\t\t\t\ta.download = filename;\n\t\t\t\t\tdocument.body.appendChild(a);\n\t\t\t\t\ta.click();\n\t\t\t\t\twindow.URL.revokeObjectURL(url);\n\t\t\t\t\tresolve(\"ok\");\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t}\n}\n","export default {\n\t/**\n\t * @description Este metodo debe ser ejecutado con apply o call para recibir el contexto\n\t * this del vue componente para que reconozca el $vs.loading y todo lo demas de la instancia\n\t * @param {String} divId attributo id del div al cual se le aplicara la animacion\n\t * @param {String} colorBtnLoading color del loading por defecto blanco\n\t */\n\topenLoadingDiv(divId, colorDivLoading = \"primary\") {\n\t\tthis.$vs.loading({\n\t\t\tcolor: colorDivLoading,\n\t\t\tcontainer: \"#\" + divId,\n\t\t\tscale: 0.6,\n\t\t});\n\t},\n\t/**\n\t * @description Metodo detiene la animacion del div, debe ser ejecutado con apply o call para recibir el contexto\n\t * @param {String} divId attributo id del div al cual se detendra la animacion\n\t */\n\tcloseLoadingDiv(divId) {\n\t\tthis.$vs.loading.close(\"#\" + divId + \" > .con-vs-loading\");\n\t},\n\t/**\n\t * @description Este metodo debe ser ejecutado con apply o call para recibir el contexto\n\t * this del vue componente para que reconozca el $vs.loading y todo lo demas de la instancia\n\t * @param {String} btnId attributo id del boton al cual se le aplicara la animacion\n\t * @param {String} backgroundBtnLoading color del boton cuando se esta animando por defecto primary\n\t * @param {String} colorBtnLoading color del loading por defecto blanco\n\t */\n\topenLoadingButton(btnId, backgroundBtnLoading = \"primary\", colorBtnLoading = \"#fff\") {\n\t\tthis.$vs.loading({\n\t\t\tbackground: backgroundBtnLoading,\n\t\t\tcolor: colorBtnLoading,\n\t\t\tcontainer: \"#\" + btnId,\n\t\t\tscale: 0.45,\n\t\t});\n\t},\n\t/**\n\t * @description Metodo detiene la animacion del boton, debe ser ejecutado con apply o call para recibir el contexto\n\t * @param {String} btnId attributo id del boton al cual se detendra la animacion\n\t */\n\tcloseLoadingButton(btnId) {\n\t\tthis.$vs.loading.close(\"#\" + btnId + \" > .con-vs-loading\");\n\t},\n\t/**\n\t * @description generate array data for any selection component\n\t * @param {Array} data Array\n\t * @param {String} propLabel propertie name from array for crete label propertie\n\t * @param {Strig} propValue propertie name from array for crete value propertie\n\t */\n\tgenerateSelectOptios(data, propLabel, propValue) {\n\t\treturn data.map((d) => {\n\t\t\treturn {label: d[propLabel], value: d[propValue]};\n\t\t});\n\t},\n\t/**\n\t * @description Method to validate some commons errors\n\t * @param {Object} err is object containt whit the error descriptions\n\t * @param {String} moduleName is the name of module when the method is called\n\t */\n\tmanageError(err, moduleName = \"all\", methodName = \"all\") {\n\t\tlet title = \"\";\n\t\tlet text = \"\";\n\t\tlet color = \"warning\";\n\n\t\tif (err.data) {\n\t\t\tif (Array.isArray(err.data.reason)) {\n\t\t\t\tconst validatorMessage = (message = \"\") => {\n\t\t\t\t\tif (message.includes(\"is too short\") && !message.includes(\"[]\")) {\n\t\t\t\t\t\treturn this.$t(\"ManualData.TooShortProperties\");\n\t\t\t\t\t} else if (message.includes(\"[] is too short\")) {\n\t\t\t\t\t\treturn this.$t(\"DesignConfig.SelectMinimumOneOption\");\n\t\t\t\t\t} else if (message.includes(\"is not one of\")) {\n\t\t\t\t\t\treturn this.$t(\"DesignConfig.SelectMinimumOneOption\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn this.$t(\"ManualData.ValidatorRequiredProperty\");\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst reasonMessage = err.data.reason.map(({absolute_path, message}) => {\n\t\t\t\t\treturn absolute_path[0].replaceAll(\"_\", \" \").toUpperCase() + \": \" + validatorMessage(message);\n\t\t\t\t});\n\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\ttext = `${this.$t(\"ManualData.Property\")} ${reasonMessage[0]}`;\n\t\t\t} else {\n\t\t\t\tconst reason = err.data.reason ? err.data.reason : \"\";\n\t\t\t\tswitch (reason) {\n\t\t\t\t\tcase \"Scheduling api not enabled for this company.\":\n\t\t\t\t\t\ttitle = this.$t(\"Schedule.ActiveApi\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.SchedulingApiNotEnabled\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Serviforms api not enabled for this company.\":\n\t\t\t\t\t\ttitle = this.$t(\"Schedule.ActiveApi\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.ServiformApiNotEnabled\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Unexpected Error: config list is empty!\":\n\t\t\t\t\t\ttitle = this.$t(\"ActivityList\");\n\t\t\t\t\t\ttext = this.$t(\"Activity.ActivityListEmpty\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"invalid values\":\n\t\t\t\t\t\tif (moduleName === \"CompanyConfigCrudForm\") {\n\t\t\t\t\t\t\tlet keys = Object.hasOwnProperty.call(err.data, \"keys\") ? err.data.keys.join(\" , \") : \"\";\n\t\t\t\t\t\t\tcolor = \"danger\";\n\t\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\t\tif (methodName === \"update\") {\n\t\t\t\t\t\t\t\ttext =\n\t\t\t\t\t\t\t\t\tthis.$t(\"UpdateCompanyConfigErrorMessage\") +\n\t\t\t\t\t\t\t\t\t\"; \" +\n\t\t\t\t\t\t\t\t\tkeys +\n\t\t\t\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\t\t\t\tthis.$t(\"IvalidValuesErrorMessage\");\n\t\t\t\t\t\t\t} else if (methodName === \"create\") {\n\t\t\t\t\t\t\t\ttext =\n\t\t\t\t\t\t\t\t\tthis.$t(\"TitleSuccessTypeConfigCreatedError\") +\n\t\t\t\t\t\t\t\t\t\"; \" +\n\t\t\t\t\t\t\t\t\tkeys +\n\t\t\t\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\t\t\t\tthis.$t(\"IvalidValuesErrorMessage\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttext = \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = `Satus error : ${err.status}, ${err.message}`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (err.message) {\n\t\t\t\tcase \"The requested resource doesn't exists\":\n\t\t\t\t\ttitle = this.$t(\"Permissions.RequiredPermissions\");\n\t\t\t\t\ttext = `${this.$t(\"Roles.Permissions.RequiredPermissionsText\")} GOTU`;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\ttext = `Satus error : ${err.status}, ${err.message}`;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tthis.$vs.notify({\n\t\t\tcolor,\n\t\t\ttitle,\n\t\t\ttext,\n\t\t\ttime: 7000,\n\t\t\ticon: \"warning\",\n\t\t});\n\t},\n\t/**\n\t * @description Method to validate some commons errors\n\t * @param {Object} err is object containt whit the error descriptions\n\t */\n\tmanageErrorValidator(err) {\n\t\tlet title = \"\";\n\t\tlet text = \"\";\n\n\t\tfunction findText(searhStr, str) {\n\t\t\tif (str.search(searhStr) != -1) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tconst messageValidator = (message) => {\n\t\t\tif (findText(\"Already registered\", message)) return this.$t(\"ManualData.AlreadyRegistered\");\n\t\t\telse if (findText(\"Date less than current date\", message))\n\t\t\t\treturn this.$t(\"ManualData.DateLessThanCurrentDate\");\n\t\t\telse if (findText(\"Not registered\", message)) return this.$t(\"ManualData.NotRegistered\");\n\t\t\telse if (findText(\"is a required property\", message))\n\t\t\t\treturn this.$t(\"ManualData.ValidatorRequiredProperty\");\n\t\t\telse if (findText(\"time data\", message)) return this.$t(\"ManualData.TimeDataFormat\");\n\t\t\telse if (findText(\"does not match\", message)) return this.$t(\"Email\");\n\t\t\telse if (findText(\"missing fields\", message)) return this.$t(\"Email\");\n\t\t\telse return message;\n\t\t};\n\t\tif (err.data) {\n\t\t\tlet message = \"\";\n\t\t\tlet validator = \"\";\n\t\t\tif (Array.isArray(err.data.reason)) {\n\t\t\t\tmessage = err.data.reason[0].message;\n\t\t\t\tvalidator = err.data.reason[0].validator;\n\t\t\t} else {\n\t\t\t\tmessage = err.data.reason ? err.data.reason : \"\";\n\t\t\t}\n\n\t\t\tif (validator === \"backend\") {\n\t\t\t\tswitch (message) {\n\t\t\t\t\tcase \"Scheduling api not enabled for this company.\":\n\t\t\t\t\t\ttitle = this.$t(\"Schedule.ActiveApi\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.SchedulingApiNotEnabled\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Serviforms api not enabled for this company.\":\n\t\t\t\t\t\ttitle = this.$t(\"Schedule.ActiveApi\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.ServiformApiNotEnabled\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"visit point not registered\":\n\t\t\t\t\t\ttitle = this.$t(\"ManualData.identification\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.NotRegistered\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Date less than current date\":\n\t\t\t\t\t\ttitle = this.$t(\"ManualData.date\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.DateLessThanCurrentDate\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"activity not registered\":\n\t\t\t\t\t\ttitle = this.$t(\"Activity.Activity\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.ActivityNotRegistered\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Already registered\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.AlreadyRegistered\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Init hour greater than end hour\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.ValidEndOur\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"The address could not be georeferenced\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.AddressCouldBeNotGeoreferenced\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"coordinates could not be found\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.CoordinatesCouldBeNotFound\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"error_date\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.ErrorDate\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"error_init_hour\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.ErrorInitHour\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"error_end_hour\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.ErrorEndHour\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Init hour less than current time\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.InitHourLessThanCurrentTime\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Duplicate record in excel\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.DuplicateRecordInExcel\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Dane code not found\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.DaneCodeNotFound\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Save record error\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.SaveRecordError\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Activity not available for the resource\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"Schedule.ActivityNoAvailable\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Resource has no activities\":\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = this.$t(\"ManualData.ResourceHasNoActivities\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\t\t\ttext = messageValidator(message);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (validator === \"required\") {\n\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\ttext = messageValidator(message);\n\t\t\t} else if (validator === \"additionalProperties\") {\n\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\ttext = this.$t(\"ManualData.ValidatorAdditionalProperties\");\n\t\t\t} else if (validator === \"minLength\") {\n\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\ttext = this.$t(\"ManualData.TooShortProperties\");\n\t\t\t} else if (validator === \"pattern\") {\n\t\t\t\tlet patter = err.data.reason[0].absolute_path.join();\n\t\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\t\tswitch (patter) {\n\t\t\t\t\tcase \"email\":\n\t\t\t\t\t\ttext = this.$t(\"Resource.EmailInvalid\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttext = messageValidator(message);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttitle = this.$t(\"VisitPointObject.Edit.Error.Title\");\n\t\t\t\ttext = this.$t(\"VisitPointObject.Edit.Error.Text\");\n\t\t\t}\n\t\t} else if (err.hasOwnProperty(\"message\")) {\n\t\t\ttitle = this.$t(\"ErrorTitle\");\n\t\t\ttext = messageValidator(err.message);\n\t\t} else if (err.data === null || err.data === undefined) {\n\t\t\ttitle = this.$t(\"VisitPointObject.Create.ErrorRegisterValidate.Title\");\n\t\t\ttext = this.$t(\"VisitPointObject.Create.ErrorRegisterValidate.Text\");\n\t\t} else {\n\t\t\ttitle = this.$t(\"VisitPointObject.Edit.Error.Title\");\n\t\t\ttext = this.$t(\"VisitPointObject.Edit.Error.Text\");\n\t\t}\n\t\treturn {title, text};\n\t},\n\tfindErrorNamePropertyValidator() {\n\t\treturn function validator(error) {\n\t\t\tif (Array.isArray(error.data.reason[0])) {\n\t\t\t\treturn validator(error.data.reason[0][0]);\n\t\t\t}\n\t\t\tconst absolute_path = error.data.reason[0].absolute_path[0];\n\t\t\tif (absolute_path === \"additional_info\") {\n\t\t\t\tlet message = error.data.reason[0].message;\n\t\t\t\tconst expresion = /'(.*)'/gm;\n\t\t\t\tconst foundMatch = message.match(expresion);\n\t\t\t\tif (error.data.reason[0].absolute_path.length > 1) {\n\t\t\t\t\treturn error.data.reason[0].absolute_path[1];\n\t\t\t\t}\n\t\t\t\treturn foundMatch ? foundMatch[0].replace(/'/g, \"\") : message;\n\t\t\t} else {\n\t\t\t\treturn absolute_path;\n\t\t\t}\n\t\t};\n\t},\n\tfindErrorNameProperty() {\n\t\treturn function validator(error) {\n\t\t\tif (!error.hasOwnProperty(\"message\")) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tconst message = error.message;\n\t\t\tif (message) {\n\t\t\t\tconst expresion = /\\[(.*)'\\]/gm;\n\t\t\t\tconst foundMatch = message.match(expresion);\n\t\t\t\treturn foundMatch ? foundMatch[0].replace(/['\\[\\]]/g, \"\") : message;\n\t\t\t} else {\n\t\t\t\treturn message;\n\t\t\t}\n\t\t};\n\t},\n\tgenerateSelectOptionsAdditionalData(data, propLabel, propValue, propValueAdditional) {\n\t\treturn data.map((d) => {\n\t\t\treturn {label: d[propLabel], value: d[propValue], valueAdditional: d[propValueAdditional]};\n\t\t});\n\t},\n};\n","module.exports = __webpack_public_path__ + \"img/not-authorized.388ffe46.png\";"],"sourceRoot":""}