{"version":3,"sources":["reducers/validacionReducer.js","reducers/authenticateReducer.js","reducers/timeoffrequestReducer.js","reducers/managerReducer.js","reducers/fixedassetsrequestReducers.js","reducers/personalrequestReducer.js","reducers/index.js","types/index.js","store.js","components/Navigation.js","config/axiosHR.js","config/axios.js","actions/authenticateActions.js","actions/timeoffrequestActions.js","components/Pto.js","actions/manageActions.js","actions/fixedassetrequestActions.js","actions/personalrequestActions.js","components/helpers/Spinner.js","components/PtoGeneric.js","components/Home.js","actions/validacionActions.js","components/NewPto.js","components/EditPto.js","components/ViewPto.js","components/PtoSupervisor.js","components/Supervisor.js","components/Login.js","components/Employees.js","components/ManageDepartment.js","components/EmployeesSupervisorManager.js","components/ManageDepartmentSupervisor.js","components/EmployeePtos.js","components/helpers/PrivateRoute.js","components/PtoCalendar.js","components/PtoYearCalendar.js","components/Director.js","components/NewPtoHr.js","components/NewUser.js","components/ViewUser.js","components/EditUser.js","components/HistoryEmployee.js","components/HistoryUsers.js","components/Footer.js","components/UserReports.js","components/FixedAssetRequests.js","components/helpers/ExportOrders.js","components/FixedAssetRequestPanel.js","components/NewFixedAsset.js","components/ViewFixedAssetRequest.js","components/EditFixedAssetRequest.js","components/PersonalRequest.js","components/PersonalRquestPanel.js","components/NewPersonalRequest.js","components/ViewPersonalRequest.js","components/EditPersonalRequest.js","components/ListDepartments.js","components/Departments.js","components/NewDepartment.js","components/EditDepartment.js","components/ViewProfile.js","components/EmployeesTranslateHours.js","components/TranslateHours.js","App.js","serviceWorker.js","index.js"],"names":["initialState","error","intialState","userInfo","hours","userHour","ptoRequests","ptoSupervisor","loading","pto","departments","employees","companies","territories","history","states","fixedAssetRequests","fixedAssetSupervisor","fixedAsset","personalRequests","personalSupervisor","personalRequest","combineReducers","state","action","type","payload","map","user","id","ptoList","filter","countPto","length","manager","request","createStore","rootReducer","compose","applyMiddleware","thunk","window","__REDUX_DEVTOOLS_EXTENSION__","a","Navigation","_ref","supervisor","useSelector","userEmail","email","hireDate","_useState","useState","_useState2","_slicedToArray","pendingPto","savePendingPto","_useState3","_useState4","saveloginBar","useEffect","_useState5","_useState6","ptoAuth","savePtoAuth","daysDifference","moment","diff","console","log","undefined","React","createElement","className","htmlFor","Fragment","Link","to","concat","format","style","fontSize","color","onClick","localStorage","clear","location","reload","src","alt","clienteAxiosHR","axios","create","baseURL","clienteAxios","obtenerInformacionUsuario","username","password","dispatch","descargaInformacionUsuario","data","avatarImage","getItem","token","formData","FormData","append","post","then","response","status","dataLogin","uid","axiosHr","respuesta","setItem","employee_name","employee_lastname","company","department","hire_date","territory","job_title","avatar","supervisor_mail","name","lastname","avatarUrl","supervisorEmail","descargaInformacionUsuarioExitosa","catch","descargaInformacionUsuarioError","obtenerBalanceHoras","horas","obtenerInicioBalanceHoras","get","obtenerBalanceHorasExito","obtenerBalanceHorasError","ajustarBalanceHoras","comenzarAjusteHoras","put","comenzarObtenerUsuarioBalanceHoras","obtenerUsuarioBalanceHorasExito","users","obtenerUsuarioBalanceHorasError","comenzarObtenerUsuarioBalanceHorasDirector","obtenerUsuarioBalanceHorasExitoDirector","obtenerUsuarioBalanceHorasErrorDirector","comenzarCrearUsuario","crearUsuarioExito","crearUsuarioError","editarUsuario","comenzarEditarUsuario","editarUsuarioExito","editarUsuarioError","comenzarEditarProfile","editarProfileExito","editarProfileError","createNewPtoAction","newPto","insertId","newPtoSuccess","getPTOListAction","newPtoError","editPto","editPtoSuccess","editPtoError","getPtoList","getPtoListSuccess","getPtoListError","getPtoListDepartmentSupervisor","startGetPtoSupervisorDepartment","getPtoListDepartmentSupervisorSuccess","getPtoListDepartmentSupervisorError","ptoListDepartment","startGetPtoSupervisorDirector","getPtoListSupervisorDirectorSuccess","getPtoListSupervisorDirectorError","deletePtoAction","startPtoDelete","delete","deletePtoSuccess","deletePtoError","getPtoDetail","startGetPtoDetail","getPtoDetailSuccess","getPtoDetailError","startPtoApproval","startPtoApprovalSuccess","startPtoApprovalError","startPtoDenegation","startPtoDenegationSuccess","startPtoDenegationError","Pto","managerView","useDispatch","balanceHoras","balanceHorasActual","departmentUsers","absenceText","createdAt","utc","date","absence_code","day_beginning","day_end","send","total_hours","reopen","totalHours","carryOverUsage","sickHoursUsage","ptoInfo","Swal","fire","title","text","showCancelButton","confirmButtonColor","cancelButtonColor","confirmButtonText","cancelButtonText","result","value","find","uids","user_id","available_hours","parseInt","carry_over_usage","sick_hours_usage","carry_over_sick_hours_usage","requested_hours","total_requests","carry_over","sick_hours_limit","sick_days_limit","carry_over_sick_time","hours_before_mov","hours_after_mov","hours_mov","carry_over_before_mov","carry_over_after_mov","carry_over_sick_time_before","carry_over_sick_time_after","observations","type_mov","date_mov","mov_increase_date","increase_date","mov_yearly_increase_date","year_increase_date","increase_date_before_mov","yearly_increase_date_before_mov","setTimeout","reOpenPto","carryOverSickHoursUsage","cancelRequest","sendEmail","hr","obtenerDepartamentos","obtenerDepartamentosInicio","obtenerDepartamentosExito","obtenerDepartamentosError","obtenerCompanies","obtenerCompaniesInicio","obtenerCompaniesExito","obtenerCompaniesError","obtenerTerritories","obtenerTerritoriesInicio","obtenerTerritoriesExito","obtenerTerritoriesError","obtenerEmpleadosManager","obtenerEmpleadosManagerInicio","obtenerEmpleadosManagerExito","obtenerEmpleadosManagerError","obtenerHistoricoInicio","obtenerHistoricoExito","historic","obtenerHistoricoError","editDepartment","editDepartmentSuccess","editDepartmentError","newDepartment","newDepartmentSuccess","newDepartmentError","obtenerEstadosActivos","obtenerEstadosActivosInicio","obtenerEstadosActivosExito","obtenerEstadosActivosError","estados","newFixedAssetRequest","newFixedAssetRequestSuccess","newFixedAssetRequestError","startGetAllFixedAssetRequestList","getAllFixedAssetRequestListSuccess","getAllFixedAssetRequestListError","startGetFixedAssetRequestList","getFixedAssetRequestListSuccess","getFixedAssetRequestListError","getFixedAssetRequestDetail","startFixedAssetRequestDetail","getFixedAssetRequestSuccess","getFixedAssetRequestError","editFixedRequest","editFixedRequestSuccess","editFixedRequestError","newPersonalRequest","newPersonalRequestSuccess","newPersonalRequestError","startGetAllPersonalRequestList","getAllPersonalRequestListSuccess","getAllPersonalRequestListError","startGetPersonalRequestList","getPersonalRequestListSuccess","getPersonalRequestListError","getPersonalRequestDetail","startPersonalRequestDetail","getPersonalRequestSuccess","getPersonalRequestError","editPersonalRequest","editPersonalRequestSuccess","editPersonalRequestError","Spinner","PtoGeneric","Home","year","mangaer","reportType","companyManager","display","alignItems","sales_team","Math","floor","role","scope","key","validarFormularioAction","iniciarValidacion","NewPto","excludedDatesArray","Date","updateLocale","workingWeekdays","holidays","holidayFormat","employeeName","saveEmployeeName","saveDepartment","reason","saveReason","dayBegining","saveDayBeginning","dayEnd","saveDayEnd","timeBeginning","saveTimeBeginning","timeEnd","saveTimeEnd","saveTotalHours","absenceCode","saveAbsenceCode","signatureEmployee","saveSignatureEmployee","dateSignEmployee","saveDateSignEmployee","saveUid","hourValidationError","saveHourValidationError","dateValidationError","saveDateValidationError","departmentColor","saveDepartmentColor","carryOver","saveCarryOver","availableHours","saveAvailableHours","saveCarryOverUsage","specialCodePlus","saveSpecialCodePlus","sickHours","saveSickHours","saveSickHoursUsage","carryOverSickHours","saveCarryOverSickHours","saveCarryOverSickHoursUsage","isWeekday","day","dayBeginingRef","useRef","dayEndRef","timeBeginningRef","timeEndRef","carryOverRef","specialCodeRef","sickHoursRef","carryOverSickHoursRef","sigPadEmployee","clearEmployee","e","preventDefault","saveCanvasEmployee","urlImage","getTrimmedCanvas","toDataURL","handleChangeInput","event","target","RegExp","test","handleChangeReasonCode","current","props","disabled","input","push","departmentFilter","array","query","el","toLowerCase","indexOf","totalAmount","hourPerDay","rangeBeginning","rangeEnd","rangeHourBeginning","rangeHourEnd","launchTimeBeginning","launchTimeEnd","laborTimeBeginning","laborTimeEnd","_locale","_invalidDate","subtractHours","isBetween","duration","asHours","businessDiff","isNaN","round","carryOverSum","sickHoursSum","carryOverSickSum","carryoverInit","sickHoursInit","carryoversickInit","availableHoursInit","submitNewPto","trim","html","carryOverZero","sickHoursZero","carryOverSickZero","dateSignature","agregarPto","hrPto","typeBalance","onSubmit","placeholder","defaultValue","onChange","required","ref","todayButton","selected","filterDate","placeholderText","excludeDates","highlightDates","margin","backgroundColor","borderRadius","textAlign","padding","showTimeSelect","showTimeSelectOnly","timeIntervals","timeCaption","dateFormat","minTime","setHours","maxTime","penColor","canvasProps","onEnd","minDate","EditPto","match","params","editMode","saveEditMode","abscenceTextRef","editarPto","editPtoAction","hr_pto","time_beginning","_d","time_end","ptoDetail","submitEditPto","hrPTO","ViewPto","dayBeginnig","date_employee_signature","Object","entries","reason_deny","width","height","employee_signature","PtoSupervisor","loadPtoList","approvePto","denyPto","reasonDeny","denyPtoAction","Supervisor","loadUsers","Login","saveUserName","savePassword","saveError","Employees","employee","terminate_contract","ExcelFile","ReactExport","ExcelSheet","ExcelColumn","ManageDepartment","useHistory","selectSaveDepartment","saveCompany","selectSaveCompany","saveTerritory","selectSaveTerritory","_useState7","_useState8","terminated","saveTerminated","_useState9","_useState10","employeeSearch","setemployeeSearch","_useState11","_useState12","employeefilters","setemployeeFilters","_useState13","_useState14","ptos","setPTOS","managerVerify","PtoEventsArray","filterElementsByName","filterElementsByCompany","filterElementsByTerritory","filterElementsByDepartment","filterbyMexilink","filterbyHitSales","handleSearchEmployee","_asyncToGenerator","_regeneratorRuntime","mark","_callee","filterbyName","filterbyCompany","filterbyTerritory","filterbyDepartment","wrap","_context","prev","next","sort","b","x","y","stop","apply","arguments","axiosHR","index","element","label","col","add","accrued_sick_days","filename","checked","onKeyDown","EmployeesSupervisorManager","ManageDepartmentSupervisor","departmentSupervisor","departmentSupervisorFilter","director_of","JSON","parse","EmployeePtos","PrivateRoute","children","PtoCalendar","month","ptoEvents","savePtoEvents","start","end","url","forEach","innerWidth","defaultView","plugins","dayGridPlugin","events","defaultDate","timeZone","aspectRatio","PtoYearCalendar","setYear","januaryRef","createRef","februaryRef","marchRef","aprilRef","mayRef","juneRef","julyRef","augustRef","septemberRef","octoberRef","novemberRef","decemberRef","subtract","getApi","prevYear","nextYear","customButtons","openMonth","click","header","left","center","right","Director","listDirector","NewPtoHr","emp_uid","usersHour","employeeData","termDisabilityWeeks","termDisabilityHours","NewUser","filterDepartmentbyName","chooseText","saveChooseText","imgSrc","saveImgSrc","imgPath","saveImgPath","employeeLastname","saveEmployeeLastname","saveSupervisor","saveEmail","emailSupervisor","saveEmailSupervisor","saveToken","saveHireDate","sickDays","saveSickDays","accruedTimeSick","saveAccruedTimeSick","travelBenefits","saveTravelBenefits","idDepartment","saveIdDepartment","statesTerritory","saveStatesTerritory","gender","saveGender","parenthood","saveParenthood","workplace","saveWorkplace","phone","savePhone","birthplace","saveBirthPlace","birthdate","saveBirthDate","jobTitle","saveJobTitle","resp","handleDepartmentSelect","Number","report_to","email_director","fileUpload","file","reader","FileReader","addEventListener","readAsDataURL","createUser","crearUsuario","formatHireDate","formatBirthDate","files","URL","createObjectURL","handleCheckSupervisor","country","defaultCountry","territoryInput","sick_days_plan","ele","handleTerritory","ViewUser","readOnly","travel_benefits","EditUser","filterDepartment","uidEmployee","lastIncrement","saveLastIncrement","carryOverSickTime","saveCarryOverSickTime","terminateDate","saveTerminateDate","independetContractor","saveIndependentContractor","insperityEmployeeId","saveInsperityEmployeeId","salesTeam","saveSalesTeam","terminatedDateRef","hidden","independent_contractor","insperity_employee_id","date_terminated","getDepartmentId","work_place","birth_place","birth_date","formatLastIncrement","formatTerminateDate","goBack","newTerminate","handleCheckTerminate","HistoryEmployee","historyEmployee","split","Modal","setAppElement","modalIsOpen","setIsOpen","isOpen","onAfterOpen","onRequestClose","content","top","bottom","marginRight","transform","contentLabel","HistoryUsers","usersHistory","obtenerHistorico","Footer","UserReports","usaEmployees","_toConsumableArray","FixedAssetRequests","equipment_requested","textTransform","cantidad","tipo","request_date","approveRequest","exportToCSV","orders","rows","order","equipmentFields","item","cost","brand","model","assetNumber","serial","imei","join","csvContent","blob","Blob","document","href","setAttribute","body","appendChild","removeChild","FixedAssetRequestPanel","requests","setRequests","loadFixedAssetRequest","dateReport","fromDate","toDate","getFixedAssetsRequestList","handleSearch","handleExport","NewFixedAsset","saveSupervisorEmail","jobDescription","saveJobDescription","_useState15","_useState16","_useState17","_useState18","equipos","setEquipos","_useState19","_useState20","tipoEquipo","setTipoEquipo","_useState21","_useState22","setCantidad","_useState23","_useState24","_useState25","_useState26","costCenter","saveCostCenter","_useState27","_useState28","_useState29","_useState30","_useState31","_useState32","_useState33","_useState34","_useState35","_useState36","_useState37","_useState38","HrRequest","saveHrRequest","agregarFixedAsset","createNewFixedAssetRequestAction","cost_center","equiposFormatted","stringify","supervisor_email","handleEmployeeSelect","background","border","equipo","nuevosEquipos","_","i","eliminarEquipo","SignatureCanvas","DatePicker","ViewFixedAssetRequest","assetRequest","equipment","setEquipment","purchaseNeeded","savePurchaseNeeded","labelCreated","saveLabelCreated","paymentMethod","savePaymentMethod","paymentSuport","savePaymentSupport","invoice","saveInvoice","oldAssetInformation","setOldAssetInformation","keys","formattedEquipment","old_asset_information","formattedOldAssetInformation","purchase_needed","label_created","payment_method","payment_support","orderedFrom","link","dateUpdated","oldAsset","EditFixedAssetRequest","setStatus","editFixedRequestAction","handleFormChange","handleOldAssetInformation","PersonalRequest","position_title","PersonalRequestPanel","loadPersonalRequests","getPersonalsRequestList","NewPersonalRequest","dateSubmitted","saveDateSubmitted","positionTitle","savePositionTitle","requestorName","saveRequestorName","requestorTitle","saveRequestorTitle","requestedStartDate","saveRequestedStartDate","hiringManager","saveHiringManager","contactNumber","saveContactNumber","exempt","saveExempt","nonExempt","saveNonExempt","fullTime","saveFullTime","partTime","savePartTime","other","saveOther","otherText","saveOtherText","shiftFrom","saveShiftFrom","shiftTo","saveShiftTo","monday","saveMonday","tuesday","saveTuesday","wednesday","saveWednesday","thursday","saveThursday","friday","saveFriday","saturday","saveSaturday","sunday","saveSunday","additionalCommentWorkSchedule","saveadditionalCommentWorkSchedule","newPosition","saveNewPosition","positionExist","savePositionExist","budgeted","saveBudgeted","existingPositionReplacement","saveExistingPositionReplacement","dutiesChanged","saveDutiesChanged","positionInformation","savePositionInformation","dailyActivities","saveDailyActivities","measureProductivity","saveMeasureProductivity","financialImpact","saveFinancialImpact","positionFit","savePositionFit","objectives","saveObjectives","contingencies","saveContingencies","dateFilled","saveDateFilled","positionFilledBy","savePositionFilledBy","startDate","saveStartDate","salaryOffered","saveSalaryOffered","recruitmentSource","saveRecruitmentSource","handleCheckbox","agregarRecruitmentRequest","createNewPersonalRequestAction","dateSubmittedFormatted","requestStartDateFormatted","shiftFromFormatted","shiftToFormatted","dept","clasname","ViewPersonalRequest","saveStatus","HrApprover","saveHrApprover","HrApproverTitle","saveHrApproverTitle","signatureHRApprover","saveSignatureHRApprover","dateSignHrApprover","savedateSignHrApprover","FinanceApprover","saveFinanceApprover","FinanceApproverTitle","saveFinanceApproverTitle","signatureFinanceApprover","saveSignatureFinanceApprover","dateSignFinanceApprover","savedateSignFinanceApprover","AdditionalApprover","saveAdditionalApprover","AdditionalApproverTitle","saveAdditionalApproverTitle","signatureAdditionalApprover","saveSignatureAdditionalApprover","dateSignAdditionalApprover","savedateSignAdditionalApprover","date_submitted","requestor_name","requestor_job_title","requestor_signature","date_requestor_signature","request_start_date","hiring_manager","contact_number","nonexempt","fulltime","parttime","other_employee_classification","additional_comment_work_schedule","new_position","position_exist","existing_position_replacement","duties_changed","position_information","role_activities_objectives","productivity_measure","financial_impact","position_fit_structure","objectives_risks_challenges_request","contingences_position_not_approved","hr_date_filled","hr_position_filled_by","hr_start_date","salary_offered","recuitment_source","human_resources_approval_name","human_resources_approval_job_title","human_resources_approval_signature","human_resources_approval_signature_date","finance_notification_request_name","finance_notification_job_title","finance_notification_signature","finance_notification_signature_date","additional_approval_name","additional_approval_job_title","additional_approval_job_signature","additional_approval_signature_date","EditPersonalRequest","_useState39","_useState40","_useState41","_useState42","_useState43","_useState44","_useState45","_useState46","_useState47","_useState48","_useState49","_useState50","_useState51","_useState52","_useState53","_useState54","_useState55","_useState56","_useState57","_useState58","_useState59","_useState60","_useState61","_useState62","_useState63","_useState64","_useState65","_useState66","_useState67","_useState68","_useState69","_useState70","_useState71","_useState72","_useState73","_useState74","_useState75","_useState76","_useState77","_useState78","_useState79","_useState80","_useState81","_useState82","_useState83","_useState84","_useState85","_useState86","_useState87","_useState88","_useState89","_useState90","_useState91","_useState92","_useState93","_useState94","_useState95","_useState96","_useState97","_useState98","_useState99","_useState100","_useState101","_useState102","_useState103","_useState104","sigPadHrApprover","sigPadFinanceApprover","sigPadAdditionalApprover","employeeOptions","editPersonalRequestFunction","editPersonalRequestAction","Select","options","selectedOption","isSearchable","justifyContent","gap","denyRecruitmentRequest","ListDepartments","directorOf","random","active","Departments","NewDepartment","createDepartment","departmentToCreate","departmentName","setDepartmentName","directorMail","setDirectorMail","reportTo","setReportTo","setActive","responsible","setResponsible","checkedState","setCheckedState","setCostCenter","toString","position","updateCheckedState","departmentFound","responsibleArray","handleCheckResponsible","updateResponsible","handleCheckDepartment","EditDepartment","departmentToEdit","editDepartmentAction","merge","ViewProfile","editProfile","editarProfile","EmployeesTranslateHours","incrementRules","xmlns","fill","viewBox","strokeWidth","stroke","strokeLinecap","strokeLinejoin","d","newAvailableHours","seniority","newCarryOver","newSickDays","newCarryOverSickDays","TranslateHours","managerEmployees","yearsSeniority","updateUserInfo","terminate_date","id_department","App","store","minHeight","exact","path","component","Boolean","hostname","ReactDOM","render","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"26BAQA,IAAMA,EAAe,CACjBC,OAAO,G,yjBCkBX,IAAMC,EAAc,CAChBC,SAAU,GACVF,OAAM,EACNG,MAAO,GACPC,SAAU,I,ikBCQd,IAAMH,EAAc,CAChBI,YAAa,GACbC,cAAe,GACfN,OAAM,EACNO,SAAS,EACTC,IAAK,I,yjBCdT,IAAMT,EAAe,CACjBU,YAAa,GACbC,UAAY,GACZC,UAAW,GACXC,YAAa,GACbZ,OAAO,EACPO,SAAS,EACTM,QAAS,GACTC,OAAQ,I,yjBCnBZ,IAAMb,EAAc,CAChBc,mBAAoB,GACp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AC,GAAD,MAASzZ,SAAS0Z,eAAe,SD0H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM5kC,MAAK,SAAA6kC,GACjCA,EAAaC,kB","file":"static/js/main.0ca9a395.chunk.js","sourcesContent":["import {\r\n VALIDAR_FORMULARIO,\r\n VALIDAR_FORMULARIO_EXITO,\r\n VALIDAR_FORMULARIO_ERROR\r\n} from '../types';\r\n\r\n\r\n// cada reducer tiene su propio state\r\nconst initialState = {\r\n error: false\r\n}\r\n\r\nexport default function (state= initialState, action) {\r\n switch(action.type) {\r\n case VALIDAR_FORMULARIO:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case VALIDAR_FORMULARIO_EXITO:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case VALIDAR_FORMULARIO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import {\r\n OBTENER_INFORMACION_USUARIO,\r\n OBTENER_INFORMACION_USUARIO_EXITO,\r\n OBTENER_INFORMACION_USUARIO_ERROR,\r\n OBTENER_BALANCE_HORAS,\r\n OBTENER_BALANCE_HORAS_EXITO,\r\n OBTENER_BALANCE_HORAS_ERROR,\r\n COMENZAR_AJUSTE_HORAS,\r\n COMENZAR_AJUSTE_HORAS_EXITO,\r\n COMENZAR_AJUSTE_HORAS_ERROR,\r\n OBTENER_USUARIO_AJUSTE,\r\n OBTENER_USUARIO_AJUSTE_EXITO,\r\n OBTENER_USUARIO_AJUSTE_ERROR,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR,\r\n CREAR_USUARIO,\r\n CREAR_USUARIO_EXITO,\r\n CREAR_USUARIO_ERROR,\r\n EDITAR_USUARIO,\r\n EDITAR_USUARIO_EXITO,\r\n EDITAR_USUARIO_ERROR,\r\n EDITAR_PROFILE,\r\n EDITAR_PROFILE_EXITO,\r\n EDITAR_PROFILE_ERROR\r\n} from '../types';\r\n\r\nconst intialState = {\r\n userInfo: {},\r\n error:false,\r\n hours: {},\r\n userHour: []\r\n}\r\n\r\nexport default function(state=intialState, action) {\r\n switch(action.type) {\r\n case OBTENER_INFORMACION_USUARIO:\r\n return {\r\n ...state,\r\n error: false,\r\n }\r\n case OBTENER_INFORMACION_USUARIO_EXITO:\r\n return {\r\n ...state,\r\n userInfo: action.payload,\r\n error: false\r\n }\r\n case OBTENER_INFORMACION_USUARIO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_BALANCE_HORAS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_BALANCE_HORAS_EXITO:\r\n return {\r\n ...state,\r\n hours: action.payload\r\n }\r\n case OBTENER_BALANCE_HORAS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_AJUSTE_HORAS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case COMENZAR_AJUSTE_HORAS_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n hours: action.payload\r\n }\r\n case COMENZAR_AJUSTE_HORAS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_USUARIO_AJUSTE:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_USUARIO_AJUSTE_EXITO:\r\n return {\r\n ...state,\r\n userHour: action.payload,\r\n error: false\r\n }\r\n case OBTENER_USUARIO_AJUSTE_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_AJUSTE_MENSUAL_HORAS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO:\r\n return {\r\n ...state,\r\n userHour: action.payload,\r\n error: false\r\n }\r\n case COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case CREAR_USUARIO:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case CREAR_USUARIO_EXITO:\r\n return {\r\n ...state,\r\n // userInfo: action.payload,\r\n error: false\r\n }\r\n case CREAR_USUARIO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case EDITAR_USUARIO:\r\n return {\r\n ...state,\r\n error: false,\r\n }\r\n case EDITAR_USUARIO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n userHour: state.userHour.map(user => user.id === action.payload.id ? user = action.payload : user),\r\n // userInfo: {} \r\n }\r\n case EDITAR_USUARIO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case EDITAR_PROFILE:\r\n return {\r\n ...state,\r\n error: false,\r\n }\r\n case EDITAR_PROFILE_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n userHour: state.userHour.map(user => user.id === action.payload.id ? user = action.payload : user),\r\n // userInfo: {} \r\n }\r\n case EDITAR_PROFILE_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import {\r\n AGREGAR_TIME_OFF_REQUEST,\r\n AGREGAR_TIME_OFF_REQUEST_EXITO,\r\n AGREGAR_TIME_OFF_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_PTOS,\r\n COMENZAR_DESCARGA_PTOS_EXITO,\r\n COMENZAR_DESCARGA_PTOS_ERROR,\r\n OBTENER_PTO_ELIMINAR,\r\n PTO_ELIMINADO_EXITO,\r\n PTO_ELIMINADO_ERROR,\r\n OBTENER_DETALLE_PTO,\r\n OBTENER_DETALLE_PTO_EXITO,\r\n OBTENER_DETALLE_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR,\r\n OBTENER_PTO_EDITAR,\r\n OBTENER_PTO_EDITAR_EXITO,\r\n OBTENER_PTO_EDITAR_ERROR,\r\n COMENZAR_APROBACION_PTO,\r\n COMENZAR_APROBACION_PTO_EXITO,\r\n COMENZAR_APROBACION_PTO_ERROR,\r\n COMENZAR_DENEGAR_PTO,\r\n COMENZAR_DENEGAR_PTO_EXITO,\r\n COMENZAR_DENEGAR_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR,\r\n COMENZAR_EDITAR_PTO,\r\n COMENZAR_EDITAR_PTO_EXITO,\r\n COMENZAR_EDITAR_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR,\r\n AJUSTAR_CARRY_OVER,\r\n AJUSTAR_CARRY_OVER_EXITO,\r\n AJUSTAR_CARRY_OVER_ERROR\r\n} from '../types';\r\n\r\nconst intialState = {\r\n ptoRequests: [],\r\n ptoSupervisor: [],\r\n error:false,\r\n loading: false,\r\n pto: {}\r\n}\r\n\r\n\r\nexport default function(state=intialState, action) {\r\n switch(action.type) {\r\n case AGREGAR_TIME_OFF_REQUEST:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case AGREGAR_TIME_OFF_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n ptoRequests: [...state.ptoRequests, action.payload],\r\n error: false\r\n }\r\n case AGREGAR_TIME_OFF_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DESCARGA_PTOS:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n pto: {}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n ptoRequests: action.payload,\r\n loading:false,\r\n pto: {}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case OBTENER_PTO_ELIMINAR:\r\n return {\r\n ...state,\r\n error:false\r\n }\r\n case PTO_ELIMINADO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n ptoRequests: state.ptoRequests.filter(pto => pto.id !== action.payload)\r\n }\r\n case PTO_ELIMINADO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_DETALLE_PTO:\r\n return {\r\n ...state,\r\n error: false,\r\n pto: {}\r\n }\r\n case OBTENER_DETALLE_PTO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n pto: action.payload\r\n }\r\n case OBTENER_DETALLE_PTO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DESCARGA_PTOS_DEPARTAMENTO:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n pto: {}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n ptoSupervisor: action.payload,\r\n loading:false,\r\n pto:{}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case OBTENER_PTO_EDITAR:\r\n return {\r\n ...state,\r\n error:false\r\n }\r\n case OBTENER_PTO_EDITAR_EXITO:\r\n return {\r\n ...state,\r\n pto: action.payload,\r\n error: false\r\n }\r\n case OBTENER_PTO_EDITAR_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_APROBACION_PTO:\r\n return {\r\n ...state,\r\n error: false,\r\n pto:{}\r\n }\r\n case COMENZAR_APROBACION_PTO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n ptoSupervisor: state.ptoSupervisor.map(pto => pto.id === action.payload.id ? pto = action.payload : pto),\r\n pto:{}\r\n }\r\n case COMENZAR_APROBACION_PTO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DENEGAR_PTO:\r\n return {\r\n ...state,\r\n error: false,\r\n pto:{}\r\n }\r\n case COMENZAR_DENEGAR_PTO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n ptoSupervisor: state.ptoSupervisor.map(pto => pto.id === action.payload.id ? pto = action.payload : pto),\r\n pto:{}\r\n }\r\n case COMENZAR_DENEGAR_PTO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n pto: {}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n ptoSupervisor: action.payload,\r\n loading:false,\r\n pto:{},\r\n countPto: action.payload.length \r\n }\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case COMENZAR_EDITAR_PTO:\r\n return {\r\n ...state,\r\n error: false,\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_PTO_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n ptoRequests: state.ptoRequests.map(pto => pto.id === action.payload.id ? pto = action.payload : pto),\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_PTO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n pto: {}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n ptoSupervisor: action.payload,\r\n loading:false,\r\n pto:{}\r\n }\r\n case COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case AJUSTAR_CARRY_OVER:\r\n return {\r\n ...state,\r\n error: false,\r\n loading: true\r\n }\r\n case AJUSTAR_CARRY_OVER_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n loading: false\r\n }\r\n case AJUSTAR_CARRY_OVER_ERROR:\r\n return {\r\n error: true,\r\n loading: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import {\r\n OBTENER_DEPARTAMENTOS,\r\n OBTENER_DEPARTAMENTOS_EXITO,\r\n OBTENER_DEPARTAMENTOS_ERROR,\r\n OBTENER_SICKDAYS,\r\n OBTENER_SICKDAYS_EXITO,\r\n OBTENER_SICKDAYS_ERROR,\r\n OBTENER_COMPANIES,\r\n OBTENER_COMPANIES_EXITO,\r\n OBTENER_COMPANIES_ERROR,\r\n OBTENER_TERRITORY,\r\n OBTENER_TERRITORY_EXITO,\r\n OBTENER_TERRITORY_ERROR,\r\n OBTENER_EMPLOYEES_MANAGER,\r\n OBTENER_EMPLOYEES_MANAGER_EXITO,\r\n OBTENER_EMPLOYEES_MANAGER_ERROR,\r\n OBTENER_HISTORICO,\r\n OBTENER_HISTORICO_EXITO,\r\n OBTENER_HISTORICO_ERROR,\r\n COMENZAR_EDITAR_DEPARTMENT,\r\n COMENZAR_EDITAR_DEPARTMENT_EXITO,\r\n COMENZAR_EDITAR_DEPARTMENT_ERROR,\r\n COMENZAR_CREAR_DEPARTMENT,\r\n COMENZAR_CREAR_DEPARTMENT_EXITO,\r\n COMENZAR_CREAR_DEPARTMENT_ERROR,\r\n OBTENER_ESTADOS_ACTIVOS,\r\n OBTENER_ESTADOS_ACTIVOS_EXITO,\r\n OBTENER_ESTADOS_ACTIVOS_ERROR,\r\n} from '../types';\r\n\r\nconst initialState = {\r\n departments: [],\r\n employees : [],\r\n companies: [],\r\n territories: [],\r\n error: false,\r\n loading: false,\r\n history: [],\r\n states: []\r\n}\r\n\r\nexport default function(state = initialState, action ) {\r\n switch(action.type) {\r\n case OBTENER_DEPARTAMENTOS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_DEPARTAMENTOS_EXITO:\r\n return {\r\n ...state,\r\n departments: action.payload,\r\n error: false\r\n }\r\n case OBTENER_DEPARTAMENTOS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_SICKDAYS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_SICKDAYS_EXITO:\r\n return {\r\n ...state,\r\n employees: action.payload,\r\n error: false\r\n }\r\n case OBTENER_SICKDAYS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_COMPANIES:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_COMPANIES_EXITO:\r\n return {\r\n ...state,\r\n companies: action.payload,\r\n error: false\r\n }\r\n case OBTENER_COMPANIES_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_TERRITORY:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_TERRITORY_EXITO:\r\n return {\r\n ...state,\r\n territories: action.payload,\r\n error: false\r\n }\r\n case OBTENER_TERRITORY_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_EMPLOYEES_MANAGER:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_EMPLOYEES_MANAGER_EXITO:\r\n return {\r\n ...state,\r\n employees: action.payload,\r\n error: false\r\n }\r\n case OBTENER_EMPLOYEES_MANAGER_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_HISTORICO:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_HISTORICO_EXITO:\r\n return {\r\n ...state,\r\n history: action.payload,\r\n error: false\r\n }\r\n case OBTENER_HISTORICO_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_EDITAR_DEPARTMENT:\r\n return {\r\n ...state,\r\n error: false,\r\n }\r\n case COMENZAR_EDITAR_DEPARTMENT_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n history: action.payload,\r\n // userInfo: {} \r\n }\r\n case COMENZAR_EDITAR_DEPARTMENT_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_CREAR_DEPARTMENT:\r\n return {\r\n ...state,\r\n error: false,\r\n }\r\n case COMENZAR_CREAR_DEPARTMENT_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n history: action.payload,\r\n // userInfo: {} \r\n }\r\n case COMENZAR_CREAR_DEPARTMENT_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case OBTENER_ESTADOS_ACTIVOS:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case OBTENER_ESTADOS_ACTIVOS_EXITO:\r\n return {\r\n ...state,\r\n states: action.payload,\r\n error: false\r\n }\r\n case OBTENER_ESTADOS_ACTIVOS_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import {\r\n AGREGAR_FIXED_ASSET_REQUEST,\r\n AGREGAR_FIXED_ASSET_REQUEST_ERROR,\r\n AGREGAR_FIXED_ASSET_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR,\r\n COMENZAR_EDITAR_FIXED_REQUEST,\r\n COMENZAR_EDITAR_FIXED_REQUEST_EXITO,\r\n COMENZAR_EDITAR_FIXED_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR\r\n}\r\nfrom '../types';\r\n\r\nconst intialState = {\r\n fixedAssetRequests: [],\r\n fixedAssetSupervisor: [],\r\n error:false,\r\n loading: false,\r\n fixedAsset: {}\r\n}\r\n\r\nexport default function(state=intialState, action) {\r\n switch(action.type) {\r\n case AGREGAR_FIXED_ASSET_REQUEST:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case AGREGAR_FIXED_ASSET_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n fixedAssetRequests: [...state.fixedAssetRequests, action.payload],\r\n error: false\r\n }\r\n case AGREGAR_FIXED_ASSET_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DESCARGA_FIXED_ASSET_REQUEST:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n fixedAsset: {}\r\n }\r\n case COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n fixedAssetRequests: action.payload,\r\n loading:false,\r\n fixedAsset: {}\r\n }\r\n case COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n fixedAsset: {}\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n fixedAssetRequests: action.payload,\r\n loading:false,\r\n fixedAsset: {}\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case OBTENER_DETALLE_FIXED_ASSET_REQUEST:\r\n return {\r\n ...state,\r\n error: false,\r\n fixedAsset: {}\r\n }\r\n case OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n fixedAsset: action.payload\r\n }\r\n case OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_EDITAR_FIXED_REQUEST:\r\n return {\r\n ...state,\r\n error: false,\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_FIXED_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n fixedAssetRequests: state.fixedAssetRequests.map(request => request.id === action.payload.id ? request = action.payload : request),\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_FIXED_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import {\r\n AGREGAR_PERSONAL_REQUEST,\r\n AGREGAR_PERSONAL_REQUEST_ERROR,\r\n AGREGAR_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR,\r\n OBTENER_DETALLE_PERSONAL_REQUEST,\r\n OBTENER_DETALLE_PERSONAL_REQUEST_EXITO,\r\n OBTENER_DETALLE_PERSONAL_REQUEST_ERROR,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR\r\n}\r\nfrom '../types';\r\n\r\nconst intialState = {\r\n personalRequests: [],\r\n personalSupervisor: [],\r\n error:false,\r\n loading: false,\r\n personalRequest: {}\r\n}\r\n\r\nexport default function(state=intialState, action) {\r\n switch(action.type) {\r\n case AGREGAR_PERSONAL_REQUEST:\r\n return {\r\n ...state,\r\n error: false\r\n }\r\n case AGREGAR_PERSONAL_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n personalRequests: [...state.personalRequests, action.payload],\r\n error: false\r\n }\r\n case AGREGAR_PERSONAL_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_DESCARGA_PERSONAL_REQUEST:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n personalRequest: {}\r\n }\r\n case COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n personalRequests: action.payload,\r\n loading:false,\r\n personalRequest: {}\r\n }\r\n case COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST:\r\n return {\r\n ...state,\r\n error:false,\r\n loading: true,\r\n personalRequest: {}\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error:false,\r\n personalRequests: action.payload,\r\n loading:false,\r\n personalRequest: {}\r\n }\r\n case COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true,\r\n loading: false,\r\n }\r\n case OBTENER_DETALLE_PERSONAL_REQUEST:\r\n return {\r\n ...state,\r\n error: false,\r\n personalRequest: {}\r\n }\r\n case OBTENER_DETALLE_PERSONAL_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n personalRequest: action.payload\r\n }\r\n case OBTENER_DETALLE_PERSONAL_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n case COMENZAR_EDITAR_PERSONAL_REQUEST:\r\n return {\r\n ...state,\r\n error: false,\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO:\r\n return {\r\n ...state,\r\n error: false,\r\n personalRequests: state.personalRequests.map(request => request.id === action.payload.id ? request = action.payload : request),\r\n pto:{}\r\n }\r\n case COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR:\r\n return {\r\n ...state,\r\n error: true\r\n }\r\n default:\r\n return state;\r\n }\r\n}","import { combineReducers } from 'redux';\r\nimport validacionReducer from './validacionReducer';\r\nimport authenticateReducer from './authenticateReducer';\r\nimport timeoffrequestReducer from './timeoffrequestReducer';\r\nimport managerReducer from './managerReducer';\r\nimport fixedassetReducer from './fixedassetsrequestReducers';\r\nimport personalrequestReducer from './personalrequestReducer';\r\n\r\nexport default combineReducers({\r\n userInfo: authenticateReducer,\r\n error: validacionReducer,\r\n ptoList: timeoffrequestReducer,\r\n manager: managerReducer,\r\n fixedAsset: fixedassetReducer,\r\n personalRequest: personalrequestReducer\r\n});","export const VALIDAR_FORMULARIO = 'VALIDAR_FORMULARIO';\r\nexport const VALIDAR_FORMULARIO_EXITO = 'VALIDAR_FORMULARIO_EXITO';\r\nexport const VALIDAR_FORMULARIO_ERROR = 'VALIDAR_FORMULARIO_ERROR';\r\n\r\nexport const OBTENER_INFORMACION_USUARIO = 'OBTENER_INFORMACION_USUARIO';\r\nexport const OBTENER_INFORMACION_USUARIO_EXITO = 'OBTENER_INFORMACION_USUARIO_EXITO';\r\nexport const OBTENER_INFORMACION_USUARIO_ERROR = 'OBTENER_INFORMACION_USUARIO_ERROR';\r\n\r\nexport const AGREGAR_TIME_OFF_REQUEST = 'AGREGAR_TIME_OFF_REQUEST';\r\nexport const AGREGAR_TIME_OFF_REQUEST_EXITO = 'AGREGAR_TIME_OFF_REQUEST_EXITO';\r\nexport const AGREGAR_TIME_OFF_REQUEST_ERROR = 'AGREGAR_TIME_OFF_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_PTOS = 'COMENZAR_DESCARGA_PTOS';\r\nexport const COMENZAR_DESCARGA_PTOS_EXITO = 'COMENZAR_DESCARGA_PTOS_EXITO';\r\nexport const COMENZAR_DESCARGA_PTOS_ERROR = 'COMENZAR_DESCARGA_PTOS_ERROR';\r\n\r\nexport const OBTENER_PTO_ELIMINAR = 'OBTENER_PTO_ELIMINAR';\r\nexport const PTO_ELIMINADO_EXITO = 'PTO_ELIMINADO_EXITO';\r\nexport const PTO_ELIMINADO_ERROR = 'PTO_ELIMINADO_ERROR';\r\n\r\nexport const OBTENER_DETALLE_PTO = 'OBTENER_DETALLE_PTO';\r\nexport const OBTENER_DETALLE_PTO_EXITO = 'OBTENER_DETALLE_PTO_EXITO';\r\nexport const OBTENER_DETALLE_PTO_ERROR = 'OBTENER_DETALLE_PTO_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_PTOS_DEPARTAMENTO = 'COMENZAR_DESCARGA_PTOS_DEPARTAMENTO';\r\nexport const COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO = 'COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO';\r\nexport const COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR = 'COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR';\r\n\r\nexport const OBTENER_PTO_EDITAR = 'OBTENER_PTO_EDITAR';\r\nexport const OBTENER_PTO_EDITAR_EXITO = 'OBTENER_PTO_EDITAR_EXITO';\r\nexport const OBTENER_PTO_EDITAR_ERROR = 'OBTENER_PTO_EDITAR_ERROR';\r\n\r\nexport const COMENZAR_APROBACION_PTO = 'COMENZAR_APROBACION_PTO';\r\nexport const COMENZAR_APROBACION_PTO_EXITO = 'COMENZAR_APROBACION_PTO_EXITO';\r\nexport const COMENZAR_APROBACION_PTO_ERROR = 'COMENZAR_APROBACION_PTO_ERROR';\r\n\r\nexport const COMENZAR_DENEGAR_PTO = 'COMENZAR_DENEGAR_PTO';\r\nexport const COMENZAR_DENEGAR_PTO_EXITO = 'COMENZAR_DENEGAR_PTO_EXITO';\r\nexport const COMENZAR_DENEGAR_PTO_ERROR = 'COMENZAR_DENEGAR_PTO_ERROR';\r\n\r\n// Descargar PTO Supervisor\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR';\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO';\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR';\r\n\r\n// Balance de horas\r\nexport const OBTENER_BALANCE_HORAS = 'OBTENER_BALANCE_HORAS';\r\nexport const OBTENER_BALANCE_HORAS_EXITO = 'OBTENER_BALANCE_HORAS_EXITO';\r\nexport const OBTENER_BALANCE_HORAS_ERROR = 'OBTENER_BALANCE_HORAS_ERROR';\r\n\r\n// Actualizar Balance Horas\r\nexport const COMENZAR_AJUSTE_HORAS = 'COMENZAR_AJUSTE_HORAS';\r\nexport const COMENZAR_AJUSTE_HORAS_EXITO = 'COMENZAR_AJUSTE_HORAS_EXITO';\r\nexport const COMENZAR_AJUSTE_HORAS_ERROR = 'COMENZAR_AJUSTE_HORAS_ERROR';\r\n\r\n// OBtener Usuario Balance Horas\r\nexport const OBTENER_USUARIO_AJUSTE = 'OBTENER_USUARIO_AJUSTE';\r\nexport const OBTENER_USUARIO_AJUSTE_EXITO = 'OBTENER_USUARIO_AJUSTE_EXITO';\r\nexport const OBTENER_USUARIO_AJUSTE_ERROR = 'OBTENER_USUARIO_AJUSTE_ERROR';\r\n\r\n// Obtener Departamentes\r\nexport const OBTENER_DEPARTAMENTOS = 'OBTENER_DEPARTAMENTOS';\r\nexport const OBTENER_DEPARTAMENTOS_EXITO = 'OBTENER_DEPARTAMENTOS_EXITO';\r\nexport const OBTENER_DEPARTAMENTOS_ERROR = 'OBTENER_DEPARTAMENTOS_ERROR';\r\n\r\n// Obtener Employees\r\nexport const OBTENER_EMPLEADOS_DEPARTAMENTO = 'OBTENER_EMPLEADOS_DEPARTAMENTO';\r\nexport const OBTENER_EMPLEADOS_DEPARTAMENTO_EXITO = 'OBTENER_EMPLEADOS_DEPARTAMENTO_EXITO';\r\nexport const OBTENER_EMPLEADOS_DEPARTAMENTO_ERROR = 'OBTENER_EMPLEADOS_DEPARTAMENTO_ERROR';\r\n\r\n// Actualizar horas mensualemente basado en hire Date\r\nexport const COMENZAR_AJUSTE_MENSUAL_HORAS = 'COMENZAR_AJUSTE_MENSUAL_HORAS';\r\nexport const COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO = 'COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO';\r\nexport const COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR = 'COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR';\r\n\r\n// Actualizar PTOS\r\nexport const COMENZAR_EDITAR_PTO = 'COMENZAR_EDITAR_PTO';\r\nexport const COMENZAR_EDITAR_PTO_EXITO = 'COMENZAR_EDITAR_PTO_EXITO';\r\nexport const COMENZAR_EDITAR_PTO_ERROR = 'COMENZAR_EDITAR_PTO_ERROR';\r\n\r\n// Listar Ptos Directores\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR';\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO';\r\nexport const COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR = 'COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR';\r\n\r\n// Crear Usurios\r\nexport const CREAR_USUARIO = 'CREAR_USUARIO';\r\nexport const CREAR_USUARIO_EXITO = 'CREAR_USUARIO_EXITO';\r\nexport const CREAR_USUARIO_ERROR = 'CREAR_USUARIO_ERROR';\r\n\r\n// editar Usurios\r\nexport const EDITAR_USUARIO = 'EDITAR_USUARIO';\r\nexport const EDITAR_USUARIO_EXITO = 'EDITAR_USUARIO_EXITO';\r\nexport const EDITAR_USUARIO_ERROR = 'EDITAR_USUARIO_ERROR';\r\n\r\n// Sick Days\r\nexport const OBTENER_SICKDAYS = 'OBTENER_SICKDAYS';\r\nexport const OBTENER_SICKDAYS_EXITO = 'OBTENER_SICKDAYS_EXITO';\r\nexport const OBTENER_SICKDAYS_ERROR = 'OBTENER_SICKDAYS_ERROR';\r\n\r\n// Comenzar Ajustes CARRY OVER\r\nexport const AJUSTAR_CARRY_OVER = 'AJUSTAR_CARRY_OVER';\r\nexport const AJUSTAR_CARRY_OVER_EXITO = 'AJUSTAR_CARRY_OVER_EXITO';\r\nexport const AJUSTAR_CARRY_OVER_ERROR = 'AJUSTAR_CARRY_OVER_ERROR';\r\n\r\n// OBTENER COMPANY\r\nexport const OBTENER_COMPANIES = 'OBTENER_COMPANIES';\r\nexport const OBTENER_COMPANIES_EXITO = 'OBTENER_COMPANIES_EXITO';\r\nexport const OBTENER_COMPANIES_ERROR = 'OBTENER_COMPANIES_ERROR';\r\n\r\n// OBTENER TERRITORY\r\nexport const OBTENER_TERRITORY = 'OBTENER_TERRITORY';\r\nexport const OBTENER_TERRITORY_EXITO = 'OBTENER_TERRITORY_EXITO';\r\nexport const OBTENER_TERRITORY_ERROR = 'OBTENER_TERRITORY_ERROR';\r\n\r\n// OBTENER EMPLOYEES MANAGER\r\nexport const OBTENER_EMPLOYEES_MANAGER = 'OBTENER_EMPLOYEES_MANAGER';\r\nexport const OBTENER_EMPLOYEES_MANAGER_EXITO = 'OBTENER_EMPLOYEES_MANAGER_EXITO';\r\nexport const OBTENER_EMPLOYEES_MANAGER_ERROR = 'OBTENER_EMPLOYEES_MANAGER_ERROR';\r\n\r\n// OBTENER HISTORICO\r\nexport const OBTENER_HISTORICO = 'OBTENER_HISTORICO';\r\nexport const OBTENER_HISTORICO_EXITO = 'OBTENER_HISTORICO_EXITO';\r\nexport const OBTENER_HISTORICO_ERROR = 'OBTENER_HISTORICO_ERROR';\r\n\r\n// EDITAR DEPARTAMENTOS\r\nexport const COMENZAR_EDITAR_DEPARTMENT = 'COMENZAR_EDITAR_DEPARTMENT';\r\nexport const COMENZAR_EDITAR_DEPARTMENT_EXITO = 'COMENZAR_EDITAR_DEPARTMENT_EXITO';\r\nexport const COMENZAR_EDITAR_DEPARTMENT_ERROR = 'COMENZAR_EDITAR_DEPARTMENT_ERROR';\r\n\r\n// EDITAR DEPARTAMENTOS\r\nexport const COMENZAR_CREAR_DEPARTMENT = 'COMENZAR_CREAR_DEPARTMENT';\r\nexport const COMENZAR_CREAR_DEPARTMENT_EXITO = 'COMENZAR_CREAR_DEPARTMENT_EXITO';\r\nexport const COMENZAR_CREAR_DEPARTMENT_ERROR = 'COMENZAR_CREAR_DEPARTMENT_ERROR';\r\n\r\n\r\n// OBTENER ESTADOS ACTIVOS\r\nexport const OBTENER_ESTADOS_ACTIVOS = 'OBTENER_ESTADOS_ACTIVOS';\r\nexport const OBTENER_ESTADOS_ACTIVOS_EXITO = 'OBTENER_ESTADOS_ACTIVOS_EXITO';\r\nexport const OBTENER_ESTADOS_ACTIVOS_ERROR = 'OBTENER_ESTADOS_ACTIVOS_ERROR';\r\n\r\n// editar Usurios\r\nexport const EDITAR_PROFILE = 'EDITAR_PROFILE';\r\nexport const EDITAR_PROFILE_EXITO = 'EDITAR_PROFILE_EXITO';\r\nexport const EDITAR_PROFILE_ERROR = 'EDITAR_PROFILE_ERROR';\r\n\r\n// Aregar FIXED ASSET REQUEST TYPES\r\n\r\nexport const AGREGAR_FIXED_ASSET_REQUEST = 'AGREGAR_FIXED_ASSET_REQUEST';\r\nexport const AGREGAR_FIXED_ASSET_REQUEST_EXITO = 'AGREGAR_FIXED_ASSET_REQUEST_EXITO';\r\nexport const AGREGAR_FIXED_ASSET_REQUEST_ERROR = 'AGREGAR_FIXED_ASSET_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_FIXED_ASSET_REQUEST = 'COMENZAR_DESCARGA_FIXED_ASSET_REQUEST';\r\nexport const COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO = 'COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO';\r\nexport const COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR = 'COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR';\r\n\r\nexport const OBTENER_DETALLE_FIXED_ASSET_REQUEST = 'OBTENER_DETALLE_FIXED_ASSET_REQUEST';\r\nexport const OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO = 'OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO';\r\nexport const OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR = 'OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_EDITAR_FIXED_REQUEST = 'COMENZAR_EDITAR_FIXED_REQUEST';\r\nexport const COMENZAR_EDITAR_FIXED_REQUEST_EXITO = 'COMENZAR_EDITAR_FIXED_REQUEST_EXITO';\r\nexport const COMENZAR_EDITAR_FIXED_REQUEST_ERROR = 'COMENZAR_EDITAR_FIXED_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST = 'COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST';\r\nexport const COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO = 'COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO';\r\nexport const COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR = 'COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR';\r\n\r\n// Aregar PERSONAL REQUEST TYPES\r\n\r\nexport const AGREGAR_PERSONAL_REQUEST = 'AGREGAR_PERSONAL_REQUEST';\r\nexport const AGREGAR_PERSONAL_REQUEST_EXITO = 'AGREGAR_PERSONAL_REQUEST_EXITO';\r\nexport const AGREGAR_PERSONAL_REQUEST_ERROR = 'AGREGAR_PERSONAL_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_PERSONAL_REQUEST = 'COMENZAR_DESCARGA_PERSONAL_REQUEST';\r\nexport const COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO = 'COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO';\r\nexport const COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR = 'COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR';\r\n\r\nexport const OBTENER_DETALLE_PERSONAL_REQUEST = 'OBTENER_DETALLE_PERSONAL_REQUEST';\r\nexport const OBTENER_DETALLE_PERSONAL_REQUEST_EXITO = 'OBTENER_DETALLE_PERSONAL_REQUEST_EXITO';\r\nexport const OBTENER_DETALLE_PERSONAL_REQUEST_ERROR = 'OBTENER_DETALLE_PERSONAL_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_EDITAR_PERSONAL_REQUEST = 'COMENZAR_EDITAR_PERSONAL_REQUEST';\r\nexport const COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO = 'COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO';\r\nexport const COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR = 'COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR';\r\n\r\nexport const COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST = 'COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST';\r\nexport const COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO = 'COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO';\r\nexport const COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR = 'COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR';","import {createStore, applyMiddleware, compose} from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport rootReducer from './reducers';\r\n\r\nconst initialState = {};\r\n\r\n// const middleware = [thunk];\r\n\r\n// const store = createStore(\r\n// rootReducer,\r\n// initialState,\r\n// compose(applyMiddleware(...middleware),\r\n// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()\r\n// )\r\n// );\r\n\r\n// const createStoreWithMiddleware = createStore(\r\n// rootReducer,\r\n// compose(\r\n// applyMiddleware(thunk),\r\n// window.navigator.userAgent.includes('Chrome') ?\r\n// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() : compose,\r\n// ),\r\n// );\r\n\r\n//export default store;\r\n//export default createStoreWithMiddleware;\r\n\r\nexport default createStore( \r\n rootReducer,\r\n initialState,\r\n compose(\r\n applyMiddleware(thunk),\r\n typeof window.__REDUX_DEVTOOLS_EXTENSION__ === \"undefined\"\r\n ? a => a\r\n : window.__REDUX_DEVTOOLS_EXTENSION__ &&\r\n window.__REDUX_DEVTOOLS_EXTENSION__()\r\n )\r\n );","import React , {Fragment, useEffect, useState} from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { useSelector } from 'react-redux';\r\nimport moment from 'moment';\r\n\r\n\r\nconst Navigation = ({history}) => {\r\n //acceder al state\r\n const supervisor = useSelector(state=>state.userInfo.userInfo.supervisor);\r\n const manager = useSelector(state=>state.userInfo.userInfo.manager);\r\n const userEmail = useSelector(state=>state.userInfo.userInfo.email);\r\n const hireDate = useSelector(state=>state.userInfo.userInfo.hireDate);\r\n\r\n const [pendingPto, savePendingPto] = useState(0);\r\n const [loginBar, saveloginBar] = useState(true);\r\n const countPto = useSelector(state=>state.ptoList.countPto);\r\n useEffect(()=>{\r\n savePendingPto(countPto);\r\n saveloginBar(true)\r\n\r\n },[countPto])\r\n\r\n\r\n const [ptoAuth, savePtoAuth] = useState(false);\r\n\r\n useEffect(()=>{\r\n const daysDifference = moment().diff(moment(hireDate), 'days');\r\n\r\n moment().diff(moment(hireDate), 'days') < 30 ? savePtoAuth(false) : savePtoAuth(true);\r\n console.log('daysDifference', daysDifference, 'hire date', hireDate)\r\n \r\n },[hireDate])\r\n \r\n const logout = ()=> {\r\n localStorage.clear();\r\n\r\n saveloginBar(false);\r\n\r\n window.location.reload(false);\r\n \r\n }\r\n\r\n \r\n\r\n return (\r\n supervisor !== undefined ? (\r\n \r\n ) \r\n : (\r\n \r\n )\r\n \r\n );\r\n};\r\n\r\nexport default Navigation;","import axios from 'axios';\r\n\r\nconst clienteAxiosHR = axios.create({\r\n baseURL: 'https://mxlportalserver.com/'\r\n});\r\n\r\nexport default clienteAxiosHR;","import axios from 'axios';\r\n\r\nconst clienteAxios = axios.create({\r\n baseURL: 'https://mxlportal.com/' \r\n});\r\n\r\nexport default clienteAxios;","import {\r\n OBTENER_INFORMACION_USUARIO,\r\n OBTENER_INFORMACION_USUARIO_EXITO,\r\n OBTENER_INFORMACION_USUARIO_ERROR,\r\n OBTENER_BALANCE_HORAS,\r\n OBTENER_BALANCE_HORAS_EXITO,\r\n OBTENER_BALANCE_HORAS_ERROR,\r\n COMENZAR_AJUSTE_HORAS,\r\n COMENZAR_AJUSTE_HORAS_EXITO,\r\n COMENZAR_AJUSTE_HORAS_ERROR,\r\n OBTENER_USUARIO_AJUSTE,\r\n OBTENER_USUARIO_AJUSTE_EXITO,\r\n OBTENER_USUARIO_AJUSTE_ERROR,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO,\r\n COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR,\r\n CREAR_USUARIO,\r\n CREAR_USUARIO_EXITO,\r\n CREAR_USUARIO_ERROR,\r\n EDITAR_USUARIO,\r\n EDITAR_USUARIO_EXITO,\r\n EDITAR_USUARIO_ERROR,\r\n EDITAR_PROFILE,\r\n EDITAR_PROFILE_EXITO,\r\n EDITAR_PROFILE_ERROR\r\n} from '../types';\r\n\r\nimport clienteAxios from '../config/axios';\r\nimport axiosHr from '../config/axiosHR';\r\n\r\n// Obtener info inicial usuarios\r\nexport function obtenerInformacionUsuario(username, password) {\r\n return async (dispatch) => {\r\n dispatch(descargaInformacionUsuario());\r\n\r\n const data = {\r\n username: username,\r\n password: password\r\n //token: token\r\n } \r\n\r\n let token, supervisor, manager, avatarImage = '';\r\n\r\n if(localStorage.getItem('token') !== null) {\r\n console.log('está logueado');\r\n token = localStorage.getItem('token'); \r\n // localStorage.removeItem('supervisor');\r\n // localStorage.removeItem('name');\r\n // localStorage.removeItem('manager'); \r\n // localStorage.removeItem('department');\r\n // localStorage.removeItem('uid');\r\n // localStorage.removeItem('hire_date');\r\n // localStorage.removeItem('supervisorEmail');\r\n // localStorage.removeItem('avatar');\r\n\r\n // axiosHr.post('/login', data).then(respuesta => {\r\n // localStorage.setItem('token', respuesta.data.data[0].token);\r\n // token = respuesta.data.data[0].token; \r\n // localStorage.setItem('supervisor', respuesta.data.data[0].supervisor);\r\n // localStorage.setItem('name', respuesta.data.data[0].employee_name);\r\n // localStorage.setItem('lastname', respuesta.data.data[0].employee_lastname);\r\n // localStorage.setItem('manager', respuesta.data.data[0].manager);\r\n // localStorage.setItem('company', respuesta.data.data[0].company); \r\n // localStorage.setItem('department', respuesta.data.data[0].department);\r\n // localStorage.setItem('uid', respuesta.data.data[0].uid);\r\n // localStorage.setItem('hire_date', respuesta.data.data[0].hire_date);\r\n \r\n // avatarImage = respuesta.data.data[0].avatar;\r\n // localStorage.setItem('supervisorEmail', respuesta.data.data[0].supervisor_mail);\r\n // if(avatarImage === '') {\r\n // localStorage.setItem('avatar' , './avatar-placeholder.png');\r\n // }else {\r\n // localStorage.setItem('avatar' , respuesta.data.data[0].avatar);\r\n // }\r\n\r\n // const userInfo = {\r\n // username: respuesta.data.data[0].username,\r\n // name : respuesta.data.data[0].employee_name,\r\n // lastname : respuesta.data.data[0].employee_lastname,\r\n // department: respuesta.data.data[0].department,\r\n // email: respuesta.data.data[0].email,\r\n // supervisor: respuesta.data.data[0].supervisor,\r\n // manager: respuesta.data.data[0].manager,\r\n // company: respuesta.data.data[0].company,\r\n // uid: respuesta.data.data[0].uid,\r\n // avatarUrl: respuesta.data.data[0].avatar,\r\n // supervisorEmail: respuesta.data.data[0].supervisor_mail,\r\n // hireDate: respuesta.data.data[0].hire_date,\r\n // sickDays: respuesta.data.data[0].sick_days_limit\r\n // }\r\n\r\n // dispatch(descargaInformacionUsuarioExitosa(userInfo));\r\n // }).catch(error => {\r\n // console.log(error);\r\n // })\r\n\r\n }else {\r\n console.log('no está logueado');\r\n\r\n let formData = new FormData();\r\n\r\n formData.append('username', username);\r\n formData.append('password', password);\r\n\r\n // await clienteAxios({\r\n // method: 'post',\r\n // url: '/index.php?option=com_api&app=users&resource=login&format=raw',\r\n // headers: {\r\n // 'Content-Type': 'application/x-www-form-urlencoded',\r\n // },\r\n // data: formData\r\n // }).then(response => {\r\n await clienteAxios.post('/wp-json/jwt-auth/v1/token', data\r\n ).then(response => {\r\n console.log(response)\r\n\r\n // console.log(response.data.status);\r\n\r\n if(response.status !== 200) {\r\n dispatch(descargaInformacionUsuarioError());\r\n return\r\n }\r\n\r\n // let dataLogin = {\r\n // uid: response.data.data.id,\r\n // username: response.data.data.auth\r\n // }\r\n\r\n let dataLogin = {\r\n uid: response.data.data.email,\r\n username: response.data.data.email,\r\n email: response.data.data.email,\r\n token: response.data.data.token\r\n }\r\n\r\n\r\n console.log(dataLogin.token)\r\n\r\n // return\r\n \r\n\r\n axiosHr.post('/login', dataLogin).then(respuesta => {\r\n localStorage.setItem('token', dataLogin.token);\r\n token = dataLogin.token;\r\n localStorage.setItem('name', respuesta.data.data[0].employee_name);\r\n localStorage.setItem('lastname', respuesta.data.data[0].employee_lastname); \r\n localStorage.setItem('supervisor', respuesta.data.data[0].supervisor);\r\n localStorage.setItem('manager', respuesta.data.data[0].manager); \r\n localStorage.setItem('company', respuesta.data.data[0].company);\r\n localStorage.setItem('department', respuesta.data.data[0].department);\r\n localStorage.setItem('uid', respuesta.data.data[0].uid);\r\n localStorage.setItem('hire_date', respuesta.data.data[0].hire_date);\r\n localStorage.setItem('territory', respuesta.data.data[0].territory);\r\n localStorage.setItem('job_title', respuesta.data.data[0].job_title);\r\n \r\n avatarImage = respuesta.data.data[0].avatar;\r\n localStorage.setItem('email', respuesta.data.data[0].email);\r\n localStorage.setItem('supervisorEmail', respuesta.data.data[0].supervisor_mail);\r\n if(avatarImage === '') {\r\n localStorage.setItem('avatar' , './avatar-placeholder.png');\r\n }else {\r\n localStorage.setItem('avatar' , respuesta.data.data[0].avatar);\r\n }\r\n\r\n const userInfo = {\r\n username: username,\r\n name : respuesta.data.data[0].employee_name,\r\n lastname: respuesta.data.data[0].employee_lastname,\r\n department: respuesta.data.data[0].department,\r\n company: respuesta.data.data[0].company,\r\n email: respuesta.data.data[0].email,\r\n supervisor: respuesta.data.data[0].supervisor,\r\n manager: respuesta.data.data[0].manager,\r\n uid: respuesta.data.data[0].uid,\r\n avatarUrl: localStorage.getItem('avatar'),\r\n supervisorEmail: respuesta.data.data[0].supervisor_mail,\r\n hireDate: respuesta.data.data[0].hire_date,\r\n territory: respuesta.data.data[0].territory,\r\n job_title: respuesta.data.data[0].job_title,\r\n\r\n }\r\n\r\n dispatch(descargaInformacionUsuarioExitosa(userInfo));\r\n\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(descargaInformacionUsuarioError());\r\n })\r\n\r\n })\r\n \r\n }\r\n\r\n if(token !== undefined) {\r\n //obtener datos del portal\r\n // await clienteAxios.get('/index.php?option=com_api&app=users&resource=user&format=raw', {\r\n // headers: {\r\n // 'Content-Type': 'application/x-www-form-urlencoded',\r\n // 'Authorization': `Bearer ${token}`\r\n // }\r\n // })\r\n // .then(respuesta => {\r\n \r\n if(localStorage.getItem('supervisor') === '1') {\r\n supervisor = true;\r\n } else {\r\n supervisor = false;\r\n }\r\n\r\n if(localStorage.getItem('manager') === '1') {\r\n manager = true;\r\n } else {\r\n manager = false;\r\n }\r\n\r\n let department = localStorage.getItem('department');\r\n let uid = localStorage.getItem('uid');\r\n let avatarUrl = localStorage.getItem('avatar');\r\n let supervisorEmail = localStorage.getItem('supervisorEmail');\r\n let email = localStorage.getItem('email');\r\n let hireDate = localStorage.getItem('hire_date');\r\n let name = localStorage.getItem('name');\r\n let company = localStorage.getItem('company');\r\n let lastname = localStorage.getItem('lastname');\r\n let territory = localStorage.getItem('territory');\r\n let job_title = localStorage.getItem('job_title');\r\n \r\n\r\n const userInfo = {\r\n // username: respuesta.data.data.username,\r\n username: username,\r\n name : name,\r\n lastname: lastname,\r\n department: department,\r\n company: company,\r\n email: email,\r\n supervisor: supervisor,\r\n manager: manager,\r\n uid: uid,\r\n avatarUrl: avatarUrl,\r\n supervisorEmail: supervisorEmail,\r\n hireDate: hireDate,\r\n territory: territory,\r\n job_title: job_title\r\n }\r\n\r\n dispatch(descargaInformacionUsuarioExitosa(userInfo));\r\n // })\r\n // .catch(error=> {\r\n // console.log(error);\r\n // dispatch(descargaInformacionUsuarioError());\r\n // });\r\n\r\n\r\n // PRUEBAS LOCAL\r\n // const userInfo = {\r\n // name : 'Julio Castro',\r\n // department: 'Graphic Design & Digital Communication',\r\n // email: 'julio.castro@mexilink.com',\r\n // supervisor: 0,\r\n // uid: 881\r\n // }\r\n // dispatch(descargaInformacionUsuarioExitosa(userInfo));\r\n }else {\r\n dispatch(descargaInformacionUsuarioError());\r\n }\r\n \r\n }\r\n}\r\n\r\nexport const descargaInformacionUsuario = () => ({\r\n type: OBTENER_INFORMACION_USUARIO\r\n});\r\n\r\nexport const descargaInformacionUsuarioExitosa = (userInfo) =>({\r\n type: OBTENER_INFORMACION_USUARIO_EXITO,\r\n payload: userInfo\r\n})\r\n\r\nexport const descargaInformacionUsuarioError = () => ({\r\n type: OBTENER_INFORMACION_USUARIO_ERROR\r\n})\r\n\r\n// Balance de horas\r\n\r\nexport function obtenerBalanceHoras(horas) {\r\n return async(dispatch) => {\r\n dispatch(obtenerInicioBalanceHoras());\r\n\r\n if(localStorage.getItem('token') !== null) {\r\n let token = localStorage.getItem('email');\r\n await axiosHr.get(`/hours/${token}`).then(respuesta => {\r\n dispatch(obtenerBalanceHorasExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerBalanceHorasError());\r\n })\r\n }\r\n \r\n \r\n }\r\n}\r\n\r\nexport const obtenerInicioBalanceHoras = () => ({\r\n type: OBTENER_BALANCE_HORAS\r\n})\r\n\r\nexport const obtenerBalanceHorasExito = (horas) => ({\r\n type: OBTENER_BALANCE_HORAS_EXITO,\r\n payload: horas\r\n})\r\n\r\nexport const obtenerBalanceHorasError = () => ({\r\n type: OBTENER_BALANCE_HORAS_ERROR\r\n})\r\n\r\n// Ajustar balance de horas\r\n\r\nexport function ajustarBalanceHoras(horas) {\r\n return async(dispatch) => {\r\n dispatch(comenzarAjusteHoras());\r\n console.log(horas);\r\n\r\n axiosHr.put('/hours-adjustment', horas)\r\n .then(respuesta => {\r\n console.log('Balance Realizado');\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const comenzarAjusteHoras = () => ({\r\n type: COMENZAR_AJUSTE_HORAS\r\n})\r\n\r\nexport const comenzarAjusteHorasExito = (horas) => ({\r\n type: COMENZAR_AJUSTE_HORAS_EXITO,\r\n payload: horas\r\n})\r\n\r\nexport const comenzarAjusteHorasError = () => ({\r\n type: COMENZAR_AJUSTE_HORAS_ERROR\r\n})\r\n\r\n// obtener usuario para balance de horas\r\nexport function obtenerUsuarioBalanceHoras (department) {\r\n return async(dispatch) => {\r\n dispatch(comenzarObtenerUsuarioBalanceHoras());\r\n\r\n axiosHr.get(`/users/${department}`)\r\n .then(respuesta=> {\r\n // console.log(respuesta);\r\n dispatch(obtenerUsuarioBalanceHorasExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n dispatch(obtenerUsuarioBalanceHorasError());\r\n })\r\n }\r\n}\r\n\r\nexport const comenzarObtenerUsuarioBalanceHoras = () => ({\r\n type: OBTENER_USUARIO_AJUSTE\r\n});\r\n\r\nexport const obtenerUsuarioBalanceHorasExito = (users) => ({\r\n type: OBTENER_USUARIO_AJUSTE_EXITO,\r\n payload: users\r\n});\r\n\r\nexport const obtenerUsuarioBalanceHorasError = () => ({\r\n type: OBTENER_USUARIO_AJUSTE_ERROR\r\n})\r\n\r\n// obtener usuario para balance de horas\r\nexport function obtenerUsuarioBalanceHorasDirector () {\r\n return async(dispatch) => {\r\n dispatch(comenzarObtenerUsuarioBalanceHorasDirector());\r\n\r\n axiosHr.get(`/directors`)\r\n .then(respuesta=> {\r\n // console.log(respuesta);\r\n dispatch(obtenerUsuarioBalanceHorasExitoDirector(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n dispatch(obtenerUsuarioBalanceHorasErrorDirector());\r\n })\r\n }\r\n}\r\n\r\nexport const comenzarObtenerUsuarioBalanceHorasDirector = () => ({\r\n type: OBTENER_USUARIO_AJUSTE\r\n});\r\n\r\nexport const obtenerUsuarioBalanceHorasExitoDirector = (users) => ({\r\n type: OBTENER_USUARIO_AJUSTE_EXITO,\r\n payload: users\r\n});\r\n\r\nexport const obtenerUsuarioBalanceHorasErrorDirector = () => ({\r\n type: OBTENER_USUARIO_AJUSTE_ERROR\r\n})\r\n\r\n// Ajustar balance de horas\r\n\r\nexport function ajustarHorasHireDate(horas) {\r\n return async(dispatch) => {\r\n dispatch(comenzarAjusteHireDate());\r\n axiosHr.put('/hours-hiredate', horas)\r\n .then(respuesta => {\r\n console.log('Balance Realizado');\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const comenzarAjusteHireDate = () => ({\r\n type: COMENZAR_AJUSTE_MENSUAL_HORAS\r\n})\r\n\r\nexport const comenzarAjusteHireDateExito = (horas) => ({\r\n type: COMENZAR_AJUSTE_MENSUAL_HORAS_EXITO,\r\n payload: horas\r\n})\r\n\r\nexport const comenzarAjusteHireDateError = () => ({\r\n type: COMENZAR_AJUSTE_MENSUAL_HORAS_ERROR\r\n})\r\n\r\n// Crear Usuario\r\n\r\nexport function crearUsuario(user) {\r\n return async(dispatch) => {\r\n dispatch(comenzarCrearUsuario());\r\n axiosHr.post('/create-user', user)\r\n .then(respuesta => {\r\n //crear usuario\r\n dispatch(crearUsuarioExito(user));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(crearUsuarioError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const comenzarCrearUsuario = () => ({\r\n type: CREAR_USUARIO\r\n})\r\n\r\nexport const crearUsuarioExito = (user) => ({\r\n type: CREAR_USUARIO_EXITO,\r\n payload: user\r\n})\r\n\r\nexport const crearUsuarioError = () => ({\r\n type: CREAR_USUARIO_ERROR\r\n})\r\n\r\n// Editar Usuario\r\n\r\nexport function editarUsuario(user) {\r\n return async(dispatch) => {\r\n dispatch(comenzarEditarUsuario());\r\n axiosHr.post('/edit-user', user)\r\n .then(respuesta => {\r\n //crear usuario\r\n dispatch(editarUsuarioExito(user));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(editarUsuarioError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const comenzarEditarUsuario = () => ({\r\n type: EDITAR_USUARIO\r\n})\r\n\r\nexport const editarUsuarioExito = (user) => ({\r\n type: EDITAR_USUARIO_EXITO,\r\n payload: user\r\n})\r\n\r\nexport const editarUsuarioError = () => ({\r\n type: EDITAR_USUARIO_ERROR\r\n})\r\n\r\n\r\n// Editar Profile\r\n\r\nexport function editarProfile(user) {\r\n return async(dispatch) => {\r\n dispatch(comenzarEditarProfile());\r\n axiosHr.post('/edit-profile', user)\r\n .then(respuesta => {\r\n //crear usuario\r\n dispatch(editarProfileExito(user));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(editarProfileError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const comenzarEditarProfile = () => ({\r\n type: EDITAR_PROFILE\r\n})\r\n\r\nexport const editarProfileExito = (user) => ({\r\n type: EDITAR_PROFILE_EXITO,\r\n payload: user\r\n})\r\n\r\nexport const editarProfileError = () => ({\r\n type: EDITAR_PROFILE_ERROR\r\n})","import {\r\n AGREGAR_TIME_OFF_REQUEST,\r\n AGREGAR_TIME_OFF_REQUEST_EXITO,\r\n AGREGAR_TIME_OFF_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_PTOS,\r\n COMENZAR_DESCARGA_PTOS_EXITO,\r\n COMENZAR_DESCARGA_PTOS_ERROR,\r\n OBTENER_PTO_ELIMINAR,\r\n PTO_ELIMINADO_EXITO,\r\n PTO_ELIMINADO_ERROR,\r\n OBTENER_DETALLE_PTO,\r\n OBTENER_DETALLE_PTO_EXITO,\r\n OBTENER_DETALLE_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO,\r\n COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR,\r\n COMENZAR_APROBACION_PTO,\r\n COMENZAR_APROBACION_PTO_EXITO,\r\n COMENZAR_APROBACION_PTO_ERROR,\r\n COMENZAR_DENEGAR_PTO,\r\n COMENZAR_DENEGAR_PTO_EXITO,\r\n COMENZAR_DENEGAR_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR,\r\n COMENZAR_EDITAR_PTO,\r\n COMENZAR_EDITAR_PTO_EXITO,\r\n COMENZAR_EDITAR_PTO_ERROR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO,\r\n COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR,\r\n} from '../types';\r\n\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n\r\n\r\n// Create new PTO\r\nexport function createNewPtoAction(pto) {\r\n return async (dispatch) => {\r\n dispatch( newPto());\r\n // Insertar en la API\r\n await clienteAxiosHR.post('/create-pto', pto)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data.insertId)\r\n pto[\"id\"] = respuesta.data.data.insertId;\r\n //console.log(pto);\r\n //Si se inserta correctamente\r\n dispatch(newPtoSuccess(pto));\r\n\r\n dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(newPtoError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const newPto = () => ({\r\n type: AGREGAR_TIME_OFF_REQUEST\r\n});\r\n\r\nexport const newPtoSuccess = (pto) => ({\r\n type: AGREGAR_TIME_OFF_REQUEST_EXITO,\r\n payload: pto\r\n});\r\n\r\nexport const newPtoError = () => ({\r\n type: AGREGAR_TIME_OFF_REQUEST_ERROR\r\n});\r\n\r\n// Create new PTO\r\nexport function editPtoAction(pto) {\r\n return async (dispatch) => {\r\n dispatch( editPto());\r\n // Insertar en la API\r\n await clienteAxiosHR.put('/update-pto', pto)\r\n .then(respuesta => {\r\n\r\n console.log(pto);\r\n //Si se actualiza correctamente\r\n dispatch(editPtoSuccess(pto));\r\n\r\n dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(editPtoError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const editPto = () => ({\r\n type: COMENZAR_EDITAR_PTO\r\n});\r\n\r\nexport const editPtoSuccess = (pto) => ({\r\n type: COMENZAR_EDITAR_PTO_EXITO,\r\n payload: pto\r\n});\r\n\r\nexport const editPtoError = () => ({\r\n type: COMENZAR_EDITAR_PTO_ERROR\r\n});\r\n\r\n// Retrieve PTO List\r\n\r\nexport function getPTOListAction(uid) {\r\n return async (dispatch) => {\r\n dispatch(getPtoList());\r\n\r\n //Consultar la API\r\n await clienteAxiosHR.get(`/pto-list/${uid}`)\r\n .then(respuesta => {\r\n dispatch(getPtoListSuccess(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n //console.log(error);\r\n dispatch(getPtoListError());\r\n })\r\n }\r\n}\r\n\r\nexport const getPtoList = () => ({\r\n type: COMENZAR_DESCARGA_PTOS\r\n});\r\n\r\nexport const getPtoListSuccess = (ptoList) => ({\r\n type: COMENZAR_DESCARGA_PTOS_EXITO,\r\n payload: ptoList\r\n});\r\n\r\nexport const getPtoListError = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_ERROR\r\n});\r\n\r\n// Retrieve PTO LIST For Department\r\n\r\nexport function getPtoListDepartment (department) {\r\n return async (dispatch) => {\r\n dispatch(startGetPtoDepartment());\r\n\r\n //Consultar la API\r\n await clienteAxiosHR.get(`/pto-list-department/${department}`)\r\n .then((respuesta) =>{\r\n const department = respuesta.data.data; \r\n dispatch(getPtoListDepartmentSuccess(department));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPtoListDepartmentError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetPtoDepartment = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_DEPARTAMENTO\r\n});\r\n\r\nexport const getPtoListDepartmentSuccess = (ptoListDepartment) => ({\r\n type: COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_EXITO,\r\n payload: ptoListDepartment\r\n});\r\n\r\nexport const getPtoListDepartmentError = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_DEPARTAMENTO_ERROR\r\n});\r\n\r\n// Retrieve PTO LIST For Department sUPERVISORT\r\n\r\nexport function getPtoListDepartmentSupervisor (department, uid, email) {\r\n return async (dispatch) => {\r\n dispatch(startGetPtoSupervisorDepartment());\r\n\r\n //Consultar la API\r\n const data = {\r\n department: department,\r\n uid: uid,\r\n email:email\r\n } \r\n\r\n await clienteAxiosHR.post(`/pto-list-supervisor`, data)\r\n .then((respuesta) =>{\r\n const department = respuesta.data.data; \r\n dispatch(getPtoListDepartmentSupervisorSuccess(department));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPtoListDepartmentSupervisorError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetPtoSupervisorDepartment = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR\r\n});\r\n\r\nexport const getPtoListDepartmentSupervisorSuccess = (ptoListDepartment) => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR_EXITO,\r\n payload: ptoListDepartment\r\n});\r\n\r\nexport const getPtoListDepartmentSupervisorError = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR_ERROR\r\n});\r\n\r\n// Retrieve PTO LIST For Supervisr - Directors\r\n\r\nexport function getPtoListSupervisorDirector (uid) {\r\n return async (dispatch) => {\r\n dispatch(startGetPtoSupervisorDirector());\r\n\r\n //Consultar la API\r\n const data = {\r\n uid: uid\r\n } \r\n\r\n await clienteAxiosHR.post(`/pto-list-supervisor-director`, data)\r\n .then((respuesta) =>{\r\n const listDirector = respuesta.data.data; \r\n dispatch(getPtoListSupervisorDirectorSuccess(listDirector));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPtoListSupervisorDirectorError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetPtoSupervisorDirector = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR\r\n});\r\n\r\nexport const getPtoListSupervisorDirectorSuccess = (ptoList) => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_EXITO,\r\n payload: ptoList\r\n});\r\n\r\nexport const getPtoListSupervisorDirectorError = () => ({\r\n type: COMENZAR_DESCARGA_PTOS_SUPERVISOR_DIRECTOR_ERROR\r\n});\r\n\r\n// Delete a pto\r\n\r\nexport function deletePtoAction(id) {\r\n return (dispatch) => {\r\n dispatch(startPtoDelete())\r\n\r\n //Delete from databse\r\n clienteAxiosHR.delete('/delete-pto/', {data: {\r\n id : id\r\n }\r\n })\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n dispatch(deletePtoSuccess(id))\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n dispatch(deletePtoError())\r\n })\r\n }\r\n}\r\n\r\nexport const startPtoDelete = () => ({\r\n type: OBTENER_PTO_ELIMINAR\r\n});\r\n\r\nexport const deletePtoSuccess = (id) => ({\r\n type: PTO_ELIMINADO_EXITO,\r\n payload: id\r\n});\r\n\r\nexport const deletePtoError = () => ({\r\n type: PTO_ELIMINADO_ERROR\r\n})\r\n\r\n// Mostrar detalle PTO\r\n\r\nexport function getPtoDetail (id) {\r\n return async (dispatch) => {\r\n dispatch(startGetPtoDetail());\r\n\r\n //Consultar la API\r\n await clienteAxiosHR.get(`/pto/view/${id}`)\r\n .then((respuesta) =>{\r\n const pto = respuesta.data.data; \r\n dispatch(getPtoDetailSuccess(pto));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPtoDetailError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetPtoDetail = () =>({\r\n type: OBTENER_DETALLE_PTO\r\n})\r\n\r\nexport const getPtoDetailSuccess = (pto) =>({\r\n type: OBTENER_DETALLE_PTO_EXITO,\r\n payload: pto\r\n})\r\n\r\nexport const getPtoDetailError = () =>({\r\n type: OBTENER_DETALLE_PTO_ERROR\r\n})\r\n\r\n// Approve a pto\r\n\r\nexport function approvePtoAction(id) {\r\n return (dispatch) => {\r\n dispatch(startPtoApproval())\r\n //console.log(id);\r\n\r\n //Update from databse\r\n clienteAxiosHR.put('/approve-pto', {data: {\r\n id : id\r\n }\r\n })\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n dispatch(startPtoApprovalSuccess(id))\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n dispatch(startPtoApprovalError())\r\n })\r\n }\r\n}\r\n\r\nexport const startPtoApproval = () => ({\r\n type: COMENZAR_APROBACION_PTO\r\n});\r\n\r\nexport const startPtoApprovalSuccess = (id) => ({\r\n type: COMENZAR_APROBACION_PTO_EXITO,\r\n payload: id\r\n});\r\n\r\nexport const startPtoApprovalError = () => ({\r\n type: COMENZAR_APROBACION_PTO_ERROR\r\n});\r\n\r\n// dENEGAR a pto\r\n\r\nexport function denyPtoAction(pto) {\r\n return (dispatch) => {\r\n dispatch(startPtoDenegation())\r\n\r\n //Update from databse\r\n clienteAxiosHR.put('/deny-pto', {data: {\r\n id : pto.id,\r\n reasonDeny: pto.reasonDeny\r\n }\r\n })\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n dispatch(startPtoDenegationSuccess(pto.id))\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n dispatch(startPtoDenegationError())\r\n })\r\n }\r\n}\r\n\r\nexport const startPtoDenegation = () => ({\r\n type: COMENZAR_DENEGAR_PTO\r\n});\r\n\r\nexport const startPtoDenegationSuccess = (id) => ({\r\n type: COMENZAR_DENEGAR_PTO_EXITO,\r\n payload: id\r\n});\r\n\r\nexport const startPtoDenegationError = () => ({\r\n type: COMENZAR_DENEGAR_PTO_ERROR\r\n});","import React, {useEffect} from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport Swal from 'sweetalert2';\r\nimport moment from 'moment';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport {ajustarBalanceHoras, obtenerInformacionUsuario} from '../actions/authenticateActions';\r\n\r\nimport axiosHr from '../config/axiosHR';\r\n\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport {deletePtoAction} from '../actions/timeoffrequestActions';\r\n\r\nconst Pto = ({pto, managerView}) => {\r\n\r\n // Dispatch para ejecutar\r\n const dispatch = useDispatch();\r\n\r\n // agregar balance horas\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // agregar balance de horas\r\n const balanceHorasActual = userInfo.hours;\r\n const uid = userInfo.userInfo.uid;\r\n const supervisorEmail = userInfo.userInfo.supervisorEmail;\r\n const email = userInfo.userInfo.email;\r\n const company = userInfo.userInfo.company;\r\n\r\n // const dueDate = moment(pto.day_beginning);\r\n // const today = moment();\r\n\r\n const manager = useSelector(state=>state.userInfo.userInfo.manager);\r\n const supervisor = useSelector(state=>state.userInfo.userInfo.supervisor);\r\n const departmentUsers = useSelector(state=>state.manager.employees);\r\n //const departmentUsers = userInfo.userHour; \r\n \r\n useEffect(()=> {\r\n \r\n const loadUser = ()=> dispatch(obtenerInformacionUsuario(null, null));\r\n loadUser();\r\n \r\n \r\n\r\n },[dispatch]);\r\n\r\n //console.log(pto);\r\n\r\n let createdAt = moment.utc(pto.date).format('MM-DD-YYYY');\r\n let absenceText;\r\n if(pto.absence_code ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(pto.absence_code ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(pto.absence_code ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(pto.absence_code ==='LTD') {\r\n absenceText = 'Long Term Disability'\r\n }\r\n if(pto.absence_code ==='STD') {\r\n absenceText = 'Short Term Disability'\r\n }\r\n if(pto.absence_code ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='O') {\r\n absenceText = 'Other'\r\n } \r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(pto.absence_code ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(pto.absence_code ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(pto.absence_code ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(pto.absence_code ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(pto.absence_code ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(pto.absence_code ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n if(pto.absence_code ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n\r\n\r\n\r\n const confirmDeletePto = (id, totalHours, carryOverUsage, sickHoursUsage, carryOverSickHoursUsage) => {\r\n // ask user confirmation\r\n \r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"This action can't be undone\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Delete!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Deleted',\r\n 'The Time off Request has been deleted successfully.',\r\n 'success'\r\n )\r\n dispatch(deletePtoAction(id) );\r\n\r\n if(pto.absence_code === 'J' || pto.absence_code === 'VT' || pto.absence_code === 'M') {\r\n let data\r\n switch (pto.absence_code) {\r\n case 'J':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(40)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(40)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n case 'VT':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(2)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(2)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n case 'M':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(24)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(24)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n\r\n\r\n } else {\r\n\r\n\r\n \r\n \r\n if(pto.absence_code === 'S') {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n })\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Delete PTO ' + absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n })\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n }\r\n\r\n \r\n\r\n \r\n \r\n }\r\n })\r\n }\r\n\r\n const sendEmail = (pto, supervisorEmail, email, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n console.log(company);\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Your Time Off Request is gonna be send to your supervisor and H.R. Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.post('/pto-email', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n }\r\n\r\n const cancelRequest = (pto, totalHours,supervisorEmail, email, carryOverUsage, sickHoursUsage, carryOverSickHoursUsage, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Your Time Off Request will be be canceled\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Cancel Request!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.post('/pto-cancel', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been canceled successfully.',\r\n 'success'\r\n );\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n });\r\n\r\n if(pto.absence_code === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Cancel PTO '+ absenceText,\r\n type_mov: 'Cancel PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Cancel PTO '+ absenceText,\r\n type_mov: 'Cancel PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n\r\n \r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n\r\n \r\n }\r\n })\r\n }\r\n\r\n const reOpenPto = (pto, totalHours,supervisorEmail, email, carryOverUsage, sickHoursUsage, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n \r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"You are about to reopen this Time Off Request\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Reopen!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.put('/reopen-pto', ptoInfo)\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been Reopen successfully.',\r\n 'success'\r\n );\r\n\r\n const balanceHorasActual = departmentUsers.find(uids => uids.uid === pto.user_id)\r\n // TODO agregar balance de horas con carry over sick time y agregar log de movimientos para reopen\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage) - parseInt(pto.carry_over_sick_hours_usage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(pto.sick_hours_usage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n uid : pto.user_id\r\n });\r\n\r\n if(pto.absence_code === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Reopen PTO '+ absenceText,\r\n type_mov: 'Reopen PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n\r\n let data = {\r\n uid : pto.user_id,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Reopen PTO '+ absenceText,\r\n type_mov: 'Reopen PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by reopen this PTO.',\r\n 'warning'\r\n )\r\n })\r\n\r\n \r\n }\r\n })\r\n }\r\n\r\n \r\n\r\n return (\r\n \r\n {pto.employee_name}\r\n {pto.department}\r\n {pto.status}\r\n {\r\n createdAt\r\n }\r\n \r\n { moment.utc(pto.day_beginning).format('MM-DD-YYYY')}\r\n {moment.utc(pto.day_end).format('MM-DD-YYYY')}\r\n {pto.send ? 'Sent' : 'Not Sent'}\r\n {absenceText}\r\n {pto.total_hours}\r\n \r\n { manager || supervisor\r\n ?\r\n pto.send === 1\r\n ?\r\n \r\n \r\n Details\r\n \r\n\r\n { (manager && pto.reopen === 0 && managerView === true && pto.status !== 'Denied' && pto.status !== 'Canceled')\r\n ? \r\n reOpenPto(pto, pto.total_hours, supervisorEmail, email, pto.carry_over_usage, pto.sick_hours_usage)}\r\n >\r\n Reopen\r\n \r\n :\r\n null\r\n }\r\n \r\n :\r\n \r\n \r\n Details\r\n \r\n\r\n {(pto.reopen === 1 && managerView !== true)\r\n ?\r\n \r\n Confirm\r\n \r\n :\r\n null\r\n }\r\n \r\n :\r\n pto.send \r\n ? \r\n \r\n \r\n Details\r\n \r\n {//dueDate.diff(today) > 0 && pto.status !== 'Canceled' && pto.status !== 'Denied'\r\n pto.status !== 'Canceled' && pto.status !== 'Denied' && pto.status !== 'Approved' && pto.status !== 'Opened' && pto.reopen !== 1\r\n ?\r\n cancelRequest(pto, pto.total_hours, supervisorEmail, email, pto.carry_over_usage, pto.sick_hours_usage, pto.carry_over_sick_hours_usage)}\r\n >\r\n Cancel\r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n : \r\n \r\n Details\r\n \r\n {(pto.reopen === 1 && managerView !== true)\r\n ?\r\n \r\n Confirm\r\n \r\n :\r\n null\r\n }\r\n {(pto.status !== 'Opened' && managerView !== true && pto.reopen !== 1 && pto.status !== 'Approved')\r\n ?\r\n sendEmail(pto, supervisorEmail, email, pto.company)}\r\n >\r\n Send\r\n \r\n :\r\n null\r\n }\r\n\r\n {(pto.status !== 'Opened' && managerView !== true && pto.reopen !== 1 && pto.status !== 'Approved' && pto.hr !==0)\r\n ?\r\n confirmDeletePto(pto.id, pto.total_hours, pto.carry_over_usage, pto.sick_hours_usage, pto.carry_over_sick_hours_usage)} \r\n >\r\n Delete\r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n \r\n }\r\n \r\n\r\n\r\n \r\n );\r\n};\r\n\r\nexport default Pto;","import {\r\n OBTENER_DEPARTAMENTOS,\r\n OBTENER_DEPARTAMENTOS_EXITO,\r\n OBTENER_DEPARTAMENTOS_ERROR,\r\n OBTENER_SICKDAYS,\r\n OBTENER_SICKDAYS_EXITO,\r\n OBTENER_SICKDAYS_ERROR,\r\n OBTENER_COMPANIES,\r\n OBTENER_COMPANIES_EXITO,\r\n OBTENER_COMPANIES_ERROR,\r\n OBTENER_TERRITORY,\r\n OBTENER_TERRITORY_EXITO,\r\n OBTENER_TERRITORY_ERROR,\r\n OBTENER_EMPLOYEES_MANAGER,\r\n OBTENER_EMPLOYEES_MANAGER_EXITO,\r\n OBTENER_EMPLOYEES_MANAGER_ERROR,\r\n OBTENER_HISTORICO,\r\n OBTENER_HISTORICO_EXITO,\r\n OBTENER_HISTORICO_ERROR,\r\n COMENZAR_EDITAR_DEPARTMENT,\r\n COMENZAR_EDITAR_DEPARTMENT_EXITO,\r\n COMENZAR_EDITAR_DEPARTMENT_ERROR,\r\n COMENZAR_CREAR_DEPARTMENT,\r\n COMENZAR_CREAR_DEPARTMENT_EXITO,\r\n COMENZAR_CREAR_DEPARTMENT_ERROR,\r\n OBTENER_ESTADOS_ACTIVOS,\r\n OBTENER_ESTADOS_ACTIVOS_EXITO,\r\n OBTENER_ESTADOS_ACTIVOS_ERROR,\r\n} from '../types';\r\n\r\nimport axiosHr from '../config/axiosHR';\r\n\r\nexport function obtenerDepartamentos() {\r\n return (dispatch) => {\r\n dispatch(obtenerDepartamentosInicio());\r\n\r\n axiosHr.get('/departments')\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerDepartamentosExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerDepartamentosError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerDepartamentosInicio = () => ({\r\n type: OBTENER_DEPARTAMENTOS\r\n});\r\n\r\nexport const obtenerDepartamentosExito = (departments) => ({\r\n type: OBTENER_DEPARTAMENTOS_EXITO,\r\n payload: departments\r\n});\r\n\r\nexport const obtenerDepartamentosError = () => ({\r\n type: OBTENER_DEPARTAMENTOS_ERROR\r\n})\r\n\r\nexport function obtenerSickDays (uid) {\r\n return (dispatch) => {\r\n dispatch(obtenerSickDaysInicio());\r\n\r\n axiosHr.get(`/sickDays/${uid}`)\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n dispatch(obtenerSickDaysExito(respuesta));\r\n //dispatch(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerSickDaysError());\r\n })\r\n }\r\n}\r\n\r\nexport const obtenerSickDaysInicio = () => ({\r\n type: OBTENER_SICKDAYS\r\n})\r\n\r\nexport const obtenerSickDaysExito = (sickDays) => ({\r\n type: OBTENER_SICKDAYS_EXITO,\r\n payload: sickDays\r\n})\r\n\r\nexport const obtenerSickDaysError = () => ({\r\n type: OBTENER_SICKDAYS_ERROR\r\n})\r\n\r\nexport function obtenerCompanies() {\r\n return (dispatch) => {\r\n dispatch(obtenerCompaniesInicio());\r\n\r\n axiosHr.get('/companies')\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerCompaniesExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerCompaniesError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerCompaniesInicio = () => ({\r\n type: OBTENER_COMPANIES\r\n});\r\n\r\nexport const obtenerCompaniesExito = (companies) => ({\r\n type: OBTENER_COMPANIES_EXITO,\r\n payload: companies\r\n});\r\n\r\nexport const obtenerCompaniesError = () => ({\r\n type: OBTENER_COMPANIES_ERROR\r\n})\r\n\r\nexport function obtenerTerritories() {\r\n return (dispatch) => {\r\n dispatch(obtenerTerritoriesInicio());\r\n\r\n axiosHr.get('/territories')\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerTerritoriesExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerTerritoriesError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerTerritoriesInicio = () => ({\r\n type: OBTENER_TERRITORY\r\n});\r\n\r\nexport const obtenerTerritoriesExito = (territories) => ({\r\n type: OBTENER_TERRITORY_EXITO,\r\n payload: territories\r\n});\r\n\r\nexport const obtenerTerritoriesError = () => ({\r\n type: OBTENER_TERRITORY_ERROR\r\n})\r\n\r\nexport function obtenerEmpleadosManager(data) {\r\n return (dispatch) => {\r\n dispatch(obtenerEmpleadosManagerInicio());\r\n\r\n console.log(data)\r\n axiosHr.post('/managerReport', data)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerEmpleadosManagerExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerEmpleadosManagerError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerEmpleadosManagerInicio = () => ({\r\n type: OBTENER_EMPLOYEES_MANAGER\r\n});\r\n\r\nexport const obtenerEmpleadosManagerExito = (employees) => ({\r\n type: OBTENER_EMPLOYEES_MANAGER_EXITO,\r\n payload: employees\r\n});\r\n\r\nexport const obtenerEmpleadosManagerError = () => ({\r\n type: OBTENER_EMPLOYEES_MANAGER_ERROR\r\n})\r\n\r\nexport function obtenerHistorico(uid) {\r\n return (dispatch) => {\r\n dispatch(obtenerHistoricoInicio());\r\n\r\n axiosHr.get(`/history/${uid}`)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerHistoricoExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerHistoricoError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerHistoricoInicio = () => ({\r\n type: OBTENER_HISTORICO\r\n});\r\n\r\nexport const obtenerHistoricoExito = (historic) => ({\r\n type: OBTENER_HISTORICO_EXITO,\r\n payload: historic\r\n});\r\n\r\nexport const obtenerHistoricoError = () => ({\r\n type: OBTENER_HISTORICO_ERROR\r\n})\r\n\r\n\r\nexport function editDepartmentAction(department) {\r\n return async (dispatch) => {\r\n dispatch( editDepartment());\r\n // Insertar en la API\r\n await axiosHr.post('/update-department', department)\r\n .then(respuesta => {\r\n\r\n console.log(department);\r\n //Si se actualiza correctamente\r\n dispatch(editDepartmentSuccess(department));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(editDepartmentError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const editDepartment = () => ({\r\n type: COMENZAR_CREAR_DEPARTMENT\r\n});\r\n\r\nexport const editDepartmentSuccess = (pto) => ({\r\n type: COMENZAR_CREAR_DEPARTMENT_EXITO,\r\n payload: pto\r\n});\r\n\r\nexport const editDepartmentError = () => ({\r\n type: COMENZAR_CREAR_DEPARTMENT_ERROR\r\n});\r\n\r\n// new department\r\nexport function newDepartmentAction(department) {\r\n return async (dispatch) => {\r\n dispatch( newDepartment());\r\n // Insertar en la API\r\n await axiosHr.post('/new-department', department)\r\n .then(respuesta => {\r\n\r\n console.log(department);\r\n //Si se actualiza correctamente\r\n dispatch(newDepartmentSuccess(department));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(newDepartmentError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const newDepartment = () => ({\r\n type: COMENZAR_EDITAR_DEPARTMENT\r\n});\r\n\r\nexport const newDepartmentSuccess = (pto) => ({\r\n type: COMENZAR_EDITAR_DEPARTMENT_EXITO,\r\n payload: pto\r\n});\r\n\r\nexport const newDepartmentError = () => ({\r\n type: COMENZAR_EDITAR_DEPARTMENT_ERROR\r\n});\r\n\r\nexport function obtenerEstadosActivos(company) {\r\n return (dispatch) => {\r\n dispatch(obtenerEstadosActivosInicio());\r\n\r\n axiosHr.get('/active-states/'+company)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data);\r\n dispatch(obtenerEstadosActivosExito(respuesta.data.data));\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n dispatch(obtenerEstadosActivosError());\r\n })\r\n\r\n }\r\n}\r\n\r\nexport const obtenerEstadosActivosInicio = () => ({\r\n type: OBTENER_ESTADOS_ACTIVOS\r\n});\r\n\r\nexport const obtenerEstadosActivosExito = (estados) => ({\r\n type: OBTENER_ESTADOS_ACTIVOS_EXITO,\r\n payload: estados\r\n});\r\n\r\nexport const obtenerEstadosActivosError = () => ({\r\n type: OBTENER_ESTADOS_ACTIVOS_ERROR\r\n})","import {\r\n AGREGAR_FIXED_ASSET_REQUEST,\r\n AGREGAR_FIXED_ASSET_REQUEST_EXITO,\r\n AGREGAR_FIXED_ASSET_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO,\r\n OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR,\r\n COMENZAR_EDITAR_FIXED_REQUEST,\r\n COMENZAR_EDITAR_FIXED_REQUEST_EXITO,\r\n COMENZAR_EDITAR_FIXED_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR\r\n}\r\nfrom '../types';\r\n\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n\r\n// Create new Fixed Asset Request\r\nexport function createNewFixedAssetRequestAction(request) {\r\n return async (dispatch) => {\r\n dispatch( newFixedAssetRequest());\r\n // Insertar en la API\r\n await clienteAxiosHR.post('/create-fixed-asset', request)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data.insertId)\r\n request[\"id\"] = respuesta.data.data.insertId;\r\n //console.log(pto);\r\n //Si se inserta correctamente\r\n dispatch(newFixedAssetRequestSuccess(request));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(newFixedAssetRequestError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const newFixedAssetRequest = () => ({\r\n type: AGREGAR_FIXED_ASSET_REQUEST\r\n});\r\n\r\nexport const newFixedAssetRequestSuccess = (request) => ({\r\n type: AGREGAR_FIXED_ASSET_REQUEST_EXITO,\r\n payload: request\r\n});\r\n\r\nexport const newFixedAssetRequestError = () => ({\r\n type: AGREGAR_FIXED_ASSET_REQUEST_ERROR\r\n});\r\n\r\n\r\n// Retrieve Fixed Asset Request\r\n\r\nexport function getAllFixedAssetsRequestList () {\r\n return async (dispatch) => {\r\n dispatch(startGetAllFixedAssetRequestList());\r\n\r\n await clienteAxiosHR.get(`/fixed-asset-request-list-all`)\r\n .then((respuesta) =>{\r\n // const department = respuesta.data.data; \r\n // console.log(respuesta)\r\n dispatch(getAllFixedAssetRequestListSuccess(respuesta.data.data));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getAllFixedAssetRequestListError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetAllFixedAssetRequestList = () => ({\r\n type: COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST\r\n});\r\n\r\nexport const getAllFixedAssetRequestListSuccess = (fixedAssetRequests) => ({\r\n type: COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_EXITO,\r\n payload: fixedAssetRequests\r\n});\r\n\r\nexport const getAllFixedAssetRequestListError = () => ({\r\n type: COMENZAR_DESCARGA_TOTAL_FIXED_ASSET_REQUEST_ERROR\r\n});\r\n\r\nexport function getFixedAssetsRequestList (department, territory, dateReport, fromDate, toDate) {\r\n return async (dispatch) => {\r\n dispatch(startGetFixedAssetRequestList());\r\n\r\n let data = {};\r\n if(dateReport === 'all') {\r\n //Consultar la API\r\n data = {\r\n department: department,\r\n territory:territory,\r\n dateReport: dateReport\r\n } \r\n } else {\r\n data = {\r\n department: department,\r\n territory:territory,\r\n dateReport: dateReport,\r\n fromDate: fromDate,\r\n toDate: toDate\r\n }\r\n }\r\n\r\n console.log(data);\r\n\r\n await clienteAxiosHR.post(`/fixed-asset-request-list`, data)\r\n .then((respuesta) =>{\r\n // const department = respuesta.data.data; \r\n // console.log(respuesta)\r\n dispatch(getFixedAssetRequestListSuccess(respuesta.data.data));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getFixedAssetRequestListError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetFixedAssetRequestList = () => ({\r\n type: COMENZAR_DESCARGA_FIXED_ASSET_REQUEST\r\n});\r\n\r\nexport const getFixedAssetRequestListSuccess = (ptoListDepartment) => ({\r\n type: COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_EXITO,\r\n payload: ptoListDepartment\r\n});\r\n\r\nexport const getFixedAssetRequestListError = () => ({\r\n type: COMENZAR_DESCARGA_FIXED_ASSET_REQUEST_ERROR\r\n});\r\n\r\n\r\n// Mostrar detalle PTO\r\n\r\nexport function getFixedAssetRequestDetail (id) {\r\n return async (dispatch) => {\r\n dispatch(startFixedAssetRequestDetail());\r\n\r\n //Consultar la API\r\n await clienteAxiosHR.get(`/fixed-asset-request/view/${id}`)\r\n .then((respuesta) =>{\r\n const request = respuesta.data.data; \r\n console.log(request);\r\n dispatch(getFixedAssetRequestSuccess(request));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getFixedAssetRequestError());\r\n })\r\n }\r\n}\r\n\r\nexport const startFixedAssetRequestDetail = () =>({\r\n type: OBTENER_DETALLE_FIXED_ASSET_REQUEST\r\n})\r\n\r\nexport const getFixedAssetRequestSuccess = (request) =>({\r\n type: OBTENER_DETALLE_FIXED_ASSET_REQUEST_EXITO,\r\n payload: request\r\n})\r\n\r\nexport const getFixedAssetRequestError = () =>({\r\n type: OBTENER_DETALLE_FIXED_ASSET_REQUEST_ERROR\r\n})\r\n\r\n\r\n// Edit Fixed Asset request Action\r\nexport function editFixedRequestAction(request) {\r\n return async (dispatch) => {\r\n dispatch( editFixedRequest());\r\n // Insertar en la API\r\n await clienteAxiosHR.put('/update-fixed-asset-request', request)\r\n .then(respuesta => {\r\n\r\n console.log(request);\r\n //Si se actualiza correctamente\r\n dispatch(editFixedRequestSuccess(request));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(editFixedRequestError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const editFixedRequest = () => ({\r\n type: COMENZAR_EDITAR_FIXED_REQUEST\r\n});\r\n\r\nexport const editFixedRequestSuccess = (request) => ({\r\n type: COMENZAR_EDITAR_FIXED_REQUEST_EXITO,\r\n payload: request\r\n});\r\n\r\nexport const editFixedRequestError = () => ({\r\n type: COMENZAR_EDITAR_FIXED_REQUEST_ERROR\r\n});","import {\r\n AGREGAR_PERSONAL_REQUEST,\r\n AGREGAR_PERSONAL_REQUEST_EXITO,\r\n AGREGAR_PERSONAL_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR,\r\n OBTENER_DETALLE_PERSONAL_REQUEST,\r\n OBTENER_DETALLE_PERSONAL_REQUEST_EXITO,\r\n OBTENER_DETALLE_PERSONAL_REQUEST_ERROR,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO,\r\n COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR\r\n}\r\nfrom '../types';\r\n\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n\r\n// Create new Fixed Asset Request\r\nexport function createNewPersonalRequestAction(request) {\r\n return async (dispatch) => {\r\n dispatch( newPersonalRequest());\r\n // Insertar en la API\r\n await clienteAxiosHR.post('/create-personal-request', request)\r\n .then(respuesta => {\r\n //console.log(respuesta.data.data.insertId)\r\n request[\"id\"] = respuesta.data.data.insertId;\r\n //console.log(pto);\r\n //Si se inserta correctamente\r\n dispatch(newPersonalRequestSuccess(request));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(newPersonalRequestError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const newPersonalRequest = () => ({\r\n type: AGREGAR_PERSONAL_REQUEST\r\n});\r\n\r\nexport const newPersonalRequestSuccess = (request) => ({\r\n type: AGREGAR_PERSONAL_REQUEST_EXITO,\r\n payload: request\r\n});\r\n\r\nexport const newPersonalRequestError = () => ({\r\n type: AGREGAR_PERSONAL_REQUEST_ERROR\r\n});\r\n\r\n\r\n// Retrieve Fixed Asset Request\r\n\r\nexport function getAllPersonalsRequestList () {\r\n return async (dispatch) => {\r\n dispatch(startGetAllPersonalRequestList());\r\n\r\n await clienteAxiosHR.get(`/personal-request-list-all`)\r\n .then((respuesta) =>{\r\n // const department = respuesta.data.data; \r\n // console.log(respuesta)\r\n dispatch(getAllPersonalRequestListSuccess(respuesta.data.data));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getAllPersonalRequestListError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetAllPersonalRequestList = () => ({\r\n type: COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST\r\n});\r\n\r\nexport const getAllPersonalRequestListSuccess = (personalRequests) => ({\r\n type: COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_EXITO,\r\n payload: personalRequests\r\n});\r\n\r\nexport const getAllPersonalRequestListError = () => ({\r\n type: COMENZAR_DESCARGA_TOTAL_PERSONAL_REQUEST_ERROR\r\n});\r\n\r\nexport function getPersonalsRequestList (department, territory, dateReport, fromDate, toDate) {\r\n return async (dispatch) => {\r\n dispatch(startGetPersonalRequestList());\r\n\r\n let data = {};\r\n if(dateReport === 'all') {\r\n //Consultar la API\r\n data = {\r\n department: department,\r\n territory:territory,\r\n dateReport: dateReport\r\n } \r\n } else {\r\n data = {\r\n department: department,\r\n territory:territory,\r\n dateReport: dateReport,\r\n fromDate: fromDate,\r\n toDate: toDate\r\n }\r\n }\r\n\r\n console.log(data);\r\n\r\n await clienteAxiosHR.post(`/personal-request-list`, data)\r\n .then((respuesta) =>{\r\n // const department = respuesta.data.data; \r\n // console.log(respuesta)\r\n dispatch(getPersonalRequestListSuccess(respuesta.data.data));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPersonalRequestListError());\r\n })\r\n }\r\n}\r\n\r\nexport const startGetPersonalRequestList = () => ({\r\n type: COMENZAR_DESCARGA_PERSONAL_REQUEST\r\n});\r\n\r\nexport const getPersonalRequestListSuccess = (ptoListDepartment) => ({\r\n type: COMENZAR_DESCARGA_PERSONAL_REQUEST_EXITO,\r\n payload: ptoListDepartment\r\n});\r\n\r\nexport const getPersonalRequestListError = () => ({\r\n type: COMENZAR_DESCARGA_PERSONAL_REQUEST_ERROR\r\n});\r\n\r\n\r\n// Mostrar detalle PTO\r\n\r\nexport function getPersonalRequestDetail (id) {\r\n return async (dispatch) => {\r\n dispatch(startPersonalRequestDetail());\r\n\r\n //Consultar la API\r\n await clienteAxiosHR.get(`/personal-request/view/${id}`)\r\n .then((respuesta) =>{\r\n const request = respuesta.data.data; \r\n console.log(request);\r\n dispatch(getPersonalRequestSuccess(request));\r\n })\r\n .catch((error)=> {\r\n //console.log(error)\r\n dispatch(getPersonalRequestError());\r\n })\r\n }\r\n}\r\n\r\nexport const startPersonalRequestDetail = () =>({\r\n type: OBTENER_DETALLE_PERSONAL_REQUEST\r\n})\r\n\r\nexport const getPersonalRequestSuccess = (request) =>({\r\n type: OBTENER_DETALLE_PERSONAL_REQUEST_EXITO,\r\n payload: request\r\n})\r\n\r\nexport const getPersonalRequestError = () =>({\r\n type: OBTENER_DETALLE_PERSONAL_REQUEST_ERROR\r\n})\r\n\r\n\r\n// Edit Fixed Asset request Action\r\nexport function editPersonalRequestAction(request) {\r\n return async (dispatch) => {\r\n dispatch( editPersonalRequest());\r\n // Insertar en la API\r\n await clienteAxiosHR.put('/update-personal-request', request)\r\n .then(respuesta => {\r\n\r\n console.log(request, 'console log de la respuesta');\r\n //Si se actualiza correctamente\r\n dispatch(editPersonalRequestSuccess(request));\r\n\r\n //dispatch(getPTOListAction());\r\n })\r\n .catch(error => {\r\n // console.log(error);\r\n\r\n // Si hay un error\r\n dispatch(editPersonalRequestError());\r\n })\r\n \r\n }\r\n}\r\n\r\n\r\nexport const editPersonalRequest = () => ({\r\n type: COMENZAR_EDITAR_PERSONAL_REQUEST\r\n});\r\n\r\nexport const editPersonalRequestSuccess = (request) => ({\r\n type: COMENZAR_EDITAR_PERSONAL_REQUEST_EXITO,\r\n payload: request\r\n});\r\n\r\nexport const editPersonalRequestError = () => ({\r\n type: COMENZAR_EDITAR_PERSONAL_REQUEST_ERROR\r\n});","import React from 'react';\r\n\r\nconst Spinner = () => {\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Spinner;","import React, {useEffect} from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport Swal from 'sweetalert2';\r\nimport moment from 'moment';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport {ajustarBalanceHoras, obtenerInformacionUsuario} from '../actions/authenticateActions';\r\n\r\nimport axiosHr from '../config/axiosHR';\r\n\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport {deletePtoAction} from '../actions/timeoffrequestActions';\r\n\r\nconst PtoGeneric = ({pto, managerView}) => {\r\n\r\n // Dispatch para ejecutar\r\n const dispatch = useDispatch();\r\n\r\n // agregar balance horas\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // agregar balance de horas\r\n const balanceHorasActual = userInfo.hours;\r\n const uid = userInfo.userInfo.uid;\r\n const supervisorEmail = userInfo.userInfo.supervisorEmail;\r\n const email = userInfo.userInfo.email;\r\n const company = userInfo.userInfo.company;\r\n\r\n // const dueDate = moment(pto.day_beginning);\r\n // const today = moment();\r\n\r\n const manager = useSelector(state=>state.userInfo.userInfo.manager);\r\n // const supervisor = useSelector(state=>state.userInfo.userInfo.supervisor);\r\n const departmentUsers = useSelector(state=>state.manager.employees);\r\n //const departmentUsers = userInfo.userHour; \r\n \r\n useEffect(()=> {\r\n \r\n const loadUser = ()=> dispatch(obtenerInformacionUsuario(null, null));\r\n loadUser();\r\n \r\n \r\n\r\n },[dispatch]);\r\n\r\n //console.log(pto);\r\n\r\n let createdAt = moment.utc(pto.date).format('MM-DD-YYYY');\r\n let absenceText;\r\n if(pto.absence_code ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(pto.absence_code ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(pto.absence_code ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(pto.absence_code ==='LTD') {\r\n absenceText = 'Long Term Disability'\r\n }\r\n if(pto.absence_code ==='STD') {\r\n absenceText = 'Short Term Disability'\r\n }\r\n if(pto.absence_code ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='O') {\r\n absenceText = 'Other'\r\n } \r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(pto.absence_code ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(pto.absence_code ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(pto.absence_code ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(pto.absence_code ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(pto.absence_code ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(pto.absence_code ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n if(pto.absence_code ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n\r\n\r\n\r\n const confirmDeletePto = (id, totalHours, carryOverUsage, sickHoursUsage, carryOverSickHoursUsage) => {\r\n // ask user confirmation\r\n \r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"This action can't be undone\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Delete!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Deleted',\r\n 'The Time off Request has been deleted successfully.',\r\n 'success'\r\n )\r\n dispatch(deletePtoAction(id) );\r\n\r\n if(pto.absence_code === 'J' || pto.absence_code === 'VT' || pto.absence_code === 'M') {\r\n let data\r\n switch (pto.absence_code) {\r\n case 'J':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(40)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(40)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n case 'VT':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(2)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(2)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n case 'M':\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(24)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : uid\r\n })\r\n\r\n data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(24)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n\r\n\r\n } else {\r\n\r\n\r\n \r\n \r\n if(pto.absence_code === 'S') {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n })\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Delete PTO ' + absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n })\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n }\r\n\r\n \r\n\r\n \r\n \r\n }\r\n })\r\n }\r\n\r\n const sendEmail = (pto, supervisorEmail, email, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n console.log(company);\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Your Time Off Request is gonna be send to your supervisor and H.R. Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.post('/pto-email', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n }\r\n\r\n const cancelRequest = (pto, totalHours,supervisorEmail, email, carryOverUsage, sickHoursUsage, carryOverSickHoursUsage, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Your Time Off Request will be be canceled\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Cancel Request!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.post('/pto-cancel', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been canceled successfully.',\r\n 'success'\r\n );\r\n\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage) - parseInt(carryOverSickHoursUsage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(carryOverSickHoursUsage),\r\n uid : uid\r\n });\r\n\r\n if(pto.absence_code === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Cancel PTO '+ absenceText,\r\n type_mov: 'Cancel PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(totalHours) - parseInt(carryOverUsage) - parseInt(sickHoursUsage)),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over) + parseInt(carryOverUsage),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Cancel PTO '+ absenceText,\r\n type_mov: 'Cancel PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n\r\n \r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n\r\n \r\n }\r\n })\r\n }\r\n\r\n const reOpenPto = (pto, totalHours,supervisorEmail, email, carryOverUsage, sickHoursUsage, company) => {\r\n // Preguntar al usuario\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n \r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"You are about to reopen this Time Off Request\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Reopen!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n clienteAxiosHR.put('/reopen-pto', ptoInfo)\r\n .then(respuesta => {\r\n // console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been Reopen successfully.',\r\n 'success'\r\n );\r\n\r\n const balanceHorasActual = departmentUsers.find(uids => uids.uid === pto.user_id)\r\n // TODO agregar balance de horas con carry over sick time y agregar log de movimientos para reopen\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage) - parseInt(pto.carry_over_sick_hours_usage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(pto.sick_hours_usage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n uid : pto.user_id\r\n });\r\n\r\n if(pto.absence_code === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov:parseInt(balanceHorasActual.sick_days_limit) + parseInt(sickHoursUsage),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Reopen PTO '+ absenceText,\r\n type_mov: 'Reopen PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n\r\n let data = {\r\n uid : pto.user_id,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Reopen PTO '+ absenceText,\r\n type_mov: 'Reopen PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by reopen this PTO.',\r\n 'warning'\r\n )\r\n })\r\n\r\n \r\n }\r\n })\r\n }\r\n\r\n \r\n\r\n return (\r\n \r\n {pto.employee_name}\r\n {pto.department}\r\n {pto.status}\r\n {\r\n createdAt\r\n }\r\n \r\n { moment.utc(pto.day_beginning).format('MM-DD-YYYY')}\r\n {moment.utc(pto.day_end).format('MM-DD-YYYY')}\r\n {pto.send ? 'Sent' : 'Not Sent'}\r\n {absenceText}\r\n {pto.total_hours}\r\n \r\n {/* { manager\r\n ?\r\n pto.send === 1\r\n ?\r\n \r\n \r\n Details\r\n \r\n\r\n { (manager && pto.reopen === 0 && managerView === true && pto.status !== 'Denied' && pto.status !== 'Canceled')\r\n ? \r\n reOpenPto(pto, pto.total_hours, supervisorEmail, email, pto.carry_over_usage, pto.sick_hours_usage)}\r\n >\r\n Reopen\r\n \r\n :\r\n null\r\n }\r\n \r\n :\r\n \r\n \r\n Details\r\n \r\n\r\n {(pto.reopen === 1 && managerView !== true)\r\n ?\r\n \r\n Confirm\r\n \r\n :\r\n null\r\n }\r\n \r\n : }*/\r\n pto.send \r\n ? \r\n \r\n \r\n Details\r\n \r\n {//dueDate.diff(today) > 0 && pto.status !== 'Canceled' && pto.status !== 'Denied'\r\n pto.status !== 'Canceled' && pto.status !== 'Denied' && pto.status !== 'Approved' && pto.status !== 'Opened' && pto.reopen !== 1\r\n ?\r\n cancelRequest(pto, pto.total_hours, supervisorEmail, email, pto.carry_over_usage, pto.sick_hours_usage, pto.carry_over_sick_hours_usage)}\r\n >\r\n Cancel\r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n : \r\n \r\n Details\r\n \r\n {(pto.reopen === 1 && managerView !== true)\r\n ?\r\n \r\n Confirm\r\n \r\n :\r\n null\r\n }\r\n {(pto.status !== 'Opened' && managerView !== true && pto.reopen !== 1 && pto.status !== 'Approved')\r\n ?\r\n sendEmail(pto, supervisorEmail, email, pto.company)}\r\n >\r\n Send\r\n \r\n :\r\n null\r\n }\r\n\r\n {(pto.status !== 'Opened' && managerView !== true && pto.reopen !== 1 && pto.status !== 'Approved' && pto.hr !==0)\r\n ?\r\n confirmDeletePto(pto.id, pto.total_hours, pto.carry_over_usage, pto.sick_hours_usage, pto.carry_over_sick_hours_usage)} \r\n >\r\n Delete\r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n \r\n }\r\n \r\n\r\n\r\n \r\n );\r\n};\r\n\r\nexport default PtoGeneric;","import React, {useEffect} from 'react';\r\nimport Pto from './Pto';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {getPTOListAction, getPtoListDepartmentSupervisor} from '../actions/timeoffrequestActions';\r\nimport {obtenerInformacionUsuario, obtenerBalanceHoras, ajustarHorasHireDate} from '../actions/authenticateActions';\r\nimport {obtenerEmpleadosManager, obtenerDepartamentos} from '../actions/manageActions';\r\nimport {getAllFixedAssetsRequestList} from '../actions/fixedassetrequestActions';\r\nimport { getAllPersonalsRequestList } from '../actions/personalrequestActions';\r\nimport Spinner from './helpers/Spinner';\r\nimport moment from 'moment';\r\nimport axiosHr from '../config/axiosHR';\r\nimport PtoGeneric from './PtoGeneric';\r\nimport { Link } from 'react-router-dom';\r\n\r\n\r\nconst Home = () => {\r\n\r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n const ptoList = useSelector(state => state.ptoList.ptoRequests);\r\n let year = moment().format('YYYY');\r\n\r\n console.log(year)\r\n useEffect(()=> { \r\n \r\n // if(localStorage.getItem('company') === 'Mexilink' || localStorage.getItem('company') === 'Hit Sales & Marketing' || localStorage.getItem('email') === 'ventas.internal18@mexilink.com') {\r\n // console.log('acceso permitido')\r\n // }else {\r\n // console.log(userInfo.userInfo.username)\r\n // localStorage.removeItem('token');\r\n \r\n // setTimeout(() => {\r\n \r\n // window.location.reload()\r\n // }, 500);\r\n // } \r\n \r\n console.log(moment(year+'-03-31').format('YYYY-MM-DD') <= moment().format('YYYY-MM-DD'),moment(year+'-03-31').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'))\r\n const loadUser = ()=> dispatch(obtenerInformacionUsuario(userInfo.userInfo.username, null));\r\n loadUser();\r\n\r\n const loadFixedAsset = () => dispatch(getAllFixedAssetsRequestList());\r\n loadFixedAsset();\r\n\r\n const loadPersonalRequests = () => dispatch(getAllPersonalsRequestList());\r\n loadPersonalRequests();\r\n\r\n if(userInfo.userInfo.supervisor || userInfo.userInfo.mangaer) {\r\n const loadPtoListSupervisor = ()=> dispatch(getPtoListDepartmentSupervisor(userInfo.userInfo.department, userInfo.userInfo.uid, userInfo.userInfo.email));\r\n loadPtoListSupervisor();\r\n }\r\n \r\n if(moment(year+'-03-31').format('YYYY-MM-DD') <= moment().format('YYYY-MM-DD') && userInfo.hours.carry_over > 0) {\r\n console.log('ajuste Carry OVer')\r\n \r\n if(userInfo.userInfo.uid !== undefined) {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(userInfo.hours.available_hours),\r\n hours_mov: userInfo.hours.carry_over,\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:0,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(userInfo.hours.carry_over_sick_time),\r\n observations: 'Carry Over Expiring Adjustment',\r\n type_mov: 'Expiring Carry Over',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n \r\n axiosHr.put('/adjust-carryover', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n \r\n }\r\n\r\n let data = {\r\n reportType:1,\r\n manager: userInfo.userInfo.manager,\r\n companyManager: userInfo.userInfo.company\r\n }\r\n const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n loadEmployeesManager();\r\n\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n },[userInfo.userInfo.hireDate, userInfo.hours.available_hours, userInfo.hours.increase_date])\r\n\r\n useEffect(()=> {\r\n\r\n const loadPtoList = ()=> dispatch(getPTOListAction(userInfo.userInfo.uid));\r\n loadPtoList();\r\n \r\n const loadHours = ()=> dispatch(obtenerBalanceHoras());\r\n loadHours();\r\n\r\n if(userInfo.userInfo.uid !== undefined) {\r\n // const loadSickDays = () => dispatch(obtenerSickDays(userInfo.userInfo.uid));\r\n // loadSickDays();\r\n }\r\n\r\n \r\n\r\n \r\n\r\n //if(moment(userInfo.userInfo.hireDate).format('YYYY-MM-DD') === moment().format('YYYY-MM-DD') && userInfo.userInfo.hireDate !== undefined) {\r\n \r\n // }\r\n\r\n // console.log( moment('2020-03-31').diff(moment()).format('YYYY-MM-DD'))\r\n // console.log(moment('2020-03-31').format('YYYY-MM-DD') <= moment().format('YYYY-MM-DD'))\r\n\r\n \r\n\r\n },[dispatch, userInfo.userInfo.uid, ptoList.length]);\r\n\r\n // useEffect(()=> {\r\n \r\n // const loadHours = ()=> dispatch(obtenerBalanceHoras());\r\n\r\n // if(userInfo.userInfo.hireDate !== undefined && userInfo.userInfo.hireDate !== '' && userInfo.hours.travel_benefits !== undefined && userInfo.hours.travel_benefits === 0) {\r\n \r\n // let today = moment();\r\n // let diffHireDate = moment(userInfo.userInfo.hireDate).diff(today, 'month') * -1;\r\n // let diffToday = today.diff(moment(userInfo.hours.increase_date), 'month');\r\n // let monthlyRaise \r\n // if(userInfo.userInfo.territory === 'Arizona' || userInfo.userInfo.territory === 'California') {\r\n // monthlyRaise = 8 * diffToday;\r\n // }else if(userInfo.userInfo.company === 'CSI') {\r\n // monthlyRaise = 10 * diffToday;\r\n // }else {\r\n // monthlyRaise = 8 * diffToday;\r\n // }\r\n\r\n // // console.log(monthlyRaise, 'este es monthly reaise'); \r\n\r\n // let diffHireDateYear = moment([userInfo.userInfo.hireDate, 0]).diff(today, 'year') * -1;\r\n // let diffTodayYear = moment(today, 'YYYY').diff(moment(userInfo.hours.year_increase_date, 'YYYY'), 'year');\r\n\r\n // if(monthlyRaise < 0) {\r\n // monthlyRaise = 0;\r\n // }\r\n\r\n // let allIncrease = (8 * Math.floor((diffHireDateYear / 3))) + (monthlyRaise);\r\n\r\n // console.log(allIncrease,diffTodayYear, diffHireDateYear, monthlyRaise );\r\n\r\n // if(diffToday > 0 && diffTodayYear >= 1) {\r\n // if(diffHireDate !== 0 && diffHireDate > 0 && diffTodayYear <= 15 && diffHireDateYear <=15) {\r\n // if(diffToday !==0 && diffToday > 0) {\r\n // // const monthlyRaiseHireDate = ()=> dispatch(ajustarHorasHireDate({monthlyRaise: Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours), uid: userInfo.userInfo.uid, increase_date: today.format('YYYY-MM-DD'), increase_type: 1 }))\r\n // // monthlyRaiseHireDate();\r\n // // let data = {\r\n // // uid : userInfo.userInfo.uid,\r\n // // hours_before_mov:userInfo.hours.available_hours,\r\n // // hours_after_mov:Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours),\r\n // // hours_mov: Math.floor(allIncrease),\r\n // // carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n // // carry_over_after_mov:parseInt(userInfo.hours.carry_over),\r\n // // observations: 'Monthly Increase',\r\n // // type_mov: 'Monthly Increase',\r\n // // date_mov: moment().format('YYYY-MM-DD'),\r\n // // mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // // mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n // // increase_date_before_mov:today.format('YYYY-MM-DD'),\r\n // // yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n // // }\r\n // // axiosHr.post('/hour-movement-log', data)\r\n // // .then(respuesta => {\r\n // // console.log(respuesta)\r\n // // })\r\n // // .catch(error => {\r\n // // console.log(error)\r\n // // });\r\n // // loadHours();\r\n // // console.log(\"mensual\")\r\n // }\r\n // }\r\n\r\n \r\n\r\n // // console.log(diffHireDateYear, diffTodayYear, (diffTodayYear / 3));\r\n\r\n // // console.log(diffHireDate, diffToday);\r\n\r\n // if(diffHireDateYear !== 0 && diffHireDateYear >= 3 && diffTodayYear <= 15 && diffHireDateYear <=15) {\r\n // if(diffTodayYear !== 0 && diffTodayYear >= 1) {\r\n // const yearlyRaiseHireDate = ()=> dispatch(ajustarHorasHireDate({monthlyRaise: Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours), uid: userInfo.userInfo.uid, increase_date: today.format('YYYY-MM-DD'), increase_type: 2 }))\r\n // yearlyRaiseHireDate();\r\n // let data = {\r\n // uid : userInfo.userInfo.uid,\r\n // hours_before_mov:userInfo.hours.available_hours,\r\n // hours_after_mov:Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours),\r\n // hours_mov: Math.floor(allIncrease),\r\n // carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n // carry_over_after_mov:parseInt(userInfo.hours.carry_over),\r\n // carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n // carry_over_sick_time_after:parseInt(userInfo.hours.carry_over_sick_time),\r\n // observations: 'Seniority in company increment',\r\n // type_mov: 'Seniority in company increment',\r\n // date_mov: moment().format('YYYY-MM-DD'),\r\n // mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n // increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // yearly_increase_date_before_mov:today.format('YYYY-MM-DD')\r\n // }\r\n // axiosHr.post('/hour-movement-log', data)\r\n // .then(respuesta => {\r\n // console.log(respuesta)\r\n // })\r\n // .catch(error => {\r\n // console.log(error)\r\n // });\r\n // loadHours();\r\n // console.log(\"anual\");\r\n // }\r\n // }\r\n // } else {\r\n\r\n // if(diffHireDate !== 0 && diffHireDate > 0 && diffTodayYear <= 15 && diffHireDateYear <=15) {\r\n // if(diffToday !==0 && diffToday > 0) {\r\n // // const monthlyRaiseHireDate = ()=> dispatch(ajustarHorasHireDate({monthlyRaise: Math.floor(monthlyRaise) + parseInt(userInfo.hours.available_hours), uid: userInfo.userInfo.uid, increase_date: today.format('YYYY-MM-DD'), increase_type: 1 }))\r\n // // monthlyRaiseHireDate();\r\n // // let data = {\r\n // // uid : userInfo.userInfo.uid,\r\n // // hours_before_mov:userInfo.hours.available_hours,\r\n // // hours_after_mov:Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours),\r\n // // hours_mov: Math.floor(allIncrease),\r\n // // carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n // // carry_over_after_mov:parseInt(userInfo.hours.carry_over),\r\n // // observations: 'Monthly Increase',\r\n // // type_mov: 'Monthly Increase',\r\n // // date_mov: moment().format('YYYY-MM-DD'),\r\n // // mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // // mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n // // increase_date_before_mov:today.format('YYYY-MM-DD'),\r\n // // yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n // // }\r\n // // axiosHr.post('/hour-movement-log', data)\r\n // // .then(respuesta => {\r\n // // console.log(respuesta)\r\n // // })\r\n // // .catch(error => {\r\n // // console.log(error)\r\n // // });\r\n // // loadHours();\r\n // // console.log(\"mensual\")\r\n // }\r\n // }\r\n\r\n \r\n\r\n // // console.log(diffHireDateYear, diffTodayYear, (diffTodayYear / 3));\r\n // // console.log(diffHireDate, diffToday);\r\n\r\n // if(diffHireDateYear !== 0 && diffHireDateYear >= 3 && diffTodayYear <= 15 && diffHireDateYear <=15) {\r\n // if(diffTodayYear !== 0 && diffTodayYear >= 1) {\r\n // const yearlyRaiseHireDate = ()=> dispatch(ajustarHorasHireDate({monthlyRaise: 8 * Math.floor((diffHireDateYear / 3)) + parseInt(userInfo.hours.available_hours), uid: userInfo.userInfo.uid, increase_date: today.format('YYYY-MM-DD'), increase_type: 2 }))\r\n // yearlyRaiseHireDate();\r\n // let data = {\r\n // uid : userInfo.userInfo.uid,\r\n // hours_before_mov:userInfo.hours.available_hours,\r\n // hours_after_mov:Math.floor(allIncrease) + parseInt(userInfo.hours.available_hours),\r\n // hours_mov: Math.floor(allIncrease),\r\n // carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n // carry_over_after_mov:parseInt(userInfo.hours.carry_over),\r\n // carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n // carry_over_sick_time_after:parseInt(userInfo.hours.carry_over_sick_time),\r\n // observations: 'Seniority in company increment',\r\n // type_mov: 'Seniority in company increment',\r\n // date_mov: moment().format('YYYY-MM-DD'),\r\n // mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n // increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n // yearly_increase_date_before_mov:today.format('YYYY-MM-DD')\r\n // }\r\n // axiosHr.post('/hour-movement-log', data)\r\n // .then(respuesta => {\r\n // console.log(respuesta)\r\n // })\r\n // .catch(error => {\r\n // console.log(error)\r\n // });\r\n // loadHours();\r\n // console.log(\"anual\");\r\n // }\r\n // }\r\n // }\r\n\r\n \r\n // //console.log(diffHireDate, diffToday, today, monthlyRaise); \r\n // }\r\n // },[userInfo.userInfo.hireDate])\r\n return (\r\n\r\n \r\n \r\n userInfo.userInfo.name !== undefined || userInfo.userInfo.uid !== undefined\r\n ? \r\n \r\n \r\n \r\n\r\n
\r\n

TIME OFF REQUEST

\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n

{userInfo.userInfo.name}{' '}{userInfo.userInfo.lastname}

\r\n

{userInfo.userInfo.department}

\r\n
\r\n
\r\n
\r\n {/*

{userInfo.userInfo.name}{' '}{userInfo.userInfo.lastname}

\r\n

{userInfo.userInfo.department}

*/}\r\n {\r\n // userInfo.hours.available_hours > 0\r\n // ?\r\n\r\n //

\r\n // Available PTO Hours: {userInfo.hours.available_hours} {\" \"} ({\r\n\r\n // userInfo.hours.available_hours - (Math.floor((moment(userInfo.userInfo.hireDate).diff(moment(), 'year') * -1)/(3)) * 8)\r\n // //userInfo.hours.available_hours\r\n \r\n // } hours + {\r\n \r\n // (Math.floor((moment(userInfo.userInfo.hireDate).diff(moment(), 'year') * -1)/(3)) * 8)\r\n \r\n // } hours earned for loyalty)\r\n \r\n //

\r\n // : \r\n \r\n

\r\n Available PTO Hours: {userInfo.hours.available_hours} hours\r\n

\r\n }\r\n

Available Sick Hours: {userInfo.hours.sick_days_limit} hours

\r\n

Available Carry Over Hours: {userInfo.hours.carry_over} hours

\r\n {\r\n userInfo.userInfo.territory === 'California'\r\n ?\r\n

Available Carry Over Sick Hours: {userInfo.hours.carry_over_sick_time} hours

\r\n :\r\n null\r\n }\r\n

Total Annual Days: {(userInfo.hours.available_hours + userInfo.hours.carry_over + userInfo.hours.sick_days_limit + userInfo.hours.carry_over_sick_time) / 8} days

\r\n \r\n {/*

Joined the company since: {moment().to(moment(userInfo.userInfo.hireDate))}

*/}\r\n

Joined the company since: {moment(userInfo.userInfo.hireDate).format('MMM-YYYY')}

\r\n {\r\n !userInfo.userInfo.sales_team\r\n ?\r\n (Math.floor((moment([userInfo.userInfo.hireDate, 0]).diff(moment(), 'year') * -1)/(3)) * 8) >= 41\r\n ?\r\n

(40 hours for seniority in company already included)

\r\n :\r\n userInfo.userInfo.company !== 'CSI'\r\n ?\r\n

({(Math.floor((moment([userInfo.userInfo.hireDate, 0]).diff(moment(), 'year') * -1)/(3)) * 8)} hours for seniority in company already included)

\r\n :\r\n null\r\n :\r\n null\r\n }\r\n \r\n \r\n \r\n {userInfo.hours.carry_over > 0\r\n ?\r\n
\r\n Carry Over expires on: 03-31-2025\r\n
\r\n \r\n :\r\n null\r\n }\r\n\r\n\r\n {/* View Profile */}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ptoList.map(pto =>(\r\n \r\n ))}\r\n \r\n \r\n
EmployeeDepartmentStatusCreated atBeginningEndDelivery StatusReasonHoursActions
\r\n \r\n \r\n \r\n
\r\n :\r\n \r\n );\r\n};\r\n\r\nexport default Home;","import {\r\n VALIDAR_FORMULARIO,\r\n VALIDAR_FORMULARIO_EXITO,\r\n VALIDAR_FORMULARIO_ERROR\r\n} from '../types';\r\n\r\nexport function validarFormularioAction(){\r\n return dispatch => {\r\n dispatch( iniciarValidacion() )\r\n }\r\n}\r\n\r\nexport const iniciarValidacion = () => {\r\n return {\r\n type: VALIDAR_FORMULARIO\r\n }\r\n}\r\nexport const validacionExito = () => {\r\n return {\r\n type: VALIDAR_FORMULARIO_EXITO\r\n }\r\n}\r\n\r\n\r\nexport const validacionError = () => {\r\n return {\r\n type: VALIDAR_FORMULARIO_ERROR \r\n }\r\n}","import React, {useState, useEffect, useRef} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport {createNewPtoAction} from '../actions/timeoffrequestActions';\r\nimport {ajustarBalanceHoras} from '../actions/authenticateActions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n\r\n// library\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport axiosHr from '../config/axiosHR';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\nconst NewPto = ({history}) => {\r\n\r\n var holidaysArray = ['04-02-2021', '05-31-2021', '07-05-2021', '09-06-2021', '11-25-2021', '11-26-2021', '12-23-2021', '12-24-2020', '01-01-2021', '01-01-2022', '04-15-2022', '05-30-2022', '07-04-2022', '09-05-2022', '11-24-2022', '11-25-2022', '12-23-2022', '12-26-2022', '01-02-2023', '04-07-2023', '07-04-2023', '05-29-2023', '09-04-2023', '11-23-2023', '11-24-2023', '12-22-2023', '12-25-2023', '01-01-2024', '03-29-2024', '05-27-2024', '07-04-2024', '09-02-2024', '11-28-2024', '11-29-2024', '12-24-2024', '12-25-2024', '01-01-2025', '04-18-2025', '05-26-2025', '07-04-2025', '09-01-2025', '11-27-2025', '11-28-2025', '12-24-2025', '12-25-2025', '01-01-2026'];\r\n\r\n var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\"), new Date(\"2025-04-18T12:00:00-00:00\"), new Date(\"2025-07-04T12:00:00-00:00\"), new Date(\"2025-09-01T12:00:00-00:00\"), new Date(\"2025-11-27T12:00:00-00:00\"), new Date(\"2025-11-28T12:00:00-00:00\"), new Date(\"2025-12-24T12:00:00-00:00\"), new Date(\"2025-12-25T12:00:00-00:00\"), new Date(\"2026-01-01T12:00:00-00:00\")];\r\n \r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n workingWeekdays: [1, 2, 3, 4, 5],\r\n holidays: holidaysArray,\r\n holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // get data from state\r\n const error = useSelector((state) => state.error.error);\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n // agregar balance de horas\r\n const balanceHorasActual = userInfo.hours;\r\n\r\n const supervisor = userInfo.userInfo.supervisor;\r\n\r\n const email = userInfo.userInfo.email;\r\n\r\n const supervisorEmail = userInfo.userInfo.supervisorEmail;\r\n \r\n const company = userInfo.userInfo.company;\r\n\r\n // state\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [reason, saveReason] = useState('');\r\n const [dayBegining, saveDayBeginning] = useState('');\r\n const [dayEnd, saveDayEnd] = useState('');\r\n const [timeBeginning, saveTimeBeginning] = useState('');\r\n const [timeEnd, saveTimeEnd] = useState('');\r\n const [totalHours, saveTotalHours] = useState('');\r\n const [absenceCode, saveAbsenceCode] = useState('');\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState(new Date());\r\n const [uid, saveUid] = useState('');\r\n const [hourValidationError, saveHourValidationError] = useState('');\r\n const [dateValidationError, saveDateValidationError] = useState('');\r\n const [departmentColor, saveDepartmentColor] = useState('');\r\n const [carryOver, saveCarryOver] = useState('');\r\n const [availableHours, saveAvailableHours] = useState('');\r\n const [carryOverUsage, saveCarryOverUsage] = useState('');\r\n const [specialCodePlus, saveSpecialCodePlus] = useState(0);\r\n const [sickHours, saveSickHours] = useState('');\r\n const [sickHoursUsage, saveSickHoursUsage] = useState('');\r\n const [carryOverSickHours, saveCarryOverSickHours] = useState('');\r\n const [carryOverSickHoursUsage, saveCarryOverSickHoursUsage] = useState('');\r\n //const [signatureSupervisor, saveSignatureSupervisor] = useState('');\r\n\r\n \r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n \r\n // Time Refs\r\n const dayBeginingRef = useRef('');\r\n const dayEndRef = useRef('');\r\n const timeBeginningRef = useRef('');\r\n const timeEndRef = useRef('');\r\n const carryOverRef = useRef('');\r\n const specialCodeRef = useRef('');\r\n const sickHoursRef = useRef('');\r\n const carryOverSickHoursRef = useRef('');\r\n \r\n\r\n // canvas\r\n \r\n const sendEmail = (pto, supervisorEmail, email, company) => {\r\n\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n clienteAxiosHR.post('/pto-email', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n // setTimeout(() => {\r\n // window.location.reload(false);\r\n // }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n } \r\n\r\n\r\n let sigPadEmployee = {};\r\n const clearEmployee = (e) => {\r\n e.preventDefault();\r\n sigPadEmployee.clear();\r\n }\r\n const saveCanvasEmployee = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureEmployee(urlImage);\r\n }\r\n\r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveReason(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeReasonCode = (value) => {\r\n console.log(timeBeginningRef.current.props.disabled);\r\n dayBeginingRef.current.clear();\r\n dayEndRef.current.clear();\r\n saveAbsenceCode(value);\r\n if(value === 'V') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'PT') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'S') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'O') {\r\n saveSpecialCodePlus(0);\r\n specialCodeRef.current.disabled = false;\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true; \r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n }else {\r\n specialCodeRef.current.disabled = true;\r\n }\r\n if(value ==='J') {\r\n saveSpecialCodePlus(40);\r\n // saveTotalHours(totalHours - 40);\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='B1') {\r\n saveSpecialCodePlus(8);\r\n // saveTotalHours(totalHours - 8)\r\n specialCodeRef.current.disabled = false;\r\n console.log(timeBeginningRef.current);\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n }\r\n if(value ==='B2') {\r\n saveSpecialCodePlus(24);\r\n saveTotalHours(0)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='B3') {\r\n saveSpecialCodePlus(40)\r\n // saveTotalHours(totalHours - 40)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='NB') {\r\n saveSpecialCodePlus(24)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='VT') {\r\n saveSpecialCodePlus(2)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n }\r\n if(value ==='M') {\r\n saveSpecialCodePlus(24)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='MA') {\r\n saveSpecialCodePlus(480)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n\r\n if(value ==='LA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='FFCRA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 80)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n }\r\n\r\n // let sigPadSupervisor = {};\r\n // const clearSupervisor = (e) => {\r\n // e.preventDefault();\r\n // sigPadSupervisor.clear();\r\n // }\r\n\r\n // const saveCanvasSupervisor = (e)=> {\r\n // e.preventDefault();\r\n // let urlImage = sigPadSupervisor.getTrimmedCanvas().toDataURL('image/png');\r\n // saveSignatureSupervisor(urlImage);\r\n // }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const agregarPto = (pto) => dispatch (createNewPtoAction(pto));\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n const validarFormulario = () => dispatch( validarFormularioAction());\r\n const exitoValidacion = () => dispatch( validacionExito() ) ;\r\n const errorValidacion = () => dispatch( validacionError() ) ;\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n \r\n useEffect(() => {\r\n loadDepartments();\r\n }, [])\r\n\r\n\r\n useEffect( ()=>{\r\n\r\n\r\n if(userInfo.userInfo.name !== undefined){\r\n saveEmployeeName(userInfo.userInfo.name +' '+ userInfo.userInfo.lastname);\r\n saveCarryOver(parseInt(balanceHorasActual.carry_over));\r\n saveSickHours(parseInt(balanceHorasActual.sick_days_limit));\r\n saveCarryOverSickHours(parseInt(balanceHorasActual.carry_over_sick_time));\r\n saveAvailableHours(balanceHorasActual.available_hours);\r\n } else {\r\n history.push('/home');\r\n }\r\n\r\n if(userInfo.userInfo.department !== undefined) {\r\n saveDepartment(userInfo.userInfo.department);\r\n let departmentFilter = filterDepartment(departments, userInfo.userInfo.department);\r\n console.log(departmentFilter)\r\n saveDepartmentColor(departmentFilter[0].color);\r\n \r\n }\r\n\r\n if(userInfo.userInfo.uid !== undefined) {\r\n saveUid(userInfo.userInfo.uid);\r\n }\r\n\r\n //saveTotalHours('0');\r\n let rangeBeginning = moment(dayBegining);\r\n let rangeEnd = moment(dayEnd);\r\n let rangeHourBeginning = moment(timeBeginning, 'HH:mm');\r\n let rangeHourEnd = moment(timeEnd, 'HH:mm');\r\n let totalAmount, hourPerDay;\r\n let launchTimeBeginning = moment('14:00:00', 'HH:mm');\r\n let launchTimeEnd = moment('15:00:00', 'HH:mm');\r\n let laborTimeBeginning = moment('08:00:00', 'HH:mm');\r\n let laborTimeEnd = moment('23:00:00', 'HH:mm');\r\n if(rangeBeginning._locale._invalidDate === '' && rangeEnd._locale._invalidDate === '') {\r\n \r\n return\r\n }else {\r\n let subtractDays, subtractHours;\r\n\r\n\r\n if(rangeBeginning._locale._invalidDate === 'Invalid date' && rangeEnd._locale._invalidDate === 'Invalid date') {\r\n subtractHours = 0;\r\n }\r\n \r\n if ((rangeHourBeginning.isBetween(laborTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeEnd, laborTimeEnd)) || (rangeHourBeginning.isBetween(launchTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeBeginning, launchTimeEnd))) {\r\n subtractHours = (moment.duration(rangeHourEnd - rangeHourBeginning).asHours()) - 1;\r\n }else {\r\n subtractHours = moment.duration(rangeHourEnd - rangeHourBeginning).asHours();\r\n } \r\n //subtractHours = rangeHourEnd.diff(rangeHourBeginning);\r\n //subtractDays = rangeEnd.diff(rangeBeginning, 'hours');\r\n \r\n //subtractDays = moment.duration(rangeEnd - rangeBeginning)..\r\n if(rangeBeginning.format('YYYY-MM-DD') === rangeEnd.format('YYYY-MM-DD')) {\r\n \r\n\r\n // if(absenceCode === 'B1') {\r\n // subtractDays = (rangeEnd.businessDiff(rangeBeginning));\r\n // }else {\r\n // subtractDays = rangeEnd.businessDiff(rangeBeginning);\r\n // }\r\n subtractDays = (rangeEnd.businessDiff(rangeBeginning));\r\n \r\n }else {\r\n subtractDays = rangeEnd.businessDiff(rangeBeginning) + 1;\r\n }\r\n\r\n hourPerDay = (subtractDays * 8);\r\n\r\n // console.log('horas por dia: ' +hourPerDay, ' | Horas por código especial:'+ specialCodePlus, ' | Horas por selector de horarios:' + subtractHours, ' | Total de horas: ' + totalHours);\r\n\r\n // console.log(rangeBeginning.format('YYYY-MM-DD'));\r\n \r\n if(isNaN(subtractHours) && !isNaN(hourPerDay)) {\r\n // saveTotalHours(Math.round(hourPerDay - specialCodePlus));\r\n saveTotalHours(Math.round(hourPerDay));\r\n \r\n }else if(isNaN(hourPerDay) && isNaN(subtractHours)) {\r\n saveTotalHours(0);\r\n }else {\r\n\t\t totalAmount = parseInt(hourPerDay) + parseInt(Math.round(subtractHours));\r\n // saveTotalHours(totalAmount - specialCodePlus);\r\n saveTotalHours(totalAmount);\r\n }\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA') {\r\n // totalAmount = 0;\r\n totalAmount = parseInt(hourPerDay);\r\n saveTotalHours(totalAmount);\r\n saveSpecialCodePlus(totalAmount);\r\n }\r\n\r\n // if(rangeBeginning.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n if(rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n saveTotalHours(0);\r\n saveDateValidationError(true);\r\n }else {\r\n saveDateValidationError(false);\r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.sick_days_limit) + parseInt(balanceHorasActual.carry_over_sick_time)) {\r\n saveHourValidationError(true);\r\n //saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n \r\n \r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n \r\n }\r\n\r\n let carryOverSum, sumAvailableHours, sickHoursSum, carryOverSickSum = 0;\r\n \r\n //console.log(availableHours);\r\n if(userInfo.userInfo.carryOver !== undefined || userInfo.userInfo.carryOver !== 0 || userInfo.userInfo.carryOver !== '') {\r\n let carryoverInit = balanceHorasActual.carry_over;\r\n let sickHoursInit = balanceHorasActual.sick_days_limit;\r\n let carryoversickInit = balanceHorasActual.carry_over_sick_time;\r\n // console.log(specialCodePlus);\r\n if (totalHours !== '' || totalHours !== undefined) {\r\n if(specialCodePlus !== 0) {\r\n // carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) - parseInt(specialCodePlus));\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) + specialCodePlus);\r\n // carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours));\r\n // specialCodeSum = parseInt(totalHours)\r\n }else {\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours));\r\n }\r\n\r\n if(absenceCode === 'S') {\r\n carryOverSickSum = (parseInt(carryoversickInit) -parseInt(totalHours));\r\n\r\n sickHoursSum = ((parseInt(sickHoursInit) + parseInt(carryoversickInit)) - parseInt(totalHours));\r\n\r\n // sickHoursSum = (parseInt(sickHoursInit) - parseInt(totalHours));\r\n\r\n saveCarryOver(Math.round(carryoverInit));\r\n carryOverRef.current.value = carryoverInit;\r\n saveCarryOverUsage(0);\r\n\r\n if(!isNaN(carryOverSickSum)) {\r\n if(carryOverSickSum >= 0) {\r\n if(carryOverSickSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n// saveCarryOverSickHoursUsage(carryoversickInit)\r\n saveCarryOverSickHoursUsage(Math.round(carryoversickInit));\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n }else {\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n carryOverSickHoursRef.current.value = carryOverSickSum;\r\n saveCarryOverSickHoursUsage(carryoversickInit - carryOverSickSum);\r\n }\r\n\r\n }else {\r\n\r\n if(!isNaN(sickHoursSum)) {\r\n if(sickHoursSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n sickHoursRef.current.value = '0';\r\n saveSickHoursUsage(sickHoursInit)\r\n saveSickHoursUsage(Math.round(sickHoursSum));\r\n }else {\r\n carryOverSickHoursRef.current.value = '0';\r\n saveSickHours(Math.round(sickHoursSum));\r\n sickHoursRef.current.value = sickHoursSum;\r\n saveSickHoursUsage(sickHoursInit - sickHoursSum);\r\n }\r\n }\r\n }\r\n }\r\n\r\n \r\n } else {\r\n saveSickHours(sickHoursInit);\r\n saveSickHoursUsage(0);\r\n saveCarryOverSickHours(carryoversickInit);\r\n saveCarryOverSickHoursUsage(0);\r\n sickHoursRef.current.value = sickHoursInit;\r\n // console.log(carryoverInit + \" - \" + totalHours + \" - \" + specialCodePlus + \" = \" + carryOverSum);\r\n if(!isNaN(carryOverSum) ) {\r\n if(carryOverSum < 0 ) {\r\n let availableHoursInit = balanceHorasActual.available_hours\r\n // sumAvailableHours = availableHoursInit + carryOverSum + specialCodePlus\r\n sumAvailableHours = availableHoursInit + carryOverSum\r\n // console.log(sumAvailableHours);\r\n saveAvailableHours(sumAvailableHours);\r\n }\r\n if(carryOverSum < 0) {\r\n carryOverRef.current.value = '0';\r\n saveCarryOverUsage(carryoverInit);\r\n saveCarryOver(Math.round(carryOverSum));\r\n // console.log(carryoverInit)\r\n }else {\r\n saveCarryOver(Math.round(carryOverSum));\r\n carryOverRef.current.value = carryOverSum;\r\n saveCarryOverUsage(carryoverInit - carryOverSum);\r\n // console.log(carryoverInit + \"-\" + carryOverSum)\r\n }\r\n }\r\n // console.log(\"carry Over =\", carryOver);\r\n }\r\n\r\n \r\n \r\n }\r\n \r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(balanceHorasActual.carry_over) + parseInt(balanceHorasActual.sick_days_limit)+ parseInt(balanceHorasActual.carry_over_sick_time)) {\r\n saveHourValidationError(true);\r\n //saveTotalHours(0);\r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n\r\n \r\n\r\n }, [dayBegining, dayEnd, timeBeginning, timeEnd, dispatch, userInfo, totalHours, balanceHorasActual.available_hours, history, carryOver, balanceHorasActual.carry_over, specialCodePlus])\r\n \r\n // Add new PTO\r\n const submitNewPto = e => {\r\n e.preventDefault();\r\n // console.log(carryOver)\r\n validarFormulario();\r\n if (parseInt(totalHours) > (parseInt(balanceHorasActual.sick_days_limit) + parseInt(balanceHorasActual.carry_over_sick_time)) && absenceCode === 'S') {\r\n saveHourValidationError(true);\r\n // errorValidacion();\r\n //saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n if(employeeName.trim() === ''|| department.trim() === '' || totalHours < 0 || absenceCode.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee === 'Invalid date' ) {\r\n errorValidacion();\r\n return\r\n }\r\n\r\n exitoValidacion();\r\n\r\n let absenceText;\r\n if(absenceCode ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(absenceCode ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(absenceCode ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(absenceCode ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(absenceCode ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(absenceCode ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(absenceCode ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(absenceCode ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(absenceCode ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(absenceCode ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(absenceCode ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(absenceCode ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(absenceCode ==='O') {\r\n absenceText = 'Other'\r\n }\r\n if(absenceCode ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(absenceCode ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(userInfo.userInfo.carryOver)) {\r\n saveHourValidationError(true);\r\n // saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n // timeBeginningRef.current.value = '';\r\n // timeEndRef.current.value = '';0\r\n // dayBeginingRef.current.focus();\r\n // saveDayBeginning('');\r\n // saveDayEnd('');\r\n // saveTimeBeginning('');\r\n // saveTimeEnd('');\r\n // return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n \r\n }\r\n\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + '

' +\r\n '

Department : ' + department + '

' +\r\n //00'

Reason : ' + reason + '

' +\r\n '

Total Hours: ' + totalHours + '

' +\r\n '

Absence Code: ' + absenceText + '

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n let rangeBeginning = moment(dayBegining).format('YYYY-MM-DD');\r\n let rangeEnd = moment(dayEnd).format('YYYY-MM-DD');\r\n let rangeHourBeginning = moment(timeBeginning).format('HH:mm');\r\n let rangeHourEnd = moment(timeEnd).format('HH:mm');\r\n let dateSignature = moment(dateSignEmployee).format('YYYY-MM-DD');\r\n const hrPto = false;\r\n\r\n if(rangeHourBeginning === 'Invalid date' || rangeHourEnd === 'Invalid date') {\r\n rangeHourBeginning = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n rangeHourEnd = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n }\r\n\r\n //const company = userInfo.userInfo.company\r\n\r\n let pto = {\r\n employeeName,\r\n department,\r\n reason,\r\n rangeBeginning,\r\n rangeEnd,\r\n rangeHourBeginning,\r\n rangeHourEnd,\r\n totalHours,\r\n absenceCode,\r\n signatureEmployee,\r\n dateSignature,\r\n uid,\r\n supervisor,\r\n departmentColor,\r\n email,\r\n carryOverUsage,\r\n sickHoursUsage,\r\n carryOverSickHoursUsage,\r\n hrPto,\r\n company,\r\n supervisorEmail\r\n }\r\n\r\n\r\n agregarPto(pto);\r\n\r\n let carryOverZero, sickHoursZero, carryOverSickZero ;\r\n\r\n if(carryOver < 0) {\r\n carryOverZero = 0;\r\n }else {\r\n carryOverZero = carryOver;\r\n }\r\n\r\n if(sickHours < 0) {\r\n sickHoursZero = 0;\r\n }else {\r\n sickHoursZero = sickHours;\r\n }\r\n\r\n if(carryOverSickHours < 0) {\r\n carryOverSickZero = 0\r\n }else {\r\n carryOverSickZero = carryOverSickHours;\r\n }\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA') {\r\n balanceHoras({\r\n available_hours: parseInt(availableHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: rangeEnd,\r\n typeBalance: true,\r\n uid : uid\r\n });\r\n\r\n // sendEmail(pto, supervisorEmail, email, company);\r\n \r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(availableHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n typeBalance: 'false',\r\n uid : uid\r\n });\r\n\r\n // sendEmail(pto, supervisorEmail, email, company);\r\n }\r\n\r\n if(absenceCode === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.sick_days_limit),\r\n hours_after_mov:parseInt(sickHoursZero),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n // sendEmail(pto, supervisorEmail, email, company);\r\n }else {\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:rangeEnd,\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n // sendEmail(pto, supervisorEmail, email, company);\r\n }else {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n // sendEmail(pto, supervisorEmail, email, company);\r\n }\r\n \r\n }\r\n \r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n {userInfo.userInfo.company !== 'CSI'\r\n ?\r\n
\r\n
\r\n
\r\n

Add New Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates={excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveTimeBeginning(e.target.value)}\r\n ref={timeBeginningRef}\r\n /> */}\r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref = {timeBeginningRef}\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveTimeEnd(e.target.value)}\r\n ref = {timeEndRef}\r\n /> */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref= {timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n\r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA' || absenceCode === 'VT'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n {\r\n userInfo.userInfo.territory === 'California'\r\n\r\n ?\r\n
\r\n \r\n \r\n
\r\n : \r\n
\r\n \r\n \r\n
\r\n }\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n {/*
\r\n \r\n
*/}\r\n\r\n {/*
\r\n \r\n \r\n
\r\n
\r\n \r\n {sigPadSupervisor = ref}} />\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
*/}\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n :\r\n // CSI PTO FORM\r\n
\r\n
\r\n
\r\n

Add New Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates={excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveTimeBeginning(e.target.value)}\r\n ref={timeBeginningRef}\r\n /> */}\r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(8,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref = {timeBeginningRef}\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveTimeEnd(e.target.value)}\r\n ref = {timeEndRef}\r\n /> */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(8,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref= {timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n\r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA' || absenceCode === 'VT'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n {/*
\r\n \r\n
*/}\r\n\r\n {/*
\r\n \r\n \r\n
\r\n
\r\n \r\n {sigPadSupervisor = ref}} />\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
*/}\r\n\r\n {/*
\r\n \r\n
*/}\r\n\r\n \r\n
\r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n \r\n }\r\n \r\n
\r\n );\r\n\r\n \r\n};\r\n\r\nexport default NewPto;","import React, {useState, useEffect, useRef} from 'react';\r\n\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport {getPtoDetail, editPtoAction} from '../actions/timeoffrequestActions';\r\nimport {ajustarBalanceHoras} from '../actions/authenticateActions';\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n\r\n// library\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport axiosHr from '../config/axiosHR';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\nconst EditPto = ({match, history}) => {\r\n // Dispatch para ejecutar la acción principal\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n \r\n var holidaysArray = ['04-02-2021', '05-31-2021', '07-05-2021', '09-06-2021', '11-25-2021', '11-26-2021', '12-23-2021', '12-24-2020', '01-01-2021', '01-01-2022', '04-15-2022', '05-30-2022', '07-04-2022', '09-05-2022', '11-24-2022', '11-25-2022', '12-23-2022', '12-26-2022', '01-02-2023', '04-07-2023', '07-04-2023', '05-29-2023', '09-04-2023', '11-23-2023', '11-24-2023', '12-22-2023', '12-25-2023', '01-01-2024', '03-29-2024', '05-27-2024', '07-04-2024', '09-02-2024', '11-28-2024', '11-29-2024', '12-24-2024', '12-25-2024', '01-01-2025', '04-18-2025', '05-26-2025', '07-04-2025', '09-01-2025', '11-27-2025', '11-28-2025', '12-24-2025', '12-25-2025', '01-01-2026'];\r\n\r\n var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\"), new Date(\"2025-04-18T12:00:00-00:00\"), new Date(\"2025-07-04T12:00:00-00:00\"), new Date(\"2025-09-01T12:00:00-00:00\"), new Date(\"2025-11-27T12:00:00-00:00\"), new Date(\"2025-11-28T12:00:00-00:00\"), new Date(\"2025-12-24T12:00:00-00:00\"), new Date(\"2025-12-25T12:00:00-00:00\"), new Date(\"2026-01-01T12:00:00-00:00\")];\r\n \r\n \r\n // set working days\r\n moment.updateLocale('us', {\r\n workingWeekdays: [1, 2, 3, 4, 5],\r\n holidays: holidaysArray,\r\n holidayFormat: 'MM-DD-YYYY'\r\n \r\n });\r\n \r\n \r\n // get data from state\r\n const error = useSelector((state) => state.error.error);\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n const pto = useSelector(state => state.ptoList.pto);\r\n // agregar balance de horas\r\n const balanceHorasActual = userInfo.hours;\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n \r\n const supervisor = userInfo.userInfo.supervisor;\r\n \r\n const email = userInfo.userInfo.email;\r\n \r\n // state\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [reason, saveReason] = useState('');\r\n const [dayBegining, saveDayBeginning] = useState('');\r\n const [dayEnd, saveDayEnd] = useState('');\r\n const [timeBeginning, saveTimeBeginning] = useState('');\r\n const [timeEnd, saveTimeEnd] = useState('');\r\n const [totalHours, saveTotalHours] = useState('');\r\n const [absenceCode, saveAbsenceCode] = useState('');\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState(new Date());\r\n const [uid, saveUid] = useState('');\r\n const [hourValidationError, saveHourValidationError] = useState('');\r\n const [dateValidationError, saveDateValidationError] = useState('');\r\n const [departmentColor, saveDepartmentColor] = useState('');\r\n const [carryOver, saveCarryOver] = useState('');\r\n const [availableHours, saveAvailableHours] = useState('');\r\n const [carryOverUsage, saveCarryOverUsage] = useState('');\r\n const [specialCodePlus, saveSpecialCodePlus] = useState(0);\r\n const [sickHours, saveSickHours] = useState('');\r\n const [sickHoursUsage, saveSickHoursUsage] = useState('');\r\n const [carryOverSickHours, saveCarryOverSickHours] = useState('');\r\n const [carryOverSickHoursUsage, saveCarryOverSickHoursUsage] = useState('');\r\n const [editMode, saveEditMode] = useState(false);\r\n //const [signatureSupervisor, saveSignatureSupervisor] = useState('');\r\n \r\n \r\n \r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n \r\n // Time Refs\r\n const dayBeginingRef = useRef('');\r\n const dayEndRef = useRef('');\r\n const timeBeginningRef = useRef('');\r\n const timeEndRef = useRef('');\r\n const carryOverRef = useRef('');\r\n const abscenceTextRef = useRef('');\r\n const specialCodeRef = useRef('');\r\n const sickHoursRef = useRef('');\r\n const carryOverSickHoursRef = useRef('');\r\n\r\n let absenceText;\r\n \r\n // canvas\r\n \r\n let sigPadEmployee = {};\r\n const clearEmployee = (e) => {\r\n e.preventDefault();\r\n sigPadEmployee.clear();\r\n }\r\n const saveCanvasEmployee = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureEmployee(urlImage);\r\n \r\n }\r\n \r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n \r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveReason(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeReasonCode = (value) => {\r\n // dayBeginingRef.current.clear();\r\n // dayEndRef.current.clear();´\r\n saveAbsenceCode(value);\r\n if(value === 'V') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n absenceText = 'Vacation'\r\n }\r\n if(value === 'PT') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n absenceText = 'Personal Time'\r\n }\r\n if(value === 'S') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n absenceText = 'Sick'\r\n }\r\n if(value === 'O') {\r\n saveSpecialCodePlus(0);\r\n specialCodeRef.current.disabled = false;\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true; \r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n absenceText = 'Other'\r\n }else {\r\n specialCodeRef.current.disabled = true;\r\n }\r\n if(value ==='J') {\r\n saveSpecialCodePlus(40);\r\n // saveTotalHours(totalHours - 40);\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Jury Duty'\r\n }\r\n if(value ==='B1') {\r\n saveSpecialCodePlus(40);\r\n // saveTotalHours(totalHours - 8)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(value ==='B2') {\r\n saveSpecialCodePlus(24);\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(value ==='B3') {\r\n saveSpecialCodePlus(8)\r\n // saveTotalHours(totalHours - 40)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(value ==='NB') {\r\n saveSpecialCodePlus(24)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'New Baby Born'\r\n }\r\n if(value ==='NBCSI') {\r\n saveSpecialCodePlus(40)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'New Baby Born'\r\n }\r\n if(value ==='VT') {\r\n saveSpecialCodePlus(2)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n // timeBeginningRef.current.clear();\r\n // timeEndRef.current.clear();\r\n // timeBeginningRef.current.input.disabled = false;\r\n // timeEndRef.current.input.disabled = false;\r\n absenceText = 'Vote'\r\n }\r\n if(value ==='M') {\r\n saveSpecialCodePlus(24)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Marriage'\r\n }\r\n if(value ==='MA') {\r\n saveSpecialCodePlus(480)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Maternity'\r\n }\r\n if(value ==='LA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(value ==='LTD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='STD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='FFCRA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 80)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='MD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 80)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n absenceText = 'Medical Disability'\r\n }\r\n \r\n }\r\n \r\n // let sigPadSupervisor = {};\r\n // const clearSupervisor = (e) => {\r\n // e.preventDefault();\r\n // sigPadSupervisor.clear();\r\n // }\r\n \r\n // const saveCanvasSupervisor = (e)=> {\r\n // e.preventDefault();\r\n // let urlImage = sigPadSupervisor.getTrimmedCanvas().toDataURL('image/png');\r\n // saveSignatureSupervisor(urlImage);\r\n // }\r\n \r\n // dispatch actions\r\n // const agregarPto = (pto) => dispatch (createNewPtoAction(pto));\r\n const editarPto = (ptoInfo) => dispatch (editPtoAction(ptoInfo));\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n const validarFormulario = () => dispatch( validarFormularioAction());\r\n const exitoValidacion = () => dispatch( validacionExito() ) ;\r\n const errorValidacion = () => dispatch( validacionError() ) ;\r\n\r\n \r\n if(pto.absence_code ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(pto.absence_code ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(pto.absence_code ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absenceCode ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(pto.absenceCode ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(pto.absenceCode ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(pto.absenceCode ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absenceCode ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absenceCode ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(pto.absenceCode ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(pto.absence_code ==='O') {\r\n absenceText = 'Other'\r\n } \r\n if(pto.absence_code ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n } \r\n if(pto.absence_code ==='VT') {\r\n absenceText = 'Vote'\r\n } \r\n if(pto.absence_code ==='MD') {\r\n absenceText = 'Medical Disability'\r\n } \r\n\r\n\r\n // const handleRenderDates = (hr) => {\r\n // if(pto.hr_pto !== undefined && pto.hr_pto === 1) {\r\n // console.log('es hecho por rh');\r\n // console.log(pto.day_beginning, pto.day_end);\r\n // saveDayBeginning(new Date((moment(pto.day_beginning).utc().format('MM/DD/YYYY'))));\r\n // saveDayEnd(new Date((moment(pto.day_end).utc().format('MM/DD/YYYY'))));\r\n // }\r\n // }\r\n\r\n useEffect(() => {\r\n // handleRenderDates(pto.hr_pto);\r\n if(pto.hr_pto === 1 && !editMode) {\r\n saveDayBeginning(new Date((moment(pto.day_beginning).utc().format('MM/DD/YYYY'))));\r\n saveDayEnd(new Date((moment(pto.day_end).utc().format('MM/DD/YYYY')))); \r\n console.log()\r\n saveTimeBeginning(moment(pto.time_beginning, \"HH:mm Z\")._d);\r\n saveTimeEnd(moment(pto.time_end, \"HH:mm Z\")._d);\r\n handleChangeReasonCode(pto.absence_code);\r\n console.log(absenceText, pto.absence_code);\r\n saveEditMode(true);\r\n }\r\n if(pto.hr_pto === 0 && !editMode ) {\r\n saveDayBeginning(new Date((moment(pto.day_beginning).utc().format('MM/DD/YYYY'))));\r\n saveDayEnd(new Date((moment(pto.day_end).utc().format('MM/DD/YYYY')))); \r\n console.log()\r\n saveTimeBeginning(moment(pto.time_beginning, \"HH:mm Z\")._d);\r\n saveTimeEnd(moment(pto.time_end, \"HH:mm Z\")._d);\r\n handleChangeReasonCode(pto.absence_code);\r\n console.log(absenceText);\r\n saveEditMode(true);\r\n }\r\n \r\n },[pto.day_beginning, pto.day_end, editMode, pto.time_beginning, pto.time_end, pto.hr_pto])\r\n \r\n useEffect( ()=>{\r\n\r\n const ptoDetail = (id) => dispatch(getPtoDetail(id));\r\n ptoDetail(id);\r\n\r\n \r\n\r\n if(userInfo.userInfo.name !== undefined){\r\n saveEmployeeName(userInfo.userInfo.name +' '+userInfo.userInfo.lastname);\r\n saveCarryOver(parseInt(balanceHorasActual.carry_over));\r\n saveCarryOverSickHours(parseInt(balanceHorasActual.carry_over_sick_time));\r\n saveAvailableHours(balanceHorasActual.available_hours);\r\n saveSickHours(balanceHorasActual.sick_days_limit);\r\n } else {\r\n history.push('/home');\r\n }\r\n \r\n if(userInfo.userInfo.department !== undefined) {\r\n saveDepartment(userInfo.userInfo.department);\r\n let departmentFilter = filterDepartment(departments, userInfo.userInfo.department);\r\n console.log(departmentFilter)\r\n saveDepartmentColor(departmentFilter[0].color);\r\n }\r\n \r\n //saveTotalHours('0');\r\n let rangeBeginning = moment(dayBegining);\r\n let rangeEnd = moment(dayEnd);\r\n let rangeHourBeginning = moment(timeBeginning, 'HH:mm');\r\n let rangeHourEnd = moment(timeEnd, 'HH:mm');\r\n let totalAmount, hourPerDay;\r\n let launchTimeBeginning = moment('14:00:00', 'HH:mm');\r\n let launchTimeEnd = moment('15:00:00', 'HH:mm');\r\n let laborTimeBeginning = moment('08:00:00', 'HH:mm');\r\n let laborTimeEnd = moment('23:00:00', 'HH:mm');\r\n\r\n \r\n if(userInfo.userInfo.uid !== undefined) {\r\n saveUid(userInfo.userInfo.uid);\r\n }\r\n if(rangeBeginning._locale._invalidDate === '' && rangeEnd._locale._invalidDate === '') {\r\n \r\n return\r\n }else {\r\n \r\n let subtractDays, subtractHours;\r\n \r\n \r\n if(rangeBeginning._locale._invalidDate === 'Invalid date' && rangeEnd._locale._invalidDate === 'Invalid date') {\r\n subtractHours = 0;\r\n }\r\n if ((rangeHourBeginning.isBetween(laborTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeEnd, laborTimeEnd)) || (rangeHourBeginning.isBetween(launchTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeBeginning, launchTimeEnd))) {\r\n subtractHours = (moment.duration(rangeHourEnd - rangeHourBeginning).asHours()) - 1;\r\n }else {\r\n subtractHours = moment.duration(rangeHourEnd - rangeHourBeginning).asHours();\r\n }\r\n //subtractHours = rangeHourEnd.diff(rangeHourBeginning);\r\n //subtractDays = rangeEnd.diff(rangeBeginning, 'hours');\r\n \r\n //subtractDays = moment.duration(rangeEnd - rangeBeginning).asDays();\r\n if(rangeBeginning.format('YYYY-MM-DD') === rangeEnd.format('YYYY-MM-DD')) {\r\n \r\n\r\n // if(absenceCode === 'B1') {\r\n // subtractDays = rangeEnd.businessDiff(rangeBeginning) + 1;\r\n // }else {\r\n // subtractDays = rangeEnd.businessDiff(rangeBeginning);\r\n // }\r\n subtractDays = (rangeEnd.businessDiff(rangeBeginning));\r\n \r\n }else {\r\n subtractDays = rangeEnd.businessDiff(rangeBeginning) + 1;\r\n }\r\n \r\n hourPerDay = (subtractDays * 8);\r\n \r\n // console.log(subtractDays);\r\n \r\n if(isNaN(subtractHours) && !isNaN(hourPerDay)) {\r\n // saveTotalHours(Math.round(hourPerDay - specialCodePlus));\r\n saveTotalHours(Math.round(hourPerDay));\r\n \r\n }else if(isNaN(hourPerDay) && isNaN(subtractHours)) {\r\n saveTotalHours(0);\r\n }else {\r\n totalAmount = parseInt(hourPerDay) + parseInt(Math.round(subtractHours));\r\n // saveTotalHours(totalAmount - specialCodePlus);\r\n saveTotalHours(totalAmount);\r\n }\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA' || absenceCode === 'LTD' || absenceCode === 'STD' || absenceCode === 'MD') {\r\n // totalAmount = 0;\r\n // saveTotalHours(0);\r\n totalAmount = parseInt(hourPerDay);\r\n saveTotalHours(totalAmount);\r\n saveSpecialCodePlus(totalAmount);\r\n }\r\n \r\n // if(rangeBeginning.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n if(rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n saveTotalHours(0);\r\n saveDateValidationError(true);\r\n }else {\r\n saveDateValidationError(false);\r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.sick_days_limit) + parseInt(balanceHorasActual.carry_over_sick_time)) {\r\n saveHourValidationError(true);\r\n //saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n \r\n \r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n \r\n }\r\n \r\n let carryOverSum, sumAvailableHours,sickHoursSum, carryOverSickSum = 0;\r\n //console.log(availableHours);\r\n if(userInfo.userInfo.carryOver !== undefined || userInfo.userInfo.carryOver !== 0 ||userInfo.userInfo.carryOver !== '') {\r\n let carryoverInit = balanceHorasActual.carry_over;\r\n let sickHoursInit = balanceHorasActual.sick_days_limit;\r\n let carryoversickInit = balanceHorasActual.carry_over_sick_time;\r\n if (totalHours !== '' || totalHours !== undefined) {\r\n\r\n if(specialCodePlus !== 0) {\r\n // carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) - parseInt(specialCodePlus));\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) + specialCodePlus);\r\n }else {\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours));\r\n }\r\n if(absenceCode === 'S') {\r\n carryOverSickSum = (parseInt(carryoversickInit) -parseInt(totalHours));\r\n\r\n sickHoursSum = ((parseInt(sickHoursInit) + parseInt(carryoversickInit)) - parseInt(totalHours));\r\n\r\n // sickHoursSum = (parseInt(sickHoursInit) - parseInt(totalHours));\r\n\r\n saveCarryOver(Math.round(carryoverInit));\r\n carryOverRef.current.value = carryoverInit;\r\n saveCarryOverUsage(0);\r\n\r\n if(!isNaN(carryOverSickSum)) {\r\n if(carryOverSickSum >= 0) {\r\n if(carryOverSickSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n// saveCarryOverSickHoursUsage(carryoversickInit)\r\n saveCarryOverSickHoursUsage(Math.round(carryoversickInit));\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n }else {\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n carryOverSickHoursRef.current.value = carryOverSickSum;\r\n saveCarryOverSickHoursUsage(carryoversickInit - carryOverSickSum);\r\n }\r\n\r\n }else {\r\n\r\n if(!isNaN(sickHoursSum)) {\r\n if(sickHoursSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n sickHoursRef.current.value = '0';\r\n saveSickHoursUsage(sickHoursInit)\r\n saveSickHoursUsage(Math.round(sickHoursSum));\r\n }else {\r\n carryOverSickHoursRef.current.value = '0';\r\n saveSickHours(Math.round(sickHoursSum));\r\n sickHoursRef.current.value = sickHoursSum;\r\n saveSickHoursUsage(sickHoursInit - sickHoursSum);\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n saveSickHours(sickHoursInit);\r\n saveSickHoursUsage(0);\r\n saveCarryOverSickHours(carryoversickInit);\r\n saveCarryOverSickHoursUsage(0);\r\n saveSickHoursUsage(0);\r\n sickHoursRef.current.value = sickHoursInit;\r\n // console.log(carryoverInit + \" - \" + totalHours + \" = \" + carryOverSum);\r\n if(!isNaN(carryOverSum)) {\r\n if(carryOverSum < 0 ) {\r\n let availableHoursInit = balanceHorasActual.available_hours\r\n // sumAvailableHours = availableHoursInit + carryOverSum + specialCodePlus\r\n sumAvailableHours = availableHoursInit + carryOverSum \r\n //console.log(sumAvailableHours);\r\n saveAvailableHours(sumAvailableHours);\r\n }\r\n if(carryOverSum < 0) {\r\n carryOverRef.current.value = '0';\r\n saveCarryOverUsage(carryoverInit);\r\n saveCarryOver(Math.round(carryOverSum));\r\n }else {\r\n saveCarryOver(Math.round(carryOverSum));\r\n carryOverRef.current.value = carryOverSum;\r\n saveCarryOverUsage(carryoverInit - carryOverSum);\r\n \r\n }\r\n }\r\n //console.log(\"carry Over =\", carryOverSum);\r\n }\r\n }\r\n \r\n }\r\n \r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(balanceHorasActual.carry_over) + parseInt(balanceHorasActual.sick_days_limit)+ parseInt(balanceHorasActual.carry_over_sick_time)) {\r\n saveHourValidationError(true);\r\n //saveTotalHours(0);\r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n \r\n \r\n }, [id, dispatch, userInfo, dayBegining, dayEnd, timeEnd, timeBeginning, totalHours, balanceHorasActual.available_hours, history, carryOver, balanceHorasActual.carry_over, specialCodePlus])\r\n \r\n // Add new PTO\r\n const submitEditPto = e => {\r\n e.preventDefault();\r\n // saveReason(pto.reason)\r\n saveAbsenceCode(pto.absence_code);\r\n validarFormulario();\r\n if (parseInt(totalHours) > (parseInt(balanceHorasActual.sick_days_limit) + parseInt(balanceHorasActual.carry_over_sick_time)) && absenceCode === 'S') {\r\n saveHourValidationError(true);\r\n // errorValidacion();\r\n //saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n //saveAbsenceCode(pto.absence_code);\r\n if(employeeName.trim() === ''|| department.trim() === '' || totalHours < 0 || absenceCode.trim() === '' || signatureEmployee.trim() === '') {\r\n errorValidacion();\r\n return\r\n }\r\n \r\n exitoValidacion();\r\n\r\n let absenceText;\r\n if(abscenceTextRef.current.value ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(abscenceTextRef.current.value ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(abscenceTextRef.current.value ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(abscenceTextRef.current.value ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(abscenceTextRef.current.value ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(abscenceTextRef.current.value ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(abscenceTextRef.current.value ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(abscenceTextRef.current.value ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(abscenceTextRef.current.value ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(abscenceTextRef.current.value ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(abscenceTextRef.current.value ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(abscenceTextRef.current.value ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(abscenceTextRef.current.value ==='O') {\r\n absenceText = 'Other'\r\n }\r\n if(abscenceTextRef.current.value ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(abscenceTextRef.current.value ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n if(abscenceTextRef.current.value ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n \r\n \r\n \r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(userInfo.userInfo.carryOver)) {\r\n saveHourValidationError(true);\r\n // saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n // timeBeginningRef.current.value = '';\r\n // timeEndRef.current.value = '';\r\n // dayBeginingRef.current.focus();\r\n // saveDayBeginning('');\r\n // saveDayEnd('');\r\n // saveTimeBeginning('');\r\n // saveTimeEnd('');\r\n return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n \r\n }\r\n \r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + '

' +\r\n '

Department : ' + department + '

' +\r\n '

Reason : ' + reason + '

' +\r\n '

Total Hours: ' + totalHours + '

' +\r\n '

Absence Code: ' + absenceText + '

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n let rangeBeginning = moment(dayBegining).format('YYYY-MM-DD');\r\n let rangeEnd = moment(dayEnd).format('YYYY-MM-DD');\r\n let rangeHourBeginning = moment(timeBeginning).format('HH:mm');\r\n let rangeHourEnd = moment(timeEnd).format('HH:mm');\r\n let dateSignature = moment(dateSignEmployee).format('YYYY-MM-DD');\r\n \r\n \r\n if(rangeHourBeginning === 'Invalid date' || rangeHourEnd === 'Invalid date') {\r\n rangeHourBeginning = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n rangeHourEnd = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n }\r\n\r\n const hrPTO = pto.hr_pto;\r\n\r\n \r\n \r\n \r\n editarPto({\r\n id,\r\n employeeName,\r\n department,\r\n reason,\r\n rangeBeginning,\r\n rangeEnd,\r\n rangeHourBeginning,\r\n rangeHourEnd,\r\n totalHours,\r\n absenceCode,\r\n signatureEmployee,\r\n dateSignature,\r\n uid,\r\n supervisor,\r\n departmentColor,\r\n email,\r\n carryOverUsage,\r\n sickHoursUsage,\r\n carryOverSickHoursUsage,\r\n hrPTO\r\n });\r\n \r\n let carryOverZero, sickHoursZero, carryOverSickZero;\r\n \r\n if(carryOver < 0) {\r\n carryOverZero = 0;\r\n }else {\r\n carryOverZero = carryOver;\r\n }\r\n\r\n if(sickHours < 0) {\r\n sickHoursZero = 0;\r\n }else {\r\n sickHoursZero = sickHours;\r\n }\r\n\r\n if(carryOverSickHours < 0) {\r\n carryOverSickZero = 0\r\n }else {\r\n carryOverSickZero = carryOverSickHours;\r\n }\r\n \r\n \r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA') {\r\n balanceHoras({\r\n available_hours: parseInt(availableHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: rangeEnd,\r\n typeBalance: true,\r\n uid : uid\r\n });\r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(availableHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n typeBalance: 'false',\r\n uid : uid\r\n });\r\n }\r\n\r\n if(absenceCode === 'S') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.sick_days_limit),\r\n hours_after_mov:parseInt(sickHoursZero),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA') {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero), \r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:rangeEnd,\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n let data = {\r\n uid : userInfo.userInfo.uid,\r\n hours_before_mov:parseInt(userInfo.hours.available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(userInfo.hours.carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(userInfo.hours.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(userInfo.hours.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n \r\n }\r\n \r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n }\r\n\r\n // End New PTO code\r\n \r\n // if(pto.time_beginning == null || pto.time_end == null) {\r\n // pto.time_beginning = '';\r\n // pto.time_end = '';\r\n // }\r\n \r\n \r\n return (\r\n
\r\n {userInfo.userInfo.company !== 'CSI'\r\n ?\r\n
\r\n
\r\n
\r\n

Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */} \r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"hh:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeBeginningRef}\r\n /> \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref = {timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n\r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n {/* */}\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n {\r\n userInfo.userInfo.territory === 'California'\r\n ?\r\n \r\n
\r\n \r\n \r\n
\r\n : \r\n
\r\n \r\n \r\n
\r\n } \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n :\r\n // PTO FORM\r\n
\r\n
\r\n
\r\n

Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */} \r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"hh:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeBeginningRef}\r\n /> \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref = {timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n\r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA' || absenceCode === 'VT'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n {/* */}\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n {/*
\r\n \r\n
*/}\r\n \r\n
\r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n }\r\n \r\n
\r\n );\r\n };\r\n\r\nexport default EditPto;","import React, {useEffect} from 'react';\r\n\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport {getPtoDetail} from '../actions/timeoffrequestActions';\r\n\r\n// library\r\nimport moment from 'moment';\r\n\r\n\r\nconst ViewPto = ({match}) => {\r\n\r\n // Dispatch para ejecutar la acción principal\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n\r\n const pto = useSelector(state => state.ptoList.pto);\r\n\r\n\r\n useEffect(()=> {\r\n\r\n const ptoDetail = (pto) => dispatch(getPtoDetail(id));\r\n ptoDetail();\r\n\r\n }, [dispatch, id])\r\n\r\n \r\n\r\n \r\n let absenceText;\r\n if(pto.absence_code ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(pto.absence_code ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(pto.absence_code ==='LA') {\r\n absenceText = 'Leave of Abscence'\r\n }\r\n if(pto.absence_code ==='LTD') {\r\n absenceText = 'Long Term Disability'\r\n }\r\n if(pto.absence_code ==='STD') {\r\n absenceText = 'Short Term Disability'\r\n }\r\n if(pto.absence_code ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='O') {\r\n absenceText = 'Other'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(pto.absence_code ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(pto.absence_code ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(pto.absence_code ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(pto.absence_code ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(pto.absence_code ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(pto.absence_code ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n if(pto.absence_code ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n\r\n let dayBeginnig = moment.utc(pto.day_beginning).format('MM-DD-YYYY');\r\n let dayEnd = moment.utc(pto.day_end).format('MM-DD-YYYY');\r\n let dateSignature = moment(pto.date_employee_signature).format('MM-DD-YYYY');\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

Time Off Request

\r\n {Object.entries(pto).length !== 0\r\n \r\n ?\r\n
\r\n {\r\n pto.reason_deny !== null\r\n ?\r\n
\r\n \r\n

{pto.reason_deny}

\r\n
\r\n \r\n :\r\n null\r\n }\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \"signature\"/\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n :\r\n null\r\n }\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n\r\n \r\n\r\n \r\n};\r\n\r\nexport default ViewPto;","import React, {useState} from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport Swal from 'sweetalert2';\r\nimport moment from 'moment';\r\nimport {ajustarBalanceHoras} from '../actions/authenticateActions';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport axiosHr from '../config/axiosHR';\r\nimport {approvePtoAction, denyPtoAction, getPtoListDepartmentSupervisor} from '../actions/timeoffrequestActions';\r\n\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\n\r\nconst PtoSupervisor = ({pto}) => {\r\n // Dispatch para ejecutar\r\n const dispatch = useDispatch();\r\n \r\n const [reasonDeny, saveReasonDeny] = useState('');\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n const departmentUsers = useSelector(state=>state.manager.employees); \r\n const loadPtoList = ()=> dispatch(getPtoListDepartmentSupervisor(userInfo.userInfo.department, userInfo.userInfo.uid, userInfo.userInfo.email));\r\n\r\n \r\n \r\n\r\n // agregar balance horas\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n\r\n let createdAt = moment.utc(pto.date).format('MM-DD-YYYY');\r\n let absenceText;\r\n if(pto.absence_code ==='V') {\r\n absenceText = 'Vacation'\r\n }\r\n if(pto.absence_code ==='PT') {\r\n absenceText = 'Personal Time'\r\n }\r\n if(pto.absence_code ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(pto.absenceCode ==='LTD') {\r\n absenceText = 'Long Term Disability'\r\n }\r\n if(pto.absenceCode ==='STD') {\r\n absenceText = 'Short Term Disability'\r\n }\r\n if(pto.absence_code ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='O') {\r\n absenceText = 'Other'\r\n } \r\n if(pto.absence_code ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(pto.absence_code ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(pto.absence_code ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(pto.absence_code ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(pto.absence_code ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(pto.absence_code ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n}\r\n if(pto.absence_code ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(pto.absence_code ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(pto.absence_code ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(pto.absence_code ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n if(pto.absence_code ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n\r\n const approvePto = pto => {\r\n\r\n const balanceHorasActual = departmentUsers.find(uids => uids.uid === pto.user_id)\r\n\r\n let company = balanceHorasActual.company\r\n \r\n // ask user confirmation\r\n const ptoInfo = {\r\n pto,\r\n company\r\n }\r\n \r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"This action can't be undone\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Approve it!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n if (result.value) {\r\n \r\n dispatch(approvePtoAction(pto.id) );\r\n\r\n clienteAxiosHR.post('/pto-email-approve', ptoInfo)\r\n .then(respuesta => {\r\n console.log(respuesta);\r\n Swal.fire(\r\n 'Approved',\r\n 'The Time off Request has been approved successfully.',\r\n 'success'\r\n )\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n\r\n setTimeout(() => {\r\n loadPtoList();\r\n }, 4000);\r\n \r\n \r\n \r\n }\r\n })\r\n\r\n // history('/pto/supervisor');\r\n }\r\n\r\n const denyPto = pto => {\r\n // ask user confirmation\r\n \r\n Swal.fire({\r\n title: '¿Reason?',\r\n text: \"This action can't be undone\",\r\n type: 'warning',\r\n input: 'text',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Denied!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Denied',\r\n 'The Time off Request has been denied successfully.',\r\n 'success'\r\n ) \r\n\r\n \r\n\r\n \r\n\r\n const balanceHorasActual = departmentUsers.find(uids => uids.uid === pto.user_id)\r\n\r\n //console.log('el uid del usuario a actualizar es', pto.user_id);\r\n //console.log('El balance de horas es', balanceHorasActual)\r\n\r\n pto.reasonDeny = result.value;\r\n\r\n if(pto.absence_code === 'J' || pto.absence_code === 'VT' || pto.absence_code === 'M') {\r\n let data\r\n switch (pto.absenceCode) {\r\n case 'J':\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(40)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : pto.user_id,\r\n })\r\n\r\n data = {\r\n uid : pto.user.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(40)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n\r\n case 'VT':\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(2)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : pto.user_id,\r\n })\r\n\r\n data = {\r\n uid : pto.user.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(2)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n\r\n case 'M':\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(24)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time),\r\n uid : pto.user_id,\r\n })\r\n\r\n data = {\r\n uid : pto.user.uid,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(24)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(userInfo.hours.carry_over),\r\n carry_over_after_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time),\r\n observations: 'Delete PTO '+ absenceText,\r\n type_mov: 'Delete PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n }else {\r\n \r\n \r\n if(pto.absence_code === 'S') {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(pto.sick_hours_usage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n uid : pto.user_id\r\n });\r\n let data = {\r\n uid : pto.user_id,\r\n hours_before_mov:parseInt(balanceHorasActual.sick_days_limit),\r\n hours_after_mov: parseInt(balanceHorasActual.carry_over_sick_time),\r\n hours_mov: parseInt(pto.totalHours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage) - parseInt(pto.carry_over_sick_hours_usage)),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) - parseInt(pto.total_hours),\r\n total_requests: balanceHorasActual.total_requests - 1,\r\n carry_over: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n sick_hours_limit: parseInt(balanceHorasActual.sick_days_limit) + parseInt(pto.sick_hours_usage),\r\n carry_over_sick_time: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n uid : pto.user_id\r\n });\r\n let data = {\r\n uid : pto.user_id,\r\n hours_before_mov:parseInt(balanceHorasActual.available_hours),\r\n hours_after_mov:parseInt(balanceHorasActual.available_hours) + (parseInt(pto.total_hours) - parseInt(pto.carry_over_usage) - parseInt(pto.sick_hours_usage)),\r\n hours_mov: parseInt(pto.total_hours),\r\n carry_over_before_mov:parseInt(balanceHorasActual.carry_over),\r\n carry_over_after_mov: parseInt(balanceHorasActual.carry_over + parseInt(pto.carry_over_usage)),\r\n carry_over_sick_time_before:parseInt(balanceHorasActual.carry_over_sick_time),\r\n carry_over_sick_time_after: parseInt(balanceHorasActual.carry_over_sick_time) + parseInt(pto.carry_over_sick_hours_usage),\r\n observations: 'Supervisor Denies PTO ' + absenceText,\r\n type_mov: 'Denies PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(balanceHorasActual.increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(balanceHorasActual.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n\r\n }\r\n\r\n \r\n\r\n \r\n \r\n\r\n dispatch(denyPtoAction(pto) );\r\n\r\n let company = balanceHorasActual.company\r\n \r\n // ask user confirmation\r\n const ptoInfo = {\r\n pto,\r\n company\r\n }\r\n\r\n clienteAxiosHR.post('/pto-email-deny', ptoInfo)\r\n .then(respuesta => {\r\n console.log(respuesta);\r\n Swal.fire(\r\n 'Success',\r\n 'The Time off Request denied notification has been send successfully.',\r\n 'warning'\r\n )\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n\r\n setTimeout(() => {\r\n loadPtoList();\r\n }, 4000);\r\n }\r\n })\r\n \r\n }\r\n\r\n \r\n\r\n return (\r\n \r\n {pto.employee_name}\r\n {pto.department}\r\n {pto.status}\r\n {\r\n createdAt\r\n }\r\n \r\n { moment.utc(pto.day_beginning).format('MM-DD-YYYY')}\r\n {moment.utc(pto.day_end).format('MM-DD-YYYY')}\r\n {absenceText}\r\n {pto.total_hours}\r\n \r\n \r\n Details\r\n \r\n\r\n approvePto(pto)}\r\n >\r\n Approve\r\n \r\n\r\n denyPto(pto )}\r\n >\r\n Deny\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PtoSupervisor;","import React, {useEffect} from 'react';\r\nimport PtoSupervisor from './PtoSupervisor';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {getPtoListDepartmentSupervisor} from '../actions/timeoffrequestActions';\r\nimport {obtenerUsuarioBalanceHoras} from '../actions/authenticateActions';\r\nconst Supervisor = ({history}) => {\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n if(userInfo.userInfo.name === undefined){\r\n history.push('/home');\r\n }\r\n \r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n const ptoList = useSelector(state => state.ptoList.ptoSupervisor);\r\n\r\n useEffect(()=> {\r\n \r\n const loadPtoList = ()=> dispatch(getPtoListDepartmentSupervisor(userInfo.userInfo.department, userInfo.userInfo.uid, userInfo.userInfo.email));\r\n loadPtoList();\r\n \r\n const loadUsers = ()=>dispatch(obtenerUsuarioBalanceHoras(userInfo.userInfo.department));\r\n loadUsers();\r\n\r\n },[dispatch, userInfo.userInfo.department, ptoList.length, userInfo.userInfo.uid]);\r\n \r\n \r\n \r\n \r\n return (\r\n \r\n \r\n

TIME OFF REQUEST

\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Department: {userInfo.userInfo.department}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n (ptoList !== undefined)\r\n ?\r\n ptoList.map(pto =>(\r\n \r\n ))\r\n : null\r\n \r\n }\r\n \r\n \r\n
EmployeeDepartmentStatusCreated AtBeginningEndReasonHoursActions
\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\nexport default Supervisor;","import React, {useState, useEffect} from 'react';\r\nimport {obtenerInformacionUsuario} from '../actions/authenticateActions';\r\nimport {useDispatch, useSelector} from 'react-redux';\r\n\r\nconst Login = ({history}) => {\r\n\r\n //console.log(localStorage.getItem('token'));\r\n\r\n if(localStorage.getItem('token')) {\r\n history.push('/home');\r\n }\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [username, saveUserName] = useState('');\r\n const [password, savePassword] = useState('');\r\n const [ error, saveError] = useState('');\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n const getCredentials = e => {\r\n e.preventDefault();\r\n //obtener información de portal\r\n const loadUser = ()=> dispatch(obtenerInformacionUsuario(username, password));\r\n loadUser();\r\n\r\n if(!userInfo.error) {\r\n saveError(false);\r\n history.push('/home');\r\n }else {\r\n saveError(true);\r\n }\r\n\r\n \r\n \r\n }\r\n\r\n useEffect(() => {\r\n if(!userInfo.error) {\r\n saveError(false);\r\n }else {\r\n saveError(true);\r\n }\r\n }, [userInfo.error])\r\n\r\n\r\n return (\r\n <>\r\n \r\n\r\n
\r\n {/*
\r\n

Under maintenance.

\r\n

Our PTO Platform will undergo scheduled maintenance.\r\n We apologize for any inconvenience and appreciate your understanding.\r\n If you have any questions, please contact: cynthia.ramos@mexilink.com

\r\n \r\n
*/}\r\n
\r\n
\r\n
\r\n

MXL Human Resources

\r\n

Please, Use Your MXL Portal Credentials.

\r\n
\r\n \r\n saveUserName(e.target.value) }\r\n required\r\n />\r\n
\r\n
\r\n \r\n savePassword(e.target.value) }\r\n required\r\n />\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n { error ?
ERROR: Please, provide valid credentials
: null }\r\n \r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default Login;","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport moment from 'moment';\r\n\r\nimport {useSelector } from 'react-redux';\r\n\r\n\r\nconst Employees = ({employee, history}) => {\r\n\r\n // acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n if(userInfo.userInfo.name === undefined){\r\n // history.push('/home');\r\n }\r\n \r\n\r\n return (\r\n \r\n {employee.employee_name}{' '}{employee.employee_lastname}\r\n {employee.department}\r\n {moment.utc(employee.hire_date).format('YYYY-MM-DD')}\r\n {/* {moment.utc(employee.increase_date).format('YYYY-MM-DD')} */}\r\n {employee.available_hours}\r\n {employee.carry_over}\r\n {employee.sick_days_limit}\r\n {employee.carry_over_sick_time}\r\n \r\n \r\n \r\n PTO List Details\r\n \r\n \r\n Create PTO\r\n \r\n {/* \r\n Profile\r\n */}\r\n \r\n Edit Profile\r\n \r\n \r\n History\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Employees;","import React, {useEffect, useState} from 'react';\r\nimport {Link, useHistory} from 'react-router-dom';\r\nimport Employees from './Employees';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector, useStore } from 'react-redux';\r\n\r\nimport {obtenerDepartamentos, obtenerCompanies, obtenerTerritories, obtenerEmpleadosManager, obtenerEstadosActivos} from '../actions/manageActions';\r\n//import {obtenerUsuarioBalanceHoras} from '../actions/authenticateActions';\r\nimport Spinner from './helpers/Spinner';\r\n\r\nimport ReactExport from \"react-export-excel\";\r\nimport moment from 'moment';\r\nimport axiosHR from '../config/axiosHR';\r\n// import {\r\n// BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend,\r\n// } from 'recharts';\r\n\r\nconst ExcelFile = ReactExport.ExcelFile;\r\nconst ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\nconst ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst ManageDepartment = () => {\r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n\r\n const [saveDepartment, selectSaveDepartment] = useState('');\r\n const [saveCompany, selectSaveCompany] = useState('');\r\n const [saveTerritory, selectSaveTerritory] = useState('');\r\n const [terminated, saveTerminated] = useState('');\r\n const [employeeSearch, setemployeeSearch] = useState('');\r\n const [employeefilters, setemployeeFilters] = useState([]);\r\n const [ptos, setPTOS] = useState([]);\r\n // const [sickDays, saveSickDays] = useState([]);\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.manager.employees);\r\n const departments = useSelector(state=>state.manager.departments);\r\n const territories = useSelector(state => state.manager.territories);\r\n const companyManager = useSelector(state=>state.userInfo.userInfo.company);\r\n const managerVerify = useSelector(state=>state.userInfo.userInfo.manager);\r\n //const companies = useSelector(state=>state.manager.companies);\r\n let companies;\r\n let PtoEventsArray = [];\r\n\r\n if(companyManager === 'CSI' && managerVerify === true) {\r\n companies = [{company: \"CSI\"}];\r\n }else {\r\n companies = [{company:'Mexilink'}, {company:'Hit Sales & Marketing'}];\r\n }\r\n \r\n //const employeeManager = useSelector(state => state.manager.employees)\r\n\r\n //const employees = userInfo.userHour;\r\n let employees = userInfo;\r\n\r\n const handleCheckTerminated = (value) => {\r\n saveTerminated(!terminated); \r\n }\r\n\r\n const sortByName = (array) => {\r\n return array.sort(function(a,b) {\r\n let x = a.employee_name.toLowerCase();\r\n let y = b.employee_name.toLowerCase();\r\n\r\n if(x>y) {return 1;}\r\n if(x {\r\n return array.filter(function(el) {\r\n let name = `${el.employee_name} ${el.employee_lastname}`;\r\n // console.log(name)\r\n return name.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n const filterElementsByCompany = (array, query) => {\r\n return array.filter(function(el) {\r\n // console.log(name)\r\n return el.company.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n const filterElementsByTerritory = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.territory.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.department.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n\r\n const filterbyMexilink = filterElementsByCompany(userInfo, 'Mexilink');\r\n\r\n const filterbyHitSales = filterElementsByCompany(userInfo, 'Hit Sales & Marketing');\r\n \r\n\r\n\r\n const handleSearchEmployee = async () => {\r\n //console.log(employeeSearch.length)\r\n if(employeeSearch.length === 0){\r\n await setemployeeFilters(sortByName(userInfo));\r\n }\r\n\r\n let filterbyName = filterElementsByName(userInfo, employeeSearch);\r\n\r\n let filterbyCompany = filterElementsByCompany(filterbyName, saveCompany);\r\n\r\n \r\n\r\n\r\n let filterbyTerritory = filterElementsByTerritory(filterbyCompany, saveTerritory);\r\n\r\n let filterbyDepartment = filterElementsByDepartment(filterbyTerritory, saveDepartment);\r\n\r\n await setemployeeFilters(filterbyDepartment);\r\n\r\n //console.log(employeefilters)\r\n }\r\n\r\n useEffect(()=> {\r\n if(terminated) {\r\n console.log(terminated)\r\n let data = {\r\n reportType:9,\r\n manager: true,\r\n companyManager: companyManager\r\n }\r\n const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n loadEmployeesManager();\r\n // console.log(data);\r\n }else {\r\n if(saveDepartment === '' && saveCompany === '' && saveTerritory === '') {\r\n let data = {\r\n reportType:1,\r\n manager: true,\r\n companyManager: companyManager\r\n }\r\n const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n loadEmployeesManager();\r\n }\r\n }\r\n\r\n axiosHR.get('/pto-list-all-employees/')\r\n .then(respuesta => {\r\n // console.log(respuesta.data.data[0].day_beginning)\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied' && pto.company !== 'CSI'\r\n ?\r\n PtoEventsArray.push(pto)\r\n :\r\n null\r\n \r\n )\r\n setPTOS(PtoEventsArray);\r\n console.log(ptos, PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n\r\n // handleSearchEmployee();\r\n },[terminated])\r\n\r\n \r\n useEffect(()=> {\r\n \r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n const loadCompanies = ()=> dispatch(obtenerCompanies());\r\n loadCompanies();\r\n\r\n const loadTerritories = ()=> dispatch(obtenerTerritories());\r\n loadTerritories();\r\n\r\n const loadStates = ()=> dispatch(obtenerEstadosActivos(companyManager));\r\n loadStates();\r\n\r\n\r\n // if(saveDepartment !== '' && saveCompany !== '' && saveTerritory !== '') {\r\n // // const loadEmployees = () => dispatch(obtenerUsuarioBalanceHoras(saveDepartment));\r\n // // loadEmployees(); \r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType: 2\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // }\r\n // if(saveDepartment === '' && saveCompany === '' && saveTerritory === '') {\r\n // let data = {\r\n // reportType:1\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany === '' && saveTerritory === '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:3\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany !== '' && saveTerritory === '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:4\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany === '' && saveTerritory !== '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:5\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany !== '' && saveTerritory === '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:6\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany !== '' && saveTerritory !== '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:7\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany === '' && saveTerritory !== '') {\r\n // let data = {\r\n // companyManager: companyManager,\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:8\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n \r\n handleSearchEmployee();\r\n \r\n \r\n },[dispatch]);\r\n\r\n // useEffect(() => {\r\n // console.log('ejhecuto la busqueda')\r\n // setTimeout(() => {\r\n // handleSearchEmployee();\r\n // }, 2000);\r\n \r\n // }, [])\r\n \r\n \r\n \r\n return (\r\n \r\n employees !== undefined && employees !== ''\r\n ? \r\n \r\n \r\n
\r\n

H.R. MANAGER

\r\n
\r\n
\r\n
\r\n
Users
\r\n
\r\n
\r\n
    \r\n \r\n New User\r\n \r\n \r\n Calendar View\r\n \r\n\r\n \r\n Transfer Employee Hours\r\n \r\n \r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
Departments
\r\n
\r\n
\r\n
    \r\n \r\n New Department\r\n \r\n\r\n \r\n Departments Panel\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
Reports
\r\n
\r\n
\r\n
    \r\n \r\n\r\n General Info}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n moment(col.hire_date).add(6,'hours').format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n Sick Days}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n parseInt(col.accrued_sick_days) - parseInt(col.sick_days_limit)}/>\r\n {/* col.travel_benefits === 0 ? 48 : 24}/> */}\r\n {/* col.travel_benefits === 0 ? 48 : 24}/>\r\n */}\r\n \r\n \r\n \r\n moment().format('DD/MM/YYYY')}/>\r\n \r\n \r\n \r\n\r\n \r\n\r\n Termination}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n moment(col.hire_date).add(6,'hours').format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n \r\n parseInt(col.available_hours) + parseInt(col.carry_over) + parseInt(col.sick_days_limit)}/>\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n { companyManager !== 'CSI'\r\n ?\r\n
\r\n
\r\n
More
\r\n
\r\n
\r\n
    \r\n\r\n Mexilink Sick Days}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n 'Sick'}/>\r\n parseInt(col.accrued_sick_days) - parseInt(col.sick_days_limit)}/>\r\n {/* col.travel_benefits === 0 ? 48 : 24}/> */}\r\n {/* col.travel_benefits === 0 ? 48 : 24}/>\r\n */}\r\n \r\n \r\n ''}/>\r\n moment().format('DD/MM/YYYY')}/>\r\n \r\n \r\n \r\n\r\n Hit Sales & Mkt Sick Days}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n 'Sick'}/>\r\n parseInt(col.accrued_sick_days) - parseInt(col.sick_days_limit)}/>\r\n {/* col.travel_benefits === 0 ? 48 : 24}/> */}\r\n {/* col.travel_benefits === 0 ? 48 : 24}/>\r\n */}\r\n \r\n \r\n ''}/>\r\n moment().format('DD/MM/YYYY')}/>\r\n \r\n \r\n \r\n\r\n\r\n All PTO}>\r\n \r\n \r\n \r\n \r\n \r\n moment(col.date).format('YYYY-MM-DD')}/>\r\n moment(col.day_beginning).format('YYYY-MM-DD')}/>\r\n moment(col.day_end).format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n :\r\n null\r\n }\r\n
\r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n \r\n {/*
*/}\r\n
\r\n {/*
*/}\r\n \r\n {/*
\r\n
\r\n \r\n \r\n
\r\n
*/}\r\n {/*
*/}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {/* */}\r\n
\r\n handleCheckTerminated(e.target.value) } \r\n checked= {terminated}\r\n />\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {/* */}\r\n setemployeeSearch(e.target.value)}\r\n onKeyDown={e => e.key === 'Enter' ? handleSearchEmployee() : null}\r\n required\r\n /> \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {/*
*/}\r\n
\r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n employeefilters.length > 0\r\n ?\r\n employeefilters.map(employee =>(\r\n \r\n \r\n ))\r\n :\r\n \r\n
The employee you are looking for is not in the selected department, please change the territory, company or department.
\r\n \r\n }\r\n
\r\n
EmployeeDepartmentHire DateLast Hour IncrementAvailable HoursCarry OverSick DaysCarry Over Sick DaysActions
\r\n \r\n \r\n \r\n
\r\n :\r\n \r\n ); \r\n};\r\n\r\nexport default ManageDepartment;","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport moment from 'moment';\r\n\r\nimport {useSelector } from 'react-redux';\r\n\r\n\r\nconst EmployeesSupervisorManager = ({employee, history}) => {\r\n\r\n // acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n if(userInfo.userInfo.name === undefined){\r\n // history.push('/home');\r\n }\r\n \r\n\r\n return (\r\n \r\n {employee.employee_name} {' '} {employee.employee_lastname}\r\n {employee.department}\r\n {moment.utc(employee.hire_date).format('YYYY-MM-DD')}\r\n {moment.utc(employee.increase_date).format('YYYY-MM-DD')}\r\n {employee.available_hours}\r\n {employee.carry_over}\r\n {employee.sick_days_limit}\r\n \r\n \r\n \r\n PTO List Details\r\n \r\n \r\n Profile\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default EmployeesSupervisorManager;","import React, {useEffect, useState} from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport EmployeesSupervisorManager from './EmployeesSupervisorManager';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {obtenerDepartamentos, obtenerCompanies, obtenerTerritories, obtenerEmpleadosManager} from '../actions/manageActions';\r\n//import {obtenerUsuarioBalanceHoras} from '../actions/authenticateActions';\r\nimport Spinner from './helpers/Spinner';\r\n\r\nimport ReactExport from \"react-export-excel\";\r\nimport moment from 'moment';\r\n// import {\r\n// BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend,\r\n// } from 'recharts';\r\n\r\nconst ExcelFile = ReactExport.ExcelFile;\r\nconst ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\nconst ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst ManageDepartmentSupervisor = () => {\r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n\r\n const departmentSupervisor = useSelector(state=>state.userInfo.userInfo.department);\r\n const [saveDepartment, selectSaveDepartment] = useState(departmentSupervisor);\r\n const [saveCompany, selectSaveCompany] = useState('');\r\n const [saveTerritory, selectSaveTerritory] = useState('');\r\n const [employeeSearch, setemployeeSearch] = useState('');\r\n const [employeefilters, setemployeeFilters] = useState([]);\r\n // const [sickDays, saveSickDays] = useState([]);\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.manager.employees);\r\n \r\n // const departments = useSelector(state=>state.manager.departments);\r\n const territories = useSelector(state => state.manager.territories);\r\n const companies = useSelector(state=>state.manager.companies);\r\n //const employeeManager = useSelector(state => state.manager.employees)\r\n\r\n //const employees = userInfo.userHour;\r\n let employees = userInfo;\r\n let departments = [];\r\n\r\n const filterElementsByName = (array, query) => {\r\n return array.filter(function(el) {\r\n let name = `${el.employee_name} ${el.employee_lastname}`;\r\n // console.log(name)\r\n return name.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n const filterElementsByCompany = (array, query) => {\r\n return array.filter(function(el) {\r\n // console.log(name)\r\n return el.company.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n const filterElementsByTerritory = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.territory.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.department.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n \r\n\r\n\r\n const handleSearchEmployee = async () => {\r\n //console.log(employeeSearch.length)\r\n if(employeeSearch.length === 0){\r\n await setemployeeFilters(userInfo);\r\n }\r\n\r\n let filterbyName = filterElementsByName(userInfo, employeeSearch);\r\n\r\n let filterbyCompany = filterElementsByCompany(filterbyName, saveCompany);\r\n\r\n let filterbyTerritory = filterElementsByTerritory(filterbyCompany, saveTerritory);\r\n\r\n let filterbyDepartment = filterElementsByDepartment(filterbyTerritory, saveDepartment);\r\n\r\n await setemployeeFilters(filterbyDepartment);\r\n\r\n //console.log(employeefilters)\r\n }\r\n \r\n departments = useSelector(state=>state.manager.departments);\r\n // console.log(departments)\r\n let departmentSupervisorFilter = filterElementsByDepartment(departments, departmentSupervisor);\r\n let director_of = JSON.parse(departmentSupervisorFilter[0].director_of);\r\n\r\n\r\n // if(departmentSupervisor === 'CEO' || departmentSupervisor === 'CFO' || departmentSupervisor === 'Sales' || departmentSupervisor === 'Operations' || departmentSupervisor === 'Controller' || departmentSupervisor === 'Purchasing') {\r\n\r\n \r\n // if(departmentSupervisor === 'CFO') {\r\n // departments = [\r\n // {department: 'Accounting'},\r\n // {department: 'Accounting CSI'},\r\n // {department: 'Controller'},\r\n // {department: 'Finance'},\r\n // {department: 'Human Resources'},\r\n // {department: 'I.T.'},\r\n // {department: 'Processing'}\r\n // ];\r\n // }\r\n\r\n // if(departmentSupervisor === 'Sales') {\r\n // departments = [\r\n // {department: 'Regional West'},\r\n // {department: 'Regional Southeast'},\r\n // {department: 'Regional Southcentral'},\r\n // {department: 'Regional Midwest'},\r\n // {department: 'Regional Northeast'},\r\n // {department: 'Business Intelligence'}\r\n // ]\r\n // }\r\n\r\n // if(departmentSupervisor === 'POS Execution Manger') {\r\n // departments = [\r\n // {department: 'Regional West'},\r\n // {department: 'Regional Southeast'},\r\n // {department: 'Regional Southcentral'},\r\n // {department: 'Regional Midwest'},\r\n // {department: 'Regional Northeast'}\r\n // ]\r\n // }\r\n\r\n // if(departmentSupervisor === 'Operations') {\r\n // departments = [\r\n // {department: 'Logistics'},\r\n // {department: 'Logistics Key Accounts'},\r\n // {department: 'Purchasing'},\r\n // {department: 'Inventory'}\r\n // ]\r\n // }\r\n\r\n // if(departmentSupervisor === 'Controller') {\r\n // departments = [\r\n // {department: 'Accounting'},\r\n // {department: 'Finance'},\r\n // {department: 'Accounting CSI'}\r\n // ]\r\n // }\r\n // if(departmentSupervisor === 'Purchasing') {\r\n // departments = [\r\n // {department: 'Inventory'},\r\n // {department: 'Purchasing'}\r\n // ]\r\n // }\r\n // if(departmentSupervisor === 'CEO') {\r\n // const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n // loadDepartments(); \r\n // }\r\n // }else {\r\n // departments = [\r\n // {department: departmentSupervisor}\r\n // ]\r\n // }\r\n // let departments = [];\r\n\r\n \r\n useEffect(()=> {\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n \r\n\r\n const loadCompanies = ()=> dispatch(obtenerCompanies());\r\n loadCompanies();\r\n\r\n const loadTerritories = ()=> dispatch(obtenerTerritories());\r\n loadTerritories();\r\n\r\n\r\n // if(saveDepartment !== '' && saveCompany !== '' && saveTerritory !== '') {\r\n // // const loadEmployees = () => dispatch(obtenerUsuarioBalanceHoras(saveDepartment));\r\n // // loadEmployees(); \r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType: 2\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // }\r\n // if(saveDepartment === '' && saveCompany === '' && saveTerritory === '') {\r\n // let data = {\r\n // reportType:1\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany === '' && saveTerritory === '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:3\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany !== '' && saveTerritory === '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:4\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany === '' && saveTerritory !== '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:5\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany !== '' && saveTerritory === '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:6\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment === '' && saveCompany !== '' && saveTerritory !== '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:7\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n\r\n // if(saveDepartment !== '' && saveCompany === '' && saveTerritory !== '') {\r\n // let data = {\r\n // company: saveCompany,\r\n // territory: saveTerritory,\r\n // department: saveDepartment,\r\n // reportType:8\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n // console.log(data);\r\n // }\r\n \r\n handleSearchEmployee();\r\n \r\n },[dispatch]);\r\n \r\n return (\r\n \r\n employees !== undefined && employees !== ''\r\n ? \r\n \r\n \r\n
\r\n

SUPERVISOR MANAGER

\r\n

{departmentSupervisor}

\r\n \r\n Calendar View\r\n \r\n\r\n General Info Report}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n moment(col.hire_date).format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {/*
*/}\r\n
\r\n {/*
*/}\r\n \r\n {/*
\r\n
\r\n \r\n \r\n
\r\n
*/}\r\n {/*
*/}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {/* */}\r\n setemployeeSearch(e.target.value)}\r\n required\r\n /> \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {/*
*/}\r\n
\r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n employeefilters.length > 0\r\n ?\r\n employeefilters.map(employee =>(\r\n \r\n \r\n ))\r\n :\r\n \r\n
The employee you are looking for is not in the selected department, please change the territory, company or department.
\r\n \r\n }\r\n
\r\n
EmployeeDepartmentHire DateLast Hour IncrementAvailable HoursCarry OverSick Days BalanceActions
\r\n \r\n \r\n \r\n
\r\n :\r\n \r\n ); \r\n};\r\n\r\nexport default ManageDepartmentSupervisor;","import React, {useEffect} from 'react';\r\nimport Pto from './Pto';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {getPTOListAction} from '../actions/timeoffrequestActions';\r\nimport {obtenerInformacionUsuario, obtenerBalanceHoras} from '../actions/authenticateActions';\r\nimport Spinner from './helpers/Spinner';\r\n\r\n\r\nconst EmployeePtos = ({match}) => {\r\n\r\n // obtener el ID a editar\r\n const { uid } = match.params;\r\n\r\n // console.log(uid);\r\n\r\n\r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n const ptoList = useSelector(state => state.ptoList.ptoRequests);\r\n\r\n useEffect(()=> {\r\n\r\n const loadPtoList = ()=> dispatch(getPTOListAction(uid));\r\n loadPtoList();\r\n \r\n const loadUser = ()=> dispatch(obtenerInformacionUsuario(null, null));\r\n loadUser();\r\n \r\n const loadHours = ()=> dispatch(obtenerBalanceHoras());\r\n loadHours();\r\n \r\n\r\n },[dispatch, uid, ptoList.length]);\r\n\r\n return (\r\n \r\n userInfo.userInfo.uid !== undefined\r\n ? \r\n \r\n \r\n

TIME OFF REQUEST

\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ptoList.map(pto =>(\r\n \r\n ))}\r\n \r\n \r\n
EmployeeDepartmentStatusCreated AtBeginningEndDelivery StatusAbscenceHoursActions
\r\n \r\n \r\n \r\n
\r\n :\r\n \r\n );\r\n};\r\n\r\nexport default EmployeePtos;","import React, {Fragment} from 'react';\r\nimport { Redirect} from 'react-router-dom';\r\n\r\nconst PrivateRoute = (props) => {\r\n const token = localStorage.getItem('token');\r\n return (\r\n \r\n {token !==null ? props.children : }\r\n \r\n );\r\n };\r\n\r\nexport default PrivateRoute;","import React, {useEffect, useState, Fragment} from 'react';\r\nimport FullCalendar from '@fullcalendar/react'\r\nimport dayGridPlugin from '@fullcalendar/daygrid'\r\n\r\nimport {useSelector} from 'react-redux';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport axiosHR from '../config/axiosHR';\r\n\r\nconst PtoCalendar = ({match}) => {\r\n\r\n\r\n const dispatch = useDispatch();\r\n let {month} = match.params\r\n\r\n const[ptoEvents, savePtoEvents] = useState([]);\r\n let PtoEventsArray = [];\r\n\r\n const user = useSelector(state=>state.userInfo.userInfo.username);\r\n const manager = useSelector(state=>state.userInfo.userInfo.manager);\r\n const department = useSelector(state=>state.userInfo.userInfo.department);\r\n const userInfo = useSelector(state=> state.userInfo.userInfo)\r\n\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.department.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n let departmentSupervisorFilter = filterElementsByDepartment(departments, department);\r\n let director_of = JSON.parse(departmentSupervisorFilter[0].director_of);\r\n\r\n let company = userInfo.company\r\n\r\n // const departments = {\r\n // 'Graphic Design & Digital Communication' : 'blue',\r\n // 'Human Resources' : 'green'\r\n // };\r\n\r\n // function saveEvents () {\r\n \r\n // }\r\n \r\n\r\n useEffect(()=> {\r\n if(user === 'salvador.escalona' || user === 'jose.mogollon') {\r\n axiosHR.get('/pto-list-all/')\r\n .then(respuesta => {\r\n // console.log(respuesta.data.data[0].day_beginning)\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n savePtoEvents(PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n } else if (manager === true || manager === 1){\r\n\r\n axiosHR.get(`/pto-list-all-manager/${company}`)\r\n .then(respuesta => {\r\n console.log(respuesta.data)\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n savePtoEvents(PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n }else {\r\n \r\n director_of.forEach(element => {\r\n \r\n \r\n \r\n axiosHR.get(`/pto-list-all-department/${element.department}`)\r\n .then(respuesta => {\r\n console.log(respuesta);\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n\r\n savePtoEvents(ptoEvents.concat(PtoEventsArray));\r\n \r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n });\r\n }\r\n\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n }, [])\r\n\r\n // let ejemplo = [\r\n // {\r\n // title: 'PTO Julio Castro', \r\n // date:'2019-10-22'\r\n // },\r\n // {\r\n // title: 'PTO Vane Medina', \r\n // start: '2019-10-23', \r\n // end: '2019-10-23',\r\n // extendedProps: {\r\n // department: 'Graphic Design & Digital Communication'\r\n // },\r\n // description: 'PTO Request description'\r\n // }\r\n //] \r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{'Company Departments'}

\r\n \r\n
\r\n
\r\n
\r\n {departments.map((department, index) =>(\r\n
\r\n
{department.department}\r\n
\r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {\r\n // PtoEvents.map(pto =>(\r\n // console.log(pto)\r\n // ))\r\n \r\n }\r\n {window.innerWidth > 768 \r\n ?\r\n \r\n\r\n :\r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default PtoCalendar;","import React, {useEffect, useState, Fragment, useRef} from 'react';\r\nimport FullCalendar from '@fullcalendar/react'\r\nimport dayGridPlugin from '@fullcalendar/daygrid'\r\nimport moment from 'moment';\r\n\r\nimport axiosHR from '../config/axiosHR';\r\n\r\nimport { useDispatch } from 'react-redux';\r\nimport {useSelector} from 'react-redux';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n\r\n// import PtoCalendarExpanded from './PtoCalendarExpanded';\r\n// import {Link} from 'react-router-dom';\r\n\r\nconst PtoYearCalendar = ({history}) => {\r\n\r\n const dispatch = useDispatch();\r\n\r\n const[ptoEvents, savePtoEvents] = useState([]);\r\n const [year, setYear] = useState(moment().format('YYYY'))\r\n let PtoEventsArray = [];\r\n\r\n const user = useSelector(state=>state.userInfo.userInfo.username);\r\n const manager = useSelector(state=>state.userInfo.userInfo.manager);\r\n const department = useSelector(state=>state.userInfo.userInfo.department);\r\n const userInfo = useSelector(state=> state.userInfo.userInfo)\r\n\r\n let company = userInfo.company\r\n\r\n let januaryRef = React.createRef()\r\n let februaryRef = React.createRef()\r\n let marchRef = React.createRef()\r\n let aprilRef = React.createRef()\r\n let mayRef = React.createRef()\r\n let juneRef = React.createRef()\r\n let julyRef = React.createRef()\r\n let augustRef = React.createRef()\r\n let septemberRef = React.createRef()\r\n let octoberRef = React.createRef()\r\n let novemberRef = React.createRef()\r\n let decemberRef = React.createRef()\r\n\r\n // const departments = {\r\n // 'Graphic Design & Digital Communication' : 'blue',\r\n // 'Human Resources' : 'green'\r\n // };\r\n\r\n // function saveEvents () {\r\n \r\n // }\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n return el.department.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n let departmentSupervisorFilter = filterElementsByDepartment(departments, department);\r\n let director_of = JSON.parse(departmentSupervisorFilter[0].director_of);\r\n \r\n const previousYear = () => {\r\n\r\n //console.log(moment(year+'-01-01').subtract(1, 'years'))\r\n console.log(year);\r\n setYear(moment(year+'-01-01').subtract(1, 'years').format('YYYY'));\r\n\r\n januaryRef.current.getApi().prevYear();\r\n februaryRef.current.getApi().prevYear();\r\n marchRef.current.getApi().prevYear();\r\n aprilRef.current.getApi().prevYear();\r\n mayRef.current.getApi().prevYear();\r\n juneRef.current.getApi().prevYear();\r\n julyRef.current.getApi().prevYear();\r\n augustRef.current.getApi().prevYear();\r\n septemberRef.current.getApi().prevYear();\r\n octoberRef.current.getApi().prevYear();\r\n novemberRef.current.getApi().prevYear();\r\n decemberRef.current.getApi().prevYear();\r\n }\r\n\r\n const nextYear = () => {\r\n\r\n //console.log(moment(year+'-01-01').subtract(1, 'years'))\r\n console.log(year);\r\n setYear(moment(year+'-01-01').add(1, 'years').format('YYYY'));\r\n\r\n januaryRef.current.getApi().nextYear();\r\n februaryRef.current.getApi().nextYear();\r\n marchRef.current.getApi().nextYear();\r\n aprilRef.current.getApi().nextYear();\r\n mayRef.current.getApi().nextYear();\r\n juneRef.current.getApi().nextYear();\r\n julyRef.current.getApi().nextYear();\r\n augustRef.current.getApi().nextYear();\r\n septemberRef.current.getApi().nextYear();\r\n octoberRef.current.getApi().nextYear();\r\n novemberRef.current.getApi().nextYear();\r\n decemberRef.current.getApi().nextYear();\r\n }\r\n \r\n \r\n\r\n useEffect(()=> {\r\n if(user === 'salvador.escalona' || user === 'jose.mogollon') {\r\n axiosHR.get('/pto-list-all/')\r\n .then(respuesta => {\r\n // console.log(respuesta.data.data[0].day_beginning)\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n savePtoEvents(PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n } else if (manager === true || manager === 1){\r\n\r\n axiosHR.get(`/pto-list-all-manager/${company}`)\r\n .then(respuesta => {\r\n console.log(respuesta.data)\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n savePtoEvents(PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n }else {\r\n\r\n director_of.forEach(element => {\r\n \r\n \r\n \r\n axiosHR.get(`/pto-list-all-department/${element.department}`)\r\n .then(respuesta => {\r\n console.log(respuesta);\r\n respuesta.data.data.map((pto, index) => \r\n pto.status !== 'Denied'\r\n ?\r\n PtoEventsArray.push({ title: pto.employee_name + ' ' + pto.status, start: pto.day_beginning, end: pto.day_end, url:`/employee/view/${pto.user_id}`, color:pto.color})\r\n :\r\n null\r\n \r\n )\r\n\r\n savePtoEvents(ptoEvents.concat(PtoEventsArray));\r\n \r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n\r\n \r\n });\r\n \r\n \r\n }\r\n\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n console.log(ptoEvents)\r\n }, [])\r\n\r\n // let ejemplo = [\r\n // {\r\n // title: 'PTO Julio Castro', \r\n // date:'2019-10-22'\r\n // },\r\n // {\r\n // title: 'PTO Vane Medina', \r\n // start: '2019-10-23', \r\n // end: '2019-10-23',\r\n // extendedProps: {\r\n // department: 'Graphic Design & Digital Communication'\r\n // },\r\n // description: 'PTO Request description'\r\n // }\r\n //] \r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{'Company Departments'}

\r\n \r\n
\r\n
\r\n
\r\n \r\n {departments.map((department, index) =>(\r\n
\r\n
{department.department}\r\n
\r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Current Year: {`${year}`}

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = '2022-01-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n \r\n }\r\n }\r\n \r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'} \r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-02-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-03-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-04-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-05-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-06-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-07-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-08-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-09-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n {\r\n var month = year+'-10-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-11-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n var month = year+'-12-01'\r\n return(\r\n history.push(`/pto/calendar/${month}`)\r\n )\r\n }\r\n }\r\n }\r\n }\r\n header={{left: 'title',\r\n center: '',\r\n right: 'openMonth' \r\n }}\r\n height= {.5}\r\n aspectRatio = {1}\r\n timeZone= {'America/Chicago'}\r\n />\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default PtoYearCalendar;","import React, {useEffect} from 'react';\r\nimport PtoSupervisor from './PtoSupervisor';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {getPtoListSupervisorDirector} from '../actions/timeoffrequestActions';\r\nimport {obtenerUsuarioBalanceHorasDirector} from '../actions/authenticateActions';\r\nconst Director = ({history}) => {\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n if(userInfo.userInfo.name === undefined){\r\n history.push('/home');\r\n }\r\n \r\n // Mandar llamar la accion principal para retornar los PTO\r\n\r\n const dispatch = useDispatch();\r\n const ptoList = useSelector(state => state.ptoList.ptoSupervisor);\r\n\r\n useEffect(()=> {\r\n \r\n const loadPtoList = ()=> dispatch(getPtoListSupervisorDirector(userInfo.userInfo.uid));\r\n loadPtoList();\r\n \r\n const loadUsers = ()=>dispatch(obtenerUsuarioBalanceHorasDirector());\r\n loadUsers();\r\n\r\n },[dispatch, userInfo.userInfo.department, ptoList.length, userInfo.userInfo.uid]);\r\n \r\n \r\n \r\n \r\n return (\r\n \r\n \r\n

TIME OFF REQUEST

\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Supervisor Request

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n (ptoList !== undefined)\r\n ?\r\n ptoList.map(pto =>(\r\n \r\n ))\r\n : null\r\n \r\n }\r\n \r\n \r\n
EmployeeDepartmentStatusCreated AtReasonHoursActions
\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\nexport default Director;","import React, {useState, useEffect, useRef} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport {createNewPtoAction} from '../actions/timeoffrequestActions';\r\nimport {ajustarBalanceHoras} from '../actions/authenticateActions';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\n// library\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport axiosHr from '../config/axiosHR';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\nconst NewPtoHr = ({match, history}) => {\r\n\r\n // obtener el ID a editar\r\n const { emp_uid } = match.params;\r\n\r\n var holidaysArray = ['04-02-2021', '05-31-2021', '07-05-2021', '09-06-2021', '11-25-2021', '11-26-2021', '12-23-2021', '12-24-2020', '01-01-2021', '01-01-2022', '04-15-2022', '05-30-2022', '07-04-2022', '09-05-2022', '11-24-2022', '11-25-2022', '12-23-2022', '12-26-2022', '01-02-2023', '04-07-2023', '07-04-2023', '05-29-2023', '09-04-2023', '11-23-2023', '11-24-2023', '12-22-2023', '12-25-2023', '01-01-2024', '03-29-2024', '05-27-2024', '07-04-2024', '09-02-2024', '11-28-2024', '11-29-2024', '12-24-2024', '12-25-2024', '01-01-2025', '04-18-2025', '05-26-2025', '07-04-2025', '09-01-2025', '11-27-2025', '11-28-2025', '12-24-2025', '12-25-2025', '01-01-2026'];\r\n\r\n var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\"), new Date(\"2025-04-18T12:00:00-00:00\"), new Date(\"2025-07-04T12:00:00-00:00\"), new Date(\"2025-09-01T12:00:00-00:00\"), new Date(\"2025-11-27T12:00:00-00:00\"), new Date(\"2025-11-28T12:00:00-00:00\"), new Date(\"2025-12-24T12:00:00-00:00\"), new Date(\"2025-12-25T12:00:00-00:00\"), new Date(\"2026-01-01T12:00:00-00:00\")];\r\n \r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n workingWeekdays: [1, 2, 3, 4, 5],\r\n holidays: holidaysArray,\r\n holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // get data from state\r\n const error = useSelector((state) => state.error.error);\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n const usersHour = useSelector(state=>state.manager.employees);\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n // get user general data\r\n const employeeData = usersHour.filter(user => user.uid == emp_uid);\r\n\r\n // agregar balance de horas\r\n const balanceHorasActual = employeeData[0];\r\n\r\n const supervisor = employeeData[0].supervisor;\r\n\r\n const supervisorEmail = employeeData[0].supervisor_mail;\r\n\r\n const email = employeeData[0].email;\r\n\r\n // state\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [reason, saveReason] = useState('');\r\n const [dayBegining, saveDayBeginning] = useState('');\r\n const [dayEnd, saveDayEnd] = useState('');\r\n const [timeBeginning, saveTimeBeginning] = useState('');\r\n const [timeEnd, saveTimeEnd] = useState('');\r\n const [totalHours, saveTotalHours] = useState('');\r\n const [absenceCode, saveAbsenceCode] = useState('');\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState(new Date());\r\n const [uid, saveUid] = useState('');\r\n const [hourValidationError, saveHourValidationError] = useState('');\r\n const [dateValidationError, saveDateValidationError] = useState('');\r\n const [departmentColor, saveDepartmentColor] = useState('');\r\n const [carryOver, saveCarryOver] = useState('');\r\n const [availableHours, saveAvailableHours] = useState('');\r\n const [carryOverUsage, saveCarryOverUsage] = useState('');\r\n const [specialCodePlus, saveSpecialCodePlus] = useState(0);\r\n const [sickHours, saveSickHours] = useState('');\r\n const [sickHoursUsage, saveSickHoursUsage] = useState('');\r\n const [carryOverSickHours, saveCarryOverSickHours] = useState('');\r\n const [carryOverSickHoursUsage, saveCarryOverSickHoursUsage] = useState('');\r\n //const [signatureSupervisor, saveSignatureSupervisor] = useState('');\r\n\r\n \r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n \r\n // Time Refs\r\n const dayBeginingRef = useRef('');\r\n const dayEndRef = useRef('');\r\n const timeBeginningRef = useRef('');\r\n const timeEndRef = useRef('');\r\n const carryOverRef = useRef('');\r\n const specialCodeRef = useRef('');\r\n const sickHoursRef = useRef('');\r\n const carryOverSickHoursRef = useRef('');\r\n \r\n\r\n // canvas\r\n \r\n let sigPadEmployee = {};\r\n const clearEmployee = (e) => {\r\n e.preventDefault();\r\n sigPadEmployee.clear();\r\n }\r\n const saveCanvasEmployee = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureEmployee(urlImage);\r\n }\r\n\r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveReason(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeReasonCode = (value) => {\r\n console.log(timeBeginningRef.current.props.disabled);\r\n dayBeginingRef.current.clear();\r\n dayEndRef.current.clear();\r\n saveAbsenceCode(value);\r\n if(value === 'V') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'PT') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'S') {\r\n saveSpecialCodePlus(0);\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n specialCodeRef.current.value = '';\r\n }\r\n if(value === 'O') {\r\n saveSpecialCodePlus(0);\r\n specialCodeRef.current.disabled = false;\r\n if(totalHours < 0) {\r\n saveTotalHours(0);\r\n }\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true; \r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n }else {\r\n specialCodeRef.current.disabled = true;\r\n }\r\n if(value ==='J') {\r\n saveSpecialCodePlus(0);\r\n // saveTotalHours(totalHours - 40);\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='B1') {\r\n saveSpecialCodePlus(0);\r\n // saveTotalHours(totalHours - 8)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n }\r\n if(value ==='B2') {\r\n saveSpecialCodePlus(0);\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='B3') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 40)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='NB') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='NBCSI') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='VT') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = false;\r\n timeEndRef.current.input.disabled = false;\r\n }\r\n if(value ==='M') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 24)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='MA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='LA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='LTD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='STD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='FFCRA') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n if(value ==='MD') {\r\n saveSpecialCodePlus(0)\r\n // saveTotalHours(totalHours - 480)\r\n specialCodeRef.current.disabled = false;\r\n timeBeginningRef.current.clear();\r\n timeEndRef.current.clear();\r\n timeBeginningRef.current.input.disabled = true;\r\n timeEndRef.current.input.disabled = true;\r\n }\r\n \r\n }\r\n\r\n // let sigPadSupervisor = {};\r\n // const clearSupervisor = (e) => {\r\n // e.preventDefault();\r\n // sigPadSupervisor.clear();\r\n // }\r\n\r\n // const saveCanvasSupervisor = (e)=> {\r\n // e.preventDefault();\r\n // let urlImage = sigPadSupervisor.getTrimmedCanvas().toDataURL('image/png');\r\n // saveSignatureSupervisor(urlImage);\r\n // }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const agregarPto = (pto) => dispatch (createNewPtoAction(pto));\r\n const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n const validarFormulario = () => dispatch( validarFormularioAction());\r\n const exitoValidacion = () => dispatch( validacionExito() ) ;\r\n const errorValidacion = () => dispatch( validacionError() ) ;\r\n\r\n\r\n useEffect( ()=>{\r\n\r\n if(employeeData[0].employee_name !== undefined || employeeData[0].supervisor !== undefined || employeeData[0] !== undefined){\r\n saveEmployeeName(employeeData[0].employee_name+' '+employeeData[0].employee_lastname);\r\n saveCarryOver(parseInt(balanceHorasActual.carry_over));\r\n saveSickHours(parseInt(balanceHorasActual.sick_days_limit));\r\n saveCarryOverSickHours(parseInt(balanceHorasActual.carry_over_sick_time));\r\n saveAvailableHours(balanceHorasActual.available_hours);\r\n } else {\r\n history.push('/home');\r\n }\r\n\r\n if(employeeData[0].department !== undefined) {\r\n saveDepartment(employeeData[0].department);\r\n let departmentFilter = filterDepartment(departments, employeeData[0].department);\r\n console.log(departmentFilter)\r\n saveDepartmentColor(departmentFilter[0].color);\r\n }\r\n\r\n if(employeeData[0].uid !== undefined) {\r\n saveUid(employeeData[0].uid);\r\n }\r\n\r\n //saveTotalHours('0');\r\n let rangeBeginning = moment(dayBegining);\r\n let rangeEnd = moment(dayEnd);\r\n let rangeHourBeginning = moment(timeBeginning, 'HH:mm');\r\n let rangeHourEnd = moment(timeEnd, 'HH:mm');\r\n let totalAmount, hourPerDay;\r\n let launchTimeBeginning = moment('14:00:00', 'HH:mm');\r\n let launchTimeEnd = moment('15:00:00', 'HH:mm');\r\n let laborTimeBeginning = moment('08:00:00', 'HH:mm');\r\n let laborTimeEnd = moment('23:00:00', 'HH:mm');\r\n if(rangeBeginning._locale._invalidDate === '' && rangeEnd._locale._invalidDate === '') {\r\n \r\n return\r\n }else {\r\n \r\n let subtractDays, subtractHours;\r\n\r\n\r\n if(rangeBeginning._locale._invalidDate === 'Invalid date' && rangeEnd._locale._invalidDate === 'Invalid date') {\r\n subtractHours = 0;\r\n }\r\n \r\n if ((rangeHourBeginning.isBetween(laborTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeEnd, laborTimeEnd)) || (rangeHourBeginning.isBetween(launchTimeBeginning, launchTimeEnd) && rangeHourEnd.isBetween(launchTimeBeginning, launchTimeEnd))) {\r\n subtractHours = (moment.duration(rangeHourEnd - rangeHourBeginning).asHours()) - 1;\r\n }else {\r\n subtractHours = moment.duration(rangeHourEnd - rangeHourBeginning).asHours();\r\n }\r\n //subtractHours = rangeHourEnd.diff(rangeHourBeginning);\r\n //subtractDays = rangeEnd.diff(rangeBeginning, 'hours');\r\n \r\n //subtractDays = moment.duration(rangeEnd - rangeBeginning).asDays();\r\n if(rangeBeginning.format('YYYY-MM-DD') === rangeEnd.format('YYYY-MM-DD')) {\r\n \r\n\r\n // if(absenceCode === 'B1') {\r\n // subtractDays = rangeEnd.businessDiff(rangeBeginning) + 1;\r\n // }else {\r\n // subtractDays = rangeEnd.businessDiff(rangeBeginning);\r\n // }\r\n subtractDays = (rangeEnd.businessDiff(rangeBeginning));\r\n \r\n }else {\r\n subtractDays = rangeEnd.businessDiff(rangeBeginning) + 1;\r\n }\r\n \r\n hourPerDay = (subtractDays * 8);\r\n\r\n // console.log(subtractDays);\r\n \r\n if(isNaN(subtractHours) && !isNaN(hourPerDay)) {\r\n // saveTotalHours(Math.round(hourPerDay - specialCodePlus));\r\n saveTotalHours(Math.round(hourPerDay));\r\n }else if(isNaN(hourPerDay) && isNaN(subtractHours)) {\r\n saveTotalHours(0);\r\n }else {\r\n\t\t totalAmount = parseInt(hourPerDay) + parseInt(Math.round(subtractHours));\r\n // saveTotalHours(totalAmount - specialCodePlus);\r\n saveTotalHours(totalAmount);\r\n }\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA' || absenceCode === 'LTD' || absenceCode === 'STD' || absenceCode === 'MD') {\r\n // totalAmount = 0;\r\n // saveTotalHours(0);\r\n totalAmount = parseInt(hourPerDay);\r\n saveTotalHours(totalAmount);\r\n saveSpecialCodePlus(totalAmount);\r\n }\r\n\r\n // if(rangeBeginning.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < moment().format('YYYY-MM-DD') || rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n if(rangeEnd.format('YYYY-MM-DD') < rangeBeginning.format('YYYY-MM-DD')) {\r\n saveTotalHours(0);\r\n saveDateValidationError(true);\r\n }else {\r\n saveDateValidationError(false);\r\n }\r\n \r\n \r\n }\r\n\r\n let carryOverSum, sumAvailableHours, sickHoursSum, carryOverSickSum = 0;\r\n //console.log(availableHours);\r\n if(employeeData[0].carryOver !== undefined || employeeData[0].carryOver !== 0 ||employeeData[0].carryOver !== '') {\r\n let carryoverInit = balanceHorasActual.carry_over;\r\n let sickHoursInit = balanceHorasActual.sick_days_limit;\r\n let carryoversickInit = balanceHorasActual.carry_over_sick_time;\r\n if (totalHours !== '' || totalHours !== undefined) {\r\n if(specialCodePlus !== 0) {\r\n // carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) + parseInt(specialCodePlus));\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours) + specialCodePlus);\r\n }else {\r\n carryOverSum = (parseInt(carryoverInit) - parseInt(totalHours));\r\n }\r\n if(absenceCode === 'S') {\r\n carryOverSickSum = (parseInt(carryoversickInit) -parseInt(totalHours));\r\n\r\n sickHoursSum = ((parseInt(sickHoursInit) + parseInt(carryoversickInit)) - parseInt(totalHours));\r\n\r\n // sickHoursSum = (parseInt(sickHoursInit) - parseInt(totalHours));\r\n\r\n saveCarryOver(Math.round(carryoverInit));\r\n carryOverRef.current.value = carryoverInit;\r\n saveCarryOverUsage(0);\r\n\r\n if(!isNaN(carryOverSickSum)) {\r\n if(carryOverSickSum >= 0) {\r\n if(carryOverSickSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n// saveCarryOverSickHoursUsage(carryoversickInit)\r\n saveCarryOverSickHoursUsage(Math.round(carryoversickInit));\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n }else {\r\n saveCarryOverSickHours(Math.round(carryOverSickSum));\r\n carryOverSickHoursRef.current.value = carryOverSickSum;\r\n saveCarryOverSickHoursUsage(carryoversickInit - carryOverSickSum);\r\n }\r\n\r\n }else {\r\n\r\n if(!isNaN(sickHoursSum)) {\r\n if(sickHoursSum < 0) {\r\n carryOverSickHoursRef.current.value = '0';\r\n sickHoursRef.current.value = '0';\r\n saveSickHoursUsage(sickHoursInit)\r\n saveSickHoursUsage(Math.round(sickHoursSum));\r\n }else {\r\n carryOverSickHoursRef.current.value = '0';\r\n saveSickHours(Math.round(sickHoursSum));\r\n sickHoursRef.current.value = sickHoursSum;\r\n saveSickHoursUsage(sickHoursInit- sickHoursSum);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n } else {\r\n saveSickHours(sickHoursInit);\r\n saveSickHoursUsage(0)\r\n saveCarryOverSickHours(carryoversickInit);\r\n saveCarryOverSickHoursUsage(0);\r\n sickHoursRef.current.value = sickHoursInit;\r\n // console.log(carryoverInit + \" - \" + totalHours + \" = \" + carryOverSum);\r\n if(!isNaN(carryOverSum)) {\r\n if(carryOverSum < 0 ) {\r\n let availableHoursInit = balanceHorasActual.available_hours\r\n // sumAvailableHours = availableHoursInit + carryOverSum + specialCodePlus\r\n sumAvailableHours = availableHoursInit + carryOverSum\r\n //console.log(sumAvailableHours);\r\n saveAvailableHours(sumAvailableHours);\r\n }\r\n if(carryOverSum < 0) {\r\n carryOverRef.current.value = '0';\r\n saveCarryOverUsage(carryoverInit);\r\n saveCarryOver(Math.round(carryOverSum));\r\n }else {\r\n saveCarryOver(Math.round(carryOverSum));\r\n carryOverRef.current.value = carryOverSum;\r\n saveCarryOverUsage(carryoverInit - carryOverSum);\r\n \r\n }\r\n }\r\n //console.log(\"carry Over =\", carryOverSum);\r\n }\r\n }\r\n \r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(balanceHorasActual.carry_over) + parseInt(balanceHorasActual.sick_days_limit)+ parseInt(balanceHorasActual.carry_over_sick_time)) {\r\n saveHourValidationError(true);\r\n //saveTotalHours(0);\r\n }else {\r\n saveHourValidationError(false);\r\n } \r\n\r\n }, [employeeData, dayBegining, dayEnd, timeBeginning, timeEnd, dispatch, userInfo, totalHours, balanceHorasActual.available_hours, history, carryOver, balanceHorasActual.carry_over, specialCodePlus])\r\n \r\n // Add new PTO\r\n const submitNewPto = e => {\r\n e.preventDefault();\r\n validarFormulario();\r\n if (parseInt(totalHours) > (parseInt(balanceHorasActual.sick_days_limit) + parseInt(balanceHorasActual.carry_over_sick_time)) && absenceCode === 'S') {\r\n saveHourValidationError(true);\r\n // errorValidacion();\r\n //saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n }\r\n if(employeeName.trim() === ''|| department.trim() === '' || totalHours < 0 || absenceCode.trim() === '' || signatureEmployee.trim() === '') {\r\n errorValidacion();\r\n return\r\n }\r\n\r\n exitoValidacion();\r\n\r\n let absenceText;\r\n if(absenceCode ==='V') { \r\n absenceText = 'Vacation'\r\n }\r\n if(absenceCode ==='LA') {\r\n absenceText = 'Leave of Absence'\r\n }\r\n if(absenceCode ==='LTD') {\r\n absenceText = 'Long Term Disability'\r\n }\r\n if(absenceCode ==='STD') {\r\n absenceText = 'Short Term Disability'\r\n }\r\n if(absenceCode ==='PT') { \r\n absenceText = 'Personal Time'\r\n }\r\n if(absenceCode ==='S') {\r\n absenceText = 'Sick'\r\n }\r\n if(absenceCode ==='J') {\r\n absenceText = 'Jury Duty'\r\n }\r\n if(absenceCode ==='B1') {\r\n absenceText = 'Bereavement 1'\r\n }\r\n if(absenceCode ==='B2') {\r\n absenceText = 'Bereavement 2'\r\n }\r\n if(absenceCode ==='B3') {\r\n absenceText = 'Bereavement 3'\r\n }\r\n if(absenceCode ==='NB') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(absenceCode ==='NBCSI') {\r\n absenceText = 'New Baby Born'\r\n }\r\n if(absenceCode ==='M') {\r\n absenceText = 'Marriage'\r\n }\r\n if(absenceCode ==='MA') {\r\n absenceText = 'Maternity'\r\n }\r\n if(absenceCode ==='O') {\r\n absenceText = 'Other'\r\n }\r\n if(absenceCode ==='FFCRA') {\r\n absenceText = 'FFCRA (Emergency Sick Time)'\r\n }\r\n if(absenceCode ==='VT') {\r\n absenceText = 'Vote'\r\n }\r\n\r\n if(absenceCode ==='MD') {\r\n absenceText = 'Medical Disability'\r\n }\r\n\r\n if (parseInt(totalHours) > parseInt(balanceHorasActual.available_hours) + parseInt(employeeData[0].carryOver)) {\r\n saveHourValidationError(true);\r\n // saveTotalHours(0);\r\n dayBeginingRef.current.value = '';\r\n dayEndRef.current.value = '';\r\n // timeBeginningRef.current.value = '';\r\n // timeEndRef.current.value = '';\r\n // dayBeginingRef.current.focus();\r\n // saveDayBeginning('');\r\n // saveDayEnd('');\r\n // saveTimeBeginning('');\r\n // saveTimeEnd('');\r\n return\r\n \r\n }else {\r\n saveHourValidationError(false);\r\n \r\n }\r\n\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + '

' +\r\n '

Department : ' + department + '

' +\r\n // '

Reason : ' + reason + '

' +\r\n '

Total Hours: ' + totalHours + '

' +\r\n '

Absence Code: ' + absenceText + '

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n let rangeBeginning = moment(dayBegining).format('YYYY-MM-DD');\r\n let rangeEnd = moment(dayEnd).format('YYYY-MM-DD');\r\n let rangeHourBeginning = moment(timeBeginning).format('HH:mm');\r\n let rangeHourEnd = moment(timeEnd).format('HH:mm');\r\n let dateSignature = moment(dateSignEmployee).format('YYYY-MM-DD');\r\n const hrPto = true;\r\n\r\n if(rangeHourBeginning === 'Invalid date' || rangeHourEnd === 'Invalid date') {\r\n rangeHourBeginning = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n rangeHourEnd = moment(\"1200\", \"hmm\").format(\"HH:mm\");\r\n }\r\n const company = employeeData[0].company;\r\n\r\n\r\n agregarPto({\r\n employeeName,\r\n department,\r\n reason,\r\n rangeBeginning,\r\n rangeEnd,\r\n rangeHourBeginning,\r\n rangeHourEnd,\r\n totalHours,\r\n absenceCode,\r\n signatureEmployee,\r\n dateSignature,\r\n uid,\r\n supervisor,\r\n departmentColor,\r\n email,\r\n carryOverUsage,\r\n sickHoursUsage,\r\n carryOverSickHoursUsage,\r\n hrPto,\r\n supervisorEmail,\r\n company\r\n });\r\n\r\n // let carryOverZero;\r\n\r\n // if(carryOver < 0) {\r\n // carryOverZero = 0;\r\n // }else {\r\n // carryOverZero = carryOver;\r\n // }\r\n\r\n let carryOverZero, sickHoursZero, carryOverSickZero ;\r\n\r\n if(carryOver < 0) {\r\n carryOverZero = 0;\r\n }else {\r\n carryOverZero = carryOver;\r\n }\r\n\r\n if(sickHours < 0) {\r\n sickHoursZero = 0;\r\n }else {\r\n sickHoursZero = sickHours;\r\n }\r\n\r\n if(carryOverSickHours < 0) {\r\n carryOverSickZero = 0\r\n }else {\r\n carryOverSickZero = carryOverSickHours;\r\n }\r\n\r\n let termDisabilityWeeks = totalHours / 40\r\n let termDisabilityHours = Math.floor(termDisabilityWeeks) *2\r\n\r\n console.log(termDisabilityWeeks, termDisabilityHours)\r\n// modificar las horas del usuario esto debe ser temporal\r\n\r\n // balanceHoras({\r\n // available_hours: parseInt(availableHours),\r\n // requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n // total_requests: balanceHorasActual.total_requests + 1,\r\n // carry_over: carryOverZero,\r\n // sick_hours_limit: sickHoursZero,\r\n // carry_over_sick_time: carryOverSickZero,\r\n // increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n // typeBalance: 'false',\r\n // uid : uid\r\n // });\r\n\r\n // original pto hr.\r\n\r\n // let data = {\r\n // uid : uid,\r\n // hours_before_mov:parseInt(employeeData[0].available_hours),\r\n // hours_after_mov:parseInt(employeeData[0].available_hours),\r\n // hours_mov: parseInt(totalHours),\r\n // carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n // carry_over_after_mov:parseInt(employeeData[0].carry_over),\r\n // carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n // carry_over_sick_time_after:parseInt(employeeData[0].carry_over_sick_time),\r\n // observations: 'New H.R PTO ' + absenceText,\r\n // type_mov: 'New H.R. PTO',\r\n // date_mov: moment().format('YYYY-MM-DD'),\r\n // mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n // mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n // increase_date_before_mov:moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n // yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n // }\r\n // 2nd attempt\r\n let data = {\r\n uid : uid,\r\n hours_before_mov:parseInt(employeeData[0].available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New H.R. PTO ' + absenceText,\r\n type_mov: 'New H.R. PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n }\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA' || absenceCode === 'STD' || absenceCode === 'LTD' || absenceCode === 'MA' ) {\r\n\r\n \r\n\r\n\r\n balanceHoras({\r\n available_hours: parseInt(availableHours) - parseInt(termDisabilityHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: rangeEnd,\r\n typeBalance: true,\r\n uid : uid\r\n });\r\n // }\r\n }else {\r\n balanceHoras({\r\n available_hours: parseInt(availableHours),\r\n requested_hours: parseInt(balanceHorasActual.requested_hours) + parseInt(totalHours),\r\n total_requests: balanceHorasActual.total_requests + 1,\r\n carry_over: carryOverZero,\r\n sick_hours_limit: sickHoursZero,\r\n carry_over_sick_time: carryOverSickZero,\r\n increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n typeBalance: 'false',\r\n uid : uid\r\n });\r\n }\r\n\r\n if(absenceCode === 'S') {\r\n let data = {\r\n uid : uid,\r\n hours_before_mov:parseInt(employeeData[0].sick_days_limit),\r\n hours_after_mov:parseInt(sickHoursZero),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n else {\r\n\r\n if(absenceCode === 'LA' || absenceCode === 'FFCRA' || absenceCode === 'LTD' || absenceCode === 'STD' || absenceCode === 'MA') {\r\n let data = {\r\n uid : uid,\r\n hours_before_mov:parseInt(employeeData[0].available_hours),\r\n hours_after_mov:parseInt(availableHours) - parseInt(termDisabilityHours),\r\n hours_mov: parseInt(termDisabilityHours),\r\n carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:rangeEnd,\r\n yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n // }else {\r\n // axiosHr.post('/hour-movement-log', data)\r\n // .then(respuesta => {\r\n // console.log(respuesta)\r\n // })\r\n // .catch(error => {\r\n // console.log(error)\r\n // });\r\n }else {\r\n let data = {\r\n uid : uid,\r\n hours_before_mov:parseInt(employeeData[0].available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: parseInt(totalHours),\r\n carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n carry_over_after_mov:carryOverZero,\r\n carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n carry_over_sick_time_after:parseInt(carryOverSickZero),\r\n observations: 'New PTO ' + absenceText,\r\n type_mov: 'New PTO',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n \r\n }\r\n \r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n {\r\n employeeData[0].company !== 'CSI'\r\n ?\r\n employeeData[0] !== undefined\r\n ?\r\n \r\n
\r\n
\r\n
\r\n

Add New Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveTimeBeginning(e.target.value)}\r\n ref={timeBeginningRef}\r\n /> */}\r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeBeginningRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveTimeEnd(e.target.value)}\r\n ref = {timeEndRef}\r\n /> */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(9,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n \r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n {/*
\r\n \r\n
*/}\r\n \r\n {/*
\r\n \r\n \r\n
\r\n
\r\n \r\n {sigPadSupervisor = ref}} />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
*/}\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n \r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n :\r\n null\r\n \r\n :\r\n //CSI FORM\r\n employeeData[0] !== undefined\r\n ?\r\n \r\n
\r\n
\r\n
\r\n

Add New Time Off Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n highlightDates = {excludedDatesArray}\r\n required\r\n >\r\n
Holidays are marked in red color 0
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveTimeBeginning(e.target.value)}\r\n ref={timeBeginningRef}\r\n /> */}\r\n saveTimeBeginning(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(8,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeBeginningRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveTimeEnd(e.target.value)}\r\n ref = {timeEndRef}\r\n /> */}\r\n saveTimeEnd(date)}\r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n minTime= {new Date().setHours(8,0,0,0)}\r\n maxTime = {new Date().setHours(18,0,0,0)}\r\n ref={timeEndRef}\r\n />\r\n
\r\n
\r\n \r\n
\r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n { dateValidationError ?
ERROR: Please select valid date range.
: null }\r\n \r\n { absenceCode === 'J' || absenceCode === 'B1'|| absenceCode === 'B2' || absenceCode === 'B3' || absenceCode === 'NB' || absenceCode === 'M' || absenceCode === 'MA'|| absenceCode === 'VT' || absenceCode === 'NBCSI'\r\n ? \r\n
\r\n
\r\n Please, schedule your excused absence by using {specialCodePlus} hours.\r\n
\r\n
\r\n Employees may use time from their PTO bank in hourly increments.\r\n
\r\n
\r\n : \r\n null \r\n }\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n {\r\n availableHours < 0 || sickHours < 0\r\n ?\r\n
\r\n \r\n \r\n
\r\n :\r\n null\r\n }\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n {/*
\r\n \r\n
*/}\r\n \r\n {/*
\r\n \r\n \r\n
\r\n
\r\n \r\n {sigPadSupervisor = ref}} />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
*/}\r\n \r\n {/*
\r\n \r\n
*/}\r\n \r\n \r\n
\r\n \r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n \r\n { hourValidationError ?
ERROR: Sorry there are no hours available.
: null }\r\n \r\n
\r\n
\r\n
\r\n :\r\n null\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default NewPtoHr;","import React, {useState, useEffect} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { useDispatch } from 'react-redux';\r\nimport {crearUsuario} from '../actions/authenticateActions';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n// library\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport 'react-phone-number-input/style.css'\r\nimport PhoneInput from 'react-phone-number-input'\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport axiosHr from '../config/axiosHR';\r\n\r\nconst NewUser = ({history}) => {\r\n\r\n // var holidaysArray = ['09-02-2019', '11-28-2019', '11-29-2019', '12-24-2019', '12-25-2019', '01-01-2020', '04-10-2020', '05-27-2020', '07-04-2020', '09-02-2020', '11-28-2020', '11-29-2020', '12-24-2020', '12-25-2020', '01-01-2021']\r\n\r\n // var excludedDatesArray = [new Date(\"2019-09-02T12:00:00-00:00\"), new Date(\"2019-11-28T12:00:00-00:00\"), new Date(\"2019-11-29T12:00:00-00:00\"), new Date(\"2019-12-24T12:00:00-00:00\"), new Date(\"2019-12-25T12:00:00-00:00\"), new Date(\"2019-01-01T12:00:00-00:00\"), new Date(\"2020-04-10T12:00:00-00:00\"), new Date(\"2020-05-27T12:00:00-00:00\"),new Date(\"2020-07-04T12:00:00-00:00\"), new Date(\"2020-09-02T12:00:00-00:00\"), new Date(\"2020-11-28T12:00:00-00:00\"), new Date(\"2020-11-29T12:00:00-00:00\"), new Date(\"2020-12-24T12:00:00-00:00\"), new Date(\"2020-12-25T12:00:00-00:00\"), new Date(\"2020-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), ]\r\n \r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n const companyManager = useSelector(state=>state.userInfo.userInfo.company);\r\n\r\n \r\n\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n // console.log(el)\r\n let departmentElement = el.id\r\n return departmentElement === Number(query)\r\n })\r\n }\r\n\r\n const filterDepartmentbyName = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n // workingWeekdays: [1, 2, 3, 4, 5],\r\n // holidays: holidaysArray,\r\n // holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // state\r\n // const [imageProfile, saveImageProfile] = useState('');\r\n const [chooseText, saveChooseText] = useState('Upload Profile Image');\r\n const [imgSrc, saveImgSrc] = useState('./../avatar-placeholder.png');\r\n const [imgPath, saveImgPath] = useState('');\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [employeeLastname, saveEmployeeLastname] = useState('');\r\n const [username, saveUserName] = useState('');\r\n const [company, saveCompany] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [supervisor, saveSupervisor] = useState(false);\r\n const [email, saveEmail] = useState('');\r\n const [emailSupervisor, saveEmailSupervisor] = useState('');\r\n const [uid, saveUid] = useState('');\r\n const [token, saveToken] = useState('');\r\n const [hireDate, saveHireDate] = useState('');\r\n const [sickDays, saveSickDays] = useState('');\r\n const [accruedTimeSick, saveAccruedTimeSick] = useState('');\r\n const [territory, saveTerritory] = useState('');\r\n const [travelBenefits, saveTravelBenefits] = useState(false);\r\n const [idDepartment, saveIdDepartment] = useState('');\r\n const [statesTerritory, saveStatesTerritory] = useState ([]);\r\n const [gender, saveGender] = useState('');\r\n const [parenthood, saveParenthood] = useState(false);\r\n const [workplace, saveWorkplace] = useState('');\r\n const [phone, savePhone] = useState('');\r\n const [birthplace, saveBirthPlace] = useState('');\r\n const [birthdate, saveBirthDate] = useState('');\r\n const[jobTitle, saveJobTitle] = useState('');\r\n\r\n useEffect( () => {\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n axiosHr.get(`/active-states/${companyManager}`).then(resp => {\r\n saveStatesTerritory(resp.data.data)\r\n // console.log(resp);\r\n })\r\n .catch(error => console.log(error));\r\n \r\n \r\n }, [])\r\n \r\n\r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n\r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveEmployeeName(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeLastName = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveEmployeeLastname(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeJobTitle = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveJobTitle(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleCheckTravelBenefits = (value) => {\r\n saveTravelBenefits(!travelBenefits);\r\n }\r\n\r\n const handleDepartmentSelect = (value) => {\r\n\r\n let departmentFilter = filterDepartment(departments, value)\r\n console.log(departmentFilter, value)\r\n saveDepartment(departmentFilter[0].department)\r\n \r\n if(!supervisor) {\r\n saveEmailSupervisor(departmentFilter[0].email_director);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }else {\r\n saveEmailSupervisor(departmentFilter[0].report_to);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }\r\n }\r\n\r\n const handleCheckSupervisor = (value) => {\r\n console.log(department, supervisor, value);\r\n saveSupervisor(!supervisor);\r\n if(!supervisor) {\r\n let departmentFilter = filterDepartmentbyName(departments, value);\r\n saveEmailSupervisor(departmentFilter[0].report_to); \r\n }else {\r\n let departmentFilter = filterDepartmentbyName(departments, value)\r\n saveEmailSupervisor(departmentFilter[0].email_director);\r\n } \r\n \r\n }\r\n\r\n const handleCheckParenthood = (value) => {\r\n saveParenthood(!parenthood)\r\n }\r\n\r\n const fileChangedHandler = (event) => {\r\n const file = event.target.files[0];\r\n // saveImageProfile(file);\r\n saveChooseText(file.name);\r\n saveImgSrc(URL.createObjectURL(file));\r\n // saveImgPath(`./images-directory/${file.name}`);\r\n fileUpload(file);\r\n }\r\n\r\n const fileUpload = (file) => {\r\n\r\n var reader = new FileReader(); // Creating reader instance from FileReader() API\r\n\r\n reader.addEventListener(\"load\", function () { // Setting up base64 URL on image\r\n saveImgPath(reader.result);\r\n }, false);\r\n\r\n reader.readAsDataURL(file); // Converting file into data URL\r\n }\r\n const handleTerritory = (territoryInput) => {\r\n saveTerritory(territoryInput);\r\n\r\n let sick_days_plan = statesTerritory.filter((ele => {\r\n let name = ele.name\r\n console.log(name === territoryInput)\r\n return name === territoryInput;\r\n } ))\r\n // console.log(sick_days_plan[0].sick_days_plan);\r\n\r\n saveAccruedTimeSick(sick_days_plan[0].sick_days_plan);\r\n }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const createUser = (user) => dispatch (crearUsuario(user));\r\n\r\n \r\n // Add new PTO\r\n const submitNewUser = e => {\r\n e.preventDefault();\r\n // validarFormulario();\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + ' '+employeeLastname+'

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n \r\n const formatHireDate = moment(hireDate).format('YYYY-MM-DD');\r\n const formatBirthDate = moment(birthdate).format('YYYY-MM-DD');\r\n createUser({\r\n imgPath,\r\n employeeName,\r\n employeeLastname,\r\n username,\r\n company,\r\n department,\r\n supervisor,\r\n email,\r\n emailSupervisor,\r\n uid,\r\n token,\r\n sickDays,\r\n formatHireDate,\r\n territory,\r\n travelBenefits,\r\n accruedTimeSick,\r\n idDepartment,\r\n gender,\r\n parenthood,\r\n workplace,\r\n formatBirthDate,\r\n birthplace,\r\n jobTitle,\r\n phone\r\n });\r\n\r\n let data = {\r\n uid : uid,\r\n hours_before_mov:0,\r\n hours_after_mov:0,\r\n hours_mov: sickDays,\r\n carry_over_before_mov:0,\r\n carry_over_after_mov:0,\r\n carry_over_sick_time_before:0,\r\n carry_over_sick_time_after:0,\r\n observations: `Create New User Sick Days (hours: ${sickDays})`,\r\n type_mov: 'New User',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment().format('YYYY-MM-DD'),\r\n mov_yearly_increase_date: moment().format('YYYY-MM-DD'),\r\n increase_date_before_mov: moment().format('YYYY-MM-DD'),\r\n yearly_increase_date_before_mov: moment().format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

Create New User

\r\n
\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckParenthood(e.target.value) } \r\n checked= {parenthood}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n saveWorkplace(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveBirthDate(date)}\r\n placeholderText=\"Select birth date\"\r\n // minDate={new Date()}\r\n />\r\n\r\n
\r\n
\r\n\r\n
\r\n \r\n saveBirthPlace(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n\r\n
\r\n \r\n saveUserName(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckSupervisor(department) } \r\n checked= {supervisor}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n saveEmail(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n saveEmailSupervisor(e.target.value) }\r\n value= {emailSupervisor}\r\n required\r\n />\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveUid(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n saveToken(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n saveSickDays(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveHireDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n />\r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n saveAccruedTimeSick(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckTravelBenefits(e.target.value) } \r\n checked= {travelBenefits}\r\n />\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default NewUser;","import React from 'react';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport moment from 'moment';\r\n\r\nconst ViewUser = ({match, history}) => {\r\n\r\n // obtener el ID a editar\r\n const { uid } = match.params;\r\n\r\n const usersHour = useSelector(state=>state.manager.employees);\r\n\r\n // get user general data\r\n const employeeData = usersHour.filter(user => user.uid == uid);\r\n\r\n if(employeeData === undefined) {\r\n history.push('/home');\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

Employee Profile

\r\n
\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveUserName(e.target.value)}\r\n required\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckSupervisor(e.target.value) } \r\n checked= {employeeData[0].supervisor ? true : false}\r\n readOnly\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n saveEmail(e.target.value) }\r\n required\r\n value={employeeData[0].email}\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n saveEmailSupervisor(e.target.value) }\r\n value= {employeeData[0].supervisor_mail}\r\n required\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n saveUid(e.target.value) }\r\n required\r\n value= {employeeData[0].uid}\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n saveToken(e.target.value) }\r\n value= {employeeData[0].token}\r\n required\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n saveDayBeginning(e.target.value)}\r\n required\r\n // ref = {dayBeginingRef}\r\n value = {moment(employeeData[0].hire_date).format('YYYY-MM-DD')}\r\n readOnly\r\n />\r\n {/* saveHireDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray} \r\n /> */}\r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckTravelBenefits(e.target.value) } \r\n checked= {employeeData[0].travel_benefits ? true : false}\r\n readOnly\r\n />\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ViewUser;","import React, {useState, useEffect, useRef} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { useDispatch } from 'react-redux';\r\nimport {editarUsuario} from '../actions/authenticateActions';\r\nimport {obtenerEmpleadosManager, obtenerDepartamentos, obtenerEstadosActivos} from '../actions/manageActions';\r\n// library\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport 'react-phone-number-input/style.css'\r\nimport PhoneInput from 'react-phone-number-input'\r\n\r\nimport { useSelector } from 'react-redux';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport axiosHr from '../config/axiosHR';\r\n\r\nconst EditUser = ({match, history}) => {\r\n\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // obtener el ID a editar\r\n const { uid } = match.params;\r\n\r\n const usersHour = useSelector(state=>state.manager.employees);\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const statesTerritory = useSelector(state=>state.manager.states);\r\n // get user general data\r\n const employeeData = usersHour.filter(user => user.uid == uid);\r\n\r\n const companyManager = useSelector(state=>state.userInfo.userInfo.company);\r\n\r\n if(employeeData === undefined) {\r\n history.push('/home');\r\n }\r\n\r\n const filterDepartmentbyName = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.id\r\n // console.log(el, query)\r\n return departmentElement === Number(query);\r\n })\r\n }\r\n \r\n //console.log(employeeData);\r\n\r\n // var holidaysArray = ['09-02-2019', '11-28-2019', '11-29-2019', '12-24-2019', '12-25-2019', '01-01-2020', '04-10-2020', '05-27-2020', '07-04-2020', '09-02-2020', '11-28-2020', '11-29-2020', '12-24-2020', '12-25-2020', '01-01-2021']\r\n\r\n // var excludedDatesArray = [new Date(\"2019-09-02T12:00:00-00:00\"), new Date(\"2019-11-28T12:00:00-00:00\"), new Date(\"2019-11-29T12:00:00-00:00\"), new Date(\"2019-12-24T12:00:00-00:00\"), new Date(\"2019-12-25T12:00:00-00:00\"), new Date(\"2019-01-01T12:00:00-00:00\"), new Date(\"2020-04-10T12:00:00-00:00\"), new Date(\"2020-05-27T12:00:00-00:00\"),new Date(\"2020-07-04T12:00:00-00:00\"), new Date(\"2020-09-02T12:00:00-00:00\"), new Date(\"2020-11-28T12:00:00-00:00\"), new Date(\"2020-11-29T12:00:00-00:00\"), new Date(\"2020-12-24T12:00:00-00:00\"), new Date(\"2020-12-25T12:00:00-00:00\"), new Date(\"2020-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), ]\r\n \r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n // workingWeekdays: [1, 2, 3, 4, 5],\r\n // holidays: holidaysArray,\r\n // holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // state\r\n // const [imageProfile, saveImageProfile] = useState('');\r\n const [chooseText, saveChooseText] = useState('Upload Profile Image');\r\n const [imgSrc, saveImgSrc] = useState('./../avatar-placeholder.png');\r\n const [imgPath, saveImgPath] = useState('');\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [employeeLastname, saveEmployeeLastname] = useState('');\r\n const [username, saveUserName] = useState('');\r\n const [company, saveCompany] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [availableHours, saveAvailableHours] = useState('');\r\n const [carryOver, saveCarryOver] = useState('');\r\n const [sickDays, saveSickDays] = useState('');\r\n const [supervisor, saveSupervisor] = useState(false);\r\n const [email, saveEmail] = useState('');\r\n const [emailSupervisor, saveEmailSupervisor] = useState('');\r\n const [uidEmployee, saveUid] = useState('');\r\n const [token, saveToken] = useState('');\r\n const [hireDate, saveHireDate] = useState('');\r\n const [lastIncrement, saveLastIncrement] = useState('');\r\n const [accruedTimeSick, saveAccruedTimeSick] = useState('');\r\n const [carryOverSickTime, saveCarryOverSickTime] = useState(0);\r\n const [territory, saveTerritory] = useState('');\r\n const [travelBenefits, saveTravelBenefits] = useState(false);\r\n const [terminated, saveTerminated] = useState(false);\r\n const [terminateDate, saveTerminateDate] = useState(new Date());\r\n const [idDepartment, saveIdDepartment] = useState('');\r\n // const [statesTerritory, saveStatesTerritory] = useState ([]);\r\n const [gender, saveGender] = useState('');\r\n const [parenthood, saveParenthood] = useState(false);\r\n const [workplace, saveWorkplace] = useState('');\r\n const [phone, savePhone] = useState('');\r\n const [birthplace, saveBirthPlace] = useState('');\r\n const [birthdate, saveBirthDate] = useState('');\r\n const[jobTitle, saveJobTitle] = useState('');\r\n const [independetContractor, saveIndependentContractor] = useState(false);\r\n const [insperityEmployeeId, saveInsperityEmployeeId] = useState('');\r\n const [salesTeam, saveSalesTeam] = useState(false);\r\n\r\n const terminatedDateRef = useRef('');\r\n\r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n\r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveEmployeeName(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeLastName = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveEmployeeLastname(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleChangeJobTitle = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveJobTitle(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleCheckTravelBenefits = (value) => {\r\n saveTravelBenefits(!travelBenefits);\r\n }\r\n\r\n const handleCheckTerminate = (value) => {\r\n console.log(value);\r\n var newTerminate = !terminated;\r\n terminatedDateRef.current.hidden = !newTerminate;\r\n saveTerminated(!terminated);\r\n }\r\n\r\n const handleCheckIndependentContractor = (value) => {\r\n console.log(value);\r\n saveIndependentContractor(!independetContractor);\r\n }\r\n\r\n const handleCheckSalesTeam = (value) => {\r\n console.log(value);\r\n saveSalesTeam(!salesTeam);\r\n }\r\n\r\n const getDepartmentId = (value) => {\r\n let departmentFilter;\r\n if(typeof(value) === 'string') {\r\n departmentFilter = filterDepartmentbyName(departments, value)\r\n }else {\r\n departmentFilter = filterDepartment(departments, value)\r\n }\r\n \r\n console.log('valor handle department', typeof(value))\r\n console.log('valor departments para filtrar',departments)\r\n console.log('valor department filtrado',departmentFilter[0].department)\r\n saveDepartment(departmentFilter[0].department)\r\n \r\n if(!supervisor) {\r\n // saveEmailSupervisor(departmentFilter[0].email_director);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }else {\r\n // saveEmailSupervisor(departmentFilter[0].report_to);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }\r\n }\r\n\r\n const handleDepartmentSelect = (value) => {\r\n let departmentFilter;\r\n if(typeof(value) === 'string') {\r\n departmentFilter = filterDepartmentbyName(departments, value)\r\n }else {\r\n departmentFilter = filterDepartment(departments, value)\r\n }\r\n \r\n console.log('valor handle department', typeof(value))\r\n console.log('valor departments para filtrar',departments)\r\n console.log('valor department filtrado',departmentFilter[0].department)\r\n saveDepartment(departmentFilter[0].department)\r\n \r\n if(!supervisor) {\r\n saveEmailSupervisor(departmentFilter[0].email_director);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }else {\r\n saveEmailSupervisor(departmentFilter[0].report_to);\r\n saveIdDepartment(departmentFilter[0].id)\r\n }\r\n }\r\n\r\n const handleCheckSupervisor = (value) => {\r\n console.log(value)\r\n saveSupervisor(!supervisor);\r\n if(!supervisor) {\r\n console.log(departments)\r\n let departmentFilter = filterDepartmentbyName(departments, value)\r\n console.log(departmentFilter);\r\n saveEmailSupervisor(departmentFilter[0].report_to);\r\n }else {\r\n let departmentFilter = filterDepartmentbyName(departments, value)\r\n saveEmailSupervisor(departmentFilter[0].email_director);\r\n }\r\n \r\n }\r\n\r\n const handleCheckParenthood = (value) => {\r\n saveParenthood(!parenthood)\r\n }\r\n\r\n\r\n\r\n const fileChangedHandler = (event) => {\r\n const file = event.target.files[0];\r\n // saveImageProfile(file);\r\n saveChooseText(file.name);\r\n saveImgSrc(URL.createObjectURL(file));\r\n // saveImgPath(`./images-directory/${file.name}`);\r\n fileUpload(file);\r\n }\r\n\r\n const fileUpload = (file) => {\r\n\r\n var reader = new FileReader(); // Creating reader instance from FileReader() API\r\n\r\n reader.addEventListener(\"load\", function () { // Setting up base64 URL on image\r\n saveImgPath(reader.result);\r\n }, false);\r\n\r\n reader.readAsDataURL(file); // Converting file into data URL\r\n }\r\n\r\n if(employeeData[0].username === undefined) {\r\n history.push('./../../home');\r\n }\r\n\r\n const handleTerritory = (territoryInput) => {\r\n\r\n console.log(territoryInput)\r\n \r\n let sick_days_plan = statesTerritory.filter((ele => {\r\n let name = ele.name\r\n console.log(name === territoryInput)\r\n return name === territoryInput;\r\n } ))\r\n console.log(sick_days_plan);\r\n saveTerritory(sick_days_plan[0].name);\r\n saveAccruedTimeSick(sick_days_plan[0].sick_days_plan);\r\n }\r\n\r\n \r\n \r\n useEffect(() => {\r\n\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n const loadStates = ()=> dispatch(obtenerEstadosActivos(companyManager));\r\n loadStates();\r\n \r\n if(employeeData[0].avatar === '')\r\n {\r\n saveImgSrc('./../../../public/avatar-placeholder.png');\r\n }else {\r\n saveImgSrc(employeeData[0].avatar);\r\n saveImgPath(employeeData[0].avatar);\r\n }\r\n\r\n if(employeeData[0].terminate_contract === 1) {\r\n terminatedDateRef.current.hidden = false;\r\n }else {\r\n terminatedDateRef.current.hidden = true;\r\n }\r\n\r\n \r\n saveEmployeeName(employeeData[0].employee_name);\r\n saveEmployeeLastname(employeeData[0].employee_lastname);\r\n saveUserName(employeeData[0].username);\r\n saveCompany(employeeData[0].company);\r\n saveDepartment(employeeData[0].department);\r\n saveSupervisor(employeeData[0].supervisor);\r\n // handleCheckSupervisor(employeeData[0].supervisor);\r\n saveEmail(employeeData[0].email);\r\n saveEmailSupervisor(employeeData[0].supervisor_mail);\r\n saveUid(employeeData[0].uid);\r\n saveToken(employeeData[0].token);\r\n saveAvailableHours(employeeData[0].available_hours);\r\n saveCarryOver(employeeData[0].carry_over);\r\n saveSickDays(employeeData[0].sick_days_limit);\r\n saveHireDate(new Date((moment(employeeData[0].hire_date).utc().format('MM/DD/YYYY'))))\r\n saveLastIncrement(new Date((moment(employeeData[0].increase_date).utc().format('MM/DD/YYYY'))))\r\n //saveTerritory(employeeData[0].territory);\r\n //saveTerritory(handleTerritory(employeeData[0].territory));\r\n saveAccruedTimeSick(employeeData[0].accrued_sick_days);\r\n saveCarryOverSickTime(employeeData[0].carry_over_sick_time);\r\n saveTravelBenefits(employeeData[0].travel_benefits);\r\n saveIndependentContractor(employeeData[0].independent_contractor);\r\n saveSalesTeam(employeeData[0].sales_team);\r\n saveInsperityEmployeeId(employeeData[0].insperity_employee_id);\r\n saveTerminated(employeeData[0].terminate_contract);\r\n savePhone(employeeData[0].phone);\r\n if(employeeData[0].terminate_contract) {\r\n saveTerminateDate(new Date(moment(employeeData[0].date_terminated).utc().format('MM/DD/YYYY')));\r\n }\r\n // handleCheckTravelBenefits(employeeData[0].travel_benefits);\r\n // handleDepartmentSelect(employeeData[0].department);\r\n // if(employeeData[0].supervisor === 0) {\r\n // handleDepartmentSelect(employeeData[0].department);\r\n // }else {\r\n // handleCheckSupervisor(employeeData[0].department);\r\n // }\r\n getDepartmentId(employeeData[0].department);\r\n saveGender(employeeData[0].gender);\r\n saveParenthood(employeeData[0].parenthood);\r\n saveWorkplace(employeeData[0].work_place);\r\n saveBirthPlace(employeeData[0].birth_place);\r\n saveJobTitle(employeeData[0].job_title);\r\n saveBirthDate(new Date((moment(employeeData[0].birth_date).utc().format('MM/DD/YYYY'))))\r\n \r\n // \r\n //handleCheckSupervisor();\r\n if(statesTerritory.length > 0) {\r\n handleTerritory(employeeData[0].territory)\r\n }\r\n \r\n\r\n }, [])\r\n\r\n \r\n \r\n \r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const editUser = (user) => dispatch (editarUsuario(user));\r\n let data = {\r\n reportType:1,\r\n manager: userInfo.userInfo.manager,\r\n companyManager: userInfo.userInfo.company\r\n }\r\n const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n \r\n \r\n // Add new PTO\r\n const submitEditUser = e => {\r\n e.preventDefault();\r\n // validarFormulario();\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + ' '+ employeeLastname+'

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n \r\n const formatHireDate = moment(hireDate).format('YYYY-MM-DD');\r\n const formatLastIncrement = moment(lastIncrement).format('YYYY-MM-DD');\r\n const formatBirthDate = moment(birthdate).format('YYYY-MM-DD');\r\n let formatTerminateDate = '';\r\n if(terminated) {\r\n formatTerminateDate = moment(terminateDate).format('YYYY-MM-DD');\r\n }else {\r\n formatTerminateDate = null;\r\n }\r\n editUser({\r\n imgPath,\r\n employeeName,\r\n employeeLastname,\r\n username,\r\n company,\r\n department,\r\n supervisor,\r\n email,\r\n availableHours,\r\n carryOver,\r\n sickDays,\r\n emailSupervisor,\r\n uidEmployee,\r\n token,\r\n formatHireDate,\r\n formatLastIncrement,\r\n territory,\r\n travelBenefits,\r\n terminated,\r\n formatTerminateDate,\r\n accruedTimeSick,\r\n carryOverSickTime,\r\n idDepartment,\r\n gender,\r\n parenthood,\r\n workplace,\r\n formatBirthDate,\r\n birthplace,\r\n jobTitle,\r\n phone,\r\n independetContractor,\r\n insperityEmployeeId,\r\n salesTeam\r\n });\r\n\r\n \r\n let data = {\r\n uid : employeeData[0].uid,\r\n hours_before_mov:parseInt(employeeData[0].available_hours),\r\n hours_after_mov:parseInt(availableHours),\r\n hours_mov: (parseInt(employeeData[0].available_hours) - parseInt(availableHours)) + (parseInt(employeeData[0].sick_days_limit) - parseInt(sickDays)) + (parseInt(employeeData[0].carry_over) - parseInt(carryOver)) + (parseInt(employeeData[0].carry_over_sick_time) - parseInt(carryOverSickTime)),\r\n carry_over_before_mov:parseInt(employeeData[0].carry_over),\r\n carry_over_after_mov:carryOver,\r\n carry_over_sick_time_before:parseInt(employeeData[0].carry_over_sick_time),\r\n carry_over_sick_time_after:carryOverSickTime,\r\n observations: `${employeeData[0].available_hours},${availableHours},${employeeData[0].carry_over},${carryOver},${employeeData[0].sick_days_limit},${sickDays},${employeeData[0].carry_over_sick_time},${carryOverSickTime}`,\r\n type_mov: 'Edit User',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employeeData[0].increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:formatLastIncrement,\r\n yearly_increase_date_before_mov:moment(employeeData[0].year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n loadEmployeesManager();\r\n //redirect\r\n setTimeout(() => {\r\n history.goBack();\r\n }, 2000);\r\n \r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n \r\n \r\n \r\n //history.push('/pto/manager');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

Edit User

\r\n
\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckParenthood(e.target.value) } \r\n checked= {parenthood}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n saveWorkplace(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveBirthDate(date)}\r\n placeholderText=\"Select birth date\"\r\n // minDate={new Date()}\r\n />\r\n\r\n
\r\n
\r\n\r\n
\r\n \r\n saveBirthPlace(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n\r\n
\r\n \r\n saveUserName(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckSupervisor(department) } \r\n checked= {supervisor}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n saveEmail(e.target.value) }\r\n required\r\n value={email}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveEmailSupervisor(e.target.value) }\r\n value= {emailSupervisor}\r\n required\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveUid(e.target.value) }\r\n required\r\n value={uid}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveInsperityEmployeeId(e.target.value) }\r\n \r\n value={insperityEmployeeId || ''}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveToken(e.target.value) }\r\n required\r\n value={token}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveAvailableHours(e.target.value) }\r\n required\r\n value={availableHours}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveCarryOver(e.target.value) }\r\n required\r\n value={carryOver}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveSickDays(e.target.value) }\r\n required\r\n value={sickDays}\r\n />\r\n
\r\n\r\n
\r\n \r\n saveCarryOverSickTime(e.target.value) }\r\n required\r\n value={carryOverSickTime}\r\n />\r\n
\r\n\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveHireDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n />\r\n\r\n
\r\n\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveLastIncrement(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n />\r\n\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveAccruedTimeSick(e.target.value) }\r\n required\r\n />\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckTravelBenefits(e.target.value) } \r\n checked= {travelBenefits}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckIndependentContractor(e.target.value) } \r\n checked= {independetContractor}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckSalesTeam(e.target.value) } \r\n checked= {salesTeam}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckTerminate(e.target.value) } \r\n checked= {terminated}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveTerminateDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n />\r\n\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default EditUser;","import React, {useState} from 'react';\r\nimport Modal from 'react-modal';\r\n\r\nimport moment from 'moment';\r\n\r\nconst HistoryEmployee = ({historyEmployee}) => {\r\n console.log(historyEmployee)\r\n\r\n let observations = historyEmployee.observations.split(\",\");\r\n\r\n Modal.setAppElement('#root')\r\n\r\n const [modalIsOpen, setIsOpen] = useState(false);\r\n\r\n var subtitle;\r\n\r\n const customStyles = {\r\n content : {\r\n top : '50%',\r\n left : '50%',\r\n right : 'auto',\r\n bottom : 'auto',\r\n marginRight : '-50%',\r\n transform : 'translate(-50%, -50%)'\r\n }\r\n };\r\n\r\n function openModal() {\r\n setIsOpen(true);\r\n }\r\n \r\n function afterOpenModal() {\r\n // references are now sync'd and can be accessed.\r\n // subtitle.style.color = '#f00';\r\n }\r\n \r\n function closeModal(){\r\n setIsOpen(false);\r\n }\r\n\r\n\r\n return (\r\n \r\n {historyEmployee.id}\r\n {moment(historyEmployee.date_mov).format('YYYY-MM-DD')}\r\n {historyEmployee.hours_before_mov}\r\n {historyEmployee.hours_after_mov}\r\n {historyEmployee.carry_over_before_mov}\r\n {historyEmployee.carry_over_after_mov}\r\n {historyEmployee.carry_over_sick_time_before}\r\n {historyEmployee.carry_over_sick_time_after}\r\n {\r\n historyEmployee.hours_mov < 0\r\n ?\r\n {parseInt(historyEmployee.hours_mov) *-1}\r\n :\r\n {historyEmployee.hours_mov}\r\n }\r\n \r\n {historyEmployee.type_mov}\r\n {/* {moment(historyEmployee.mov_increase_date).format('YYYY-MM-DD')}\r\n {moment(historyEmployee.increase_date_before_mov).format('YYYY-MM-DD')}\r\n {moment(historyEmployee.mov_yearly_increase_date).format('YYYY-MM-DD')}\r\n {moment(historyEmployee.yearly_increase_date_before_mov).format('YYYY-MM-DD')} */}\r\n {\r\n historyEmployee.type_mov === 'Edit User'\r\n ?\r\n \r\n \r\n\r\n \r\n

# {historyEmployee.id} - {historyEmployee.type_mov}

\r\n
    \r\n
  • \r\n Available Hours: from {observations[0]} to {observations[1]}\r\n
  • \r\n
  • \r\n Carry Over Hours: from {observations[2]} to {observations[3]}\r\n
  • \r\n
  • \r\n Sick Hours: from {observations[4]} to {observations[5]}\r\n
  • \r\n
  • \r\n Carry Over Sick Hours: from {observations[6]} to {observations[7]}\r\n
  • \r\n
\r\n \r\n \r\n \r\n :\r\n {historyEmployee.observations}\r\n }\r\n \r\n \r\n );\r\n};\r\n\r\nexport default HistoryEmployee;","import React, {Fragment, useEffect} from 'react';\r\nimport HistoryEmployee from './HistoryEmployee';\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {Link} from 'react-router-dom';\r\n\r\nimport {obtenerHistorico} from '../actions/manageActions';\r\nimport ReactExport from \"react-export-excel\";\r\n\r\n\r\nconst ExcelFile = ReactExport.ExcelFile;\r\nconst ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\nconst ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst HistoryUsers = ({match}) => {\r\n\r\n const { uid } = match.params;\r\n\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n \r\n\r\n const usersHistory = useSelector(state=>state.manager.history);\r\n const usersHour = useSelector(state=>state.manager.employees);\r\n\r\n // get user general data\r\n const employeeData = usersHour.filter(user => user.uid == uid);\r\n\r\n let observations;\r\n\r\n useEffect(()=> {\r\n const loadHistory = ()=>dispatch(obtenerHistorico(uid));\r\n loadHistory();\r\n },[])\r\n return (\r\n \r\n
\r\n

PTO History

\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n

{employeeData[0].employee_name}{' '}{employeeData[0].employee_lastname}

\r\n

{employeeData[0].department}

\r\n
\r\n
\r\n
\r\n \r\n { \r\n

\r\n Available PTO Hours: {employeeData[0].available_hours} hours\r\n

\r\n }\r\n

Available Sick Hours: {employeeData[0].sick_days_limit} hours

\r\n

Available Carry Over Hours: {employeeData[0].carry_over} hours

\r\n {\r\n employeeData[0].territory === 'California'\r\n ?\r\n

Available Carry Over Sick Hours: {employeeData[0].carry_over_sick_time} hours

\r\n :\r\n null\r\n }\r\n\r\n

Total Annual Days: {(employeeData[0].available_hours + employeeData[0].carry_over + employeeData[0].sick_days_limit + employeeData[0].carry_over_sick_time) / 8} days

\r\n \r\n {/*

Joined the company since: {moment().to(moment(userInfo.userInfo.hireDate))}

*/}\r\n

Joined the company since: {moment(employeeData[0].hire_date).format('MMM-YYYY')}

\r\n\r\n {\r\n !employeeData[0].sales_team\r\n ?\r\n \r\n (Math.floor((moment([employeeData[0].hire_date, 0]).diff(moment(), 'year') * -1)/(3)) * 8) >= 41\r\n ?\r\n

(40 hours for seniority in company already included)

\r\n :\r\n

\r\n ({(Math.floor((moment([employeeData[0].hire_date, 0]).diff(moment(), 'year') * -1)/(3)) * 8)} hours for seniority in company already included)

\r\n \r\n :\r\n null\r\n }\r\n \r\n {employeeData[0].carry_over > 0\r\n ?\r\n
\r\n Carry Over expires on: 03-31-2025\r\n
\r\n :\r\n null\r\n }\r\n\r\nHistory Employee Report}>\r\n \r\n \r\n moment(col.date_mov).format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n {\r\n if(col.hours_mov < 0) {\r\n return parseInt(col.hours_mov) * -1\r\n }else {\r\n return col.hours_mov\r\n }\r\n }}/>\r\n \r\n moment(col.mov_increase_date).format('YYYY-MM-DD')}/>\r\n moment(col.increase_date_before_mov).format('YYYY-MM-DD')}/>\r\n moment(col.mov_yearly_increase_date).format('YYYY-MM-DD')}/>\r\n moment(col.yearly_increase_date_before_mov).format('YYYY-MM-DD')}/>\r\n {/* */}\r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n
\r\n {/* End column */}\r\n
\r\n
\r\n {/* End Card User */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {\r\n usersHistory.map(historyEmployee =>(\r\n \r\n \r\n ))\r\n }\r\n \r\n
#DateAvailable Hours Before RequestAvalialble Hours After RequestCarry Over Before RequestCarry Over After RequestCarry Over Sick Time Before RequestCarry Over Sick Time After RequestHoursTypeMonthly Increment Date Before RequestMonthly Increment Date After RequestSeniority Increment Before RequestSeniority Increment After RequestObservations
\r\n
\r\n );\r\n};\r\n\r\nexport default HistoryUsers;","import React from 'react';\r\n\r\nconst Footer = () => {\r\n return (\r\n
© Copyright 2025 Mexilink Incorporated All Rights Reserved
\r\n );\r\n};\r\n\r\nexport default Footer;","import React, {useEffect, useState} from 'react';\r\n//Redux\r\nimport {useSelector } from 'react-redux';\r\n\r\nimport Spinner from './helpers/Spinner';\r\n\r\nimport ReactExport from \"react-export-excel\";\r\n//import moment from 'moment';\r\nimport moment from 'moment-timezone';\r\nimport axiosHR from '../config/axiosHR';\r\n\r\nconst ExcelFile = ReactExport.ExcelFile;\r\nconst ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\nconst ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst UserReports = () => {\r\n\r\n const [ptos, setPTOS] = useState([]);\r\n\r\n //acceder al state\r\n const employees = useSelector(state=>state.manager.employees);\r\n const userEmail = useSelector(state=> state.userInfo.userInfo.email);\r\n\r\n let PtoEventsArray = [];\r\n\r\n let usaEmployees = [];\r\n \r\n\r\n \r\n\r\n useEffect(() => { \r\n\r\n axiosHR.get('/pto-list-all/')\r\n .then(respuesta => {\r\n // console.log(respuesta.data.data[0].day_beginning)\r\n let find = '';\r\n respuesta.data.data.map((pto, index) => {\r\n\r\n find = employees.find(employee => \r\n {\r\n \r\n if (`${employee.employee_name} ${employee.employee_lastname}` === pto.employee_name) {\r\n pto.job_title = employee.job_title\r\n return pto\r\n }\r\n }\r\n )\r\n\r\n console.log(find);\r\n \r\n\r\n return pto.status !== 'Denied' && pto.company !== 'CSI'\r\n ?\r\n \r\n PtoEventsArray.push(pto)\r\n\r\n\r\n :\r\n null\r\n \r\n })\r\n setPTOS(PtoEventsArray);\r\n console.log(ptos, PtoEventsArray);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n })\r\n }, [])\r\n \r\n \r\n const filterElementsByCompany = (array, query) => {\r\n return array.filter(function(el) {\r\n // console.log(name)\r\n return el.company.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n const filterbyMexilink = filterElementsByCompany(employees, 'Mexilink');\r\n\r\n const filterbyHitSales = filterElementsByCompany(employees, 'Hit Sales & Marketing');\r\n\r\n usaEmployees = [...filterbyMexilink, ...filterbyHitSales, ...usaEmployees];\r\n \r\n return (\r\n \r\n
\r\n

Special Users Report

\r\n
\r\n
\r\n
\r\n
Users Reports
\r\n
\r\n
\r\n
    \r\n {\r\n (userEmail == 'astrid.miranda@mexilink.com')\r\n ?\r\n <>\r\n Mexilink Sick Days Report}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n parseInt(col.accrued_sick_days) - parseInt(col.sick_days_limit)}/>\r\n {/* col.travel_benefits === 0 ? 48 : 24}/> */}\r\n {/* col.travel_benefits === 0 ? 48 : 24}/>\r\n */}\r\n \r\n \r\n \r\n moment().add(6,'hours').format('DD/MM/YYYY')}/>\r\n \r\n \r\n \r\n \r\n Hit Sales Sick Days Report}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n parseInt(col.accrued_sick_days) - parseInt(col.sick_days_limit)}/>\r\n {/* col.travel_benefits === 0 ? 48 : 24}/> */}\r\n {/* col.travel_benefits === 0 ? 48 : 24}/>\r\n */}\r\n \r\n \r\n \r\n moment().add(6,'hours').format('DD/MM/YYYY')}/>\r\n \r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n {\r\n (userEmail == 'jonathan.lareo@mexilink.com' || userEmail == 'julio.castro@mexilink.com')\r\n ?\r\n General Info Only}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n moment(col.hire_date).add(6, 'hours').format('YYYY-MM-DD')}/>\r\n moment(col.birth_date).add(6, 'hours').format('YYYY-MM-DD')}/>\r\n moment(col.birth_date).add(6, 'hours').format('YYYY')}/>\r\n moment(col.birth_date).add(6, 'hours').format('MM')}/>\r\n moment(col.birth_date).add(6, 'hours').format('DD')}/>\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n {/* End Card */}\r\n\r\n
\r\n
\r\n
PTO Reports
\r\n
\r\n
\r\n
    \r\n All PTO}>\r\n \r\n \r\n \r\n \r\n \r\n moment(col.date).format('YYYY-MM-DD')}/>\r\n moment(col.day_beginning).format('YYYY-MM-DD')}/>\r\n moment(col.day_end).format('YYYY-MM-DD')}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default UserReports;","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport Swal from 'sweetalert2';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport moment from 'moment';\r\n\r\nconst FixedAssetRequests = ({request, history}) => {\r\n\r\n const supervisor = useSelector(state=>state.userInfo.userInfo.supervisor);\r\n const userInfo = useSelector(state=> state.userInfo.userInfo);\r\n\r\n\r\n const approveRequest = (request) => {\r\n // Preguntar al usuario\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request is going to be send to I.T. Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n request.status = 'Under Review By I.T.';\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n setTimeout(() => {\r\n window.location.reload(false);\r\n //history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n }\r\n\r\n const deniedRequest = (request) => {\r\n // Preguntar al usuario\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n // clienteAxiosHR.post('/pto-email', ptoInfo)\r\n // .then(respuesta => {\r\n // //console.log(respuesta);\r\n // Swal.fire(\r\n // 'Sent',\r\n // 'The Time off Request has been sent successfully.',\r\n // 'success'\r\n // )\r\n\r\n // setTimeout(() => {\r\n // window.location.reload(false);\r\n // }, 3000);\r\n // })\r\n // .catch(error => {\r\n // console.log(error);\r\n // Swal.fire(\r\n // 'Failed',\r\n // 'An error was occurred by sending your request.',\r\n // 'warning'\r\n // )\r\n // })\r\n }\r\n })\r\n}\r\n\r\n return (\r\n \r\n {request.id}\r\n {request.employee_name}{' '}{request.employee_lastname}\r\n {request.department}\r\n \r\n
    {\r\n JSON.parse(request.equipment_requested).map((element, key) => (
  • {element.cantidad} - {element.tipo}
  • \r\n ))\r\n }\r\n
\r\n \r\n {moment(request.request_date).format('MM-DD-YYYY')}\r\n {request.status}\r\n \r\n \r\n Details\r\n \r\n {\r\n supervisor && request.status === 'New Request' && userInfo.department == request.department || userInfo.email === 'alfonso.montero@mexilink.com' || userInfo.email === 'mara.martinez@mexilink.com'\r\n ?\r\n <>\r\n approveRequest(request)}\r\n >\r\n Approve\r\n \r\n\r\n deniedRequest(request)}\r\n >\r\n Denied\r\n \r\n \r\n :\r\n null\r\n\r\n }\r\n\r\n {\r\n userInfo.department === 'I.T.' && request.status === 'Under Review By I.T.'\r\n ?\r\n \r\n Complete Asset Information\r\n \r\n :\r\n null\r\n }\r\n\r\n {\r\n userInfo.department === 'Treasury' && request.status === 'Under Review By Treasury' || userInfo.email === 'alfonso.montero@mexilink.com' || userInfo.email === 'mara.martinez@mexilink.com'\r\n ?\r\n \r\n Complete Purchase Information\r\n \r\n :\r\n null\r\n }\r\n\r\n {\r\n userInfo.department === 'I.T.' && request.status === 'I.T. Department are completing information'\r\n ?\r\n \r\n Complete Invoice Information\r\n \r\n :\r\n null\r\n }\r\n\r\n {\r\n userInfo.department === 'Accounting' && request.status === 'Under Review By Accounting' || userInfo.email === 'alfonso.montero@mexilink.com' || userInfo.email === 'mara.martinez@mexilink.com'\r\n ?\r\n \r\n Complete Invoice Information\r\n \r\n :\r\n null\r\n }\r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default FixedAssetRequests;","const exportToCSV = (orders) => {\r\n // Crear el encabezado del CSV\r\n const headers = [\r\n 'Order ID', 'Employee Name', 'Department', 'Reason', 'Status',\r\n 'Request Date', 'Quantity', 'Cost', 'Type', 'Brand', 'Model', 'Asset Number', 'Serial', 'IMEI'\r\n ];\r\n \r\n // Crear filas de datos\r\n const rows = orders.map(order => {\r\n const { id, employee_name, department, reason, status, request_date, equipment_requested } = order;\r\n\r\n const oldAssets=[];\r\n let equipmentFields = [];\r\n // Parsear los arrays de equipment_requested y old_asset_information\r\n const equipmentList = JSON.parse(equipment_requested)\r\n .map((item ,index)=> {\r\n // `${item.cantidad} x ${item.tipo} (Brand: ${item.brand} Model: ${item.model} Asset Number: ${item.assetNumber} Serial: ${item.serial} IMEI: ${item.imei} )` \r\n if(index === 0){ \r\n equipmentFields.push(item.cantidad, item.cost, item.tipo, item.brand, item.model, item.assetNumber, item.serial, item.imei, \"\\n\");\r\n }else {\r\n equipmentFields.push(\"\", \"\", \"\", \"\", \"\", item.cantidad, item.cost, item.tipo, item.brand, item.model, item.assetNumber, item.serial, item.imei, \"\\n\");\r\n }\r\n })\r\n .join('\\n ');\r\n\r\n\r\n\r\n // if (old_asset_information !== null) { \r\n // oldAssets = JSON.parse(old_asset_information).map(item => item).join('; ');\r\n // }\r\n return [\r\n id, employee_name, department, reason, status, request_date, ...equipmentFields\r\n ];\r\n });\r\n\r\n // Convertir los datos a formato CSV\r\n const csvContent = [headers, ...rows].map(e => e.join(\",\")).join(\"\\n\");\r\n \r\n // Crear un blob y descargarlo\r\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\r\n const url = URL.createObjectURL(blob);\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.setAttribute('download', 'Orders_Report.csv');\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n};\r\n\r\nexport default exportToCSV;","import React, {useEffect, useState, useRef} from 'react';\r\nimport Spinner from './helpers/Spinner';\r\nimport moment from 'moment';\r\nimport { getFixedAssetsRequestList} from '../actions/fixedassetrequestActions';\r\nimport {obtenerDepartamentos, obtenerTerritories } from '../actions/manageActions';\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport FixedAssetRequests from './FixedAssetRequests';\r\n//import ReactExport from \"react-export-excel\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport exportToCSV from './helpers/ExportOrders';\r\n\r\n\r\n// const ExcelFile = ReactExport.ExcelFile;\r\n// const ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\n// const ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst FixedAssetRequestPanel = ({history}) => {\r\n\r\n const dispatch = useDispatch();\r\n\r\n //acceder al state\r\n //const userInfo = useSelector(state=>state.manager.employees);\r\n const departments = useSelector(state=>state.manager.departments);\r\n const territories = useSelector(state => state.manager.territories);\r\n const fixedAssetRequests = useSelector(state => state.fixedAsset.fixedAssetRequests);\r\n\r\n const [department, saveDepartment] = useState('');\r\n const [territory, saveTerritory] = useState('');\r\n const [requests, setRequests] = useState([]);\r\n const [dayBegining, saveDayBeginning] = useState('');\r\n const [dayEnd, saveDayEnd] = useState('');\r\n\r\n const loadFixedAssetRequest = (department, territory, dateReport, fromDate, toDate) => dispatch(getFixedAssetsRequestList(department, territory, dateReport, fromDate, toDate));\r\n\r\n // const filterElementsByName = (array, query) => {\r\n // return array.filter(function(el) {\r\n // let name = `${el.employee_name} ${el.employee_lastname}`;\r\n // // console.log(name)\r\n // return name.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n // })\r\n // }\r\n\r\n const handleSearch = async (department, territory, dateReport, fromDate, toDate) => {\r\n\r\n\r\n if(department === '' && territory === '' && dayBegining === '' && dayEnd === '') {\r\n dateReport = 'all';\r\n await loadFixedAssetRequest(department, territory, 'all', fromDate, toDate);\r\n } else {\r\n\r\n // console.log(department, territory, dateReport, fromDate, toDate);\r\n await loadFixedAssetRequest(department, territory, true, fromDate, toDate);\r\n }\r\n }\r\n\r\n // const handleReport = async (department, territory, dateReport, fromDate, toDate) => {\r\n // // await loadFixedAssetRequest(department, territory, dateReport, fromDate, toDate);\r\n // }\r\n\r\n const handleExport = async (data) => {\r\n exportToCSV(data);\r\n }\r\n \r\n // Time Refs\r\n const dayBeginingRef = useRef('');\r\n const dayEndRef = useRef('');\r\n\r\n useEffect(() => {\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n // let data = {\r\n // reportType:1,\r\n // manager: true,\r\n // companyManager: 'Mexilink'\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n\r\n const loadTerritories = ()=> dispatch(obtenerTerritories());\r\n loadTerritories();\r\n\r\n \r\n\r\n }, [])\r\n\r\n useEffect(() => {\r\n\r\n setRequests(fixedAssetRequests);\r\n \r\n }, [fixedAssetRequests])\r\n \r\n \r\n return (\r\n <>\r\n
\r\n

Fixed Asset Request Control Panel

\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Filter By Department
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
Filter By Territory
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
Reports
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n \r\n placeholderText=\"Custom Date Range\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n \r\n required\r\n >\r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n \r\n placeholderText=\"Custom Date Range\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n \r\n required\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {/* Download Report}>\r\n \r\n \r\n \r\n {\r\n let equipmentJson = JSON.parse(col.equipment_requested);\r\n let equiposTemplate = ``;\r\n equipmentJson.forEach(equipment => {\r\n\r\n equiposTemplate+= `\r\n\r\n Type: \r\n ${equipment.tipo},\r\n Brand:\r\n ${equipment.brand},\r\n Cost:\r\n ${equipment.cost},\r\n Asset Number:\r\n ${equipment.assetNumber},\r\n Serial Number:\r\n ${equipment.serial}\r\n `\r\n });\r\n \r\n return equiposTemplate;\r\n }\r\n }/>\r\n \r\n \r\n \r\n \r\n */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n requests.length > 0\r\n ?\r\n requests.map(request =>(\r\n \r\n \r\n ))\r\n :\r\n \r\n
Please choose the search criteria to obtain the list of orders.
\r\n \r\n }\r\n
\r\n
#EmployeeDepartmentEquipment RequestedDateStatusActions
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default FixedAssetRequestPanel;","import React, {useState, useEffect, useRef} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport {createNewFixedAssetRequestAction} from '../actions/fixedassetrequestActions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n\r\n// library\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport axiosHr from '../config/axiosHR';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\nconst NewFixedAsset = ({history}) => {\r\n\r\n var holidaysArray = ['04-02-2021', '05-31-2021', '07-05-2021', '09-06-2021', '11-25-2021', '11-26-2021', '12-23-2021', '12-24-2020', '01-01-2021', '01-01-2022', '04-15-2022', '05-30-2022', '07-04-2022', '09-05-2022', '11-24-2022', '11-25-2022', '12-23-2022', '12-26-2022', '01-02-2023', '04-07-2023', '07-04-2023', '05-29-2023', '09-04-2023', '11-23-2023', '11-24-2023', '12-22-2023', '12-25-2023', '01-01-2024', '03-29-2024', '05-27-2024', '04-07-2024', '09-02-2024', '11-28-2024', '11-29-2024', '12-24-2024', '12-25-2024'];\r\n\r\n var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\")]\r\n \r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n workingWeekdays: [1, 2, 3, 4, 5],\r\n holidays: holidaysArray,\r\n holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // get data from state\r\n const error = useSelector((state) => state.error.error);\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // acceder al state de la lista de empleados\r\n const employees = useSelector(state=>state.manager.employees);\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n // agregar balance de horas\r\n\r\n // const supervisor = userInfo.userInfo.supervisor;\r\n\r\n // const email = userInfo.userInfo.email;\r\n\r\n // const supervisorEmail = userInfo.userInfo.supervisorEmail;\r\n \r\n //const company = userInfo.userInfo.company;\r\n\r\n // state\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [supervisorEmail, saveSupervisorEmail] = useState(userInfo.userInfo.supervisorEmail);\r\n const [email, saveEmail] = useState(userInfo.userInfo.email);\r\n const [company, saveCompany] = useState(userInfo.userInfo.company);\r\n const [supervisor, saveSupervisor] = useState(userInfo.userInfo.supervisor);\r\n const [department, saveDepartment] = useState('');\r\n const [jobDescription, saveJobDescription] = useState('');\r\n const [territory, saveTerritory] = useState('');\r\n // const [equipmenteRequested, saveEquipmenteRequested] = useState('');\r\n const [equipos, setEquipos] = useState([]);\r\n const [tipoEquipo, setTipoEquipo] = useState('');\r\n const [cantidad, setCantidad] = useState(1);\r\n\r\n const [reason, saveReason] = useState('');\r\n const [costCenter, saveCostCenter] = useState('');\r\n const [status, saveStatus] = useState('New Request');\r\n \r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState(new Date());\r\n const [uid, saveUid] = useState('');\r\n \r\n const [departmentColor, saveDepartmentColor] = useState('');\r\n const [HrRequest, saveHrRequest] = useState(false);\r\n\r\n \r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n\r\n\r\n const agregarEquipo = () => {\r\n if (tipoEquipo && cantidad > 0) {\r\n setEquipos([...equipos, { tipo: tipoEquipo, cantidad }]);\r\n setTipoEquipo('');\r\n setCantidad(1);\r\n }\r\n };\r\n \r\n const eliminarEquipo = (index) => {\r\n const nuevosEquipos = equipos.filter((_, i) => i !== index);\r\n setEquipos(nuevosEquipos);\r\n };\r\n \r\n\r\n // canvas\r\n \r\n const sendEmail = (pto, supervisorEmail, email, company) => {\r\n\r\n const ptoInfo = {\r\n pto,\r\n supervisorEmail,\r\n email,\r\n company\r\n }\r\n\r\n clienteAxiosHR.post('/pto-email', ptoInfo)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'The Time off Request has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n // setTimeout(() => {\r\n // window.location.reload(false);\r\n // }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by sending your request.',\r\n 'warning'\r\n )\r\n })\r\n } \r\n\r\n\r\n let sigPadEmployee = {};\r\n const clearEmployee = (e) => {\r\n e.preventDefault();\r\n sigPadEmployee.clear();\r\n }\r\n const saveCanvasEmployee = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureEmployee(urlImage);\r\n }\r\n\r\n const handleChangeInput = (event) => {\r\n const {value} = event.target;\r\n let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n if(regex.test(value)) {\r\n // console.log(value);\r\n saveReason(value);\r\n } else {\r\n console.log(\"Es un caracter no válido\")\r\n }\r\n }\r\n\r\n const handleEmployeeSelect = (event) => {\r\n const {value} = event.target;\r\n // extraer la información de empleado del array de empleados\r\n let employee = employees.filter(employee => employee.email === value);\r\n\r\n saveEmployeeName(employee[0].employee_name + ' ' + employee[0].employee_lastname);\r\n saveJobDescription(employee[0].job_title);\r\n saveTerritory(employee[0].territory);\r\n saveUid(employee[0].uid);\r\n saveDepartment(employee[0].department);\r\n\r\n saveSupervisor(employee[0].supervisor);\r\n saveSupervisorEmail(employee[0].supervisor_email);\r\n saveCompany(employee[0].company);\r\n saveEmail(employee[0].email);\r\n\r\n let departmentFilter = filterDepartment(departments, employee[0].department);\r\n \r\n saveDepartmentColor(departmentFilter[0].color);\r\n saveCostCenter(departmentFilter[0].cost_center);\r\n saveTerritory(employee[0].territory);\r\n }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const agregarFixedAsset = (request) => dispatch (createNewFixedAssetRequestAction(request));\r\n // const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n const validarFormulario = () => dispatch( validarFormularioAction());\r\n const exitoValidacion = () => dispatch( validacionExito() ) ;\r\n const errorValidacion = () => dispatch( validacionError() ) ;\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n \r\n useEffect(() => {\r\n loadDepartments();\r\n }, [])\r\n\r\n\r\n useEffect( ()=>{\r\n\r\n\r\n if(userInfo.userInfo.name !== undefined){\r\n saveEmployeeName(userInfo.userInfo.name +' '+ userInfo.userInfo.lastname);\r\n saveJobDescription(userInfo.userInfo.job_title);\r\n saveTerritory(userInfo.userInfo.territory);\r\n } else {\r\n history.push('/home');\r\n }\r\n\r\n if(userInfo.userInfo.department !== undefined) {\r\n saveDepartment(userInfo.userInfo.department);\r\n let departmentFilter = filterDepartment(departments, userInfo.userInfo.department);\r\n \r\n saveDepartmentColor(departmentFilter[0].color);\r\n saveCostCenter(departmentFilter[0].cost_center);\r\n \r\n }\r\n\r\n if(userInfo.userInfo.uid !== undefined) {\r\n saveUid(userInfo.userInfo.uid);\r\n }\r\n\r\n if(userInfo.userInfo.department === 'Human Resources') {\r\n saveHrRequest(true);\r\n }\r\n\r\n \r\n\r\n }, [dispatch, userInfo, history])\r\n \r\n // Add new Request\r\n const submitNewFixedAssetRequest = e => {\r\n e.preventDefault();\r\n // console.log(carryOver)\r\n validarFormulario();\r\n if(employeeName.trim() === ''|| department.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee === 'Invalid date' ) {\r\n errorValidacion();\r\n return\r\n }\r\n\r\n exitoValidacion();\r\n\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n // html: '
'+\r\n // '

Name : ' + employeeName + '

' +\r\n // '

Department : ' + department + '

' +\r\n // //00'

Reason : ' + reason + '

' +\r\n // //'

Total Hours: ' + totalHours + '

' +\r\n // // '

Absence Code: ' + absenceText + '

' +\r\n // '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n let dateSignature = moment(dateSignEmployee).format('YYYY-MM-DD');\r\n \r\n\r\n //const company = userInfo.userInfo.company\r\n let equiposFormatted = JSON.stringify(equipos);\r\n\r\n let fixedAssetRequest = {\r\n employeeName,\r\n department,\r\n signatureEmployee,\r\n dateSignature,\r\n uid,\r\n supervisor,\r\n departmentColor,\r\n email,\r\n company,\r\n supervisorEmail,\r\n equiposFormatted,\r\n jobDescription,\r\n territory,\r\n costCenter,\r\n reason,\r\n HrRequest,\r\n status\r\n }\r\n\r\n\r\n agregarFixedAsset(fixedAssetRequest);\r\n\r\n\r\n setEquipos([]);\r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Add New Fixed Asset Request

\r\n
\r\n
\r\n \r\n saveEmployeeName(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n saveJobDescription(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n saveJobDescription(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n saveDepartment(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n saveCostCenter(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n\r\n {userInfo.userInfo.department === 'Human Resources'\r\n ?\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n :null\r\n }\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n {/*
\r\n
\r\n \r\n
\r\n
*/}\r\n\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
Asset List:
\r\n \r\n \r\n
\r\n \r\n
    \r\n {equipos.map((equipo, index) => (\r\n
  • \r\n {equipo.tipo} - QUANTITY: {equipo.cantidad} \r\n \r\n
  • \r\n ))}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n \r\n
\r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n\r\n \r\n};\r\n\r\nexport default NewFixedAsset;","import React, {useEffect, useState} from 'react';\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport { getFixedAssetRequestDetail } from '../actions/fixedassetrequestActions';\r\nimport moment from 'moment/moment';\r\n\r\n\r\n\r\nconst ViewFixedAssetRequest = ({match}) => {\r\n\r\n // Dispatch para ejecutar la acción principal\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n\r\n const assetRequest = useSelector(state => state.fixedAsset.fixedAsset);\r\n\r\n const [equipment, setEquipment] = useState([])\r\n\r\n const [purchaseNeeded, savePurchaseNeeded] = useState(false);\r\n const [labelCreated, saveLabelCreated] = useState(false);\r\n const [paymentMethod, savePaymentMethod] = useState('');\r\n const [paymentSuport, savePaymentSupport] = useState('');\r\n \r\n const [invoice, saveInvoice] = useState('');\r\n\r\n const [oldAssetInformation, setOldAssetInformation] = useState([]);\r\n\r\n const [status, setStatus] = useState(assetRequest.status);\r\n\r\n useEffect(()=> {\r\n\r\n const fixedAssetRequestDetail = (request) => dispatch(getFixedAssetRequestDetail(id));\r\n fixedAssetRequestDetail();\r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n }, [dispatch, id])\r\n\r\n useEffect(() => {\r\n if(Object.keys(assetRequest).length !== 0) {\r\n let formattedEquipment = JSON.parse(assetRequest.equipment_requested);\r\n setEquipment(formattedEquipment);\r\n\r\n\r\n }\r\n\r\n if(assetRequest.old_asset_information !== null && assetRequest.old_asset_information !== undefined && assetRequest.old_asset_information.length > 0) {\r\n let formattedOldAssetInformation = JSON.parse(assetRequest.old_asset_information);\r\n console.log( assetRequest.old_asset_information === undefined, 'old asset en view fixed asset');\r\n setOldAssetInformation(formattedOldAssetInformation);\r\n // if(assetRequest.old_asset_information.length !== 0 ) {\r\n // let formattedOldAssetInformation = JSON.parse(assetRequest.old_asset_information);\r\n // setOldAssetInformation(formattedOldAssetInformation);\r\n // }else {\r\n // setOldAssetInformation([])\r\n // }\r\n }else {\r\n setOldAssetInformation([])\r\n }\r\n \r\n if (assetRequest.purchase_needed) {\r\n savePurchaseNeeded(true);\r\n }\r\n if(assetRequest.label_created) {\r\n saveLabelCreated(true);\r\n }\r\n \r\n if(assetRequest.payment_method) {\r\n savePaymentMethod(assetRequest.payment_method);\r\n }\r\n \r\n if(assetRequest.payment_support) {\r\n savePaymentSupport(assetRequest.payment_support);\r\n }\r\n \r\n if(assetRequest.invoice) {\r\n saveInvoice(assetRequest.invoice);\r\n }\r\n }, [assetRequest])\r\n\r\n \r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Fixed Asset Request

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"signature\"/\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n equipment.map((equipo, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Brand\r\n \r\n Model\r\n \r\n Serial\r\n IMEI
{equipo.tipo}{equipo.cantidad}{equipo.model || 'Not updated yet'}{equipo.serial || 'Not updated yet'}{equipo.imei || 'Not Updated yet'}
\r\n
\r\n
\r\n {\r\n assetRequest.status !== 'New Request'\r\n ?\r\n <>\r\n
\r\n
\r\n

Order Status: {assetRequest.status}

\r\n

Purchase Needed ?

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n // Purchase Needed\r\n purchaseNeeded\r\n ?\r\n <>\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n equipment.map((equipo, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n CostVendorLink
{equipo.tipo}{equipo.cantidad} {equipo.brand || 'Not updated yet'}\r\n \r\n \r\n {equipo.cost || 'Not updated yet'}\r\n \r\n {equipo.orderedFrom || 'Not updated yet'}\r\n \r\n {equipo.link || 'Not updated yet'}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {\r\n // Treasury is working\r\n assetRequest.status === 'Under Review By Treasury' || assetRequest.status === 'I.T. Department are completing information' || assetRequest.status === 'Under Review By Accounting'\r\n //assetRequest\r\n ?\r\n <>\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n Payment Method\r\n \r\n Upload Payment Method Support\r\n \r\n Upload Invoice / Quote\r\n
\r\n {paymentMethod}\r\n \r\n Payment Support Link\r\n \r\n \r\n Quote / Invoice Link \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {/*
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n Upload Invoice / Quote\r\n
\r\n \r\n \r\n
\r\n
*/}\r\n \r\n :\r\n null\r\n \r\n \r\n }\r\n \r\n :\r\n null\r\n \r\n }\r\n \r\n
\r\n
\r\n

Label Created ?

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n assetRequest.status === 'I.T. Department are completing information' && labelCreated\r\n ? \r\n <>\r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n {\r\n assetRequest.status === 'Under Review By Accounting'\r\n ? \r\n <>\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n \r\n \r\n \r\n {\r\n equipment.map((equipo, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n assetRequest.status === 'I.T. Department are completing information' && labelCreated\r\n ?\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n {\r\n assetRequest.status === 'Under Review By Accounting' \r\n ?\r\n <>\r\n \r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n ))\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n \r\n Model\r\n \r\n Serial\r\n IMEIAsset NumberDate Updated On The System
{equipo.tipo}{equipo.cantidad} {equipo.brand || 'Not updated yet'}\r\n \r\n {equipo.model || 'Not updated yet'}\r\n \r\n {equipo.serial || 'Not updated yet'}\r\n \r\n {equipo.imei || 'Not updated yet'}\r\n \r\n {equipo.assetNumber || 'Not updated yet'}\r\n \r\n {equipo.dateUpdated || 'Not updated yet'}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n oldAssetInformation !== null \r\n ?\r\n oldAssetInformation.map((oldAsset, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n :null\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n \r\n Model\r\n \r\n Serial\r\n IMEIStatus
{oldAsset.tipo || 'Not updated yet'}\r\n \r\n \r\n \r\n 1\r\n {oldAsset.brand || 'Not updated yet'}\r\n \r\n {oldAsset.model || 'Not updated yet'}\r\n \r\n {oldAsset.serial || 'Not updated yet'}\r\n \r\n {oldAsset.imei || 'Not updated yet'}\r\n \r\n {oldAsset.status || 'Not updated yet'}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n :\r\n null\r\n }\r\n \r\n\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ViewFixedAssetRequest;","import React, {useEffect, useState} from 'react';\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport { getFixedAssetRequestDetail, editFixedRequestAction } from '../actions/fixedassetrequestActions';\r\n\r\nimport Swal from 'sweetalert2';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n\r\nconst EditFixedAssetRequest = ({match, history}) => {\r\n\r\n // Dispatch para ejecutar\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n\r\n const assetRequest = useSelector(state => state.fixedAsset.fixedAsset);\r\n\r\n const [purchaseNeeded, savePurchaseNeeded] = useState(false);\r\n const [labelCreated, saveLabelCreated] = useState(false);\r\n const [paymentMethod, savePaymentMethod] = useState('');\r\n const [paymentSuport, savePaymentSupport] = useState('');\r\n\r\n const [invoice, saveInvoice] = useState('');\r\n // Equipment state\r\n const [equipment, setEquipment] = useState([]);\r\n\r\n const [oldAssetInformation, setOldAssetInformation] = useState([]);\r\n // const [tipoEquipo, setTipoEquipo] = useState('');\r\n // const [cantidad, setCantidad] = useState(1);\r\n\r\n const [status, setStatus] = useState(assetRequest.status);\r\n\r\n const handleCheckTerminate = (value) => {\r\n console.log(value);\r\n savePurchaseNeeded(!purchaseNeeded);\r\n }\r\n\r\n const handleCheckLabel = (value) => {\r\n console.log(value);\r\n saveLabelCreated(!labelCreated);\r\n }\r\n\r\n const editFixedRequest = (request) => dispatch(editFixedRequestAction(request));\r\n\r\n const agregarEquipo = () => {\r\n console.log(typeof(oldAssetInformation))\r\n // if (tipoEquipo && cantidad > 0) {\r\n setOldAssetInformation([...oldAssetInformation, { tipo: '', cantidad: '', brand:'', model: '', serial:'', imei: '', status:'' }]);\r\n \r\n // }\r\n };\r\n \r\n const eliminarEquipo = (index) => {\r\n const nuevosEquipos = oldAssetInformation.filter((_, i) => i !== index);\r\n setOldAssetInformation(nuevosEquipos);\r\n };\r\n \r\n const handleFormChange = (index, event) => {\r\n let data = [...equipment];\r\n data[index][event.target.name] = event.target.value;\r\n setEquipment(data);\r\n }\r\n\r\n const handleOldAssetInformation = (index, event) => {\r\n let data = [...oldAssetInformation];\r\n data[index][event.target.name] = event.target.value;\r\n setOldAssetInformation(data);\r\n }\r\n\r\n const sumitEditFixedAsset = e => {\r\n e.preventDefault();\r\n\r\n // console.log('submit', assetRequest.status === 'Under Review By I.T.');\r\n\r\n\r\n // let data = {\r\n // equipment\r\n // }\r\n\r\n switch (assetRequest.status) {\r\n case 'Under Review By I.T.':\r\n\r\n console.log('click');\r\n\r\n if(purchaseNeeded && assetRequest.status == 'Under Review By I.T.') {\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request is going to be send to Treasury Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n setStatus('Under Review By Treasury')\r\n \r\n let request = assetRequest\r\n \r\n request.status = 'Under Review By Treasury';\r\n request.equipment_requested = JSON.stringify(equipment);\r\n request.old_asset_information = JSON.stringify(oldAssetInformation);\r\n request.purchase_needed = purchaseNeeded;\r\n request.label_created = labelCreated;\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n editFixedRequest(request);\r\n \r\n setTimeout(() => {\r\n //window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n \r\n }else {\r\n\r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request is going to be send to Accounting Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n setStatus('Under Review By Accounting')\r\n \r\n let request = assetRequest\r\n \r\n request.status = status;\r\n request.equipment_requested = JSON.stringify(equipment);\r\n request.old_asset_information = JSON.stringify(oldAssetInformation);\r\n request.status = 'Under Review By Accounting';\r\n request.purchase_needed = purchaseNeeded;\r\n request.label_created = labelCreated;\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n editFixedRequest(request);\r\n \r\n setTimeout(() => {\r\n // window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n\r\n }\r\n \r\n break;\r\n\r\n case 'Under Review By Treasury':\r\n\r\n \r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request is going to be send to I.T. Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n setStatus('I.T. Department are completing information')\r\n \r\n let request = assetRequest\r\n \r\n request.status = 'I.T. Department are completing information';\r\n //request.equipment_requested = JSON.stringify(equipment);\r\n //request.old_asset_information = JSON.stringify(oldAssetInformation);\r\n // request.purchase_needed = purchaseNeeded;\r\n // request.label_created = labelCreated;\r\n request.payment_method = paymentMethod;\r\n request.payment_support = paymentSuport;\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request email notification has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n editFixedRequest(request);\r\n \r\n setTimeout(() => {\r\n // window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n break;\r\n\r\n case 'I.T. Department are completing information':\r\n\r\n \r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request is going to be send to Accounting Department\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n setStatus('Under Review By Accounting')\r\n \r\n let request = assetRequest\r\n \r\n request.status = 'Under Review By Accounting';\r\n request.equipment_requested = JSON.stringify(equipment);\r\n request.old_asset_information = JSON.stringify(oldAssetInformation);\r\n // request.purchase_needed = purchaseNeeded;\r\n request.label_created = labelCreated;\r\n request.invoice = invoice;\r\n //request.payment_support = paymentSuport;\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request email notification has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n editFixedRequest(request);\r\n \r\n setTimeout(() => {\r\n // window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n break;\r\n \r\n case 'Under Review By Accounting':\r\n\r\n \r\n Swal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Fixed Asset Request will be set as Complete\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n setStatus('Complete')\r\n \r\n let request = assetRequest\r\n \r\n request.status = 'Complete';\r\n request.equipment_requested = JSON.stringify(equipment);\r\n //request.old_asset_information = JSON.stringify(oldAssetInformation);\r\n // request.purchase_needed = purchaseNeeded;\r\n // request.label_created = labelCreated;\r\n //request.invoice = invoice;\r\n //request.payment_support = paymentSuport;\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Fixed Asset Request email notification has been sent successfully.',\r\n 'success'\r\n )\r\n\r\n editFixedRequest(request);\r\n \r\n setTimeout(() => {\r\n // window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n\r\n \r\n }\r\n\r\n useEffect(()=> {\r\n\r\n const fixedAssetRequestDetail = (request) => dispatch(getFixedAssetRequestDetail(id));\r\n fixedAssetRequestDetail();\r\n \r\n }, [dispatch, id])\r\n\r\n useEffect(() => {\r\n if(Object.keys(assetRequest).length !== 0) {\r\n let formattedEquipment = JSON.parse(assetRequest.equipment_requested);\r\n setEquipment(formattedEquipment)\r\n \r\n if(assetRequest.old_asset_information !== null) {\r\n let formattedOldAssetInformation = JSON.parse(assetRequest.old_asset_information);\r\n console.log(formattedOldAssetInformation, assetRequest.old_asset_information);\r\n setOldAssetInformation(formattedOldAssetInformation);\r\n // if(assetRequest.old_asset_information.length !== 0 ) {\r\n // let formattedOldAssetInformation = JSON.parse(assetRequest.old_asset_information);\r\n // setOldAssetInformation(formattedOldAssetInformation);\r\n // }else {\r\n // setOldAssetInformation([])\r\n // }\r\n }else {\r\n setOldAssetInformation([])\r\n }\r\n\r\n if (assetRequest.purchase_needed) {\r\n savePurchaseNeeded(true);\r\n }\r\n if(assetRequest.label_created) {\r\n saveLabelCreated(true);\r\n }\r\n\r\n if(assetRequest.payment_method) {\r\n savePaymentMethod(assetRequest.payment_method);\r\n }\r\n\r\n if(assetRequest.payment_support) {\r\n savePaymentSupport(assetRequest.payment_support);\r\n }\r\n\r\n if(assetRequest.invoice) {\r\n saveInvoice(assetRequest.invoice);\r\n }\r\n\r\n\r\n }\r\n}, [assetRequest])\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Add New Fixed Asset Request

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"signature\"/\r\n {/* */}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Order Status: {assetRequest.status}

\r\n

Purchase Needed ?

\r\n
\r\n
\r\n
\r\n handleCheckTerminate(e.target.value) } \r\n checked= {purchaseNeeded}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n {\r\n // Purchase Needed\r\n purchaseNeeded\r\n ?\r\n <>\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n equipment.map((equipo, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n ))\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n CostVendorLink
{equipo.tipo}{equipo.cantidad} handleFormChange(key, event)}\r\n \r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n />
\r\n\r\n \r\n
\r\n
\r\n \r\n {\r\n // Treasury is working\r\n assetRequest.status === 'Under Review By Treasury' || assetRequest.status === 'I.T. Department are completing information' || assetRequest.status === 'Under Review By Accounting'\r\n //assetRequest\r\n ?\r\n <>\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n Payment Method\r\n \r\n Upload Payment Method Support\r\n \r\n Upload Invoice / Quote\r\n
savePaymentMethod(event.target.value)}\r\n value={paymentMethod}\r\n /> savePaymentSupport(event.target.value)}\r\n /> saveInvoice(event.target.value)}\r\n value={invoice}\r\n />
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n {/*
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n Upload Invoice / Quote\r\n
\r\n\r\n \r\n
\r\n
*/}\r\n \r\n :\r\n null\r\n\r\n \r\n }\r\n \r\n :\r\n null\r\n\r\n }\r\n\r\n
\r\n
\r\n

Label Created ?

\r\n
\r\n
\r\n
\r\n handleCheckLabel(e.target.value) } \r\n checked= {labelCreated}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n assetRequest.status === 'I.T. Department are completing information' && labelCreated\r\n ? \r\n <>\r\n \r\n \r\n :\r\n null\r\n }\r\n\r\n {\r\n assetRequest.status === 'Under Review By Accounting'\r\n ? \r\n <>\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n \r\n \r\n\r\n {\r\n equipment.map((equipo, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n assetRequest.status === 'I.T. Department are completing information' && labelCreated\r\n ?\r\n <>\r\n\r\n \r\n\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n\r\n{\r\n assetRequest.status === 'Under Review By Accounting' \r\n ?\r\n <>\r\n\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n \r\n \r\n ))\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n \r\n Model\r\n \r\n Serial\r\n IMEIAsset NumberDate Updated On The System
{equipo.tipo}{equipo.cantidad} handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n /> handleFormChange(key, event)}\r\n />
\r\n\r\n \r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n oldAssetInformation !== null \r\n ?\r\n oldAssetInformation.map((oldAsset, key) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n ))\r\n :null\r\n \r\n }\r\n \r\n \r\n
\r\n Asset Type\r\n \r\n Quantity\r\n \r\n Brand\r\n \r\n Model\r\n \r\n Serial\r\n IMEIStatus
handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n /> handleOldAssetInformation(key, event)}\r\n />
\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n
\r\n\r\n \r\n\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default EditFixedAssetRequest;","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport Swal from 'sweetalert2';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport moment from 'moment';\r\n\r\nconst PersonalRequest = ({request, history}) => {\r\n\r\n const supervisor = useSelector(state=>state.userInfo.userInfo.supervisor);\r\n const userInfo = useSelector(state=> state.userInfo.userInfo);\r\n\r\n return (\r\n \r\n {request.position_title}\r\n {request.department}\r\n \r\n {moment(request.request_date).format('MM-DD-YYYY')}\r\n {request.status}\r\n \r\n \r\n Details\r\n \r\n {\r\n request.status === 'H.R. Approval' && userInfo.email === 'nubia.osuna@mexilink.com'\r\n ?\r\n \r\n Human Resource Approval\r\n \r\n :\r\n null\r\n\r\n }\r\n\r\n {\r\n request.status === 'Finance Approval' && userInfo.email === 'maria.chacin@mexilink.com'\r\n ?\r\n \r\n Finance Approval\r\n \r\n :\r\n null\r\n\r\n }\r\n\r\n {\r\n request.status === 'Additional Approval' && userInfo.email === 'nubia.osuna@mexilink.com'\r\n ?\r\n \r\n Additional Approval\r\n \r\n :\r\n null\r\n\r\n }\r\n\r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PersonalRequest;","import React, {useEffect, useState, useRef} from 'react';\r\nimport Spinner from './helpers/Spinner';\r\nimport moment from 'moment';\r\nimport { getPersonalsRequestList} from '../actions/personalrequestActions';\r\nimport {obtenerDepartamentos, obtenerTerritories } from '../actions/manageActions';\r\n//Redux\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n// import FixedAssetRequests from './FixedAssetRequests';\r\nimport PersonalRequest from './PersonalRequest';\r\n//import ReactExport from \"react-export-excel\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport exportToCSV from './helpers/ExportOrders';\r\n\r\n\r\n// const ExcelFile = ReactExport.ExcelFile;\r\n// const ExcelSheet = ReactExport.ExcelFile.ExcelSheet;\r\n// const ExcelColumn = ReactExport.ExcelFile.ExcelColumn;\r\n\r\nconst PersonalRequestPanel = ({history}) => {\r\n\r\n const dispatch = useDispatch();\r\n\r\n //acceder al state\r\n //const userInfo = useSelector(state=>state.manager.employees);\r\n const departments = useSelector(state=>state.manager.departments);\r\n const territories = useSelector(state => state.manager.territories);\r\n const personalRequests = useSelector(state => state.personalRequest.personalRequests);\r\n\r\n const [department, saveDepartment] = useState('');\r\n const [territory, saveTerritory] = useState('');\r\n const [requests, setRequests] = useState([]);\r\n const [dayBegining, saveDayBeginning] = useState('');\r\n const [dayEnd, saveDayEnd] = useState('');\r\n\r\n const loadPersonalRequests = (department, territory, dateReport, fromDate, toDate) => dispatch(getPersonalsRequestList(department, territory, dateReport, fromDate, toDate));\r\n\r\n // const filterElementsByName = (array, query) => {\r\n // return array.filter(function(el) {\r\n // let name = `${el.employee_name} ${el.employee_lastname}`;\r\n // // console.log(name)\r\n // return name.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n // })\r\n // }\r\n\r\n const handleSearch = async (department, territory, dateReport, fromDate, toDate) => {\r\n\r\n\r\n if(department === '' && territory === '' && dayBegining === '' && dayEnd === '') {\r\n dateReport = 'all';\r\n await loadPersonalRequests(department, territory, 'all', fromDate, toDate);\r\n } else {\r\n\r\n // console.log(department, territory, dateReport, fromDate, toDate);\r\n await loadPersonalRequests(department, territory, true, fromDate, toDate);\r\n }\r\n }\r\n\r\n // const handleReport = async (department, territory, dateReport, fromDate, toDate) => {\r\n // // await loadPersonalRequests(department, territory, dateReport, fromDate, toDate);\r\n // }\r\n\r\n const handleExport = async (data) => {\r\n exportToCSV(data);\r\n }\r\n \r\n // Time Refs\r\n const dayBeginingRef = useRef('');\r\n const dayEndRef = useRef('');\r\n\r\n useEffect(() => {\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n\r\n // let data = {\r\n // reportType:1,\r\n // manager: true,\r\n // companyManager: 'Mexilink'\r\n // }\r\n // const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n // loadEmployeesManager();\r\n\r\n const loadTerritories = ()=> dispatch(obtenerTerritories());\r\n loadTerritories();\r\n\r\n \r\n\r\n }, [])\r\n\r\n useEffect(() => {\r\n\r\n setRequests(personalRequests);\r\n \r\n }, [personalRequests])\r\n \r\n \r\n return (\r\n <>\r\n
\r\n

Personal Request Control Panel

\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Filter By Department
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
Reports
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveDayBeginning(date)}\r\n \r\n placeholderText=\"Custom Date Range\"\r\n ref = {dayBeginingRef}\r\n // minDate={new Date()}\r\n \r\n required\r\n >\r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDayEnd(e.target.value)}\r\n required\r\n ref = {dayEndRef}\r\n /> */}\r\n saveDayEnd(date)}\r\n \r\n placeholderText=\"Custom Date Range\"\r\n ref = {dayEndRef}\r\n //minDate={new Date()}\r\n \r\n required\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {/* Download Report}>\r\n \r\n \r\n \r\n {\r\n let equipmentJson = JSON.parse(col.equipment_requested);\r\n let equiposTemplate = ``;\r\n equipmentJson.forEach(equipment => {\r\n\r\n equiposTemplate+= `\r\n\r\n Type: \r\n ${equipment.tipo},\r\n Brand:\r\n ${equipment.brand},\r\n Cost:\r\n ${equipment.cost},\r\n Asset Number:\r\n ${equipment.assetNumber},\r\n Serial Number:\r\n ${equipment.serial}\r\n `\r\n });\r\n \r\n return equiposTemplate;\r\n }\r\n }/>\r\n \r\n \r\n \r\n \r\n */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n requests.length > 0\r\n ?\r\n \r\n requests.map(request =>(\r\n \r\n \r\n ))\r\n :\r\n \r\n
Please choose the search criteria to obtain the list of orders.
\r\n \r\n }\r\n
\r\n
Position TitleDepartmentDateStatusActions
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default PersonalRequestPanel;","import React, {useState, useEffect, useRef, Fragment} from 'react';\r\n//import ReactDom from 'react-dom';\r\n\r\n// Redux\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport {createNewPersonalRequestAction} from '../actions/personalrequestActions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\n\r\n// library\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport moment from 'moment-business-days';\r\nimport Swal from 'sweetalert2';\r\nimport DatePicker from \"react-datepicker\";\r\nimport axiosHr from '../config/axiosHR';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\n \r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\nconst NewPersonalRequest = ({history}) => {\r\n\r\n var holidaysArray = ['04-02-2021', '05-31-2021', '07-05-2021', '09-06-2021', '11-25-2021', '11-26-2021', '12-23-2021', '12-24-2020', '01-01-2021', '01-01-2022', '04-15-2022', '05-30-2022', '07-04-2022', '09-05-2022', '11-24-2022', '11-25-2022', '12-23-2022', '12-26-2022', '01-02-2023', '04-07-2023', '07-04-2023', '05-29-2023', '09-04-2023', '11-23-2023', '11-24-2023', '12-22-2023', '12-25-2023', '01-01-2024', '03-29-2024', '05-27-2024', '04-07-2024', '09-02-2024', '11-28-2024', '11-29-2024', '12-24-2024', '12-25-2024'];\r\n\r\n var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\")]\r\n \r\n\r\n // set working days\r\n moment.updateLocale('us', {\r\n workingWeekdays: [1, 2, 3, 4, 5],\r\n holidays: holidaysArray,\r\n holidayFormat: 'MM-DD-YYYY'\r\n\r\n });\r\n\r\n\r\n // get data from state\r\n const error = useSelector((state) => state.error.error);\r\n //acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n // // acceder al state de la lista de empleados\r\n // const employees = useSelector(state=>state.manager.employees);\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n let departmentElement = el.department\r\n return departmentElement.toLowerCase().indexOf(query.toLowerCase()) > -1;\r\n })\r\n }\r\n\r\n // state\r\n const [dateSubmitted, saveDateSubmitted] = useState('');\r\n const [positionTitle, savePositionTitle] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [costCenter, saveCostCenter] = useState('');\r\n const [status, saveStatus] = useState('H.R. Approval');\r\n \r\n\tconst [requestorName, saveRequestorName] = useState(`${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`);\r\n\tconst [requestorTitle, saveRequestorTitle] = useState(userInfo.userInfo.job_title);\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState(new Date());\r\n\r\n\tconst [requestedStartDate, saveRequestedStartDate] = useState('');\r\n\tconst [hiringManager, saveHiringManager] = useState('');\r\n\tconst [contactNumber, saveContactNumber] = useState('');\r\n\t\r\n\t//const [employmentClassification, saveEmploymentClassification] = useState('');\r\n\tconst [exempt, saveExempt] = useState(false);\r\n\tconst [nonExempt, saveNonExempt] = useState(false);\r\n\tconst [fullTime, saveFullTime] = useState(false);\r\n\tconst [partTime, savePartTime] = useState(false);\r\n\tconst [other, saveOther] = useState(false);\r\n\tconst [otherText, saveOtherText] = useState('');\r\n\r\n\tconst [shiftFrom, saveShiftFrom] = useState('');\r\n\tconst [shiftTo, saveShiftTo] = useState('');\r\n\tconst [monday, saveMonday] = useState(false);\r\n\tconst [tuesday, saveTuesday] = useState(false);\r\n\tconst [wednesday, saveWednesday] = useState(false);\r\n\tconst [thursday, saveThursday] = useState(false);\r\n\tconst [friday, saveFriday] = useState(false);\r\n\tconst [saturday, saveSaturday] = useState(false);\r\n\tconst [sunday, saveSunday] = useState(false);\r\n\r\n\tconst [additionalCommentWorkSchedule, saveadditionalCommentWorkSchedule] = useState('');\r\n\tconst [newPosition, saveNewPosition] = useState(false);\r\n\tconst [positionExist, savePositionExist] = useState(\"yes\");\r\n\tconst [budgeted, saveBudgeted] = useState(\"yes\");\r\n\tconst [existingPositionReplacement, saveExistingPositionReplacement] = useState('');\r\n\tconst [dutiesChanged, saveDutiesChanged] = useState(\"yes\");\r\n\r\n\tconst [positionInformation, savePositionInformation] = useState('');\r\n\tconst [dailyActivities, saveDailyActivities] = useState('');\r\n\tconst [measureProductivity, saveMeasureProductivity] = useState('');\r\n\tconst [financialImpact, saveFinancialImpact] = useState('');\r\n\tconst [positionFit, savePositionFit] = useState('');\r\n\r\n\tconst [objectives, saveObjectives] = useState('');\r\n\tconst [contingencies, saveContingencies] = useState('');\r\n\r\n\tconst [dateFilled, saveDateFilled] = useState('');\r\n\tconst [positionFilledBy, savePositionFilledBy] = useState('');\r\n\tconst [startDate, saveStartDate] = useState('');\r\n\tconst [salaryOffered, saveSalaryOffered] = useState('');\r\n\tconst [recruitmentSource, saveRecruitmentSource] = useState('');\r\n\r\n\r\n \r\n\r\n const isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n \r\n const timeBeginningRef = useRef('');\r\n const timeEndRef = useRef('');\r\n\r\n // canvas\r\n \r\n // const sendEmail = (pto, supervisorEmail, email, company) => {\r\n\r\n // const ptoInfo = {\r\n // pto,\r\n // supervisorEmail,\r\n // email,\r\n // company\r\n // }\r\n\r\n // clienteAxiosHR.post('/pto-email', ptoInfo)\r\n // .then(respuesta => {\r\n // //console.log(respuesta);\r\n // Swal.fire(\r\n // 'Sent',\r\n // 'The Time off Request has been sent successfully.',\r\n // 'success'\r\n // )\r\n\r\n // // setTimeout(() => {\r\n // // window.location.reload(false);\r\n // // }, 3000);\r\n // })\r\n // .catch(error => {\r\n // console.log(error);\r\n // Swal.fire(\r\n // 'Failed',\r\n // 'An error was occurred by sending your request.',\r\n // 'warning'\r\n // )\r\n // })\r\n // } \r\n\r\n\r\n let sigPadEmployee = {};\r\n const clearEmployee = (e) => {\r\n e.preventDefault();\r\n sigPadEmployee.clear();\r\n }\r\n const saveCanvasEmployee = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureEmployee(urlImage);\r\n }\r\n\r\n\r\n // const handleChangeInput = (event) => {\r\n // const {value} = event.target;\r\n // let regex = new RegExp(\"^[a-zA-Z0-9áéíóúÁÉÍÓÚ,. ]+$\");\r\n\r\n // if(regex.test(value)) {\r\n // // console.log(value);\r\n // // saveReason(value);\r\n // } else {\r\n // console.log(\"Es un caracter no válido\")\r\n // }\r\n // }\r\n\r\n\r\n const handleCheckbox = (value) => {\r\n //console.log(value);\r\n if(value === 'exempt') {\r\n saveExempt(!exempt);\r\n } else if(value === 'non-exempt') {\r\n saveNonExempt(!nonExempt);\r\n } else if(value === 'full-time') {\r\n saveFullTime(!fullTime);\r\n } else if(value === 'part-time') {\r\n savePartTime(!partTime);\r\n } else if(value === 'other') {\r\n saveOther(!other);\r\n } else if(value === 'monday') {\r\n saveMonday(!monday);\r\n } else if(value === 'tuesday') {\r\n saveTuesday(!tuesday);\r\n } else if(value === 'wednesday') {\r\n saveWednesday(!wednesday);\r\n } else if(value === 'thursday') {\r\n saveThursday(!thursday);\r\n } else if(value === 'friday') {\r\n saveFriday(!friday);\r\n } else if(value === 'saturday') {\r\n saveSaturday(!saturday);\r\n } else if(value === 'sunday') {\r\n saveSunday(!sunday);\r\n }else if (value === 'newPosition') {\r\n saveNewPosition(!newPosition);\r\n savePositionExist('no');\r\n saveExistingPositionReplacement('');\r\n }\r\n\r\n }\r\n\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const agregarRecruitmentRequest = (request) => dispatch (createNewPersonalRequestAction(request));\r\n // const balanceHoras = (horas) => dispatch(ajustarBalanceHoras(horas));\r\n const validarFormulario = () => dispatch( validarFormularioAction());\r\n const exitoValidacion = () => dispatch( validacionExito() ) ;\r\n const errorValidacion = () => dispatch( validacionError() ) ;\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n \r\n useEffect(() => {\r\n loadDepartments();\r\n }, [])\r\n\r\n \r\n // Add new Request\r\n const submitNewPersonalRequest = e => {\r\n e.preventDefault();\r\n // console.log(carryOver)\r\n validarFormulario();\r\n // if(employeeName.trim() === ''|| department.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee === 'Invalid date' ) {\r\n // errorValidacion();\r\n // return\r\n // }\r\n\r\n exitoValidacion();\r\n\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n // html: '
'+\r\n // '

Name : ' + employeeName + '

' +\r\n // '

Department : ' + department + '

' +\r\n // //00'

Reason : ' + reason + '

' +\r\n // //'

Total Hours: ' + totalHours + '

' +\r\n // // '

Absence Code: ' + absenceText + '

' +\r\n // '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n let dateSignature = moment(dateSignEmployee).format('YYYY-MM-DD');\r\n \r\n\r\n //const company = userInfo.userInfo.company\r\n \r\n let dateSubmittedFormatted = moment(dateSubmitted).format('YYYY-MM-DD');\r\n let requestStartDateFormatted = moment(requestedStartDate).format('YYYY-MM-DD');\r\n \r\n\r\n let shiftFromFormatted = moment(shiftFrom).format('HH:mm')\r\n let shiftToFormatted = moment(shiftTo).format('HH:mm')\r\n\r\n\r\n if(newPosition === true) {\r\n saveNewPosition(true);\r\n }else {\r\n saveNewPosition(false);\r\n }\r\n\r\n // if(exempt) {\r\n // saveExempt(true);\r\n // }else {\r\n // saveExempt(false);\r\n // }\r\n\r\n // if(nonExempt) {\r\n // saveNonExempt(true);\r\n // }else {\r\n // saveNonExempt(false);\r\n // }\r\n\r\n // if(fullTime) {\r\n // saveFullTime(true);\r\n // }else {\r\n // saveFullTime(false);\r\n // }\r\n\r\n // if(partTime === \"1\") {\r\n // savePartTime(true);\r\n // }else {\r\n // savePartTime(false);\r\n // }\r\n\r\n // if(other === \"1\") {\r\n // saveOther(true);\r\n // }else {\r\n // saveOther(false);\r\n // }\r\n\r\n // if(monday === true) {\r\n // saveMonday(1);\r\n // }else {\r\n // saveMonday(0);\r\n // }\r\n\r\n // if(tuesday === true) {\r\n // saveTuesday(1);\r\n // }else {\r\n // saveTuesday(0);\r\n // }\r\n\r\n // if(wednesday === true) {\r\n // saveWednesday(1);\r\n // }else {\r\n // saveWednesday(0);\r\n // }\r\n\r\n // if(thursday === true) {\r\n // saveThursday(1);\r\n // }else {\r\n // saveThursday(0);\r\n // }\r\n\r\n // if(friday === true) {\r\n // saveFriday(1);\r\n // }else {\r\n // saveFriday(0);\r\n // }\r\n\r\n // if(saturday === true) {\r\n // saveSaturday(1);\r\n // }else {\r\n // saveSaturday(0);\r\n // }\r\n\r\n // if(sunday === true) {\r\n // saveSunday(1);\r\n // }else {\r\n // saveSunday(0);\r\n // }\r\n\r\n // if(budgeted === 'yes') {\r\n // saveBudgeted(1);\r\n // }else {\r\n // saveBudgeted(0);\r\n // }\r\n\r\n\r\n\r\n let recruitmentRequest = {\r\n status,\r\n dateSubmittedFormatted,\r\n\t\t\tpositionTitle,\r\n\t\t\tdepartment,\r\n\t\t\trequestStartDateFormatted,\r\n\t\t\thiringManager,\r\n\t\t\tcontactNumber,\r\n costCenter,\r\n otherText,\r\n exempt,\r\n nonExempt,\r\n fullTime,\r\n partTime,\r\n other,\r\n\t\t\tshiftFromFormatted,\r\n\t\t\tshiftToFormatted,\r\n monday,\r\n tuesday,\r\n wednesday,\r\n thursday,\r\n friday,\r\n saturday,\r\n sunday,\r\n\t\t\tadditionalCommentWorkSchedule,\r\n\t\t\tnewPosition,\r\n\t\t\tpositionExist,\r\n existingPositionReplacement,\r\n\t\t\tbudgeted,\r\n\t\t\tdutiesChanged,\r\n\t\t\tpositionInformation,\r\n\t\t\tdailyActivities,\r\n\t\t\tmeasureProductivity,\r\n\t\t\tfinancialImpact,\r\n positionFit,\r\n\t\t\tobjectives,\r\n\t\t\tcontingencies,\r\n requestorName,\r\n requestorTitle,\r\n signatureEmployee,\r\n\t\t\tdateSignature,\r\n\t\t\t// dateFilled,\r\n\t\t\t// positionFilledBy,\r\n\t\t\t// startDate,\r\n\t\t\t// salaryOffered,\r\n\t\t\t// recruitmentSource\r\n\r\n }\r\n\r\n\r\n agregarRecruitmentRequest(recruitmentRequest);\r\n\r\n\r\n \r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Recruitment Request Form

\r\n
\r\n \r\n \r\n
\r\n
\r\n saveCostCenter(e.target.value) }\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {/* Position Details */}\r\n

Position Details

\r\n
\r\n
\r\n
\r\n \r\n saveDateSubmitted(date)}\r\n // filterDate={isWeekday}\r\n placeholderText=\"Select a date\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n required\r\n \r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n savePositionTitle(e.target.value) }\r\n required\r\n \r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n saveRequestedStartDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a date\"\r\n // minDate={new Date()}\r\n // excludeDates={excludedDatesArray}\r\n required\r\n \r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n saveHiringManager(e.target.value) }\r\n required\r\n value={hiringManager}\r\n />\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n\t\t\t\t\t\t\t\t\t\t saveContactNumber(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n {/* Employee Clasification */}\r\n
\r\n
\r\n
\r\n

Employee Classification

\r\n
\r\n {/* Begin Row */}\r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n \r\n
\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t{ other ? \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\r\n
\r\n saveOtherText(e.target.value)} \r\n required \r\n />\r\n
\r\n )\r\n\t\t\t\t\t\t\t\t\t\t\t\t:null\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n
\r\n {/* End Row */}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n {/* Work Schedule */}\r\n

Work Schedule

\r\n
\r\n \r\n
\r\n
\r\n \r\n {/* saveShiftFrom(e.target.value)} \r\n required \r\n /> */}\r\n saveShiftFrom(date)} \r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n \r\n ref = {timeBeginningRef}\r\n required\r\n />\r\n \r\n {/* saveShiftTo(e.target.value)} \r\n required \r\n /> */}\r\n saveShiftTo(date)} \r\n showTimeSelect\r\n showTimeSelectOnly\r\n timeIntervals={60}\r\n timeCaption=\"Time\"\r\n dateFormat=\"h:mm aa\"\r\n \r\n ref = {timeEndRef}\r\n required\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n handleCheckbox(e.target.value)}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n
\r\n
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{/* Position Information */}\r\n\t\t\t\t\t\t\t

Position Information

\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t saveExistingPositionReplacement(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n disabled = {newPosition === true ? true : false} \r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsavePositionInformation(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsaveDailyActivities(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsaveMeasureProductivity(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsaveFinancialImpact(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsavePositionFit(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//
onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsaveObjectives(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsaveContingencies(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{/* Approvals && Notifications */}\r\n\r\n\t\t\t\t\t\t\t

Approvals & Notifications

\r\n
\r\n \r\n\t\t\t\t\t\t\t
\r\n \r\n
\r\n \r\n saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\t\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadEmployee = ref}} \r\n onEnd = {saveCanvasEmployee}\r\n />\r\n {/* */}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateSignEmployee(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\r\n {userInfo.userInfo.email === 'nubia.osuna@mexilink.com' || userInfo.userInfo.email === 'anthony.marban@mexilink.com'\r\n\r\n ? \r\n \r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{/* Approvals && Notifications */}\r\n\r\n\t\t\t\t\t\t\t

Human Resource Department Use Only

\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n saveDateFilled(date)}\r\n \r\n placeholderText=\"Select a date\"\r\n \r\n required\r\n \r\n />\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t savePositionFilledBy(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t saveStartDate(date)}\r\n \r\n placeholderText=\"Select a date\"\r\n \r\n required\r\n \r\n />\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t saveSalaryOffered(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t saveRecruitmentSource(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n
\r\n : null\r\n }\r\n\r\n\r\n \r\n \r\n \r\n\r\n { error ?
ERROR: Please fill out all the required fields.
: null }\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n\r\n \r\n};\r\n\r\nexport default NewPersonalRequest;","import React, {useEffect, useState, useRef, Fragment} from 'react';\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport { getPersonalRequestDetail } from '../actions/personalrequestActions';\r\nimport moment from 'moment/moment';\r\nimport DatePicker from \"react-datepicker\";\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\n\r\n\r\nconst ViewPersonalRequest = ({match}) => {\r\n\r\n // Dispatch para ejecutar la acción principal\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n\r\n const personalRequest = useSelector(state => state.personalRequest.personalRequest);\r\n\r\n\t // get data from state\r\n\t const error = useSelector((state) => state.error.error);\r\n\t //acceder al state\r\n\t const userInfo = useSelector(state=>state.userInfo);\r\n\t\r\n\t var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\")]\r\n\r\n // state\r\n const [dateSubmitted, saveDateSubmitted] = useState('');\r\n const [positionTitle, savePositionTitle] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [costCenter, saveCostCenter] = useState('');\r\n const [status, saveStatus] = useState('');\r\n \r\n\tconst [requestorName, saveRequestorName] = useState('');\r\n\tconst [requestorTitle, saveRequestorTitle] = useState('');\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState('');\r\n\r\n\tconst [requestedStartDate, saveRequestedStartDate] = useState('');\r\n\tconst [hiringManager, saveHiringManager] = useState('');\r\n\tconst [contactNumber, saveContactNumber] = useState('');\r\n\t\r\n\t//const [employmentClassification, saveEmploymentClassification] = useState('');\r\n\tconst [exempt, saveExempt] = useState(false);\r\n\tconst [nonExempt, saveNonExempt] = useState(false);\r\n\tconst [fullTime, saveFullTime] = useState(false);\r\n\tconst [partTime, savePartTime] = useState(false);\r\n\tconst [other, saveOther] = useState(false);\r\n\tconst [otherText, saveOtherText] = useState('');\r\n\r\n\tconst [shiftFrom, saveShiftFrom] = useState('');\r\n\tconst [shiftTo, saveShiftTo] = useState('');\r\n\tconst [monday, saveMonday] = useState(false);\r\n\tconst [tuesday, saveTuesday] = useState(false);\r\n\tconst [wednesday, saveWednesday] = useState(false);\r\n\tconst [thursday, saveThursday] = useState(false);\r\n\tconst [friday, saveFriday] = useState(false);\r\n\tconst [saturday, saveSaturday] = useState(false);\r\n\tconst [sunday, saveSunday] = useState(false);\r\n\r\n\tconst [additionalCommentWorkSchedule, saveadditionalCommentWorkSchedule] = useState('');\r\n\tconst [newPosition, saveNewPosition] = useState(false);\r\n\tconst [positionExist, savePositionExist] = useState(\"yes\");\r\n\tconst [budgeted, saveBudgeted] = useState(\"yes\");\r\n\tconst [existingPositionReplacement, saveExistingPositionReplacement] = useState('');\r\n\tconst [dutiesChanged, saveDutiesChanged] = useState(\"yes\");\r\n\r\n\tconst [positionInformation, savePositionInformation] = useState('');\r\n\tconst [dailyActivities, saveDailyActivities] = useState('');\r\n\tconst [measureProductivity, saveMeasureProductivity] = useState('');\r\n\tconst [financialImpact, saveFinancialImpact] = useState('');\r\n\tconst [positionFit, savePositionFit] = useState('');\r\n\r\n\tconst [objectives, saveObjectives] = useState('');\r\n\tconst [contingencies, saveContingencies] = useState('');\r\n\r\n\tconst [dateFilled, saveDateFilled] = useState('');\r\n\tconst [positionFilledBy, savePositionFilledBy] = useState('');\r\n\tconst [startDate, saveStartDate] = useState('');\r\n\tconst [salaryOffered, saveSalaryOffered] = useState('');\r\n\tconst [recruitmentSource, saveRecruitmentSource] = useState('');\r\n\r\n\tconst [HrApprover, saveHrApprover] = useState('');\r\n\tconst [HrApproverTitle, saveHrApproverTitle] = useState('');\r\n const [signatureHRApprover, saveSignatureHRApprover] = useState('');\r\n const [dateSignHrApprover, savedateSignHrApprover] = useState('');\r\n\r\n\tconst [FinanceApprover, saveFinanceApprover] = useState('');\r\n\tconst [FinanceApproverTitle, saveFinanceApproverTitle] = useState('');\r\n const [signatureFinanceApprover, saveSignatureFinanceApprover] = useState('');\r\n const [dateSignFinanceApprover, savedateSignFinanceApprover] = useState('');\r\n\r\n\tconst [AdditionalApprover, saveAdditionalApprover] = useState('');\r\n\tconst [AdditionalApproverTitle, saveAdditionalApproverTitle] = useState('');\r\n const [signatureAdditionalApprover, saveSignatureAdditionalApprover] = useState('');\r\n const [dateSignAdditionalApprover, savedateSignAdditionalApprover] = useState('');\r\n\r\n const timeBeginningRef = useRef('');\r\n const timeEndRef = useRef('');\r\n\r\n\tuseEffect(()=> {\r\n\r\n const personalRequestDetail = (request) => dispatch(getPersonalRequestDetail(id));\r\n personalRequestDetail();\r\n\t\t\r\n\t\tconst validarFormulario = () => dispatch( validarFormularioAction());\r\n\t\tconst exitoValidacion = () => dispatch( validacionExito() ) ;\r\n }, [dispatch, id])\r\n\r\n\tuseEffect(() => {\r\n\t\t if(Object.keys(personalRequest).length !== 0) {\r\n\t\t\r\n\t\t\tsaveDateSubmitted(moment(personalRequest.date_submitted).format('MM-DD-YYYY'));\r\n\t\t\tsavePositionTitle(personalRequest.position_title);\r\n\t\t\tsaveDepartment(personalRequest.department);\r\n\t\t\tsaveCostCenter(personalRequest.cost_center);\r\n\t\t\tsaveStatus(personalRequest.status);\r\n\t\t\tsaveRequestorName(personalRequest.requestor_name);\r\n\t\t\tsaveRequestorTitle(personalRequest.requestor_job_title);\r\n\t\t\tsaveSignatureEmployee(personalRequest.requestor_signature);\r\n\t\t\tsaveDateSignEmployee(moment(personalRequest.date_requestor_signature).format('MM-DD-YYYY'));\r\n\t\t\tsaveRequestedStartDate(moment(personalRequest.request_start_date).format('MM-DD-YYYY'));\r\n\t\t\tsaveHiringManager(personalRequest.hiring_manager);\r\n\t\t\tsaveContactNumber(personalRequest.contact_number);\r\n\t\t\tsaveExempt(personalRequest.exempt);\r\n\t\t\tsaveNonExempt(personalRequest.nonexempt);\r\n\t\t\tsaveFullTime(personalRequest.fulltime);\r\n\t\t\tsavePartTime(personalRequest.parttime);\r\n\t\t\tsaveOther(personalRequest.other);\r\n\t\t\tsaveOtherText(personalRequest.other_employee_classification);\r\n\t\t\tsaveShiftFrom(moment(personalRequest.shiftFrom).format('HH:mm'));\r\n\t\t\tsaveShiftTo(moment(personalRequest.shiftTo).format('HH:mm'));\r\n\t\t\tsaveMonday(personalRequest.monday);\r\n\t\t\tsaveTuesday(personalRequest.tuesday);\r\n\t\t\tsaveWednesday(personalRequest.wednesday);\r\n\t\t\tsaveThursday(personalRequest.thursday);\r\n\t\t\tsaveFriday(personalRequest.friday);\r\n\t\t\tsaveSaturday(personalRequest.saturday);\r\n\t\t\tsaveSunday(personalRequest.sunday);\r\n\t\t\tsaveadditionalCommentWorkSchedule(personalRequest.additional_comment_work_schedule);\r\n\t\t\tsaveNewPosition(personalRequest.new_position);\r\n\t\t\tsavePositionExist(personalRequest.position_exist);\r\n\t\t\tsaveBudgeted(personalRequest.budgeted);\r\n\t\t\tsaveExistingPositionReplacement(personalRequest.existing_position_replacement);\r\n\t\t\tsaveDutiesChanged(personalRequest.duties_changed);\r\n\t\t\tsavePositionInformation(personalRequest.position_information);\r\n\t\t\tsaveDailyActivities(personalRequest.role_activities_objectives);\r\n\t\t\tsaveMeasureProductivity(personalRequest.productivity_measure);\r\n\t\t\tsaveFinancialImpact(personalRequest.financial_impact);\r\n\t\t\tsavePositionFit(personalRequest.position_fit_structure);\r\n\t\t\tsaveObjectives(personalRequest.objectives_risks_challenges_request);\r\n\t\t\tsaveContingencies(personalRequest.contingences_position_not_approved);\r\n\t\t\tsaveDateFilled(personalRequest.hr_date_filled);\r\n\t\t\tsavePositionFilledBy(personalRequest.hr_position_filled_by);\r\n\t\t\tsaveStartDate(personalRequest.hr_start_date);\r\n\t\t\tsaveSalaryOffered(personalRequest.salary_offered);\r\n\t\t\tsaveRecruitmentSource(personalRequest.recuitment_source);\r\n\r\n\t\t\tsaveHrApprover(personalRequest.human_resources_approval_name);\r\n\t\t\tsaveHrApproverTitle(personalRequest.human_resources_approval_job_title);\r\n\t\t\tsaveSignatureHRApprover(personalRequest.human_resources_approval_signature);\r\n\t\t\tsavedateSignHrApprover(moment(personalRequest.human_resources_approval_signature_date).format('MM-DD-YYYY'));\r\n\r\n\t\t\tsaveFinanceApprover(personalRequest.finance_notification_request_name);\r\n\t\t\tsaveFinanceApproverTitle(personalRequest.finance_notification_job_title);\r\n\t\t\tsaveSignatureFinanceApprover(personalRequest.finance_notification_signature);\r\n\t\t\tsavedateSignFinanceApprover(moment(personalRequest.finance_notification_signature_date).format('MM-DD-YYYY'));\r\n\r\n\t\t\tsaveAdditionalApprover(personalRequest.additional_approval_name);\r\n\t\t\tsaveAdditionalApproverTitle(personalRequest.additional_approval_job_title);\r\n\t\t\tsaveSignatureAdditionalApprover(personalRequest.additional_approval_job_signature);\r\n\t\t\tsavedateSignAdditionalApprover(moment(personalRequest.additional_approval_signature_date).format('MM-DD-YYYY'));\r\n\t\t}\r\n\t}, [personalRequest])\r\n\r\n\r\n\r\n\tconst handleCheckbox = (value) => {\r\n //console.log(value);\r\n if(value === 'exempt') {\r\n saveExempt(!exempt);\r\n } else if(value === 'non-exempt') {\r\n saveNonExempt(!nonExempt);\r\n } else if(value === 'full-time') {\r\n saveFullTime(!fullTime);\r\n } else if(value === 'part-time') {\r\n savePartTime(!partTime);\r\n } else if(value === 'other') {\r\n saveOther(!other);\r\n } else if(value === 'monday') {\r\n saveMonday(!monday);\r\n } else if(value === 'tuesday') {\r\n saveTuesday(!tuesday);\r\n } else if(value === 'wednesday') {\r\n saveWednesday(!wednesday);\r\n } else if(value === 'thursday') {\r\n saveThursday(!thursday);\r\n } else if(value === 'friday') {\r\n saveFriday(!friday);\r\n } else if(value === 'saturday') {\r\n saveSaturday(!saturday);\r\n } else if(value === 'sunday') {\r\n saveSunday(!sunday);\r\n }else if (value === 'newPosition') {\r\n saveNewPosition(!newPosition);\r\n savePositionExist('no');\r\n saveExistingPositionReplacement('');\r\n }\r\n\r\n }\r\n\r\n\r\n return (\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t

Recruitment Request Form

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t saveCostCenter(e.target.value) }\r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Position Details */}\r\n\t\t\t\t\t\t

Position Details

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t savePositionTitle(e.target.value) }\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={positionTitle}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveHiringManager(e.target.value) }\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={hiringManager}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveContactNumber(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/* Employee Clasification */}\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t

Employee Classification

\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t{/* Begin Row */}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t{ other ? \r\n\t\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t saveOtherText(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trequired \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={otherText}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t:null\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{/* End Row */}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/* Work Schedule */}\r\n\t\t\t\t\t\t

Work Schedule

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveShiftFrom(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={shiftFrom}\r\n\t\t\t\t\t\t\t\t\t\tdisabled \r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveShiftTo(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={shiftTo}\r\n\t\t\t\t\t\t\t\t\t\trequired \r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t saveExistingPositionReplacement(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled = {newPosition === true ? true : false} \r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsavePositionInformation(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveDailyActivities(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveMeasureProductivity(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveFinancialImpact(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsavePositionFit(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//
onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveObjectives(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveContingencies(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Approvals && Notifications */}\r\n\r\n\t\t\t\t\t\t

Approvals & Notifications

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{personalRequest.status === 'H.R. Approval' || personalRequest.status === 'Completed'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t:\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t{personalRequest.status === 'Finance Approval' || personalRequest.status === 'Completed'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t:\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t{personalRequest.status === 'Additional Approval' || personalRequest.status === 'Completed'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t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t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t:\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t{userInfo.userInfo.email === 'nubia.osuna@mexilink.com' || userInfo.userInfo.email === 'anthony.marban@mexilink.com'\r\n\r\n\t\t\t\t\t? \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Approvals && Notifications */}\r\n\r\n\t\t\t\t\t\t

Human Resource Department Use Only

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/* saveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t/> */}\r\n\t\t\t\t\t\t\t\t\t saveDateFilled(date)}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tplaceholderText=\"Select a date\"\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t savePositionFilledBy(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveStartDate(date)}\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\tplaceholderText=\"Select a date\"\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveSalaryOffered(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRecruitmentSource(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t{ error ?
ERROR: Please fill out all the required fields.
: null }\r\n\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t\r\n );\r\n};\r\n\r\nexport default ViewPersonalRequest;","import React, {useEffect, useState, useRef, Fragment} from 'react';\r\n// Redux\r\nimport {useDispatch, useSelector} from 'react-redux';\r\nimport { getPersonalRequestDetail, editPersonalRequestAction } from '../actions/personalrequestActions';\r\nimport moment from 'moment/moment';\r\nimport DatePicker from \"react-datepicker\";\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport { validarFormularioAction, validacionExito, validacionError } from '../actions/validacionActions';\r\nimport Swal from 'sweetalert2';\r\nimport clienteAxiosHR from '../config/axiosHR';\r\nimport Select from 'react-select';\r\n\r\nconst EditPersonalRequest = ({match, history}) => {\r\n\r\n // Dispatch para ejecutar la acción principal\r\n const dispatch = useDispatch();\r\n\r\n // obtener el ID a editar\r\n const { id } = match.params;\r\n\r\n const personalRequest = useSelector(state => state.personalRequest.personalRequest);\r\n\r\n\t // get data from state\r\n\t const error = useSelector((state) => state.error.error);\r\n\t //acceder al state\r\n\t const userInfo = useSelector(state=>state.userInfo);\r\n\r\n\t // acceder al state de la lista de empleados\r\n\tconst employees = useSelector(state=>state.manager.employees);\r\n\t\r\n\t var excludedDatesArray = [new Date(\"2021-02-04T12:00:00-00:00\"), new Date(\"2021-05-31T12:00:00-00:00\"), new Date(\"2021-07-05T12:00:00-00:00\"), new Date(\"2021-09-06T12:00:00-00:00\"), new Date(\"2021-11-25T12:00:00-00:00\"), new Date(\"2021-11-26T12:00:00-00:00\"), new Date(\"2021-12-23T12:00:00-00:00\"), new Date(\"2021-12-24T12:00:00-00:00\"),new Date(\"2022-01-01T12:00:00-00:00\"), new Date(\"2021-01-01T12:00:00-00:00\"), new Date(\"2022-04-15T12:00:00-00:00\"), new Date(\"2022-05-30T12:00:00-00:00\"), new Date(\"2022-07-04T12:00:00-00:00\"), new Date(\"2022-09-05T12:00:00-00:00\"), new Date(\"2022-11-24T12:00:00-00:00\"), new Date(\"2022-11-25T12:00:00-00:00\"), new Date(\"2022-12-23T12:00:00-00:00\"), new Date(\"2022-12-26T12:00:00-00:00\"), new Date(\"2023-01-02T12:00:00-00:00\"), new Date(\"2023-04-07T12:00:00-00:00\"), new Date(\"2023-05-29T12:00:00-00:00\"), new Date(\"2023-07-04T12:00:00-00:00\"), new Date(\"2023-09-04T12:00:00-00:00\"), new Date(\"2023-11-23T12:00:00-00:00\"), new Date(\"2023-11-24T12:00:00-00:00\"), new Date(\"2023-12-22T12:00:00-00:00\"), new Date(\"2023-12-25T12:00:00-00:00\"), new Date(\"2024-01-01T12:00:00-00:00\"), new Date(\"2024-03-29T12:00:00-00:00\"), new Date(\"2024-05-27T12:00:00-00:00\"), new Date(\"2024-07-04T12:00:00-00:00\"), new Date(\"2024-09-02T12:00:00-00:00\"), new Date(\"2024-11-28T12:00:00-00:00\"), new Date(\"2024-11-29T12:00:00-00:00\"), new Date(\"2024-12-24T12:00:00-00:00\"), new Date(\"2024-12-25T12:00:00-00:00\"), new Date(\"2025-01-01T12:00:00-00:00\")]\r\n\r\n // state\r\n const [dateSubmitted, saveDateSubmitted] = useState('');\r\n const [positionTitle, savePositionTitle] = useState('');\r\n const [department, saveDepartment] = useState('');\r\n const [costCenter, saveCostCenter] = useState('');\r\n const [status, saveStatus] = useState('');\r\n \r\n\tconst [requestorName, saveRequestorName] = useState('');\r\n\tconst [requestorTitle, saveRequestorTitle] = useState('');\r\n const [signatureEmployee, saveSignatureEmployee] = useState('');\r\n const [dateSignEmployee, saveDateSignEmployee] = useState('');\r\n\r\n\tconst [requestedStartDate, saveRequestedStartDate] = useState('');\r\n\tconst [hiringManager, saveHiringManager] = useState('');\r\n\tconst [contactNumber, saveContactNumber] = useState('');\r\n\t\r\n\t//const [employmentClassification, saveEmploymentClassification] = useState('');\r\n\tconst [exempt, saveExempt] = useState(false);\r\n\tconst [nonExempt, saveNonExempt] = useState(false);\r\n\tconst [fullTime, saveFullTime] = useState(false);\r\n\tconst [partTime, savePartTime] = useState(false);\r\n\tconst [other, saveOther] = useState(false);\r\n\tconst [otherText, saveOtherText] = useState('');\r\n\r\n\tconst [shiftFrom, saveShiftFrom] = useState('');\r\n\tconst [shiftTo, saveShiftTo] = useState('');\r\n\tconst [monday, saveMonday] = useState(false);\r\n\tconst [tuesday, saveTuesday] = useState(false);\r\n\tconst [wednesday, saveWednesday] = useState(false);\r\n\tconst [thursday, saveThursday] = useState(false);\r\n\tconst [friday, saveFriday] = useState(false);\r\n\tconst [saturday, saveSaturday] = useState(false);\r\n\tconst [sunday, saveSunday] = useState(false);\r\n\r\n\tconst [additionalCommentWorkSchedule, saveadditionalCommentWorkSchedule] = useState('');\r\n\tconst [newPosition, saveNewPosition] = useState(false);\r\n\tconst [positionExist, savePositionExist] = useState(\"yes\");\r\n\tconst [budgeted, saveBudgeted] = useState(\"yes\");\r\n\tconst [existingPositionReplacement, saveExistingPositionReplacement] = useState('');\r\n\tconst [dutiesChanged, saveDutiesChanged] = useState(\"yes\");\r\n\r\n\tconst [positionInformation, savePositionInformation] = useState('');\r\n\tconst [dailyActivities, saveDailyActivities] = useState('');\r\n\tconst [measureProductivity, saveMeasureProductivity] = useState('');\r\n\tconst [financialImpact, saveFinancialImpact] = useState('');\r\n\tconst [positionFit, savePositionFit] = useState('');\r\n\r\n\tconst [objectives, saveObjectives] = useState('');\r\n\tconst [contingencies, saveContingencies] = useState('');\r\n\r\n\tconst [HrApprover, saveHrApprover] = useState('');\r\n\tconst [HrApproverTitle, saveHrApproverTitle] = useState('');\r\n const [signatureHRApprover, saveSignatureHRApprover] = useState('');\r\n const [dateSignHrApprover, savedateSignHrApprover] = useState('');\r\n\r\n\tconst [FinanceApprover, saveFinanceApprover] = useState('');\r\n\tconst [FinanceApproverTitle, saveFinanceApproverTitle] = useState('');\r\n const [signatureFinanceApprover, saveSignatureFinanceApprover] = useState('');\r\n const [dateSignFinanceApprover, savedateSignFinanceApprover] = useState('');\r\n\r\n\tconst [AdditionalApprover, saveAdditionalApprover] = useState('');\r\n\tconst [AdditionalApproverTitle, saveAdditionalApproverTitle] = useState('');\r\n const [signatureAdditionalApprover, saveSignatureAdditionalApprover] = useState('');\r\n const [dateSignAdditionalApprover, savedateSignAdditionalApprover] = useState('');\r\n\r\n\r\n\tuseEffect(()=> {\r\n\r\n const personalRequestDetail = (request) => dispatch(getPersonalRequestDetail(id));\r\n personalRequestDetail();\r\n\t\t\r\n\t\t//const validarFormulario = () => dispatch( validarFormularioAction());\r\n\t\tconst exitoValidacion = () => dispatch( validacionExito() ) ;\r\n }, [dispatch, id])\r\n\r\n\tuseEffect(() => {\r\n\t\t if(Object.keys(personalRequest).length !== 0) {\r\n\t\t\r\n\t\t\tsaveDateSubmitted(moment(personalRequest.date_submitted).format('MM-DD-YYYY'));\r\n\t\t\tsavePositionTitle(personalRequest.position_title);\r\n\t\t\tsaveDepartment(personalRequest.department);\r\n\t\t\tsaveCostCenter(personalRequest.cost_center);\r\n\t\t\tsaveStatus(personalRequest.status);\r\n\t\t\tsaveRequestorName(personalRequest.requestor_name);\r\n\t\t\tsaveRequestorTitle(personalRequest.requestor_job_title);\r\n\t\t\tsaveSignatureEmployee(personalRequest.requestor_signature);\r\n\t\t\tsaveDateSignEmployee(moment(personalRequest.date_requestor_signature).format('MM-DD-YYYY'));\r\n\t\t\tsaveRequestedStartDate(moment(personalRequest.request_start_date).format('MM-DD-YYYY'));\r\n\t\t\tsaveHiringManager(personalRequest.hiring_manager);\r\n\t\t\tsaveContactNumber(personalRequest.contact_number);\r\n\t\t\tsaveExempt(personalRequest.exempt);\r\n\t\t\tsaveNonExempt(personalRequest.nonexempt);\r\n\t\t\tsaveFullTime(personalRequest.fulltime);\r\n\t\t\tsavePartTime(personalRequest.parttime);\r\n\t\t\tsaveOther(personalRequest.other);\r\n\t\t\tsaveOtherText(personalRequest.other_employee_classification);\r\n\t\t\tsaveShiftFrom(moment(personalRequest.shiftFrom).format('HH:mm'));\r\n\t\t\tsaveShiftTo(moment(personalRequest.shiftTo).format('HH:mm'));\r\n\t\t\tsaveMonday(personalRequest.monday);\r\n\t\t\tsaveTuesday(personalRequest.tuesday);\r\n\t\t\tsaveWednesday(personalRequest.wednesday);\r\n\t\t\tsaveThursday(personalRequest.thursday);\r\n\t\t\tsaveFriday(personalRequest.friday);\r\n\t\t\tsaveSaturday(personalRequest.saturday);\r\n\t\t\tsaveSunday(personalRequest.sunday);\r\n\t\t\tsaveadditionalCommentWorkSchedule(personalRequest.additional_comment_work_schedule);\r\n\t\t\tsaveNewPosition(personalRequest.new_position);\r\n\t\t\tsavePositionExist(personalRequest.position_exist);\r\n\t\t\tsaveBudgeted(personalRequest.budgeted);\r\n\t\t\tsaveExistingPositionReplacement(personalRequest.existing_position_replacement);\r\n\t\t\tsaveDutiesChanged(personalRequest.duties_changed);\r\n\t\t\tsavePositionInformation(personalRequest.position_information);\r\n\t\t\tsaveDailyActivities(personalRequest.role_activities_objectives);\r\n\t\t\tsaveMeasureProductivity(personalRequest.productivity_measure);\r\n\t\t\tsaveFinancialImpact(personalRequest.financial_impact);\r\n\t\t\tsavePositionFit(personalRequest.position_fit_structure);\r\n\t\t\tsaveObjectives(personalRequest.objectives_risks_challenges_request);\r\n\t\t\tsaveContingencies(personalRequest.contingences_position_not_approved);\r\n\t\t\t// saveDateFilled(personalRequest.hr_date_filled);\r\n\t\t\t// savePositionFilledBy(personalRequest.hr_position_filled_by);\r\n\t\t\t// saveStartDate(personalRequest.hr_start_date);\r\n\t\t\t// saveSalaryOffered(personalRequest.salary_offered);\r\n\t\t\t// saveRecruitmentSource(personalRequest.recuitment_source);\r\n\t\t\tif(personalRequest.status === 'H.R. Approval') {\r\n\t\t\t\tsaveHrApprover(`${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`);\r\n\t\t\t\tsaveHrApproverTitle(userInfo.userInfo.job_title);\r\n\t\t\t\tsavedateSignHrApprover(moment().format('MM-DD-YYYY'));\r\n\t\t }if(personalRequest.status === 'Finance Approval') {\r\n\t\t\t\tsaveFinanceApprover(`${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`);\r\n\t\t\t\tsaveFinanceApproverTitle(userInfo.userInfo.job_title);\r\n\t\t\t\tsavedateSignFinanceApprover(moment().format('MM-DD-YYYY'));\r\n\t\t\t\tsaveHrApprover(personalRequest.human_resources_approval_name);\r\n\t\t\t\tsaveHrApproverTitle(personalRequest.human_resources_approval_job_title);\r\n\t\t\t\tsaveSignatureHRApprover(personalRequest.human_resources_approval_signature);\r\n\t\t\t\tsavedateSignHrApprover(moment(personalRequest.human_resources_approval_signature_date).format('MM-DD-YYYY'));\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tif(personalRequest.status === 'Finance Approval') {\r\n\t\t\t\t\r\n\t\t\t\tsaveHrApprover(personalRequest.human_resources_approval_name);\r\n\t\t\t\tsaveHrApproverTitle(personalRequest.human_resources_approval_job_title);\r\n\t\t\t\tsaveSignatureHRApprover(personalRequest.human_resources_approval_signature);\r\n\t\t\t\tsavedateSignHrApprover(moment(personalRequest.human_resources_approval_signature_date).format('MM-DD-YYYY'));\r\n\t\t\t\tsaveFinanceApprover(`${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`);\r\n\t\t\t\tsaveFinanceApproverTitle(userInfo.userInfo.job_title);\r\n\t\t\t\tsaveSignatureFinanceApprover(personalRequest.finance_notification_signature);\r\n\t\t\t\tsavedateSignFinanceApprover(moment().format('MM-DD-YYYY'));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(personalRequest.status === 'Additional Approval') {\r\n\t\t\t\tsaveAdditionalApprover(`${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`);\r\n\t\t\t\tsaveAdditionalApproverTitle(userInfo.userInfo.job_title);\r\n\t\t\t\tsavedateSignAdditionalApprover(moment().format('MM-DD-YYYY'));\r\n\t\t\t\tsaveHrApprover(personalRequest.human_resources_approval_name);\r\n\t\t\t\tsaveHrApproverTitle(personalRequest.human_resources_approval_job_title);\r\n\t\t\t\tsaveSignatureHRApprover(personalRequest.human_resources_approval_signature);\r\n\t\t\t\tsavedateSignHrApprover(moment(personalRequest.human_resources_approval_signature_date).format('MM-DD-YYYY'));\r\n\t\t\t\tsaveFinanceApprover(personalRequest.finance_notification_request_name);\r\n\t\t\t\tsaveFinanceApproverTitle(personalRequest.finance_notification_job_title);\r\n\t\t\t\tsaveSignatureFinanceApprover(personalRequest.finance_notification_signature);\r\n\t\t\t\tsavedateSignFinanceApprover(moment(personalRequest.finance_notification_signature_date).format('MM-DD-YYYY'));\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// saveHrApprover(personalRequest.human_resources_approval_name);\r\n\t\t\t\t// saveHrApproverTitle(personalRequest.human_resources_approval_job_title);\r\n\t\t\t\t// saveSignatureHRApprover(personalRequest.human_resources_approval_signature);\r\n\t\t\t\t// savedateSignHrApprover(moment(personalRequest.human_resources_approval_signature_date).format('MM-DD-YYYY'));\r\n\r\n\t\t\t\t// // finance\r\n\r\n\t\t\t\t// if(personalRequest.finance_notification_job_title !== null) {\r\n\t\t\t\t// \tsaveFinanceApprover(personalRequest.finance_notification_request_name);\r\n\t\t\t\t// \tsaveFinanceApproverTitle(personalRequest.finance_notification_job_title);\r\n\t\t\t\t// \tsaveSignatureFinanceApprover(personalRequest.finance_notification_signature);\r\n\t\t\t\t// \tsavedateSignFinanceApprover(moment(personalRequest.finance_notification_signature_date).format('MM-DD-YYYY'));\r\n\t\t\t\t// }\r\n\r\n\t\t\t\t// // additional approver\r\n\t\t\t\t// if(personalRequest.additional_approval_job_title !== null) {\r\n\t\t\t\t// \tsaveAdditionalApprover(personalRequest.additional_approval_name);\r\n\t\t\t\t// \tsaveAdditionalApproverTitle(personalRequest.additional_approval_job_title);\r\n\t\t\t\t// \tsaveSignatureAdditionalApprover(personalRequest.additional_approval_job_signature);\r\n\t\t\t\t// \tsavedateSignAdditionalApprover(moment(personalRequest.additional_approval_signature_date).format('MM-DD-YYYY'));\r\n\t\t\t\t// }\r\n\t\t\t}\r\n\t\t}\r\n\t}, [personalRequest])\r\n\r\n\tconst isWeekday = date => {\r\n const day = moment(date).day();\r\n return day !== 0 && day !== 6;\r\n };\r\n\r\n\t let sigPadEmployee = {};\r\n\t let sigPadHrApprover = {};\r\n\t let sigPadFinanceApprover = {};\r\n\t let sigPadAdditionalApprover = {};\r\n // const clearEmployee = (e) => {\r\n // e.preventDefault();\r\n // sigPadEmployee.clear();\r\n // }\r\n\r\n\tconst employeeOptions = employees.map(employee => ({\r\n\t\tvalue: employee.email,\r\n\t\tlabel: `${employee.employee_name} ${employee.employee_lastname}`\r\n\t}));\r\n\r\n\tconst handleEmployeeChange = selectedOption => {\r\n\t\tsaveAdditionalApprover(selectedOption.value);\r\n\t};\r\n\r\n\t const clearHrSignature = (e) => {\r\n e.preventDefault();\r\n sigPadHrApprover.clear();\r\n }\r\n\r\n\t const clearFinanceSignature = (e) => {\r\n e.preventDefault();\r\n sigPadFinanceApprover.clear();\r\n }\r\n\r\n\t const clearAdditionalSignature = (e) => {\r\n e.preventDefault();\r\n sigPadAdditionalApprover.clear();\r\n }\r\n\r\n // const saveCanvasEmployee = (e)=> {\r\n // e.preventDefault();\r\n // let urlImage = sigPadEmployee.getTrimmedCanvas().toDataURL('image/png');\r\n // saveSignatureEmployee(urlImage);\r\n // }\r\n\r\n\tconst saveCanvasHrApprover = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadHrApprover.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureHRApprover(urlImage);\r\n }\r\n\r\n\tconst saveCanvasFinanceApprover = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadFinanceApprover.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureFinanceApprover(urlImage);\r\n }\r\n\r\n\tconst saveCanvasAdditionalApprover = (e)=> {\r\n e.preventDefault();\r\n let urlImage = sigPadAdditionalApprover.getTrimmedCanvas().toDataURL('image/png');\r\n saveSignatureAdditionalApprover(urlImage);\r\n }\r\n\r\n\tconst editPersonalRequestFunction = (request) => dispatch(editPersonalRequestAction(request));\r\n\r\n\tconst sumitEditFixedAsset = e => {\r\n\t\te.preventDefault();\r\n\r\n\t\tswitch (personalRequest.status) {\r\n\t\t\tcase 'H.R. Approval':\r\n\t\t\t\t//dispatch(validarFormulario());\r\n\t\t\t\tif(requestorName.trim() === '' || requestorTitle.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee.trim() === '') {\r\n\t\t\t\t//\tdispatch(validacionError());\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//dispatch(validacionExito());\r\n\r\n\t\t\t\t// save to database\r\n\t\t\t\tSwal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Personal Request is going to be send to Finance Department for Approval.\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n saveStatus('Finance Approval');\r\n \r\n let request = personalRequest\r\n\r\n\t\t\t\t\t\t//console.log(HrApprover, HrApproverTitle);\r\n\r\n\t\t\t\t\t\t\r\n \r\n request.status = 'Finance Approval';\r\n request.human_resources_approval_name = `${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`;\r\n\t\t\t\t\t\trequest.human_resources_approval_job_title = userInfo.userInfo.job_title;\r\n\t\t\t\t\t\trequest.human_resources_approval_signature = signatureHRApprover;\r\n\t\t\t\t\t\trequest.human_resources_approval_signature_date = moment().format('YYYY-MM-DD');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email-personal-request', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Personal Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n editPersonalRequestFunction(request);\r\n \r\n\t\t\t\t\t\t\t \r\n setTimeout(() => {\r\n //window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'Finance Approval':\r\n\t\t\t\t//dispatch(validarFormulario());\r\n\t\t\t\tif(requestorName.trim() === '' || requestorTitle.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee.trim() === '') {\r\n\t\t\t\t//\tdispatch(validacionError());\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//dispatch(validacionExito());\r\n\r\n\t\t\t\t// save to database\r\n\t\t\t\tSwal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Personal Request is going to be send to H.R. Department for Approval.\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n saveStatus('Additional Approval');\r\n \r\n let request = personalRequest\r\n\t\t\t\t\t\t\r\n \r\n request.status = 'Additional Approval';\r\n request.finance_notification_request_name = `${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`;\r\n\t\t\t\t\t\trequest.finance_notification_job_title = userInfo.userInfo.job_title;\r\n\t\t\t\t\t\trequest.finance_notification_signature = signatureFinanceApprover;\r\n\t\t\t\t\t\trequest.finance_notification_signature_date = moment().format('YYYY-MM-DD');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email-personal-request', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Personal Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n editPersonalRequestFunction(request);\r\n \r\n\t\t\t\t\t\t\t \r\n setTimeout(() => {\r\n //window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'Additional Approval':\r\n\t\t\t\t//dispatch(validarFormulario());\r\n\t\t\t\tif(requestorName.trim() === '' || requestorTitle.trim() === '' || signatureEmployee.trim() === '' || dateSignEmployee.trim() === '') {\r\n\t\t\t\t//\tdispatch(validacionError());\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//dispatch(validacionExito());\r\n\r\n\t\t\t\t// save to database\r\n\t\t\t\tSwal.fire({\r\n title: '¿Are you sure?',\r\n text: \"Personal Request is going to be send to H.R. Department for Approval.\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Send!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n // console.log(pto);\r\n if (result.value) {\r\n saveStatus('Completed');\r\n \r\n let request = personalRequest\r\n\t\t\t\t\t\t\r\n \r\n request.status = 'Completed';\r\n request.additional_approval_name = `${userInfo.userInfo.name} ${userInfo.userInfo.lastname}`;\r\n\t\t\t\t\t\trequest.additional_approval_job_title = userInfo.userInfo.job_title;\r\n\t\t\t\t\t\trequest.additional_approval_job_signature = signatureAdditionalApprover;\r\n\t\t\t\t\t\trequest.additional_approval_signature_date = moment().format('YYYY-MM-DD');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email-personal-request', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Personal Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n editPersonalRequestFunction(request);\r\n \r\n\t\t\t\t\t\t\t \r\n setTimeout(() => {\r\n //window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n }\r\n })\r\n\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tconst denyRecruitmentRequest = (e, request) => {\r\n // ask user confirmation\r\n\t\te.preventDefault();\r\n \r\n Swal.fire({\r\n title: '¿Reason?',\r\n text: \"This action can't be undone\",\r\n type: 'warning',\r\n input: 'text',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, Denied!',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Denied',\r\n 'The Recruitment Request has been denied successfully.',\r\n 'success'\r\n ) \r\n \r\n\t\t\t saveStatus('Finance Approval');\r\n \r\n let request = personalRequest;\r\n\r\n request.status = 'Request Denied';\r\n\t\t\t\t\t\trequest.reason = result.value;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n // request.status = 'Under Review by I.T.';\r\n clienteAxiosHR.post('/request-email-personal-request', request)\r\n .then(respuesta => {\r\n //console.log(respuesta);\r\n Swal.fire(\r\n 'Sent',\r\n 'Personal Request has been Approved and email notification was sent successfully.',\r\n 'success'\r\n )\r\n\r\n\t\t\t\t\t\t\t \r\n setTimeout(() => {\r\n //window.location.reload(false);\r\n history.push('/home');\r\n }, 3000);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n Swal.fire(\r\n 'Failed',\r\n 'An error was occurred by approving your request.',\r\n 'warning'\r\n )\r\n })\r\n\r\n \r\n }\r\n })\r\n \r\n }\r\n\r\n\r\n return (\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t

Recruitment Request Form

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t saveCostCenter(e.target.value) }\r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Position Details */}\r\n\t\t\t\t\t\t

Position Details

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t savePositionTitle(e.target.value) }\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={positionTitle}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveHiringManager(e.target.value) }\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={hiringManager}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveContactNumber(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/* Employee Clasification */}\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t

Employee Classification

\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t{/* Begin Row */}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t{ other ? \r\n\t\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t saveOtherText(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trequired \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={otherText}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t:null\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{/* End Row */}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/* Work Schedule */}\r\n\t\t\t\t\t\t

Work Schedule

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveShiftFrom(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={shiftFrom}\r\n\t\t\t\t\t\t\t\t\t\tdisabled \r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveShiftTo(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\tdefaultValue={shiftTo}\r\n\t\t\t\t\t\t\t\t\t\trequired \r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Position Information */}\r\n\t\t\t\t\t\t

Position Information

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t handleCheckbox(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t saveExistingPositionReplacement(e.target.value)} \r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled = {newPosition === true ? true : false} \r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsavePositionInformation(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveDailyActivities(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveMeasureProductivity(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveFinancialImpact(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsavePositionFit(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//
onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveObjectives(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tsaveContingencies(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t//onChange = {handleChangeInput}\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t{/* Approvals && Notifications */}\r\n\r\n\t\t\t\t\t\t

Approvals & Notifications

\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t{personalRequest.status === 'H.R. Approval'\r\n\r\n\t\t\t\t\t? \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{/*

Approvals & Notifications

*/}\r\n
\r\n\r\n\t\t\t\t\t\t\t{userInfo.userInfo.email === 'nubia.osuna@mexilink.com'\r\n ?\r\n
\r\n
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n {/* \r\n */}\r\n
\r\n
\r\n :null\r\n }\r\n \r\n\t\t\t\t\t\t\t
\r\n \r\n
\r\n \r\n saveHrApprover(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\t\t\t\t\t\t\t\t\t\t saveHrApproverTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadHrApprover = ref}} \r\n onEnd = {saveCanvasHrApprover}\r\n />\r\n {/* */}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n savedateSignHrApprover(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t{personalRequest.status === 'Finance Approval' \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n \r\n\t\t\t\t\t\t\t
\r\n \r\n
\r\n \r\n saveFinanceApprover(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\t\t\t\t\t\t\t\t\t\t saveFinanceApproverTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadFinanceApprover = ref}} \r\n onEnd = {saveCanvasFinanceApprover}\r\n />\r\n {/* */}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n savedateSignFinanceApprover(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t:\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{personalRequest.status === 'Additional Approval' \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorName(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t saveRequestorTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"signature\"/\r\n\t\t\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{/* */}\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tsaveDateSignEmployee(e.target.value)}\r\n\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t
\r\n \r\n\t\t\t\t\t\t\t
\r\n \r\n
\r\n \r\n saveAdditionalApprover(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\t\t\t\t\t\t\t\t\t\t saveAdditionalApproverTitle(e.target.value)}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {sigPadAdditionalApprover = ref}} \r\n onEnd = {saveCanvasAdditionalApprover}\r\n />\r\n {/* */}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n {/* saveDateSignEmployee(e.target.value)}\r\n /> */}\r\n dateSignAdditionalApprover(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n minDate={new Date()}\r\n excludeDates={excludedDatesArray}\r\n required\r\n disabled\r\n />\r\n
\r\n
\r\n \r\n
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t:\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t{ error ?
ERROR: Please fill out all the required fields.
: null }\r\n\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t\r\n );\r\n};\r\n\r\nexport default EditPersonalRequest;","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\n\r\nconst ListDepartments = ({department}) => {\r\n let directorOf = JSON.parse(department.director_of);\r\n\r\n if (directorOf.length === 0) {\r\n directorOf[0] = {\"id\" : Math.floor(Math.random() * 100) + 200, \"department\" : \"Not assigned\"}\r\n }\r\n \r\n return (\r\n \r\n {department.department}\r\n {department.email_director}\r\n {department.report_to}\r\n
    \r\n {directorOf.length > 1 \r\n ? \r\n directorOf.map(name =>
  • {name.department}
  • ) \r\n :\r\n {directorOf[0].department}\r\n \r\n }\r\n
\r\n
\r\n {department.active === 1 ? \"Active\" : \"Inactive\"}\r\n \r\n Edit Department\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ListDepartments;","import React, {useEffect, useState} from 'react';\r\nimport {obtenerDepartamentos} from '../actions/manageActions';\r\nimport { useDispatch, useSelector, useStore } from 'react-redux';\r\n\r\nimport Spinner from './helpers/Spinner';\r\nimport ListDepartments from './ListDepartments';\r\n\r\nconst Departments = () => {\r\n const dispatch = useDispatch();\r\n\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n\r\n useEffect(() => {\r\n const loadDepartments = ()=> dispatch(obtenerDepartamentos());\r\n loadDepartments();\r\n }, [])\r\n \r\n return (\r\n departments !== undefined && departments !== ''\r\n ?\r\n \r\n \r\n \r\n
\r\n

Departments

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n departments.map(department =>(\r\n \r\n \r\n \r\n ))\r\n }\r\n \r\n
Name Director Mail Report toResponsableColorActiveActions
\r\n
\r\n
\r\n :\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Departments;","import React, {useState, useEffect, useRef} from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {newDepartmentAction} from '../actions/manageActions';\r\nimport Swal from 'sweetalert2';\r\n\r\nconst NewDepartment = ({match, history}) => {\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n \r\n return el.id === Number(query);\r\n \r\n })\r\n }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const createDepartment = (departmentToCreate) => dispatch (newDepartmentAction(departmentToCreate));\r\n \r\n \r\n const [departmentName, setDepartmentName] = useState('');\r\n const [directorMail, setDirectorMail] = useState('');\r\n const [reportTo, setReportTo] = useState('');\r\n const [active, setActive] = useState(true);\r\n const [responsible, setResponsible] = useState([]);\r\n const [checkedState, setCheckedState] = useState(departments);\r\n const [costCenter, setCostCenter] = useState('');\r\n \r\n const color = \"#\" + ((1<<24)*Math.random() | 0).toString(16);\r\n\r\n const handleCheckActive = (value) => {\r\n \r\n var newActive = !active;\r\n setActive(!active);\r\n }\r\n\r\n const handleCheckResponsible = (position, department) => {\r\n let updateCheckedState = checkedState;\r\n\r\n let found = updateCheckedState.find(departmentFound =>departmentFound.department === department.department);\r\n if(found){\r\n console.log('departamento encontrado')\r\n let responsibleArray = responsible.filter((item) => item.department !== department.department)\r\n setResponsible(responsibleArray);\r\n }else {\r\n console.log('departamento no encontrado')\r\n updateCheckedState.push(responsible[position])\r\n let responsibleArray = responsible.filter((item) => item.department !== department.department)\r\n console.log(responsibleArray);\r\n setResponsible(responsibleArray);\r\n setCheckedState(updateCheckedState);\r\n }\r\n \r\n }\r\n\r\n const handleCheckDepartment = (position, department) => {\r\n\r\n let updateCheckedState = [];\r\n let updateResponsible = responsible;\r\n\r\n let found = updateResponsible.find(departmentFound =>departmentFound.department === department.department);\r\n if(found) {\r\n console.log('articulo encontrado')\r\n updateCheckedState = checkedState.filter((item) => item.department !== department.department)\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Warning',\r\n text: `${department.department} department is already assigned.`,\r\n type: 'warning',\r\n showCancelButton: false,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Accept',\r\n })\r\n setCheckedState(updateCheckedState);\r\n }else {\r\n console.log('articulo no encontrado')\r\n if(checkedState[position]) {\r\n console.log(checkedState[position])\r\n updateResponsible.push(checkedState[position])\r\n updateCheckedState = checkedState.filter((item) => item.department !== department.department)\r\n setResponsible(updateResponsible)\r\n setCheckedState(updateCheckedState)\r\n //console.log(responsible)\r\n }\r\n }\r\n\r\n\r\n \r\n }\r\n\r\n // useEffect(() => {\r\n // // departmentsToSelect();\r\n \r\n // }, [])\r\n\r\n const submitDepartment = (e) => {\r\n e.preventDefault();\r\n Swal.fire({\r\n title: 'Create Department',\r\n text: \"Are you sure ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n\r\n if(result.value) {\r\n\r\n Swal.fire(\r\n 'Saved',\r\n 'Department info has been created successfully.',\r\n 'success'\r\n )\r\n\r\n createDepartment({\r\n departmentName,\r\n directorMail,\r\n reportTo,\r\n active,\r\n responsible,\r\n color,\r\n costCenter\r\n });\r\n\r\n //redirect\r\n history.push('/home');\r\n\r\n\r\n }\r\n\r\n \r\n\r\n \r\n });\r\n }\r\n \r\n \r\n \r\n \r\n\r\n useEffect(() => {\r\n\r\n\r\n }, [responsible, checkedState])\r\n \r\n\r\n \r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n setDepartmentName(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setDirectorMail(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setReportTo(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setCostCenter(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckActive(e.target.value) } \r\n checked= {active}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n {\r\n \r\n responsible.map((department, index) => {\r\n return (\r\n \r\n {\r\n \r\n \r\n
\r\n {/* handleCheckResponsible(index)}\r\n /> */}\r\n \r\n {/* handleCheckResponsible(index, department) } \r\n checked={checkedState[index]}\r\n /> */}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n }\r\n \r\n
\r\n \r\n );\r\n }\r\n )}\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n {\r\n \r\n checkedState.map((department, index) => {\r\n return (\r\n \r\n {\r\n \r\n \r\n
\r\n {/* handleCheckResponsible(index)}\r\n /> */}\r\n \r\n {/* handleCheckDepartment(index, department) } \r\n \r\n /> */}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n }\r\n \r\n
\r\n \r\n );\r\n }\r\n )}\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default NewDepartment;","import React, {useState, useEffect, useRef} from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {editDepartmentAction} from '../actions/manageActions';\r\nimport Swal from 'sweetalert2';\r\n\r\nconst EditDepartment = ({match, history}) => {\r\n\r\n // obtener departamentos\r\n const departments = useSelector(state=>state.manager.departments);\r\n\r\n const {id} = match.params;\r\n\r\n const filterElementsByDepartment = (array, query) => {\r\n return array.filter(function(el) {\r\n \r\n return el.id === Number(query);\r\n \r\n })\r\n }\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const editDepartment = (departmentToEdit) => dispatch (editDepartmentAction(departmentToEdit));\r\n\r\n \r\n let responsibleDepartment\r\n\r\n const department = filterElementsByDepartment(departments,id);\r\n if(department[0].director_of !== undefined ) {\r\n responsibleDepartment = JSON.parse(department[0].director_of);\r\n }else {\r\n responsibleDepartment = [department[0]];\r\n }\r\n \r\n\r\n\r\n\r\n const merge = responsibleDepartment.map((item, index) => \r\n //console.log(item.department, index)\r\n // item.department === departments[index].department ? false : item\r\n \r\n \r\n departments.find(element => item.id === element.id)\r\n // console.log(item.department)\r\n // let elements = departments.filter((el, indice) => el.department !== item.department);\r\n // if(departments.indexOf(item.department) === -1) {\r\n // console.log('no encontrado')\r\n // }\r\n \r\n )\r\n\r\n console.log(merge)\r\n\r\n \r\n \r\n\r\n const [idDepartment, setIdDepartment] = useState(department[0].id)\r\n const [departmentName, setDepartmentName] = useState('');\r\n const [directorMail, setDirectorMail] = useState('');\r\n const [reportTo, setReportTo] = useState('');\r\n const [active, setActive] = useState(department[0].active);\r\n const [responsible, setResponsible] = useState(merge);\r\n const [checkedState, setCheckedState] = useState(departments);\r\n const [costCenter, setCostCenter] = useState('');\r\n\r\n //new Array(departments.length).fill(false)\r\n\r\n // let departmentsToSelect = () => {\r\n // let responsibles = merge;\r\n // let updateCheckedState = checkedState;\r\n // let update;\r\n // update = updateCheckedState.filter((departmentFound, index) => {\r\n // if(responsibles[index] !== undefined) {\r\n // console.log(departmentFound.department, responsibles[index].department)\r\n // return departmentFound.department !== responsibles[index].department ? departmentFound : ''\r\n // }\r\n // }\r\n \r\n // );\r\n // setCheckedState(update)\r\n \r\n \r\n // }\r\n\r\n const handleCheckActive = (value) => {\r\n \r\n var newActive = !active;\r\n setActive(!active);\r\n }\r\n\r\n const handleCheckResponsible = (position, department) => {\r\n let updateCheckedState = checkedState;\r\n\r\n let found = updateCheckedState.find(departmentFound =>departmentFound.department === department.department);\r\n if(found){\r\n console.log('departamento encontrado')\r\n let responsibleArray = responsible.filter((item) => item.department !== department.department)\r\n setResponsible(responsibleArray);\r\n }else {\r\n console.log('departamento no encontrado')\r\n updateCheckedState.push(responsible[position])\r\n let responsibleArray = responsible.filter((item) => item.department !== department.department)\r\n console.log(responsibleArray);\r\n setResponsible(responsibleArray);\r\n setCheckedState(updateCheckedState);\r\n }\r\n \r\n }\r\n\r\n const handleCheckDepartment = (position, department) => {\r\n\r\n let updateCheckedState = [];\r\n let updateResponsible = responsible;\r\n\r\n let found = updateResponsible.find(departmentFound =>departmentFound.department === department.department);\r\n if(found) {\r\n console.log('articulo encontrado')\r\n updateCheckedState = checkedState.filter((item) => item.department !== department.department)\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Warning',\r\n text: `${department.department} department is already assigned.`,\r\n type: 'warning',\r\n showCancelButton: false,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Accept',\r\n })\r\n setCheckedState(updateCheckedState);\r\n }else {\r\n console.log('articulo no encontrado')\r\n if(checkedState[position]) {\r\n console.log(checkedState[position])\r\n delete checkedState[position].director_of\r\n console.log(checkedState[position])\r\n updateResponsible.push(checkedState[position])\r\n updateCheckedState = checkedState.filter((item) => item.department !== department.department)\r\n console.log(updateResponsible)\r\n setResponsible(updateResponsible)\r\n setCheckedState(updateCheckedState)\r\n //console.log(responsible)\r\n }\r\n }\r\n\r\n\r\n \r\n }\r\n\r\n // useEffect(() => {\r\n // // departmentsToSelect();\r\n \r\n // }, [])\r\n\r\n const submitDepartment = (e) => {\r\n e.preventDefault();\r\n Swal.fire({\r\n title: 'Edit Department',\r\n text: \"Are you sure ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel'\r\n }).then((result) => {\r\n\r\n if(result.value) {\r\n\r\n Swal.fire(\r\n 'Saved',\r\n 'Department info has been updated successfully.',\r\n 'success'\r\n )\r\n\r\n editDepartment({\r\n idDepartment,\r\n departmentName,\r\n directorMail,\r\n reportTo,\r\n active,\r\n responsible,\r\n costCenter\r\n });\r\n\r\n //redirect\r\n history.push('/home');\r\n\r\n\r\n }\r\n\r\n \r\n\r\n \r\n });\r\n }\r\n \r\n \r\n \r\n \r\n\r\n useEffect(() => {\r\n\r\n setDepartmentName(department[0].department)\r\n setDirectorMail(department[0].email_director)\r\n setReportTo(department[0].report_to)\r\n \r\n console.log(responsible)\r\n console.log(checkedState)\r\n }, [responsible, checkedState])\r\n \r\n\r\n \r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n setDepartmentName(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setDirectorMail(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setReportTo(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n \r\n setCostCenter(e.target.value) }\r\n />\r\n
\r\n\r\n
\r\n

\r\n
\r\n handleCheckActive(e.target.value) } \r\n checked= {active}\r\n />\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n {\r\n \r\n responsible.map((department, index) => {\r\n return (\r\n \r\n {\r\n \r\n \r\n
\r\n {/* handleCheckResponsible(index)}\r\n /> */}\r\n \r\n {/* handleCheckResponsible(index, department) } \r\n checked={checkedState[index]}\r\n /> */}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n }\r\n \r\n
\r\n \r\n );\r\n }\r\n )}\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n {\r\n \r\n checkedState.map((department, index) => {\r\n return (\r\n \r\n {\r\n \r\n \r\n
\r\n {/* handleCheckResponsible(index)}\r\n /> */}\r\n \r\n {/* handleCheckDepartment(index, department) } \r\n \r\n /> */}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n }\r\n \r\n
\r\n \r\n );\r\n }\r\n )}\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default EditDepartment;","import React, {useState, useEffect} from 'react';\r\n// Redux\r\nimport { useDispatch } from 'react-redux';\r\n// libraries\r\nimport { useSelector } from 'react-redux';\r\nimport moment from 'moment';\r\nimport PhoneInput from 'react-phone-number-input';\r\nimport 'react-phone-number-input/style.css';\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport Swal from 'sweetalert2';\r\nimport {editarProfile} from '../actions/authenticateActions';\r\n\r\n\r\nconst ViewProfile = ({match, history}) => {\r\n\r\n // obtener el ID a editar\r\n const { uid } = match.params;\r\n\r\n const usersHour = useSelector(state=>state.manager.employees);\r\n\r\n // get user general data\r\n const employeeData = usersHour.filter(user => user.uid == uid);\r\n\r\n if(employeeData === undefined) {\r\n history.push('/home');\r\n }\r\n\r\n const [employeeName, saveEmployeeName] = useState('');\r\n const [phone, savePhone] = useState('');\r\n const [birthplace, saveBirthPlace] = useState('');\r\n const [birthdate, saveBirthDate] = useState('');\r\n\r\n useEffect(() => {\r\n saveEmployeeName(employeeData[0].employee_name);\r\n savePhone(employeeData[0].phone);\r\n saveBirthPlace(employeeData[0].birth_place);\r\n saveBirthDate(new Date((moment(employeeData[0].birth_date).utc().format('MM/DD/YYYY'))))\r\n }, [])\r\n\r\n // dispatch actions\r\n const dispatch = useDispatch();\r\n const editProfile = (user) => dispatch (editarProfile(user));\r\n \r\n // Add new PTO\r\n const submitEditUser = e => {\r\n e.preventDefault();\r\n // validarFormulario();\r\n // Preguntar al usuario\r\n Swal.fire({\r\n title: 'Request Summary',\r\n text: \"This is your summary request, are you sure to submit ?\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Confirm',\r\n cancelButtonText: 'Cancel',\r\n html: '
'+\r\n '

Name : ' + employeeName + '

' +\r\n '
'\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.fire(\r\n 'Saved',\r\n 'Your request has been sent successfully',\r\n 'success'\r\n )\r\n \r\n const formatBirthDate = moment(birthdate).format('YYYY-MM-DD');\r\n const uidEmployee = uid; \r\n editProfile({\r\n employeeName,\r\n formatBirthDate,\r\n birthplace,\r\n phone,\r\n uidEmployee\r\n });\r\n \r\n \r\n \r\n //redirect\r\n history.push('/home');\r\n }\r\n })\r\n \r\n \r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

Your Profile

\r\n
\r\n
\r\n
\r\n {/* Change avatar dinamically */}\r\n \"avatar\"\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveUserName(e.target.value)}\r\n required\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n saveEmail(e.target.value) }\r\n required\r\n value={employeeData[0].email}\r\n readOnly\r\n />\r\n
\r\n\r\n
\r\n \r\n saveEmailSupervisor(e.target.value) }\r\n value= {employeeData[0].supervisor_mail}\r\n required\r\n readOnly\r\n />\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n saveDayBeginning(e.target.value)}\r\n required\r\n // ref = {dayBeginingRef}\r\n value = {moment(employeeData[0].hire_date).format('YYYY-MM-DD')}\r\n readOnly\r\n />\r\n {/* saveHireDate(date)}\r\n filterDate={isWeekday}\r\n placeholderText=\"Select a weekday\"\r\n // minDate={new Date()}\r\n excludeDates={excludedDatesArray} \r\n /> */}\r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {/* saveDayBeginning(e.target.value)}\r\n required\r\n ref = {dayBeginingRef}\r\n /> */}\r\n saveBirthDate(date)}\r\n placeholderText=\"Select birth date\"\r\n // minDate={new Date()}\r\n />\r\n\r\n
\r\n\r\n
\r\n \r\n saveBirthPlace(e.target.value)}\r\n required\r\n />\r\n
\r\n\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ViewProfile;","import React, { useEffect } from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport moment from 'moment';\r\n\r\n\r\nimport {useSelector } from 'react-redux';\r\n\r\n\r\nconst EmployeesTranslateHours = ({employee, history, incrementRules}) => {\r\n\r\n // acceder al state\r\n const userInfo = useSelector(state=>state.userInfo);\r\n\r\n if(userInfo.userInfo.name === undefined){\r\n // history.push('/home');\r\n }\r\n\r\n \r\n \r\n\r\n useEffect(() => {\r\n\r\n incrementRules(employee);\r\n \r\n }, [])\r\n \r\n\r\n \r\n \r\n\r\n return (\r\n \r\n {employee.employee_name}{' '}{employee.employee_lastname}\r\n {employee.department}\r\n {moment.utc(employee.hire_date).format('YYYY-MM-DD')}\r\n {/* {moment.utc(employee.increase_date).format('YYYY-MM-DD')} */}\r\n {employee.available_hours}\r\n {employee.carry_over}\r\n {employee.sick_days_limit}\r\n {employee.carry_over_sick_time}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {incrementRules(employee).newAvailableHours}\r\n {incrementRules(employee).seniority}\r\n {incrementRules(employee).newCarryOver}\r\n {incrementRules(employee).newSickDays}\r\n {incrementRules(employee).newCarryOverSickDays}\r\n \r\n Edit Profile\r\n \r\n \r\n );\r\n};\r\n\r\nexport default EmployeesTranslateHours;","import React, {useState, useEffect, Fragment} from 'react';\r\nimport EmployeesTranslateHours from './EmployeesTranslateHours';\r\nimport moment from 'moment';\r\nimport {editarUsuario} from '../actions/authenticateActions';\r\nimport axiosHr from '../config/axiosHR';\r\nimport {obtenerEmpleadosManager} from '../actions/manageActions';\r\n\r\n//Redux\r\nimport { useDispatch, useSelector, useStore } from 'react-redux';\r\n\r\nconst TranslateHours = ({history}) => {\r\n\r\n\r\n //acceder al state\r\n const managerEmployees = useSelector(state=>state.manager.employees);\r\n const userInfo = useSelector(state=>state.userInfo) \r\n \r\n const sortByName = (array) => {\r\n return array.sort(function(a,b) {\r\n let x = a.employee_name.toLowerCase();\r\n let y = b.employee_name.toLowerCase();\r\n \r\n if(x>y) {return 1;}\r\n if(x dispatch (editarUsuario(user));\r\n let data = {\r\n reportType:1,\r\n manager: userInfo.userInfo.manager,\r\n companyManager: userInfo.userInfo.company\r\n }\r\n const loadEmployeesManager = ()=>dispatch(obtenerEmpleadosManager(data));\r\n\r\n //State para el loading\r\n const [loading, saveLoading] = useState(false);\r\n\r\n // Crear reglas de incremento.\r\n const incrementRules = (employee) => {\r\n let newAvailableHours = employee.available_hours;\r\n let newCarryOver = employee.carry_over;\r\n let newSickDays = employee.sick_days_limit;\r\n let newCarryOverSickDays = employee.carry_over_sick_time;\r\n // let hireDate = moment.utc(employee.hire_date);\r\n\r\n let seniority = (Math.floor((moment([employee.hire_date, 0]).diff(moment(), 'year') * -1)/(3)) * 8) >= 41 ? 40 : (Math.floor((moment([employee.hire_date, 0]).diff(moment(), 'year') * -1)/(3)) * 8);\r\n let yearsSeniority = Math.floor((moment([employee.hire_date, 0]).diff(moment(), 'year') * -1));\r\n let seniorityCSI = 0;\r\n // Reglas de incremento.\r\n\r\n \r\n\r\n //console.log(seniority , 'seniority' , employee.hire_date, 'hire date', employee.employee_name, 'employee name');\r\n \r\n \r\n\r\n if(employee.company === 'CSI'){\r\n\r\n // CSI RULES\r\n console.log('CSI RULES');\r\n \r\n\r\n switch (yearsSeniority) {\r\n case 1:\r\n newAvailableHours = 120;\r\n break;\r\n case 2:\r\n newAvailableHours = 120;\r\n break;\r\n case 3:\r\n newAvailableHours = 128;\r\n break;\r\n case 4:\r\n newAvailableHours = 144;\r\n break;\r\n case 5:\r\n newAvailableHours = 160;\r\n break;\r\n case 6:\r\n newAvailableHours = 176;\r\n break;\r\n case 7:\r\n newAvailableHours = 176;\r\n break;\r\n case 8:\r\n newAvailableHours = 176;\r\n break;\r\n case 9:\r\n newAvailableHours = 176;\r\n break;\r\n case 10:\r\n newAvailableHours = 176;\r\n break;\r\n case 11:\r\n newAvailableHours = 192;\r\n break;\r\n case 12:\r\n newAvailableHours = 192;\r\n break;\r\n case 13:\r\n newAvailableHours = 192;\r\n break;\r\n case 14:\r\n newAvailableHours = 192;\r\n break;\r\n case 15:\r\n newAvailableHours = 192;\r\n break;\r\n case 16:\r\n newAvailableHours = 208;\r\n break;\r\n case 17:\r\n newAvailableHours = 208;\r\n break;\r\n case 18:\r\n newAvailableHours = 208;\r\n break;\r\n case 19:\r\n newAvailableHours = 208;\r\n break;\r\n case 20:\r\n newAvailableHours = 208;\r\n break;\r\n case 21:\r\n newAvailableHours = 224;\r\n break;\r\n case 22:\r\n newAvailableHours = 224;\r\n break;\r\n case 23:\r\n newAvailableHours = 224;\r\n break;\r\n case 24:\r\n newAvailableHours = 224;\r\n break;\r\n case 25:\r\n newAvailableHours = 224;\r\n break;\r\n case 26:\r\n newAvailableHours = 240;\r\n break;\r\n case 27:\r\n newAvailableHours = 240;\r\n break;\r\n case 28:\r\n newAvailableHours = 240;\r\n break;\r\n case 29:\r\n newAvailableHours = 240;\r\n break;\r\n case 30:\r\n newAvailableHours = 240;\r\n break;\r\n \r\n default:\r\n \r\n break;\r\n }\r\n\r\n //console.log(yearsSeniority , 'yearsseniority' , employee.hire_date, 'hire date', employee.employee_name, 'employee name', 'newAvailableHours', newAvailableHours);\r\n \r\n newAvailableHours = newAvailableHours + employee.available_hours;\r\n newSickDays = 0;\r\n newCarryOverSickDays = 0;\r\n newCarryOver = 0;\r\n\r\n return {\r\n newAvailableHours,\r\n newCarryOver,\r\n newSickDays,\r\n newCarryOverSickDays,\r\n seniority\r\n }\r\n } else {\r\n\r\n //travel benefits\r\n employee.sales_team === 1 ? newAvailableHours = 136 : newAvailableHours = 96 + seniority; \r\n\r\n if(employee.available_hours > 40){\r\n newCarryOver = 40;\r\n }else {\r\n newCarryOver = employee.available_hours;\r\n }\r\n\r\n if(employee.territory === 'California'){\r\n newSickDays = 48;\r\n\r\n if(employee.carry_over_sick_time > 72){\r\n newCarryOverSickDays = 72;\r\n }else {\r\n newCarryOverSickDays = employee.sick_days_limit;\r\n }\r\n }else {\r\n newSickDays = 24;\r\n newCarryOverSickDays = 0;\r\n }\r\n\r\n return {\r\n newAvailableHours,\r\n newCarryOver,\r\n newSickDays,\r\n newCarryOverSickDays,\r\n seniority\r\n }\r\n }\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n }\r\n\r\n const updateUserInfo = (employees) => {\r\n \r\n employees.forEach(employee => {\r\n \r\n \r\n const formatHireDate = moment(employee.hire_date).format('YYYY-MM-DD');\r\n const formatLastIncrement = moment(employee.increase_date).format('YYYY-MM-DD');\r\n const formatBirthDate = moment(employee.birth_date).format('YYYY-MM-DD');\r\n let formatTerminateDate = '';\r\n if(employee.terminate_contract === 1){\r\n formatTerminateDate = moment(employee.terminate_date).format('YYYY-MM-DD');\r\n }else {\r\n formatTerminateDate = null;\r\n }\r\n let imgPath = employee.avatar;\r\n let employeeName = employee.employee_name;\r\n let employeeLastname = employee.employee_lastname;\r\n let username = employee.username;\r\n let company = employee.company;\r\n let department = employee.department;\r\n let supervisor = employee.supervisor;\r\n let email = employee.email;\r\n let availableHours = incrementRules(employee).newAvailableHours;\r\n let carryOver = incrementRules(employee).newCarryOver;\r\n let sickDays = incrementRules(employee).newSickDays;\r\n let emailSupervisor = employee.supervisor_mail;\r\n let uidEmployee = employee.uid;\r\n let token = employee.token;\r\n let territory = employee.territory;\r\n let travelBenefits = employee.travel_benefits;\r\n let terminated = employee.terminate_contract;\r\n let accruedTimeSick = employee.accrued_sick_days;\r\n let carryOverSickTime = incrementRules(employee).newCarryOverSickDays;\r\n let idDepartment = employee.id_department;\r\n let gender = employee.gender;\r\n let parenthood = employee.parenthood;\r\n let workplace = employee.work_place;\r\n let jobTitle = employee.job_title;\r\n let phone = employee.phone;\r\n let independetContractor = employee.independent_contractor;\r\n let insperityEmployeeId = employee.insperity_employee_id;\r\n let birthplace = employee.birth_place;\r\n let salesTeam = employee.sales_team;\r\n\r\n \r\n editUser({\r\n imgPath,\r\n employeeName,\r\n employeeLastname,\r\n username,\r\n company,\r\n department,\r\n supervisor,\r\n email,\r\n availableHours,\r\n carryOver,\r\n sickDays,\r\n emailSupervisor,\r\n uidEmployee,\r\n token,\r\n formatHireDate,\r\n formatLastIncrement,\r\n territory,\r\n travelBenefits,\r\n terminated,\r\n formatTerminateDate,\r\n accruedTimeSick,\r\n carryOverSickTime,\r\n idDepartment,\r\n gender,\r\n parenthood,\r\n workplace,\r\n formatBirthDate,\r\n birthplace,\r\n jobTitle,\r\n phone,\r\n independetContractor,\r\n insperityEmployeeId,\r\n salesTeam\r\n });\r\n\r\n \r\n let data = {\r\n uid : employee.uid,\r\n hours_before_mov:parseInt(employee.available_hours),\r\n hours_after_mov:incrementRules(employee).newAvailableHours,\r\n hours_mov: incrementRules(employee).newAvailableHours - parseInt(employee.available_hours),\r\n carry_over_before_mov:parseInt(employee.carry_over),\r\n carry_over_after_mov:incrementRules(employee).newCarryOver,\r\n carry_over_sick_time_before:parseInt(employee.carry_over_sick_time),\r\n carry_over_sick_time_after:incrementRules(employee).newCarryOverSickDays,\r\n observations: `${employee.available_hours},${incrementRules(employee).newAvailableHours},${employee.carry_over},${incrementRules(employee).newCarryOver},${employee.sick_days_limit},${incrementRules(employee).newSickDays},${employee.carry_over_sick_time},${carryOverSickTime}`,\r\n type_mov: 'Edit User',\r\n date_mov: moment().format('YYYY-MM-DD'),\r\n mov_increase_date: moment(employee.increase_date).format('YYYY-MM-DD'),\r\n mov_yearly_increase_date:moment(employee.year_increase_date).format('YYYY-MM-DD'),\r\n increase_date_before_mov:formatLastIncrement,\r\n yearly_increase_date_before_mov:moment(employee.year_increase_date).format('YYYY-MM-DD')\r\n }\r\n axiosHr.post('/hour-movement-log', data)\r\n .then(respuesta => {\r\n console.log(respuesta)\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n\r\n });\r\n\r\n loadEmployeesManager();\r\n\r\n //redirect\r\n setTimeout(() => {\r\n\r\n history.push('/home');\r\n }, 3000);\r\n }\r\n\r\n\r\n return (\r\n \r\n

Translate Hours

\r\n\r\n
\r\n
\r\n

Employees Hours Translate Rules

\r\n
\r\n {userInfo.userInfo.company === 'CSI' ?\r\n
\r\n
    \r\n
  1. Employees starts with 120 available hours
  2. \r\n
  3. Users Gets 8 hours every 3 years since year of hire date
  4. \r\n \r\n {/*
  5. You Can Take PTO After 30 Days of Employment (New hired)
  6. */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
Year WorkedInitial Available Hours
1120
2120
3128
4144
5160
6-10176
11-15192
16-20208
21-25224
26-30240
\r\n
\r\n :\r\n
\r\n
    \r\n
  1. Employees starts with 96 available hours
  2. \r\n
  3. Users Gets 8 hours every 3 years since year of hire date
  4. \r\n
  5. Max Carry Over is 40 hours
  6. \r\n
  7. Initial Sick Time 24 hours
  8. \r\n
  9. Initial Sick Time California 48 Hours
  10. \r\n
  11. California Max Carry Over Sick Time 72 Hours
  12. \r\n
  13. Sales Team Starts With 136 Available Hours
  14. \r\n {/*
  15. You Can Take PTO After 30 Days of Employment (New hired)
  16. */}\r\n
\r\n
\r\n \r\n }\r\n \r\n\r\n
\r\n \r\n {loading &&
\r\n
\r\n
}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {\r\n employees.length > 0\r\n ?\r\n employees.map(employee =>(\r\n \r\n \r\n ))\r\n :\r\n \r\n null\r\n }\r\n \r\n
EmployeeDepartmentHire DateAvailable HoursCarry OverSick DaysCarry Over Sick DaysTranslate Hours ToNew Available HoursSeniority Hours (already included)New Carry OverNew Sick DaysNew Carry Over Sick DaysActions
\r\n
\r\n );\r\n};\r\n\r\nexport default TranslateHours;","import React from 'react';\r\n\r\nimport {BrowserRouter as Router, Route, Switch} from 'react-router-dom';\r\n\r\n// Redux\r\nimport {Provider} from 'react-redux';\r\nimport store from './store';\r\n\r\n//Components\r\n//import Header from './components/Header';\r\nimport Navigation from './components/Navigation';\r\nimport Home from './components/Home';\r\nimport NewPto from './components/NewPto';\r\nimport EditPto from './components/EditPto';\r\nimport ViewPto from './components/ViewPto';\r\nimport Supervisor from './components/Supervisor';\r\nimport Login from './components/Login';\r\nimport ManageDepartment from './components/ManageDepartment';\r\nimport ManageDepartmentSupervisor from './components/ManageDepartmentSupervisor';\r\nimport EmployeePtos from './components/EmployeePtos';\r\nimport PrivateRoute from './components/helpers/PrivateRoute';\r\nimport PtoCalendar from './components/PtoCalendar';\r\nimport PtoYearCalendar from './components/PtoYearCalendar';\r\nimport Director from './components/Director';\r\nimport NewPtoHr from './components/NewPtoHr';\r\nimport NewUser from './components/NewUser';\r\nimport ViewUser from './components/ViewUser';\r\nimport EditUser from './components/EditUser';\r\nimport HistoryUsers from './components/HistoryUsers';\r\nimport Footer from './components/Footer';\r\nimport UserReports from './components/UserReports';\r\n// Fixed Asset Request\r\nimport FixedAssetRequestPanel from './components/FixedAssetRequestPanel';\r\nimport NewFixedAsset from './components/NewFixedAsset';\r\nimport ViewFixedAssetRequest from './components/ViewFixedAssetRequest';\r\nimport EditFixedAssetRequest from './components/EditFixedAssetRequest';\r\n\r\n// Personal Requests\r\nimport PersonalRequestPanel from './components/PersonalRquestPanel';\r\nimport NewPersonalRequest from './components/NewPersonalRequest';\r\nimport ViewPersonalRequest from './components/ViewPersonalRequest';\r\nimport EditPersonalRequest from './components/EditPersonalRequest';\r\n\r\n// Departments\r\nimport Departments from './components/Departments';\r\nimport NewDepartment from './components/NewDepartment';\r\nimport EditDepartment from './components/EditDepartment';\r\nimport ViewProfile from './components/ViewProfile';\r\n\r\nimport TranslateHours from './components/TranslateHours';\r\n\r\n\r\nfunction App() {\r\n\r\n return (\r\n \r\n \r\n {/*
*/}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n