{"version":3,"sources":["webpack:///./src/components/mixins/inputHelper.js","webpack:///./src/components/mixins/formHelper.js","webpack:///./src/components/mixins/dateHelper.js","webpack:///./src/views/supplier/ApplicantsPage.vue","webpack:///src/views/supplier/ApplicantsPage.vue","webpack:///./src/views/supplier/ApplicantsPage.vue?26ae","webpack:///./src/views/supplier/ApplicantsPage.vue?a96f"],"names":["methods","reg","value","caps","trim","this","upper","trimSpaces","cleanTildes","toUpperCase","s","r","toLowerCase","replace","RegExp","uppercase","addressId","address","zipCodeVariable","statesArray","citiesArray","neighborhoodsArray","result","publicApiGet","data","zipcode","collections","state","city","neighborhoods","state_id","city_id","neighborhood_id","payload","addressName","axios","get","verifyPayloadZipCode","clearPayloadAddressFields","mexicoCountryId","zipCode","length","verifyZipCodeTimer","clearTimeout","setTimeout","getPayloadAddressByZipCode","isNaN","warningNotif","setPayloadZipCodeAddressValues","id","e","warn","failed","verifyZipCode","undefined","clearAddressFields","country_id","getAddressByZipCode","isAutoFormField","f","special_definition","doc_id","field_type","isAutoFormFieldPublic","bo_private","isDocumentNotPrivate","notDocumentNorPrivate","isAutoFieldToSave","is_readonly","formFieldSetter","parent","useNested","fname","db_field","max_chars","min_chars","extras","JSON","parse","parsed_extras","on_change","on_change_method","on_mounted","special_validation","method","section_id","hard_validation","show_only_if","show_conditioned","condition","exact_value","disabled","is_computed","external_computed","placeholder","disabled_from_today","disabled_if","disabled_conditioned","disabled_condition","alias","nested","div_class","textarea_extended","input_group","source","findDocSetsForField","formField","section","documents","find","nestedFieldValue","main","field","val","getNestedObject","arrayFromFieldName","nestedObj","pathArr","reduce","obj","key","setDeepObject","target","path","level","setDeepObjectWithIds","nestedPath","push","setNestedObjectWithIds","forEach","nidObj","nid","join","copyKeysToObject","recipient","origin","k","split","objectIsEmpty","Object","keys","unpackNested","base","prop","pr","packNested","includes","v","curp","personal_id","p","current_personal_profile_id","publicApiPost","error","clabe","banks","g","slice","clabe_code","rfc","validation","post","n","p2","r2","business_id","just_uniqueness","current_business_profile_id","email","applicantUserId","relationData","isEqual","projectId","evaluateConditionBase","ss","container","evaluator","validator","inc","rules","is_required","verify","valid","array","callback","index","missingFieldsNotif","flow","console","log","constitutionDateFormat","moment","String","locale","format","constitutionPaymentDateFormat","explicitDateFormat","sessionFormat","regularDateFormat","yearDateFormat","midDateFormat","humanDateFormat","dateTimeFormat","dateTime12Format","compactDateFormat","logDateFormat","timeAgoFormat","fromNow","calculateAgeFromDate","diff","minDateForValidAge","years","subtract","calculateDaysDiff","m","validatedDate","isValid","getDateFromInputs","yy","mm","dd","yint","parseInt","mint","year","month","day","nextAccreditationDate","add","setDateToEndOfDay","d","endOf","end","setDateToStartOfDay","startOf","start","signatureFormatDate","signatureValidityDate","incomeSpecial","timeStampFormat","formatDatepicker","isAfter","date","maxDate","limit","getPreviousMonth","step","getDay","render","_vm","_c","_self","attrs","staticClass","_v","staticStyle","activeTableView","ref","applicantsList","itemsPerPage","scopedSlots","_u","fn","_l","tr","indextr","fullname","_s","canCreateProject","on","$event","stopPropagation","createProjectRequest","_e","slot","isMounted","currentItemsPage","queriedItems","itemsPerPageDefinitions","it","partialCreationClientName","person_type","pmTypeValue","formatDocField","partialCreationUserId","documentSet","savePartialPreproject","staticRenderFns","mixins","components","onError","onSuccess","errorMssg","existingApplicantId","errorEmailNotAvailable","minimumDaysToCreditReview","created_id","pfTypeValue","pfaeTypeValue","person_type_section_id","form_id_pf","form_id_pfae","form_id_pm","pfFormatDocId","pmFormatDocId","pf_person_type","pm_person_type","partialCreationConfirmed","isPartialCreation","watch","family_group_id","collection","text","computed","client_id","color","title","acceptText","confirmPartialCreation","type","cancelText","accept","confirmFullCreation","mssg","cancel","close","goToProject","name","params","finish","formId","vFieldsCount","ff","component"],"mappings":"mIAAe,QACbA,QAAS,CACPC,IAAIC,EAAOC,GAAO,EAAOC,GAAO,GAC9B,OAAY,MAATF,GAA0B,IAATA,EACX,GAGNC,EACME,KAAKC,MAAMJ,EAAOE,GAEnBA,EACCC,KAAKE,WAA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A,eAGA,8BACA,oCACA,6BAGA,6BACA,qBACA,IACA,8CACA,wFAAA8C,iBACA,wDACA,wBACA,iBACAC,eACAC,8BACAJ,UACAK,sBAGA,gCACA,iCAEA,8BACA,8BAGA,SACA,aAEA,sBAGAC,4BACA,iBACAH,gBACAI,eACAH,kCACAJ,sDACAK,uBACAG,sBACAC,iCAIAC,yBACA,iBACAP,gBACAI,eACAH,kCACAJ,yJACAK,uBACAG,sBACAC,oCAGA,0BACA,2BACA,qCACA,wBACA,sBAEA,6BACA,qBACA,OAAAP,oCACA,mEACA,mBACA,gCACA,uBAGA,wBACA,6BAEA,sBAEA,sBACA,8IACAS,kDACA,iBACAR,gBACAI,eACAH,2CACAJ,OACAK,2BACAG,uBACAC,wBACAG,mBACAC,qBAGAC,cACA,sBACAC,uBACAC,QAAAvR,uBAGAwR,SACA,yBAGA,sCACA,IACA,kEACA,0CACA,qCACA,4FACA,mBACA,+EACA,sEACA,SACA,eAIA,oBACA,IACA,WACA,yBACA,sBACAC,kBACA,MACA,wBACAA,oBACA,MACA,sBACAA,kBACA,MACA,QACA,MAGA,wDACA,sBACA,iCACA,qBACA,wBAEA,oDACA,qBACA,4BAEA,QAEA,6BACAC,IACAjU,qBAKA,GAJA,gCACA,gCAAAiU,MAGA,gBACA,OAAAjO,YAAAmL,kBACA,2CACA,iBACA+C,mDAEA,gCAIA,KACA,4BAIA,SACA,aACA,iBAGA,8BACA,sDACA,KAIA,IACA,OAAAlB,oCACA,mEACA,mBACA,gCACA,uBAGA,wBACA,6BAGA,SACA,eACA,iCAjBA,qGCxXuW,I,YCOnWmB,EAAY,eACd,EACArF,EACAuC,GACA,EACA,KACA,KACA,MAIa,aAAA8C,E","file":"js/chunk-47af97e9.02f83f2d.js","sourcesContent":["export default {\n  methods: {\n    reg(value, caps = false, trim = false){\n      if(value == null || value == ''){\n        return \"\";\n      }\n\n      if(caps){\n        return this.upper(value, trim);\n      }\n      else if(trim) {\n        return this.trimSpaces(value);\n      }\n      else {\n        return value;\n      }\n    },\n    upper(value, trim = false) {\n      if (value == null || value == '') {\n        return \"\";\n      }\n      return this.cleanTildes(value, trim).toUpperCase();\n    },\n    cleanTildes(s, trim = false){\n      var r = s.toLowerCase();\n      r = r.replace(new RegExp(\"[àáâãäå]\", 'g'),\"a\");\n      r = r.replace(new RegExp(\"æ\", 'g'),\"ae\");\n      r = r.replace(new RegExp(\"ç\", 'g'),\"c\");\n      r = r.replace(new RegExp(\"[èéêë]\", 'g'),\"e\");\n      r = r.replace(new RegExp(\"[ìíîï]\", 'g'),\"i\");\n      //r = r.replace(new RegExp(\"ñ\", 'g'),\"n\");                            \n      r = r.replace(new RegExp(\"[òóôõö]\", 'g'),\"o\");\n      r = r.replace(new RegExp(\"œ\", 'g'),\"oe\");\n      //r = r.replace(new RegExp(\"[ùúûü]\", 'g'),\"u\");\n      r = r.replace(new RegExp(\"[ùúû]\", 'g'),\"u\");\n      r = r.replace(new RegExp(\"[ýÿ]\", 'g'),\"y\");\n      \n      if(trim){\n        r = r.replace(/\\s/g,'');\n      }\n\n      return r;\n    },\n    trimSpaces(s){\n      return s.replace(/\\s/g,'');\n    },\n    uppercase(value){\n      if (value == null || value == '') {\n        return \"\";\n      }\n      return value.toUpperCase();\n    }\n  }\n}","export default {\n  methods: {\n      async setZipCodeAddressValues(addressId, address, {zipCodeVariable, statesArray, citiesArray, neighborhoodsArray}) {\n        if(!addressId)\n        {  \n          this[zipCodeVariable] = '';\n          return;\n        }\n        let result = await this.publicApiGet(`api/getAddressById/${addressId}`);\n        if(result) {\n          result = result.data;\n          this[zipCodeVariable] = result.address.zipcode;\n          if(result.address.zipcode != null) {\n            this.collections[statesArray] = [result.state];\n            this.collections[citiesArray] = [result.city];\n            this.collections[neighborhoodsArray] = result.neighborhoods;\n            \n            address.state_id = result.neighborhoods[0].city.state_id;\n            address.city_id = result.neighborhoods[0].city_id;\n            address.neighborhood_id = result.address.neighborhood_id;\n          }\n        }\n      },\n      async setPayloadZipCodeAddressValues(addressId, payload, {addressName, statesArray, citiesArray, neighborhoodsArray}) {\n        if(!addressId)\n        {  \n          this[addressName] = '';\n          return;\n        }\n        let result = await axios.get(`api/getAddressById/${addressId}`);\n        if(result) {\n          result = result.data;\n          if(result.address.zipcode != null) {\n            this[addressName] = result.address.zipcode;\n            this.collections[statesArray] = [result.state];\n            this.collections[citiesArray] = [result.city];\n            this.collections[neighborhoodsArray] = result.neighborhoods;\n            \n            payload[`${addressName}$state_id`] = result.neighborhoods[0].city.state_id;\n            payload[`${addressName}$city_id`] = result.neighborhoods[0].city_id;\n            payload[`${addressName}$neighborhood_id`] = result.address.neighborhood_id;\n          }\n        }\n      },\n\n\t\tverifyPayloadZipCode(payload, {addressName, statesArray, citiesArray, neighborhoodsArray, addressId}) {\n\t\t\tif(this[addressName] == payload[`${addressName}$zipcode`])\n\t\t\t\treturn;\n\t\t\tthis.clearPayloadAddressFields({payload, addressName, statesArray, citiesArray, neighborhoodsArray});\n\t\t\tif(payload[`${addressName}$country_id`] == this.mexicoCountryId) // México\n      {\n        let zipCode = payload[`${addressName}$zipcode`];\n        if(zipCode && zipCode.length >= 5) {\n          if(this.verifyZipCodeTimer != null) \n            clearTimeout(this.verifyZipCodeTimer);\n          this.verifyZipCodeTimer = setTimeout(() => this.getPayloadAddressByZipCode({payload, addressName, statesArray, citiesArray, neighborhoodsArray, addressId}), 1000);\n        }\n      }\n\t\t},\n\t\tasync getPayloadAddressByZipCode({payload, addressName, statesArray, citiesArray, neighborhoodsArray, addressId}) {\n      try {\n        if(isNaN(payload[`${addressName}$zipcode`])) {\n\t\t\t\t\tthis.warningNotif('Código postal', 'El código postal ingresado no es válido');\n          return;\n        }\n\n        if(addressId && !this[addressName] && payload[`${addressName}$neighborhood_id`] != null) {\n          this.setPayloadZipCodeAddressValues(addressId, payload, {\n            addressName,\n            statesArray, \n            citiesArray, \n            neighborhoodsArray\n          });\n          return;\n        }\n  \n        let result = await axios.get(`api/getAddressByZipCode/${payload[`${addressName}$zipcode`]}`);\n        if(result) {\n          result = result.data;\n          if(result.neighborhoods.length > 0) {\n            this[addressName] = payload[`${addressName}$zipcode`];\n            this.collections[statesArray] = [result.state];\n            this.collections[citiesArray] = [result.city];\n            this.collections[neighborhoodsArray] = result.neighborhoods;\n            payload[`${addressName}$state_id`] = result.state.id;\n            payload[`${addressName}$city_id`] = result.city.id;\n            payload[`${addressName}$neighborhood_id`] = null;\n            return;\n          }\n          this.warningNotif('Código postal', 'El código postal no tuvo resultados');\n        }\n      } \n      catch (e) {\n        this.warn(e);\n        this.failed = true;\n      }\t\n    },\n\t\tclearPayloadAddressFields({payload, addressName, statesArray, citiesArray, neighborhoodsArray}) {\n\t\t\tpayload[`${addressName}$state_id`] = null;\n\t\t\tpayload[`${addressName}$city_id`] = null;\n\t\t\tpayload[`${addressName}$neighborhood_id`] = null;\n  \n      this.collections[statesArray] = [];\n\t\t\tthis.collections[citiesArray] = [];\n\t\t\tthis.collections[neighborhoodsArray] = [];\n    },\n\n    verifyZipCode(address, {zipCodeVariable, statesArray, citiesArray, neighborhoodsArray}) {\n      if(this[zipCodeVariable] === undefined || this[zipCodeVariable] == address.zipcode)\n        return;\n      this.clearAddressFields({address, statesArray, citiesArray, neighborhoodsArray});\n      if(address.zipcode)\n        this[zipCodeVariable] = address.zipcode;\n      if(address.country_id == this.mexicoCountryId) // México\n      {\n        let zipCode = address.zipcode;\n        if(zipCode && zipCode.length >= 5) {\n          if(this.verifyZipCodeTimer != null) \n            clearTimeout(this.verifyZipCodeTimer);\n          this.verifyZipCodeTimer = setTimeout(() => this.getAddressByZipCode({address, statesArray, citiesArray, neighborhoodsArray}), 1000);\n        }\n      }\n\t},\t\t\t\n    async getAddressByZipCode({address, statesArray, citiesArray, neighborhoodsArray}) {\n      try {\n        if(isNaN(address.zipcode)) {\n          this.warningNotif('Código postal', 'El código postal ingresado no es válido');\n          return;\n        }\n  \n        let result = await this.publicApiGet(`api/getAddressByZipCode/${address.zipcode}`);\n        if(result) {\n          result = result.data;\n          if(result.neighborhoods.length > 0) {\n            this.collections[statesArray] = [result.state];\n            this.collections[citiesArray] = [result.city];\n            this.collections[neighborhoodsArray] = result.neighborhoods;\n            address.state_id = result.state.id;\n            address.city_id = result.city.id;\n            address.neighborhood_id = null;\n            return;\n          }\n          this.warningNotif('Código postal', 'El código postal no tuvo resultados');\n        }\n      } \n      catch (e) {\n        this.warn(e);\n        this.failed = true;\n      }\t\n    },\n    clearAddressFields({address, statesArray, citiesArray, neighborhoodsArray}) {\n      address.state_id = null;\n      address.city_id = null;\n      address.neighborhood_id = null;\n  \n      this.collections[statesArray] = [];\n\t\t\tthis.collections[citiesArray] = [];\n\t\t\tthis.collections[neighborhoodsArray] = [];\n    },\n    isAutoFormField(f){\n      return f.special_definition == 0 && f.doc_id == null && f.field_type != 'document';\n    },\n    isAutoFormFieldPublic(f){\n      return f.special_definition == 0 && f.doc_id == null && f.field_type != 'document' && f.bo_private != 1;\n    },\n    isDocumentNotPrivate(f){\n      return f.bo_private == 0 && (f.doc_id != null && f.field_type == 'document');\n    },\n    notDocumentNorPrivate(f){\n      return f.bo_private == 0 && \n      (f.doc_id == null && f.field_type != 'document');\n    },\n    isAutoFieldToSave(f){\n      return this.isAutoFormField(f) && !f.is_readonly;\n    },\n    formFieldSetter(f, parent, useNested = false){\n      f.fname = f.db_field;\n\n       if(f.max_chars > 0 || f.min_chars > 0){\n        // definir que se requiere trim\n        f.trim = true;\n      }\n\n      if(f.extras == null) return;\n      let extras = JSON.parse(f.extras);\n      f.parsed_extras = extras;\n\n      // check if need to be aware of change\n      if(extras.on_change != null){\n        f.on_change_method = extras.on_change;\n\n        if(!(extras.on_change in parent)){\n          this.warn(`METHOD IMPLEMENTATION MISSING [${f.fname}]: ${extras.on_change}`);\n        }\n      }\n\n      // check if need to be aware of change\n      if(extras.on_mounted != null){\n        f.on_mounted = extras.on_mounted;\n\n        if(!(extras.on_mounted in parent)){\n          this.warn(`METHOD IMPLEMENTATION MISSING [${f.fname}]: ${extras.on_mounted}`);\n        }\n      }\n\n      // check if need to be aware of change\n      if(extras.special_validation != null){\n        f.special_validation = extras.special_validation;\n        if(!(f.special_validation.method in parent)){\n          this.warn(`SPECIAL VALIDATION IMPLEMENTATION MISSING [${f.fname}][${f.section_id}]: ${f.special_validation.method}`);\n        }\n      }\n\n      if(extras.hard_validation != null){\n        f.hard_validation = extras.hard_validation;\n        if(!(f.hard_validation.method in parent)){\n          this.warn(`HARD VALIDATION IMPLEMENTATION MISSING [${f.fname}][${f.section_id}]: ${f.hard_validation.method}`);\n        }\n      }\n\n      // check if need to be show_conditioned\n      if(extras.show_only_if != null){\n        f.show_conditioned = true;\n        f.condition = extras.show_only_if;\n\n        if(!(extras.show_only_if in parent)){\n          this.warn(`CONDITION IMPLEMENTATION MISSING [${f.fname}]: ${extras.show_only_if}`);\n        }\n      }\n\n      // check if need to be a specific value\n      if(extras.exact_value != null){\n        f.exact_value = extras.exact_value;\n        //f.disabled = true;\n      }\n\n      // check if need to be a specific value\n      if(extras.is_readonly != null){\n        f.is_readonly = extras.is_readonly;\n        f.disabled = true;\n      }\n\n      if(extras.is_computed != null){\n        f.is_computed = extras.is_computed;\n      }\n\n      if(extras.external_computed != null){\n        f.external_computed = extras.external_computed;\n      }\n\n      if(extras.disabled != null){\n        f.disabled = extras.disabled;\n      }\n\n      if(extras.placeholder != null){\n        f.placeholder = extras.placeholder;\n      }\n      if(extras.disabled_from_today != null){\n        f.disabled_from_today = extras.disabled_from_today;\n      }\n\n       // check if edition need to be conditioned\n      if(extras.disabled_if != null){\n        f.disabled_conditioned = true;\n        f.disabled_condition = extras.disabled_if;\n\n        if(!(extras.disabled_if in parent)){\n          this.warn(`CONDITION IMPLEMENTATION MISSING [${f.fname}]: ${extras.disabled_if}`);\n        }\n      }\n\n      // check for alias\n      if(extras.alias != null){\n        f.fname = extras.alias;\n      }\n\n      // check prefix for nested values\n      if(extras.nested != null && useNested){\n        f.fname = extras.nested + \"$\" + f.fname;\n      }\n\n      // check prefix for div_class key\n      if(extras.div_class != null){\n        f.div_class = extras.div_class;\n      }\n\n      // check for extended textarea\n      if(extras.textarea_extended != null){\n        f.textarea_extended = extras.textarea_extended;\n      }\n\n      // check if should use input group\n      if(extras.input_group != null){\n        f.input_group = extras.input_group;\n        if(!(f.input_group.source in parent)){\n          this.warn(`INPUT GROUP SOURCE IMPLEMENTATION MISSING [${f.fname}]: ${f.input_group.source}`);\n        }\n      }\n    },\n    findDocSetsForField(formField, section){\n      return section.documents.find(f => f.id == formField.doc_id);\n    },\n    nestedFieldValue(main, field){\n      if(field == null){\n        return null;\n      }\n      else if(field == \"base\"){\n        return main;\n      }\n      else {\n        let val = this.getNestedObject(main, this.arrayFromFieldName(field) );\n        return val;\n      }\n    },\n    getNestedObject(nestedObj, pathArr) {\n      if(pathArr.length == 0){ return nestedObj}\n      return pathArr.reduce((obj, key) =>\n        (obj && obj[key] !== 'undefined') ? obj[key] : undefined, nestedObj);\n    },\n    setDeepObject(target, path, value) {\n      let pathArr = this.arrayFromFieldName(path);\n      pathArr.reduce((obj, key, level) => {\n        if(level == pathArr.length -1){\n          obj[key] = value;\n          return value;\n        }\n        if(obj[key] == undefined){\n          obj[key] = {};\n          return obj[key];\n        }\n        return obj[key];\n      }, target);\n    },\n    setDeepObjectWithIds(target, source, path, value){\n      let pathArr = this.arrayFromFieldName(path);\n      let nestedPath = [];\n      pathArr.reduce((obj, key, level) => {        \n        if(level == pathArr.length -1){\n          obj[key] = value;\n          obj.id = this.getNestedObject(source, nestedPath).id;\n          return value;\n        }\n        if(obj[key] == undefined){\n          obj[key] = {};\n          obj.id = this.getNestedObject(source, nestedPath).id;\n          nestedPath.push(key);\n          return obj[key];\n        }\n        nestedPath.push(key);\n        return obj[key];\n      }, target);\n    },\n    setNestedObjectWithIds(target, source, path, value){\n      let pathArr = this.arrayFromFieldName(path);\n      let nestedPath = [];\n      let parent = target;\n      pathArr.forEach(key => {\n        if(pathArr.length > 1){\n          parent = this.getNestedObject(target, nestedPath);\n        }\n        nestedPath.push(key);\n        let obj = this.getNestedObject(target, nestedPath);\n        let nidObj = this.getNestedObject(source, nestedPath);\n        let nid = null;\n        if(nidObj){\n          nid = nidObj.id;\n        }\n        if(nestedPath.join(\".\") == path){\n          if(!obj){\n            obj = value;\n            obj.id = nid;\n          }\n          else {\n            this.copyKeysToObject(obj, value);\n            obj.id = nid;\n          }\n        }\n        else{\n          if(!obj){\n            obj = {id: nid};\n          }\n          else {\n            obj.id = nid;\n          }\n        }\n        parent[key] = obj;\n      });\n    },\n    copyKeysToObject(recipient, origin){\n      let k;\n      for (k in origin) {\n        recipient[k] = origin[k];\n      }\n    },\n    arrayFromFieldName(fname){\n      return fname.split('.');\n    },\n    objectIsEmpty(obj) {\n      return Object.keys(obj).length === 0;\n    },\n    unpackNested(data){\n      let base = {};\n      for(var prop in data){\n        if(typeof data[prop] == \"object\"){\n          for (var pr in data[prop]) {\n            base[prop + \"$\" + pr] = data[prop][pr];\n          }\n        }\n        else {\n          base[prop] = data[prop];\n        }\n      }\n      return base;\n    },\n    packNested(base){\n      let data = {};\n      for(var prop in base){\n        if(prop.includes(\"$\")){\n          let r = prop.split(\"$\");\n          let k = r[0];\n          let v = r[1];\n          if(data[k] == null){\n            data[k] = {};\n          }\n          data[k][v]= base[prop];\n        }\n        else {\n          data[prop] = base[prop];\n        }\n      }\n      return data;\n    },\n    async validate_unique_curp(curp, personal_id){\n      try {\n        let p = {curp: curp, current_personal_profile_id: personal_id};\n        let r = await this.publicApiPost('api/v1/personal/verify_unique_curp', p);\n        return r.data == \"valid\";\n      }\n      catch (error) {\n        return false;\n      }\n    },\n    async validate_clabe(clabe, banks){\n      if(clabe.length >= 3){\n        let g = clabe.slice(0, 3);\n        if(banks.find(f => f.clabe_code == g)){\n          return true;\n        }\n      }\n      return false;\n    },\n    async validate_unique_personal_rfc(rfc, personal_id){\n      try {\n        let validation = [];\n\n        let p = {rfc: rfc, current_personal_profile_id: personal_id};\n        let r = await axios.post('api/v1/personal/verify_unique_rfc', p);\n        if (r.data !== \"valid\") {\n          validation.push({n: \"RFC ya registrado\", e: \"Ya tenemos un registro con el mismo RFC, te pedimos de favor nos contactes a través del Chat para revisar el caso.\"});\n        }\n\n        let p2 = {rfc: rfc};\n        let r2 = await axios.post('api/v1/personal/validate_rfc_format', p2);\n        if (r2.data !== \"valid\") {\n          validation.push({n: \"RFC Formato Incorrecto\", e: \"El formato de RFC no coincide con el formato para una Persona Física.\"});\n        }\n\n        return validation;\n      }\n      catch (error) {\n        return false;\n      }\n    },\n    async validate_unique_business_rfc(rfc, business_id, just_uniqueness = false){\n      try {\n        let validation = [];\n        let p = {rfc: rfc, current_business_profile_id: business_id};\n        let r = await axios.post('api/v1/business/verify_unique_rfc', p);\n        if (r.data !== \"valid\") {\n          if(just_uniqueness) {\n            return false;\n          }\n          validation.push({n: \"RFC ya registrado\", e: \"Ya tenemos un registro con el mismo RFC, te pedimos de favor nos contactes a través del Chat para revisar el caso.\"});\n        }\n\n        let p2 = {rfc: rfc};\n        let r2 = await axios.post('api/v1/business/validate_rfc_format', p2);\n        if (r2.data !== \"valid\") {\n          validation.push({n: \"RFC Formato Incorrecto\", e: \"El formato de RFC no coincide con el formato para una Persona Moral.\"});\n        }\n\n        return validation;\n      }\n      catch (error) {\n        return false;\n      }\n    },\n    async isEmailEqualToApplicants(email, applicantUserId, relationData) {\n      try {\n        const {data} = await axios.post(`api/v1/email-equal-to-applicants/${applicantUserId}`, { email, relationData });\n        return data.isEqual;\n      }\n      catch (error) {\n        return false;\n      }\n    },\n    async isEmailDuplicatedInProject(email, projectId, relationData) {\n      try {\n        const {data} = await axios.post(`api/v1/email-duplicated-in-project/${projectId}`, { email, relationData });\n        return data.isEqual;\n      }\n      catch (error) {\n        return false;\n      }\n    },\n    evaluateConditionBase(parent, condition){\n      if(condition != null && condition in parent){\n        let ss = parent[condition];\n      //  console.log(\"evaluateCondition => \" + condition + \", \" + ss);\n        return ss;\n      }\n      else if(condition != null) {\n        this.warn(\"Missing evaluator condition: \" + condition);\n      }\n    },\n    async evaluateFieldCompletition(f, container, evaluator, validator){\n      if(container != null){\n        let val = container[f.fname];\n        if(f.show_conditioned){\n          let inc = evaluator(f.condition);\n          if(!inc){\n            return null;\n          }\n        }\n        if(f.field_type == \"checkbox\") { return null}\n        let rules = \"\";\n        if(f.is_required){ rules = \"required\";}\n        let r = await validator.verify(val, rules);      \n        return r.valid;      \n      }\n      return false;\n    },\n    async asyncForEach(array, callback){\n      for (let index = 0; index < array.length; index++) {\n        await callback(array[index], index, array);\n      }\n    },\n    /**\n     * Envía una notificación a slack cuando el curp/rfc es duplicado\n     * @param {\n     *  user_id: number,\n     *  loan_id: number,\n     *  flow: string,\n     *  role: string,\n     *  id: string\n     * } data \n     */\n    async sendIdentifiersNotification(data)\n    {\n      this.missingFieldsNotif(null, `Ya existe un perfil asociado a este ${data.flow}. Te contactaremos por WhatsApp o correo electrónico en no más de 1 día hábil para brindarte apoyo.`);\n      try {\n        await this.publicApiPost('api/v1/profile/identifiers-notification', data);\n      } catch (error) {\n        console.log(error);\n      }\n    }\n  }\n}","import moment from 'moment'\nexport default {\n  methods: {\n    constitutionDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('LL');\n      }\n    },\n    constitutionPaymentDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD [de] MMMM');\n      }\n    },\n    explicitDateFormat(value) {\n      if(value){\n        return moment(String(value)).format('DD/MM/YYYY [a las] hh:mm a')\n      }\n    },\n    sessionFormat(value) {\n      if(value){\n        return moment(String(value)).format('DD/MM/YYYY h:mm a')\n      }\n    },\n    regularDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD/MM/YYYY')\n      }\n    },\n    yearDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('YYYY/MM/DD')\n      }\n    },\n    midDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD [de] MMMM [de] YYYY')\n      }\n    },\n    humanDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('D MMM YYYY')\n      }\n    },\n    dateTimeFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD/MM/YYYY HH:mm')\n      }\n    },\n    dateTime12Format(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD/MM/YYYY h:mm a')\n      }\n    },\n    compactDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD [de] MMM [´]YY')\n      }\n    },\n    logDateFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD [de] MMMM [de] YYYY HH:mm')\n      }\n    },\n    timeAgoFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").fromNow();\n      }\n    },\n    calculateAgeFromDate(value){\n      if(value){\n        return moment().diff(value, 'years');\n      }\n    },\n    minDateForValidAge(years){\n      return moment().subtract(years, 'years').format();\n    },\n    calculateDaysDiff(value){\n      if(value){\n        let m = moment(String(value));\n        let n = moment();\n        return n.diff(m, 'days');\n      }\n    },\n    validatedDate(value){\n      if(value){\n        let m = moment(String(value));\n        if(m.isValid()){\n          return m.locale(\"es\").format('DD/MM/YYYY');\n        }\n        else {\n          return \"--\";\n        }\n      }\n    },\n    getDateFromInputs(yy,mm,dd){\n      let yint =  parseInt(yy);\n      let mint = parseInt(mm);\n      mint -= 1;\n      if(yint <= 20){\n        // suponer que el año es entre 2000 y 2010\n        yint += 2000;\n      }\n      else {\n        // suponer que el año es menor a 2000\n        yint += 1900;\n      }\n\n      let m = moment({ year: yint, month: mint, day: dd});\n      if(m.isValid()){\n        return m.format('YYYY-MM-DD');\n      }\n      else {\n        return false;\n      }\n    },\n    nextAccreditationDate(value){\n      if(value){\n        let m = moment(String(value)).add(180, 'days');\n        return m.locale(\"es\").format('DD/MM/YYYY');\n      }\n      else {\n        return \"--\"\n      }\n    },\n    setDateToEndOfDay(value){\n      let m = moment(String(value)).add(1, 'days');\n      let d = m.endOf('day')\n      let end = d.locale(\"es\").format('YYYY-MM-DD HH:mm:ss');\n      return end;\n    },\n    setDateToStartOfDay(value){\n      let m = moment(String(value)).add(1, 'days');\n      let d = m.startOf('day');\n      let start = d.locale(\"es\").format('YYYY-MM-DD HH:mm:ss');\n      return start;\n    },\n    signatureFormatDate(value){\n      if(value){\n        let m = moment(String(value));\n        if(m.isValid()){\n          return m.locale(\"es\").format('DD/MM/YYYY HH:mm:ss');\n        }\n      }\n      return \"No establecido\";\n    },\n    signatureValidityDate(value){\n      if(value){\n        let m = moment(String(value));\n        if(m.isValid()){\n          return m.locale(\"es\").format('DD/MM/YYYY');\n        }\n      }\n      return \"No establecido\";\n    },\n    incomeSpecial(value){\n      if(value){\n        let m = moment(String(value));\n        if(m.isValid()){\n          return m.locale(\"es\").format('MMMM - YYYY').toUpperCase();\n        }\n      }\n      return \"No establecido\";\n    },\n    timeStampFormat(value) {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('DD-MM-YYYY-HH_mm_ss')\n      }\n    },\n    formatDatepicker(value)\n    {\n      if(value){\n        return moment(String(value)).locale(\"es\").format('YYYY-MM-DD')\n      }\n    },\n    isAfter(date, maxDate, limit = 'year')\n    {\n      return moment(date).isAfter(maxDate, limit); \n    },\n    getPreviousMonth(date, format = \"MMMM\", step = 1)\n    {\n      return moment(date).locale(\"es\").subtract(step, 'months').format(format);\n    },\n    getDay(date)\n    {\n      return moment(date).locale(\"es\").format('DD');\n    }\n  }\n}","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"proveedor\"}},[_c('vx-card',{staticClass:\"mb-6\"},[_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full\"},[_c('h1',{staticClass:\"rg-big-title extrabold rg-title\"},[_vm._v(\"Mis \"),_c('span',{staticClass:\"orange\"},[_vm._v(\"solicitantes\")]),_vm._v(\".\")]),_c('p',{staticClass:\"text-subtitle mt-4 black\",staticStyle:{\"color\":\"black !important\"}},[_vm._v(\" En esta página podrás consultar la lista de solicitantes que has registrado previamente. También podrás crear un proyecto a partir de alguno de los solicitantes, \"),_c('strong',[_vm._v(\"si las condiciones de su crédito lo permiten.\")])])])])]),(_vm.activeTableView)?_c('vx-card',{staticClass:\"mb-6\",attrs:{\"title\":\"Lista de solicitantes\"}},[_c('p',[_vm._v(\"A partir de la acción \"),_c('strong',[_vm._v(\"\\\"crear proyecto\\\"\")]),_vm._v(\" podrás abrir una nueva solicitud de forma automática. En caso de que el proyecto más reciente del solicitante se haya aprobado hace más de 180 días, será necesario proveer de nueva cuenta el \"),_c('strong',[_vm._v(\"Formato de revisión crediticia\")]),_vm._v(\" firmado y escaneado. \")]),_c('vs-table',{ref:\"applicantsTable\",attrs:{\"stripe\":\"\",\"search\":\"\",\"noDataText\":\"No se han generado registros\",\"data\":_vm.applicantsList,\"pagination\":\"\",\"max-items\":_vm.itemsPerPage},scopedSlots:_vm._u([{key:\"default\",fn:function({data}){return _vm._l((data),function(tr,indextr){return _c('vs-tr',{key:indextr},[_c('vs-td',{attrs:{\"data\":data[indextr].fullname}},[_vm._v(\" \"+_vm._s(data[indextr].fullname)+\" \")]),_c('vs-td',{attrs:{\"data\":data[indextr].email}},[_vm._v(\" \"+_vm._s(data[indextr].email)+\" \")]),_c('vs-td',{attrs:{\"data\":data[indextr].id}},[(_vm.canCreateProject(tr))?_c('vs-button',{staticClass:\"p-2\",attrs:{\"type\":\"flat\",\"icon\":\"add_box\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.createProjectRequest(data[indextr])}}},[_vm._v(\"Crear proyecto\")]):_vm._e()],1)],1)})}}],null,false,2843652223)},[_c('div',{staticClass:\"flex flex-wrap-reverse flex-grow justify-end\",attrs:{\"slot\":\"header\"},slot:\"header\"},[(_vm.isMounted)?_c('vs-dropdown',{staticClass:\"cursor-pointer mr-4 items-per-page-handler\",attrs:{\"vs-trigger-click\":\"\"}},[_c('div',{staticClass:\"p-3 border border-solid d-theme-border-grey-light rounded-full d-theme-dark-bg cursor-pointer flex items-center justify-between font-medium\"},[_c('span',{staticClass:\"mr-2\"},[_vm._v(_vm._s(_vm.currentItemsPage * _vm.itemsPerPage - (_vm.itemsPerPage - 1))+\" - \"+_vm._s(_vm.applicantsList.length - _vm.currentItemsPage * _vm.itemsPerPage > 0 ? _vm.currentItemsPage * _vm.itemsPerPage : _vm.applicantsList.length)+\" de \"+_vm._s(_vm.queriedItems))]),_c('feather-icon',{attrs:{\"icon\":\"ChevronDownIcon\",\"svgClasses\":\"h-4 w-4\"}})],1),_c('vs-dropdown-menu',_vm._l((_vm.itemsPerPageDefinitions),function(it){return _c('vs-dropdown-item',{key:it,on:{\"click\":function($event){_vm.itemsPerPage=it}}},[_c('span',[_vm._v(_vm._s(it))])])}),1)],1):_vm._e()],1),_c('template',{slot:\"thead\"},[_c('vs-th',{staticClass:\"bold\",attrs:{\"sort-key\":\"fullname\"}},[_vm._v(\"NOMBRE\")]),_c('vs-th',{staticClass:\"bold\",attrs:{\"sort-key\":\"email\"}},[_vm._v(\"EMAIL\")]),_c('vs-th',{staticClass:\"bold\"},[_vm._v(\"ACCIONES\")])],1)],2)],1):_c('vx-card',{staticClass:\"mb-5\",attrs:{\"title\":\"Presolicitud para solicitante existente\"}},[_c('p',{staticClass:\"mb-3\"},[_vm._v(\"Solicitante seleccionado: \"),_c('strong',[_vm._v(_vm._s(this.partialCreationClientName))]),_vm._v(\".\")]),_c('p',{staticClass:\"mb-4\"},[_vm._v(\"Se creará una nueva pre-solicitud a partir de los datos ya existentes del solicitante. Sin embargo, es necesario que \"),_c('strong',[_vm._v(\"se llene de nueva cuenta el formato de revisión crediticia y lo agregues firmado y escaneado.\")]),_vm._v(\" Puedes descargar el formato aquí:\")]),(_vm.person_type != _vm.pmTypeValue)?_c('download-button',{attrs:{\"title\":\"Círculo de Crédito Persona Física o PFAE\",\"actionLink\":\"/formatos/Formato-Consulta-Informacion-Crediticia-CC-Persona-Fisica-o-PFAE.pdf\",\"fileName\":\"Formato-Consulta-Informacion-Crediticia-CC-Persona-Fisica-o-PFAE.pdf\",\"remoteFile\":true}}):_vm._e(),(_vm.person_type == _vm.pmTypeValue)?_c('download-button',{attrs:{\"title\":\"Círculo de Crédito Persona Moral\",\"actionLink\":\"/formatos/Formato-Consulta-Informacion-Crediticia-CC-Persona-Moral.pdf\",\"fileName\":\"Formato-Consulta-Informacion-Crediticia-CC-Persona-Moral.pdf\",\"remoteFile\":true}}):_vm._e(),_c('div',{staticClass:\"vx-row\"},[_c('document-upload',{ref:\"formato\",attrs:{\"f\":_vm.formatDocField.formField,\"automatic\":true,\"target_id\":_vm.partialCreationUserId,\"doc\":_vm.formatDocField.documentSet,\"skipLoadedActions\":false,\"initAsEmpty\":true}})],1),_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full\"},[_c('div',{staticClass:\"flex justify-between flex-wrap\"},[_c('vs-button',{staticClass:\"mt-2\",attrs:{\"type\":\"border\"},on:{\"click\":()=> _vm.activeTableView = true}},[_vm._v(\"Cancelar y volver\")]),_c('vs-button',{staticClass:\"mt-2\",on:{\"click\":function($event){return _vm.savePartialPreproject()}}},[_vm._v(\"Enviar\")])],1)])])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div id=\"proveedor\">\n\n    <vx-card class=\"mb-6\" >\n      <div class=\"vx-row\">\n        <div class=\"vx-col w-full\">\n            <h1 class=\"rg-big-title extrabold rg-title\">Mis <span class=\"orange\">solicitantes</span>.</h1>\n            <p class=\"text-subtitle mt-4 black\" style=\"color: black !important;\">\n              En esta página podrás consultar la lista de solicitantes que has registrado previamente. \n              También podrás crear un proyecto a partir de alguno de los solicitantes, <strong>si las condiciones de su crédito lo permiten.</strong>\n            </p>\n        </div>\n      </div>\n    </vx-card>\n\n    <vx-card v-if=\"activeTableView\" title=\"Lista de solicitantes\" class=\"mb-6\">\n      <p>A partir de la acción <strong>\"crear proyecto\"</strong> podrás abrir una nueva solicitud de forma automática.\n        En caso de que el proyecto más reciente del solicitante se haya aprobado hace más de 180 días, será necesario proveer de nueva cuenta el <strong>Formato de revisión crediticia</strong> firmado y escaneado.\n      </p>\n      \n      <vs-table ref=\"applicantsTable\" stripe search noDataText=\"No se han generado registros\" :data=\"applicantsList\" pagination :max-items=\"itemsPerPage\">\n\n        <div slot=\"header\" class=\"flex flex-wrap-reverse flex-grow justify-end\">\n          <!-- ITEMS PER PAGE -->\n          <vs-dropdown v-if=\"isMounted\" vs-trigger-click class=\"cursor-pointer mr-4 items-per-page-handler\">\n            <div class=\"p-3 border border-solid d-theme-border-grey-light rounded-full d-theme-dark-bg cursor-pointer flex items-center justify-between font-medium\">\n              <span class=\"mr-2\">{{ currentItemsPage * itemsPerPage - (itemsPerPage - 1) }} - {{ applicantsList.length - currentItemsPage * itemsPerPage > 0 ? currentItemsPage * itemsPerPage : applicantsList.length }} de {{ queriedItems }}</span>\n              <feather-icon icon=\"ChevronDownIcon\" svgClasses=\"h-4 w-4\" />\n            </div>\n            <vs-dropdown-menu>\n              <vs-dropdown-item v-for=\"it in itemsPerPageDefinitions\" @click=\"itemsPerPage=it\" :key=\"it\">\n                <span>{{it}}</span>\n              </vs-dropdown-item>\n            </vs-dropdown-menu>\n          </vs-dropdown>\n        </div>\n\n        <template slot=\"thead\">\n          <vs-th class=\"bold\" sort-key=\"fullname\">NOMBRE</vs-th>\n          <vs-th class=\"bold\" sort-key=\"email\">EMAIL</vs-th>\n          <vs-th class=\"bold\">ACCIONES</vs-th>\n\n        </template>\n\n        <template slot-scope=\"{data}\">\n          <vs-tr :key=\"indextr\" v-for=\"(tr, indextr) in data\">\n\n            <vs-td :data=\"data[indextr].fullname\">\n              {{ data[indextr].fullname }}\n            </vs-td>\n\n            <vs-td :data=\"data[indextr].email\">\n              {{ data[indextr].email }}\n            </vs-td>\n\n            <vs-td :data=\"data[indextr].id\">\n              <vs-button v-if=\"canCreateProject(tr)\" type=\"flat\" class=\"p-2\" icon=\"add_box\" @click.stop=\"createProjectRequest(data[indextr])\">Crear proyecto</vs-button>\n            </vs-td>\n          </vs-tr>\n        </template>\n      </vs-table>\n    </vx-card>\n\n    <!-- Formato -->\n    <vx-card v-else title=\"Presolicitud para solicitante existente\" class=\"mb-5\">\n      <p class=\"mb-3\">Solicitante seleccionado: <strong>{{this.partialCreationClientName}}</strong>.</p>\n      <p class=\"mb-4\">Se creará una nueva pre-solicitud a partir de los datos ya existentes del solicitante.\n        Sin embargo, es necesario que <strong>se llene de nueva cuenta el formato de revisión crediticia y lo agregues firmado y escaneado.</strong>\n        Puedes descargar el formato aquí:</p>\n        <download-button\n        v-if=\"person_type != pmTypeValue\"\n          title=\"Círculo de Crédito Persona Física o PFAE\"\n          actionLink=\"/formatos/Formato-Consulta-Informacion-Crediticia-CC-Persona-Fisica-o-PFAE.pdf\"\n          fileName=\"Formato-Consulta-Informacion-Crediticia-CC-Persona-Fisica-o-PFAE.pdf\"\n          :remoteFile=\"true\" />\n\n      <download-button\n        v-if=\"person_type == pmTypeValue\"\n        title=\"Círculo de Crédito Persona Moral\"\n        actionLink=\"/formatos/Formato-Consulta-Informacion-Crediticia-CC-Persona-Moral.pdf\"\n        fileName=\"Formato-Consulta-Informacion-Crediticia-CC-Persona-Moral.pdf\"\n        :remoteFile=\"true\" />\n\n      <div class=\"vx-row\">\n        <document-upload \n          ref=\"formato\"\n          :f=\"formatDocField.formField\"\n          :automatic=\"true\"\n          :target_id=\"partialCreationUserId\"\n          :doc=\"formatDocField.documentSet\"\n          :skipLoadedActions=\"false\"\n          :initAsEmpty=\"true\"\n          />\n      </div>\n\n      <!-- Save Button -->\n      <div class=\"vx-row\">\n        <div class=\"vx-col w-full\">\n          <div class=\"flex justify-between flex-wrap\">\n            <vs-button type=\"border\" class=\"mt-2\" @click=\"()=> activeTableView = true\">Cancelar y volver</vs-button>\n            <vs-button class=\"mt-2\" @click=\"savePartialPreproject()\">Enviar</vs-button>                \n          </div>\n        </div>\n      </div>\n\n    </vx-card>\n\n  </div>\n</template>\n\n<script>\nimport inputHelper from \"@mixins/inputHelper\"\nimport dateHelper from \"@mixins/dateHelper\";\nimport formHelper from \"@components/mixins/formHelper\";\nconst itemsPerPageDefinitions = [5,10,25,50];\n\nexport default {\n  mixins: [inputHelper, dateHelper,formHelper],\n  components: {\n  },\n  data(){\n    return {\n      applicantsList: [],\n      isMounted: false,\n\n      itemsPerPageDefinitions: itemsPerPageDefinitions,\n      itemsPerPage: itemsPerPageDefinitions[0],\n      activeTableView: null,\n\n      onError: false,\n      onSuccess: false,\n      errorMssg: \"\",\n\n      existingApplicantId: null,\n      errorEmailNotAvailable: null,\n      minimumDaysToCreditReview: 180,      \n      created_id: null,\n\n      pfTypeValue: 0,\n      pfaeTypeValue: 2,\n      pmTypeValue: 1,\n      person_type_section_id: 25,\n      person_type: null,\n      form_id_pf: 9,\n      form_id_pfae: 10,\n      form_id_pm: 11,\n      pfFormatDocId: 16,\n      pmFormatDocId: 24,\n      pf_person_type: 1,\n      pm_person_type: 1,\n      partialCreationConfirmed: null,\n      isPartialCreation: null,\n      formatDocField: null,\n      partialCreationClientName: null,\n      partialCreationUserId: null,\n    }\n  },\n  async created(){\n    this.isMounted = false;\n    this.showLoading(true);\n    this.activeTableView = true;\n    await this.getAvailableApplicants();\n    this.isMounted = true;\n    this.showLoading(false);\n  },\n  watch: {\n    family_group_id(newVal,oldVal){\n      if(newVal == null){\n        this.getProductGroupsForSelect = [];\n      }\n      else {\n        let collection = this.productGroupsList.filter(f => f.family_group_id == this.family_group_id);\n        this.getProductGroupsForSelect = [];\n        collection.forEach(opt => {\n          this.getProductGroupsForSelect.push({value: opt.id, text: opt.name}); //conversion a sintaxis de vs-select \n        })\n      }\n    } \n  },\n  computed: {\n    currentItemsPage () {\n      if (this.isMounted) {\n        return this.$refs.applicantsTable.currentx;\n      }\n      return 0\n    },\n    queriedItems () {\n      return this.$refs.applicantsTable ? this.$refs.applicantsTable.queriedResults.length : this.applicantsList.length\n    },\n  },\n  methods: {\n    canCreateProject(item){\n      return true;\n    },\n    async getAvailableApplicants(){\n      try {\n        let res = await axios.get(`/api/v1/supplier/${this.SupplierId}/getSupplierAvailableClients`);\n        this.applicantsList = res.data;\n      }\n      catch (e) {\n        this.warn(e);\n      }\n    },\n    async createProjectRequest(item){\n      this.existingApplicantId = item.id;\n      await this.runClientValidation(item);\n    },\n\n    async runClientValidation(item){\n      this.showLoading(true);\n      try {\n        let sel = this.applicantsList.find(f => f.id == item.id);\n        let res = await axios.post(`/api/v1/supplier/${this.SupplierId}/checkExistingClientForProject`, {client_id: item.id});\n        const explanation = res.data.explanation.replace('%name%', sel.fullname);\n        if(res.data.result == 'failed') {\n          this.$vs.dialog({\n            color: \"danger\",\n            title: \"Creación de solicitud\",\n            text: `${explanation}`,\n            acceptText: \"Cerrar\",\n          });\n        }\n        else if(res.data.result == 'partial-passed') {\n          this.confirmPartialCreation(sel, explanation);\n        }\n        else if(res.data.result == 'full-passed') {\n          this.confirmFullCreation(sel, explanation);\n        }\n\n      } catch (error) {\n        this.warn(error);\n      }\n      this.showLoading(false);\n    },\n\n    confirmPartialCreation(sel, explanation){\n      this.$vs.dialog({\n        color: \"warning\",\n        type: \"confirm\",\n        title: \"Creación de pre-solicitud\",\n        text: `Confirme que desea crear una pre-solicitud. ${explanation}`,\n        acceptText: \"Confirmar\",\n        cancelText: 'Cancelar',\n        accept: this.setPreprojectView,\n      });\n    },\n\n    confirmFullCreation(sel, explanation){\n      this.$vs.dialog({\n        color: \"warning\",\n        type: \"confirm\",\n        title: \"Creación de pre-solicitud\",\n        text: `Confirme que desea crear una solicitud para el cliente ${sel.fullname}. Todos los datos se llenarán en base a la información provista en el pasado.`,\n        acceptText: \"Confirmar\",\n        cancelText: 'Cancelar',\n        accept: this.createFullPreproject,\n      });\n    },\n    async setPreprojectView(){\n      this.showLoading(true);\n      await this.getFormInfoForPartialCreation();\n      this.activeTableView = false;\n      this.showLoading(false);\n    },\n    async createFullPreproject(){\n      this.showLoading(true);\n      let payload = { client_id: this.existingApplicantId };\n      let res = await axios.post('/api/v2/projects/createProjectForApplicant', payload);\n      if(res.data.success == true){\n        this.created_id = res.data.id;\n        await this.formSubmitted();\n      }\n      else {\n        this.warn(res.data.error);\n        this.errorMssg = res.data.error;\n      }\n      this.showLoading(false);\n    },\n    async formSubmitted(){\n      let mssg = \"Tu proyecto ha sido creado, y está en revisión para ser pre-aprobado. Puedes completar la solicitud mientras tanto si así lo deseas. \";\n      mssg += `El ID de tu proyecto es: ${this.created_id}.`;\n      this.$vs.dialog({\n        color: \"success\",\n        type: \"confirm\",\n        title: \"Pre solicitud creada correctamente\",\n        text: mssg,\n        acceptText: \"Ver solicitud\",\n        cancelText: 'Finalizar',\n        accept: this.goToProject,\n        cancel: this.finish,\n        close: this.finish,\n      })\n    },\n    goToProject() {\n      this.$router.replace({\n        name: \"detalleProyecto\",\n        params: { id: this.created_id }\n      });\n    },\n    finish(){\n      this.activeTableView = true;\n    },\n\n    async getFormInfoForPartialCreation(){\n      try {\n        let c = this.applicantsList.find(f => f.id == this.existingApplicantId);\n        this.partialCreationClientName = c.fullname;\n        this.partialCreationUserId = c.user_id;\n        this.person_type = (c.person_type == this.pf_person_type) ? this.pfTypeValue : this.pmTypeValue;\n        await this.getFormInfo();\n        let doc_id = (c.person_type == this.pf_person_type) ? this.pfFormatDocId : this.pmFormatDocId;\n        this.formatDocField = this.documentsFields.find(f => f.documentSet.id == doc_id);\n      } catch (error) {\n        this.warn(error);\n      }      \n    },\n\n    async getFormInfo(){\n      try{          \n          let formId = null;\n          switch (this.person_type) {\n            case this.pfTypeValue:\n              formId = this.form_id_pf;\n              break;\n            case this.pfaeTypeValue:\n              formId = this.form_id_pfae;\n              break;\n            case this.pmTypeValue:\n              formId = this.form_id_pm;\n              break;\n            default:\n              break;\n          }\n      \n        let response = await axios.get(\"/api/v1/forms/getFormFields/\" + formId);\n        this.form = response.data.flow;\n        this.allSections = response.data.sections;\n        this.formSections = [];\n        this.documentsFields = [];\n\n        let url = this.ApiDomain + `/storagev3/documents/form/${formId}`;\n        let response2 = await axios.get(url);\n        this.documentsStates = response2.data;\n        \n        let vFieldsCount = 0;\n\n        this.allSections.forEach(s => {\n          vFieldsCount = 0;\n          s.fields.forEach(f => {\n           this.formFieldSetter(f, this, true);\n           if(this.notDocumentNorPrivate(f)){ vFieldsCount += 1;}\n\n           // check for documents\n            if(f.doc_id != null){\n              let ff = {formField: f, documentSet: null };\n              let ss = this.documentsStates.find(sid => sid.id == s.id);\n              if(ss && ss.documents){\n                ff.documentSet = ss.documents.find(d => d.id == f.doc_id);\n              }\n              this.documentsFields.push(ff);\n            }\n          })\n\n          if(vFieldsCount > 0){\n            this.formSections.push(s);\n          }\n        });\n      }\n      catch(e){\n        this.warn(e);\n        this.failed = true;\n      }\n    },\n    async savePartialPreproject(){\n      let r = await this.$refs.formato.checkForNewFileSaved();\n      if(!r){\n        this.missingFieldsNotif(\"Documento pendiente\", \"Por favor agrega el documento antes de continuar\");     \n      }\n      else {\n        try {\n          let payload = { client_id: this.existingApplicantId };\n          let res = await axios.post('/api/v2/projects/createProjectForApplicant', payload);\n          if(res.data.success == true){\n            this.created_id = res.data.id;\n            await this.formSubmitted();\n          }\n          else {\n            this.warn(res.data.error);\n            this.errorMssg = res.data.error;\n          }\n        }\n        catch (error) {\n          this.warn(err);\n          this.failedOperationNotif();\n        }\n      }   \n    },\n  }\n}\n</script>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ApplicantsPage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ApplicantsPage.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ApplicantsPage.vue?vue&type=template&id=b550548a&\"\nimport script from \"./ApplicantsPage.vue?vue&type=script&lang=js&\"\nexport * from \"./ApplicantsPage.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"],"sourceRoot":""}