{"version":3,"sources":["config/constants.js","logo.png","components/navbar.js","ErrorBoundary.js","pages/home.js","util/formatNumbers.js","components/formUltraSound.js","components/modals/modalFormMassage.js","components/formMassage.js","components/formDNA.js","components/requestOtpCode.js","components/verifyOtpCode.js","components/modals/goGreenModal.js","pages/form.js","pages/apptlist.js","pages/videoRemake.js","util/index.js","pages/checkout.js","services/aws.js","services/upload-files.service.js","components/upload-images.component.js","pages/imgupload.js","components/notePageUltraSound.js","components/notePageMassage.js","pages/notepage.js","pages/login.js","pages/logsDashboard.js","pages/faq.js","components/modals/confirmationAction.js","pages/dailyReport.js","components/booking/ItemTypes.js","components/booking/droppableSidebar.js","components/booking/draggableSidebar.js","components/booking/draggableBlock.js","components/booking/droppableBlock.js","components/booking/hoverCard.js","components/booking/dnaBlock.js","components/booking/dnaBlockW.js","components/booking/defaultBlock.js","components/booking/defaultBlockW.js","components/booking/emptyBlockW.js","components/booking/emptyBlock.js","components/visitsTable.js","pages/booking.js","pages/bookingLogin.js","pages/approveDailyReport.js","components/pieChart.js","pages/consultTechnicians.js","components/barChart.js","components/horizontalBarChart.js","components/operationalDashboardGraph.js","components/pdfs/historicalReportPDF.js","components/operationalDashBoardTable.js","pages/operationalDashboard.js","components/polarAreaChart.js","pages/operationalDetails.js","pages/menuDashboard.js","pages/directorsLogin.js","pages/config.js","pages/dailyCloseout.js","pages/incompleteAppointments.js","pages/editReviewLinks.js","pages/visits.js","pages/ManagementDashboard.js","pages/contentManagerReviews.js","pages/contentManagerServices.js","components/pdfs/dynamicReportPDF.js","components/dynamicTable.js","pages/projectionReport.js","App.js","reportWebVitals.js","index.js"],"names":["sitesList","siteId","name","singleMenuOptions","type","restricted","users","label","link","dataCy","bookingMenuOptions","directorsMenuOptions","items","managementMenuOptions","questions","categoryName","id","question","answer","adminQuestionsOnly","blocks","segment","endSegment","appointment","timeZones","value","abbr","offset","isdst","text","utc","NavBar","appState","setAppState","useState","menuOptions","setMenuOptions","authType","setAuthType","authRole","setAuthRole","sites","setSites","useEffect","managementMode","directorsAuth","locationsAuth","map","el","siteLocation","siteName","bookingAuth","sitesSelect","singleAuth","role","length","handleLocationChange","logOut","a","nav","status","logOutMethod","method","headers","siteid","authorization","token","fetch","process","logOutResponse","json","data","ok","message","locationId","redirect","userId","userName","allowedPermissions","authorizationTokens","JSON","stringify","multiLogOut","singleLogout","response","Promise","reject","Error","toString","auths","logoutAttempts","auth","accesssToken","all","console","error","selectedOption","split","authObject","find","userRol","className","to","src","logo","width","alt","options","isSearchable","onChange","placeholder","defaultValue","selectedSite","prevSelectedSite","handleBookingLocationChange","data-bs-toggle","data-bs-target","aria-controls","aria-expanded","aria-label","option","index","undefined","user","data-cy","href","aria-labelledby","item","onClick","icon","faSignOutAlt","ErrorBoundary","props","state","hasError","this","children","React","Component","Home","emailOrPhone","validate","clientName","appoimentDate","appointmentId","fillForm","setstate","authState","setAuthState","searchTerm","locationTerm","facilities","search","setSearch","dateAppoiment","moment","calendar","isPast","params","useParams","results","paramSite","site","filter","facility","toLowerCase","includes","handleOnClickCheck","event","preventDefault","getMethod","clients","appoimnets","Status","FirstName","LastName","StartDateTime","Id","YellowAlert","putPayload","Execute","putMethod","allowedpermissions","body","putResponse","putData","dynamoPayload","parseInt","LocationId","appointmentDate","staffId","StaffId","arrived","Date","clientId","ClientId","putDynamo","dynamoResponse","dynamoData","target","onBlur","cleanValue","test","replace","spin","faSpinner","pathname","skip2fa","bgColor","fgColor","level","formatAmount","amount","parseFloatLocale","toLocaleString","minimumFractionDigits","maximumFractionDigits","noComma","String","replaceAll","parseFloat","parseNumberPhoneUS","phone","x","match","FormUltraSound","formData","formSubmited","setFormSubmited","setModalsState","modalsState","setFormData","msgData","requiredFields","firstName","useRef","lastName","email","address_line_1","city","zip_code","phone_cel","due_date","birth_date","doctor_facilities","pregnancy_problem","ultrasounds","about_us","terms_checkbox","waiver_checkbox","filledFirstAppointmentData","currentDate","toISOString","format","fullData","required","initialsImage","waiverSignatureImage","handleChange","phoneNumber","handleCheckbox","termsCheckboxModal","waiverCheckboxModal","handleSubmit","firstRef","validFiel","badValue","i","current","scrollIntoView","inputRequiredClass","attempt","signatureDate","pdfData","formDataPdf","FormData","birthDate","concat","dueDate","ultrasoundDate","last_ultrasound_date","lastUltrasoundDate","getMonth","getDate","getFullYear","pdfPayload","firstAppointment","missingData","client_id","initialsFile","signatureFile","addressLine1","addressLine2","address_line_2","postalCode","mobilePhone","referredBy","spousePartner","spouse_partner","phisicianName","phisician_name","phisicianPhone","phisician_phone","pregnancyProblem","pregnancyProblemExplain","pregnancy_problem_explain","normalResults","normal_results","normalResultsExplain","normal_results_explain","doctorFacilities","ipAddress","ipv4","programId","Object","keys","forEach","key","append","pdfPutMethod","pdfResponse","bucketOk","Aws","Key","mindBodyOk","MindBody","Message","FileName","clientPayload","homePhone","phone_home","workPhone","phone_work","clientPutMethod","clientResponse","clientData","payload","Client","AddressLine1","AddressLine2","BirthDate","City","State","PostalCode","MobilePhone","ReferredBy","Email","SendEmail","CrossRegionalUpdate","Test","log","ref","readOnly","maxLength","checked","htmlFor","bypass2fa","ModalFormMassage","conditionsAndTermsSignatureRef","urltoFile","url","filename","mimeType","then","res","arrayBuffer","buf","File","handleLanguageChange","language","closeModal","termsAndConditionsCheckboxModal","handleMedicalConditions","e","medicalConditions","handleModalSubmit","termsAndConditionsSignatureName","getTrimmedCanvas","toDataURL","signatureImagePNG","termsAndConditionsSignatureClass","termsAndConditionsSignatureButtonDisabled","termsAndConditionsImage","termsAndConditionsLenguage","style","textAlign","color","rows","canvasProps","onEnd","signatureLength","toData","element","disabled","FormMassage","massages","terms_conditions_checkbox","massageDate","last_massage_date","lastMassageDate","problemsMassages","problems_massages","problemsMassagesExplain","problems_massages_explain","FormDNA","waiver_checkbox_dna","RequestOtpCode","setState","requestOtpCode","otpTarget","requestOtpStatus","contact","requestCode","faMobile","faEnvelope","VerifyOtpCode","expiredCodeRequest","regenerateToken","verifyOtpCode","checkOtpStatus","ip","otpToken","verifyCode","decimalScale","allowNegative","allowLeadingZeros","onValueChange","values","isPlaying","duration","colors","remainingTime","GoGreenModal","FormPage","location","useLocation","spanishWaiverContent","englishWaiverContent","englishWaiverContentDNA","spanishWaiverContentDNA","checkStatus","formStatus","fullName","serviceRequired","initials","setMsgData","signatureImage","initialsModal","waiverSignatureModal","termsButtonClass","waiverButtonClass","initialsButtonClass","waiverSignatureButtonClass","termsButtonDisabled","waiverButtonDisabled","initialsButtonDisabled","waiverSignatureButtonDisabled","termsLanguage","waiverLanguage","goGreenModal","initialsRef","waiverSignatureRef","publicIp","v4","ipAdress","getIp","appointmentData","apptDate","ProgramId","toDateString","Service","Name","FirstAppointment","numberFormat","substr","HomePhone","WorkPhone","getClient","termsSignatureModal","initialSignatureName","waiverSignatureName","initialsImagePNG","date","formatedDate","startdate","appointmentGetMethod","appointmentResponse","isDNA","onScroll","scrollHeight","scrollTop","clientHeight","pdfjs","GlobalWorkerOptions","workerSrc","version","AppointmentsListPage","displayForms","apidata","setApiData","rooms","setRooms","hoverIndex","setHoverIndex","hoverIndexNotes","setHoverIndexNotes","arrivedStatus","setArrivedStatus","showForm","setShowForm","modalURL","setModalURL","appointmentStatusClass","tabsStatusClass","appointments","room","months","0","1","2","3","4","5","6","7","8","9","10","11","locationid","appointmentsData","mutableItem","apptDateYear","apptDateMonth","apptDateDate","minutes","getMinutes","getHours","apptHour","filteredRooms","Set","filteredArr","duplicate","has","add","sort","b","class","findIndex","arrivedAppointments","notArrivedAppointments","sortedAppointments","getAppointmentList","handleRoomChange","handleModalOpenForm","urlForms","faCheck","faTimes","formFilled","sessionTypeName","redAlert","faExclamationTriangle","join","onMouseOver","onMouseLeave","faStickyNote","faEye","selectedAppointment","Appointment","sessionTypeId","lastVisitDate","lastVisitServiceName","lastVisitNote","hidden","data-dismiss","defaultProps","DocumentsViewer","file","setFile","getBlobFromS3URL","blob","buffer","fromBuffer","fileType","getBlob","URL","createObjectURL","PDFViewer","numPages","setNumPages","pageNumber","setPageNumber","changePage","prevPageNumber","overflow","onLoadError","cMapUrl","cMapPacked","onLoadSuccess","r","resolve","VideoRemakePage","setAppointmentsData","clientPhone","clientEmail","splittedDate","visits","ServiceName","AppointmentId","service","startDateTime","endDateTime","EndDateTime","formatDate2string","dateParts","dd","padStart","formatDate2object","mm","yyyy","transformSites","filterSiteId","transformedSites","push","Number","trim","CheckoutPage","cart","setCart","additionals","setAdditionals","staff","setStaff","beforeTip","afterTip","totalPurchase","setTotalPurchase","dicomStatus","dicomMessage","appointmentid","tip","setTip","subtotal","discount","tax","summary","setSummary","cash","cashEnabled","creditCard","creditCardEnabled","giftCard","giftCardEnabled","giftCardBalance","giftCardCode","paymentMethods","setPaymentMethods","itemId","discountReason","modalData","setModalData","enabled","receipt","setReceipt","checkoutStatus","setCheckoutStatus","errorDiscount","showErrorDiscount","withValueLimit","inputObj","show","setShow","handleModalOpen","reason","modal","filteredProducts","arr","products","servicesArray","services","ProductId","OnlinePrice","Price","multiple","qty","removable","discountedPrice","discountType","taxedPrice","TaxRate","cartItem","newTotal","roundWithEpsilon","productsArray","staffMembers","getAppt","handleAddToCart","handlePlusQty","handleNumChange","processMedia","dataInfo","sendMail","files","staffName","targetURL","postMethod","payLoaddItems","tipItem","Item","Type","Metadata","Amount","Quantity","cashPaymentItem","giftCardPaymentItem","CardNumber","creditCardPaymentItem","paymentItem","staffObject","totalAmount","Items","AppointmentIds","DiscountAmount","Payments","notes","discountReasons","completed","receiptOfPayment","invoiceDate","receiptResponse","receiptData","handleRadioChange","updatedCart","handleDiscountChange","floatValue","roundHalfEven","handlePaymentChange","payment","handleGiftCardSearch","RemainingBalance","newSubtotal","newDiscount","newTax","checkboxName","currentIpuntEnabled","currentInput","currentInputValue","otherInput","otherInputEnabled","otherInputValue","toFixed","isAllowed","onlinePrice","prefix","suffix","faTrash","faSearch","Math","abs","ShortDescription","input","numbeToRound","round","EPSILON","CognitoIdentityClient","require","fromCognitoIdentityPool","S3Client","PutObjectCommand","ListObjectsCommand","DeleteObjectCommand","REGION","albumPhotosKey","s3","region","credentials","client","identityPoolId","albumBucketName","getAlbum","send","Prefix","Bucket","remove","uploadParams","sign","photoKey","Body","ACL","upload","onUploadProgress","getFiles","bucketUrl","BorderLinearProgress","withStyles","theme","root","height","borderRadius","colorPrimary","backgroundColor","bar","LinearProgress","UploadImages","selectFile","bind","deleteS3","currentFile","previewImage","progress","isError","imageInfos","uploadStatus","UploadService","Contents","updateImages","splice","catch","err","loaded","total","image","slice","encodeURIComponent","Button","display","accept","variant","component","Box","alignItems","mr","minWidth","Typography","delete","_renderListItim","statusVideo","imgCount","minImageCount","isSending","sendRequest","forwardRef","innerRef","baseImagesUrl","baseLogoUrl","ImgUploadPage","setIsSending","isMounted","setImgCount","images","setImages","setStatusVideo","dateStartAppointment","dateEndAppointment","apptDateYearStart","apptDateMonthStart","apptDateDateStart","apptHourStart","apptHourFinish","useCallback","dateTime","newEmail","minutesEnd","imageUrl","NotePageUltraSound","originalService","setNotes","originalNotes","setService","cbffEnabled","cbffDenied","cbff","submitStatus","openModal","handleInputChange","sendNotes","extras","SessionTypeId","Notes","weeks","appointmendId","serviceName","cbffWeeks","cbffPayload","RedAlert","lastCbff","cbffUpdate","cbffResponse","jsonResponse","cbffMessage","submitMessage","faEdit","defaultChecked","price","newItem","clientFirstName","clientLastName","isSendMail","NotePageMassage","NotePage","serviceId","setServices","DefaultTimeLength","NumDeducted","setOriginalNotes","setOriginalService","early","gender","meet","special","come","Duration","newExtras","splitedItem","getMethod2","servicesResponse","currentServicePrice","mutableService","getAppointment","LoginPage","username","password","localAuthState","setLocalAuthState","locations","setLocations","setSubmitStatus","history","useHistory","handleLoginInput","attribute","Username","Password","encrypted","crypto","encrypt","getPermissionsMethod","getPermissionsResponse","permissionsData","getResponse","siteResponse","locationData","locId","LogsDashboardPage","FaqPage","questionsDisplay","category","Accordion","AccordionSummary","expandIcon","ExpandMore","AccordionDetails","ConfirmationAction","confirmationAction","setConfirmationAction","handleCleanData","action","infoBody","infoTittle","nameAction","info","aria-hidden","data-bs-backdrop","data-bs-keyboard","fontSize","data-bs-parent","faQuestion","faBug","data-bs-dismiss","initState","approved","initTotals","giftCardTotal","cashTotal","creditCardTotal","fullTotal","initFormData","openingCash","cashPayments","endingCashStore","initFormDataClover","cloverCreditCard","cloverCash","cloverTips","initEndingCashDif","initTotalEnding","withdrawals","endingCash","tipTotal","initEmployees","initEmployeesReview","initTotalEmployees","totalEndingCashStore","totalOpeningCash","totalTips","initAppointmentTable","initPaymentAppointments","cashAppointments","creditAppointments","discountAppointments","acumTipCash","acumAmountCash","acumTipCC","acumAmountCC","initReasons","DailyReport","totals","setTotals","formDataClover","setFormDataClover","endigCashDiferent","setEndigCashDiferent","totalEnding","setTotalEnding","employees","setEmployees","employeesReview","setEmployeesReview","totalEmployees","setTotalEmployees","appointmentsTable","setAppointmentsTable","paymentAppointments","setPaymentAppointments","reasons","setReasons","observations","setObservations","createdBy","setCreatedBy","tipped","setTipped","userSession","setUserSession","textResponse","review","closeDate","handleReason","resetPage","clearForm","drawnerNotes","handleReasonsChange","list","handleEmployeeChange","listEmployee","newListEmploye","addTotalOpeningCashEmployee","addTotalEndingCashStoreEmployee","addCashEmployee","cashEmployee","employeEndingCashStore","employeeOpeningCashParseNumber","employeeOpeningCash","infoCheckout","employeeName","eCash","CashEmployee","isNaN","arrivalEmployee","checkOutEmployee","employeeNotes","tipEmployee","employeeEndingCashStore","reviewDate","handleChangeClover","putReview","postForm","timeComparison","timeFormat","time","tokens","hours","getReport","ReportGetMethod","qDate","reportResponse","reportData","eList","emailSend","ttip","tname","z","temp","addTipsEmployees","localCloverCreditCard","localCloverTips","localCloverCash","getTime","timeString","mTime","m","updateTotals","endingCashTotal","opening","payments","endingCashStor","sum","downloadFile","document","createElement","setAttribute","appendChild","click","parentNode","removeChild","valueReasonsParseFloat","infoForm","sortDate","endingCashDiferen","infoReasons","infoEmployee","locationName","observation","responseInfo","defineDisplay","dt","AmOrPm","setArrivalCheckoutDisplays","employeesReviewSend","employee","arrivalEmployeeDisplay","checkOutEmployeeDisplay","infoReview","putMethodReview","getPDF","ReportGetPDF","reportPDF","responsePDF","getLocationTime","getSitesQuery","mySite","foundedSite","alert","localDate","siteDate","timeZone","table","calculateReviewReport","reportResponseReview","listReviewEmloyee","listInfoEmployee","totalEmployeeEndingCashStore","totalEmployeeOpeningCash","totalTip","reasonUpdate","single","directors","booking","searchBySite","handleDeleteServiceWalkin","request","aria-describedby","thousandSeparator","formattedValue","handleReasonDelete","scope","newList","HandleAllEmailWhatsAppCheckboxes","align","cursor","ItemTypes","DroppableSidebar","updateFunction","useDrop","drop","monitor","collect","isOver","canDrop","position","top","left","zIndex","opacity","DraggableSidebar","useDrag","isDragging","drag","DraggableBlock","isWeekRange","displayAll","indice","customClass","hideName","hide","DroppableBlock","block","blockDate","HoverCard","cardClass","DnaBlock","getBlockClass","handleClick","handleChangeBlockOnDrop","getBlockDescription","handleClose","handleSidebarChange","confirmAppointment","viewLastVisit","available","occupied","datesState","roomAppointments","startDate","roomIndex","highlight","searchClientVisits","appt","open","aria-haspopup","Menu","mouseY","onClose","anchorReference","anchorPosition","mouseX","MenuItem","cancel","DnaBlockW","handleSidebarChangeWeek","dayIndex","displayableBlocks","onClickArgument","DefaultBlock","DefaultBlockW","EmptyBlockW","EmptyBlock","VisitsTable","visit","appointmentStatus","Tooltip","title","placement","IconButton","useStyles","makeStyles","appBar","marginLeft","spacing","flex","Transition","Slide","direction","BookingPage","totalCounter","Booked","Confirmed","Arrived","Completed","NoShow","requesting","selectedLocation","userAction","setUserAction","searchResults","editedClient","editedAppointment","blockId","availableBlocks","createNotes","statusDisabled","lastVisit","sidebarState","setSidebarState","setStartDate","endDate","setEndDate","setCurrentDate","setDatesState","blocksPerRoom","setBlocksPerRoom","blocksPerWeek","setBlocksPerWeek","setDisplayableBlocks","fetchServices","setFetchServices","setLocation","successCancel","reschedule","successReschedule","rebookSidebar","setRebookSidebar","inputValue","clientVisits","setClientVisits","classes","sitesInfo","setSitesInfo","mutableDate","setDate","clearSidebar","handleLocationChangeWeek","clearAppointmentSidebar","clientX","clientY","consultServices","consultedServices","connectionRequest","ultrasoundResponse","ultrasoundsData","massageResponse","massageData","otherResponse","otherData","setTimeout","availableBlocksWeek","setDateRange","range","searchClient","searchClientsRequest","searchClientsResponse","searchClientsData","queryStartDate","queryEndDate","blocksRequest","blocksRequestResponse","blocksRequestData","appointmentsPerRoom","schedule","reduce","memo","appointmentsRequest","appointmentsRequestResponse","appointmentsRequestData","appointmentsPerDay","availabilitiesPerDay","unavailabilitiesPerDay","blocksPerDay","mutableAppointment","availabilities","blockSegment","startSegment","availabilityInstance","startTime","endTime","unavailabilities","unAvailabilityInstance","description","Description","mutableBlocks","mutableBlock","addTwelve","rawHours","stringDate","availabilityBlock","isBetween","unavailabilityBlock","something","Boolean","blockAppointments","blockAppointment","statusCounter","fetchSchedule","query","scheduleAttemps","scheduleResults","availabilityBlocks","unavailabilityBlocks","toLocaleTimeString","hour","minute","appointmentsPerRooms","counter","avBlocks","unavBlocks","appRoomIndex","handleCalendarChange","handleAppointmentBook","bookAppointmentRequest","bookAppointmentResponse","bookAppointmentData","notesArray","isSpanish","mailBody","web","locationPhone","sitePhone","locationAddress","address","howArrive","HTASpanish","HTAEnglish","postMail","mailResponse","isCbff","addOns","AddOns","bookDate","bookTime","source","triggerModalOnDrop","getElementById","cancelAppointment","handleEditAppointment","handleEditAppointmentOnDrop","hourStar","hourEnd","userNameCancel","createClient","createClientRequest","createClientResponse","createClientData","createdClient","updateClient","updateClientRequest","updateClientResponse","updateClientData","updatedClient","handleClientFormChange","handleEditClientFormChange","returnClass","borderBottom","borderTop","borderEmptyBottom","borderEmptyTop","hideDescription","availableBlocksForSelect","sendFullBody","dataParams","addOneWeek","addOneDay","subOneWeek","subOneDay","subtract","getLocationsInformation","getSitesData","allSitesItem","sitesArray","siteInfo","handleDialogClose","searchClientsVisitsResponse","onSelect","selected","selectsStart","peekNextMonth","showMonthDropdown","showYearDropdown","dropdownMode","inline","DndProvider","backend","HTML5Backend","getBlockClassSidebar","right","faTimesCircle","clientItem","handleClientSelect","appointmentToEdit","appointmentEdited","segmentId","faAngleDoubleLeft","faAngleDoubleRight","faRedoAlt","trunc","handleRoomChangeWeek","Dialog","fullScreen","TransitionComponent","AppBar","Toolbar","edge","createRequest","BookingLoginPage","setUserName","setPassword","getSites","multiLogin","singleLogin","responseData","authAttemps","authResults","successfulAuths","handleLogin","getAllLocations","sitesForSelect","sitesAuth","siteslist","siteForSelect","ApproveDailyReport","disableButton","completedSitesQuery","completedSitesResponse","completedData","sitesOptions","completedOptions","approvedOptions","siteIndex","siteObject","sitios","c","foundSitedex","isDisabled","sitesApproved","entries","groupStyles","justifyContent","selectStyles","styles","isFocused","isSelected","groupTextStyles","textTransform","formatGroupLabel","instanceId","handleSiteChange","dateFormat","handleDateChange","PieChart","labels","datasets","borderColor","borders","borderWidth","radius","plugins","legend","maintainAspectRatio","ConsultTechnicians","staffDetails","setStaffDetails","palette","setPalette","selection","setSelection","grouping","setGrouping","clicked","emailStatus","setEmailStatus","visible","success","alertMessage","setAlertMessage","updateLocation","loc","getServiceName","detailedName","serviceCompareCount","count","serviceCompareName","localeCompare","sortTechnician","criteria","sortedStaff","reverse","getLocations","getColorPalette","staffOnly","app","colorPalette","distinctColors","hueMin","hueMax","chromaMin","chromaMax","lightMin","lightMax","hex","border","brighten","getStaff","unshift","getGroupedData","memberData","staffData","member","memberServices","serviceCount","cbffServed","memberDetails","getData","visile","getMehodPDF","ReportGetMethodPDF","requestPDF","reportResponsePDF","reportDataPDF","selectsEnd","minDate","technician","sSquery","RegExp","sValue","filterHelper","technicianKey","normalize","faSortDown","BarChart","maxBarThickness","barThickness","scales","y","max","maxHeight","responsive","HorizontalBarChart","borderColors","chartName","createDataSets","indexAxis","OperationalDashboardGraph","operationalData","failed","Pending","confirmed","booked","CBFF","noShow","Attended","origin","callCenter","online","mindBody","totalAppointments","totalSales","totalExpectedSales","PdfTable","sitesData","viewTableColumn","reportDate","borderStyle","widthStyle","fontSizeStyle","sales","madeBy","salesAndMadeBy","salesAndAppointment","madeByAndAppointment","columns","setColumns","StyleSheet","create","padding","tableRow","margin","flexDirection","tableCol1Header","borderBottomColor","borderLeftWidth","borderTopWidth","tableCol1","totalCol","tableCellHeader","fontWeight","tableCell","marginTop","marginBottom","heigth","dateText","dateTextDiv","logoDiv","size","dicomOk","cbffGranted","appointmentsBooked","pending","expectedSales","OperationalDashboardTable","realodDashboard","header","setSitesData","btnPdf","setBtnPdf","sortBySites","sortBySales","sortTable","setSortTable","setViewTableColumn","selectRows","setSelectRows","select","viewAllRows","buttonSelectRows","setButtonSelectRows","handleViewTableColumn","newSitesData","totalOnline","totalCallCenter","totalMindBody","totalColumnAppointmentBooked","totalAppointmentsBooked","totalCbffGranted","totalCompleted","totalnoShow","totalColumnPending","totalCbff","clickedButtonTrigger","addEventListener","fileName","loading","faDownload","row","handleSitesSelectedByRows","selectedSitesRows","handleViewSelectedRows","OperationalDashboard","today","setOperationalData","setRealodDashboard","setFailed","getOperationalData","dataRequests","goodData","badData","handleSwitchButton","graphIconPath","tableIconPath","pathArrayProperties","d","faFileAlt","faChartLine","PolarAreaChart","OperationalDetails","detailsData","appointmentsAttended","returningTotal","returning","retvsnew","new","anchor","setAnchor","anchorClient","setAnchorClient","cbffGrantedTotal","totalNoShow","completedUltrasound","currentTarget","xmlns","viewBox","strokeWidth","stroke","fill","strokeLinecap","strokeLinejoin","cx","cy","x1","y1","x2","y2","points","Popover","anchorEl","anchorOrigin","vertical","horizontal","transformOrigin","elevation","basicColors","totalExpected","MenuDashboard","DirectorsLogin","userRole","ConfigSetup","siteList","setSiteList","siteToken","setSiteToken","initDatosSite","folder","zipwhipSession","bitlyForm","inboxId","creatorId","storeName","gMapLink","reviewLinkOriginal","reviewLinkSent","chatbotId","datosSite","setDatosSite","allTimeZones","setAllTimeZones","showSelect","setShowSelect","validateEmail","validatePhone","validateFolder","updateStatus","updateServiceStatus","updateServiceMessage","updateMessage","requestAction","selectValueDefault","selectLabelDefault","selectedValueTimeZone","selectedLabelTimeZone","selectedUtcTimeZone","selectedIdtstTimeZone","getTimeZone","getConfig","updateConfig","timeZoneValue","updateSitesQuery","updateSiteResponse","siteSelected","datosSiteResponse","filterSites","getToken","handleUpdateService","postServices","found","foundTimeZone","substring","DailyCloseout","setData","updateSiteName","formatQuantity","siteLocations","addTotals","dailyData","returns","byPayment","cashEquivalent","cashEquivalentSum","nonCashEquivalent","nonCashEquivalentSum","totalReceipts","quantity","returnsqty","byCategory","serviceCategory","serviceCategorySum","productCategory","serviceCategoryProductSum","totalAccruedSales","serviceCategorygiftCardSum","totalPaymentsSum","getResponseData","postPDF","infoPDF","selectedIndex","section","paymentType","paymentTypeNon","categoryProduct","categoryGiftcard","IncompleteAppointments","includeAppointments","setIncludeAppointments","firstSite","handleButtonDownloadReport","dateName","requestSCV","axios","responseType","window","revokeObjectURL","errorE","parse","locationItem","paddingLeft","paddingRight","EditReviewLinksPage","requestStatus","updateAllSites","singleUpdate","updateSiteRequestConfig","updateAttemps","updateResults","handleUpdateClick","failedAttempts","elem","rel","mutableSitesData","findedIndex","handleSelectChange","siteSelect","VisitsPage","faEraser","ManagementDashboard","ContentManagerReviews","showDelete","setShowDelete","reviewsData","setReviews","fetchData","setFetchData","deleteId","setDeleteId","abstract","photo","closeModalDelete","modalOpenForReview","uniqueId","image1","modalOpenForDelete","handleDelete","deleteReview","getReviews","reviewData","reviews","postVisible","val","putForm","faEyeSlash","faPen","faTrashAlt","faPaperclip","marginRight","faUpload","ContentManagerServices","servicesData","selectedService","setSelectedService","price1","price2","price3","time1","time2","image1Title","image2","image2Title","image3","image4","modalOpenForService","iconUrl","image1Url","image2Url","image3Url","image4Url","filteredServiceData","getServices","selectedValue","DynamicReportPdf","bodyTable","footTable","tfoot","titlePdf","subTitlePdf","titleText","subTitleText","divOneTittle","divTwoTittle","divThreeTittle","divOneSubTittle","divTwoSubTittle","divThreeSubTittle","DynamicTable","fileNamePdf","setReloadData","reloadData","dir","setDir","setIndex","setBodyTable","setFootTable","handleSubTotals","listData","listTotals","tfootShowTotals","subTotals","accumulator","newRows","filterBody","column","valA","valB","newBody","handleSelectRow","ProjectionReport","todayMinus1","startOf","setBody","startD","setStartD","endD","setEndD","getDailyClosing","searchStartDate","searchEndDate","lastDayOfMonth","endOf","daysBetweenDates","diff","lastDayOfMonthParseDay","newListData","result","salesReceipt","projected","App","path","from","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode"],"mappings":";krBAAaA,EAAY,CACvB,CAAEC,OAAQ,SAAUC,KAAM,2BAC1B,CAAED,OAAQ,SAAUC,KAAM,4BAC1B,CAAED,OAAQ,SAAUC,KAAM,0BAC1B,CAAED,OAAQ,SAAUC,KAAM,2BAC1B,CAAED,OAAQ,SAAUC,KAAM,iCAC1B,CAAED,OAAQ,SAAUC,KAAM,4BAC1B,CAAED,OAAQ,SAAUC,KAAM,wBAC1B,CAAED,OAAQ,SAAUC,KAAM,oCAC1B,CAAED,OAAQ,SAAUC,KAAM,2BAC1B,CAAED,OAAQ,SAAUC,KAAM,gCAC1B,CAAED,OAAQ,SAAUC,KAAM,4BAC1B,CAAED,OAAQ,UAAWC,KAAM,0BAC3B,CAAED,OAAQ,UAAWC,KAAM,4BAC3B,CAAED,OAAQ,UAAWC,KAAM,2BAC3B,CAAED,OAAQ,UAAWC,KAAM,2BAC3B,CAAED,OAAQ,UAAWC,KAAM,gCAC3B,CAAED,OAAQ,SAAUC,KAAM,+BAC1B,CAAED,OAAQ,UAAWC,KAAM,4BAC3B,CAAED,OAAQ,UAAWC,KAAM,4BAC3B,CAAED,OAAQ,UAAWC,KAAM,gCAC3B,CAAED,OAAQ,UAAWC,KAAM,+BAC3B,CAAED,OAAQ,UAAWC,KAAM,4BAC3B,CAAED,OAAQ,UAAWC,KAAM,+BAC3B,CAAED,OAAQ,UAAWC,KAAM,8BAC3B,CAAED,OAAQ,UAAWC,KAAM,+BAGhBC,EAAoB,CAC/B,CACEC,KAA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I,EACJC,SACE,gEACFC,OACE,8MAEJ,CACEF,GAAI,EACJC,SACE,+DACFC,OACE,2LAEJ,CACEF,GAAI,EACJC,SAAU,0DACVC,OACE,iHAIR,CACEH,aAAc,yBACdC,GAAI,EACJJ,MAAO,CACL,CACEI,GAAI,EACJC,SACE,+EACFC,OACE,yIAEJ,CACEF,GAAI,EACJC,SACE,oEACFC,OACE,oJAEJ,CACEF,GAAI,EACJC,SAAU,sCACVC,OACE,2IAIR,CACEH,aAAc,0BACdC,GAAI,EACJJ,MAAO,CACL,CACEI,GAAI,EACJC,SACE,2EACFC,OACE,gSAEJ,CACEF,GAAI,EACJC,SACE,2EACFC,OACE,ySAEJ,CACEF,GAAI,EACJC,SACE,uEACFC,OACE,kOAIR,CACEH,aAAc,mBACdC,GAAI,EACJJ,MAAO,CACL,CACEI,GAAI,EACJC,SACE,uGACFC,OACE,+LAEJ,CACEF,GAAI,EACJC,SACE,qFACFC,OACE,0KAEJ,CACEF,GAAI,EACJC,SACE,qJACFC,OACE,8LAIR,CACEH,aAAc,eACdC,GAAI,EACJJ,MAAO,CACL,CACEI,GAAI,EACJC,SACE,mGACFC,OACE,mJAEJ,CACEF,GAAI,EACJC,SACE,0EACFC,OACE,kLAEJ,CACEF,GAAI,EACJC,SAAU,wDACVC,OACE,sFAIR,CACEH,aAAc,eACdC,GAAI,EACJJ,MAAO,CACL,CACEI,GAAI,EACJC,SACE,oEACFC,OACE,8QAEJ,CACEF,GAAI,EACJC,SACE,oEACFC,OACE,mQAEJ,CACEF,GAAI,EACJC,SAAU,8DACVC,OACE,+OAEJ,CACEF,GAAI,EACJC,SACE,oFACFC,OACE,uFAEJ,CACEF,GAAI,EACJC,SAAU,8BACVC,OACE,uPAEJ,CACEF,GAAI,EACJC,SAAU,sCACVC,OACE,2JAEJ,CACEF,GAAI,EACJC,SAAU,iCACVC,OACE,4EAEJ,CACEF,GAAI,EACJC,SAAU,+CACVC,OACE,sFAEJ,CACEF,GAAI,EACJC,SAAU,6CAC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EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,O,OCGdO,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEF/3B,SAASqS,eAAe,SAM1BglB,M","file":"static/js/main.61014295.chunk.js","sourcesContent":["export const sitesList = [\n { siteId: \"490100\", name: \"Little Bellies Columbus\" },\n { siteId: \"549974\", name: \"Little Bellies - Houston\" },\n { siteId: \"557418\", name: \"Little Bellies - Miami\" },\n { siteId: \"743289\", name: \"Little Bellies Oklahoma\" },\n { siteId: \"758692\", name: \"Little Bellies - Jacksonville\" },\n { siteId: \"795028\", name: \"Little Bellies Cleveland\" },\n { siteId: \"902886\", name: \"Little Bellies Tulsa\" },\n { siteId: \"826493\", name: \"Little Bellies - West Palm Beach\" },\n { siteId: \"888809\", name: \"Little Bellies - Dallas\" },\n { siteId: \"782522\", name: \"Little Bellies - San Antonio\" },\n { siteId: \"491521\", name: \"Little Bellies - Atlanta\" },\n { siteId: \"5721159\", name: \"Little Bellies - Tampa\" },\n { siteId: \"5721382\", name: \"Little Bellies - Orlando\" },\n { siteId: \"5722368\", name: \"Little Bellies - Austin\" },\n { siteId: \"5721162\", name: \"Little Bellies - Denver\" },\n { siteId: \"5723785\", name: \"Little Bellies - Los Angeles\" },\n { siteId: \"572377\", name: \"Little Bellies - Sacramento\" },\n { siteId: \"5725645\", name: \"Little Bellies - Raleigh\" },\n { siteId: \"5726405\", name: \"Little Bellies - Chicago\" },\n { siteId: \"5729682\", name: \"Little Bellies - Minneapolis\" },\n { siteId: \"5729354\", name: \"Little Bellies - Washington\" },\n { siteId: \"5731081\", name: \"Little Bellies - Phoenix\" },\n { siteId: \"5739497\", name: \"Little Bellies - Fort Worth\" },\n { siteId: \"5739704\", name: \"Little Bellies - Charlotte\" },\n { siteId: \"5742875\", name: \"Little Bellies - Nashville\" },\n];\n\nexport const singleMenuOptions = [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Appointments\",\n link: \"/appointments\",\n dataCy: \"appointments-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Remake-Video\",\n link: \"/remakevideo\",\n dataCy: \"remakeVideo-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Forms\",\n link: \"/forms\",\n dataCy: \"forms-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"FAQ\",\n link: \"/faq\",\n dataCy: \"faq-nav\",\n },\n];\n\nexport const bookingMenuOptions = [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Booking\",\n link: \"/booking\",\n dataCy: \"booking-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Visits\",\n link: \"/visits\",\n dataCy: \"visits-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"FAQ\",\n link: \"/faq\",\n dataCy: \"faq-nav\",\n },\n];\n\nexport const directorsMenuOptions = [\n {\n type: \"dropdown\",\n label: \"Technicians Options\",\n link: \"#\",\n dataCy: \"dropdown-nav\",\n items: [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Appointments\",\n link: \"/appointments\",\n dataCy: \"appointments-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Remake-Video\",\n link: \"/remakevideo\",\n dataCy: \"remakeVideo-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Forms\",\n link: \"/forms\",\n dataCy: \"forms-nav\",\n },\n ],\n },\n {\n type: \"dropdown\",\n label: \"Reports\",\n link: \"#\",\n dataCy: \"dropdown-reports-nav\",\n items: [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Daily Report\",\n link: \"/dailyreport\",\n dataCy: \"daily-report-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Review Report\",\n link: \"/reviewdailyreport\",\n dataCy: \"review-daily-report-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Projection Report\",\n link: \"/projectionreport\",\n dataCy: \"projection-report-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Business Snapshot\",\n link: \"/snapshots\",\n dataCy: \"consult-technicians-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Daily Closeout\",\n link: \"/dailycloseout\",\n dataCy: \"daily-closeout-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Incomplete Booking\",\n link: \"/incompleteappointments\",\n dataCy: \"incomplete-appointments-nav\",\n },\n ],\n },\n\n {\n type: \"dropdown\",\n label: \"Content Manager\",\n link: \"#\",\n dataCy: \"dropdown-nav-cm\",\n items: [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Reviews\",\n link: \"/contentmanagereviews\",\n dataCy: \"contentmanagereviews-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Services\",\n link: \"/contentmanagerservices\",\n dataCy: \"contentmanagerservices-nav\",\n },\n ],\n },\n\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Operational Dashboard\",\n link: \"/operationaldashboard\",\n dataCy: \"operational-dashboard-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Sites Configuration\",\n link: \"/config\",\n dataCy: \"config-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: [\"Saul Pesate\", \"pancitasspa@gmail.com\"],\n label: \"Link Configuration\",\n link: \"/editreviewlinks\",\n dataCy: \"editlink-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Logs\",\n link: \"/logs\",\n dataCy: \"logs-nav\",\n },\n];\n\nexport const managementMenuOptions = [\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Appointments\",\n link: \"/appointments\",\n dataCy: \"appointments-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Daily Report\",\n link: \"/dailyreport\",\n dataCy: \"daily-report-nav\",\n },\n {\n type: \"single\",\n restricted: false,\n users: null,\n label: \"Review Report\",\n link: \"/reviewdailyreport\",\n dataCy: \"review-daily-report-nav\",\n },\n];\n\nexport const questions = [\n {\n categoryName: \"General\",\n id: 0,\n items: [\n {\n id: 0,\n question:\n \"Something happened and there's an error notification, what does it means?\",\n answer:\n \"The error notification in all pages comes with an error message, if you get an error notification please take a screenshot or a picture and report this to your supervisor, the code will help to determine the origin of the error itself.\",\n },\n {\n id: 1,\n question:\n \"I get an error indicating Denied access and that i don't have permissions to perform an action, what's that about?\",\n answer:\n \"If you get an error indicating that you can't perform an action you should contact your supervisor and ask for the respective permissions, after a manual upgrade of your user you will be good to go.\",\n },\n ],\n },\n {\n categoryName: \"Checkout\",\n id: 1,\n items: [\n {\n id: 0,\n question:\n \"How do the cash and credit buttons work on the checkout page?\",\n answer:\n \"Well if you select just one it will add the total ammount of the purchase to it, if you edit that value and then select the other payment method it will add the remaining ammount to that payment method.\",\n },\n {\n id: 1,\n question:\n \"The checkout button appears to be disabled, what's going on?\",\n answer:\n \"If the button is disabled it means that either the ammount doesn't match the total price or that the staff member was not selected, please make sure this two things are correctly set.\",\n },\n {\n id: 3,\n question: \"I can't type more in the discount box, what's going on?\",\n answer:\n \"You are trying to enter a discount above what's permited, you should see it on the error message at the top\",\n },\n ],\n },\n {\n categoryName: \"Appointments dashboard\",\n id: 2,\n items: [\n {\n id: 0,\n question:\n \"In my appointments board i get a 'not found' notification. What's happening?\",\n answer:\n \"Either the location doesn't have any appointments left for the day or is too early to display the appointments list for the next day.\",\n },\n {\n id: 1,\n question:\n \"I accidentaly marked an appointment as arrived, what should i do?\",\n answer:\n \"If this happens you should contact your supervisor and inform what happened and the appointment will be manually returned to the previous state.\",\n },\n {\n id: 2,\n question: \"What does the form indicator means?\",\n answer:\n \"The form indicator in the appointments board shows if a client has filled the form and agreed to little bellies terms and conditions.\",\n },\n ],\n },\n {\n categoryName: \"Appointments Notes Edit\",\n id: 3,\n items: [\n {\n id: 0,\n question:\n \"I can't assign a come back for free on an appointment, what should i do?\",\n answer:\n \"If you are editing the notes on an appointment and the cbff field isn't there it means that the service doesn't have an automatic come back for free, if there is the need to give that service please contact your supervisor in order to manually give the client it's come back for free.\",\n },\n {\n id: 1,\n question:\n \"I can't assign a come back for free on an appointment, what should i do?\",\n answer:\n \"If you are editing the notes on an appointment and a message appears pointing out that the client has already two consecutives come back for free appointments, you should notify your supervisor about the need to give a third one and it will be manually give the client it's come back for free.\",\n },\n {\n id: 2,\n question:\n \"In the edit notes page the button seems to be disabled, why is that?\",\n answer:\n \"If a button on the page appears to be disabled it means that there is a mandatory field that needs to be filled, check if there is an empty field marked as mandatory (*) and make sure to fill it with the respective info.\",\n },\n ],\n },\n {\n categoryName: \"Video Experience\",\n id: 4,\n items: [\n {\n id: 0,\n question:\n \"If i have to remake a video experience, how would i know what service did it had on the appointment?\",\n answer:\n \"Don't worry when you search for the user's appointments to remake the video experience, the appointments board will tell you the details about the date of the appointment and the service.\",\n },\n {\n id: 1,\n question:\n \"I updated an image and then realise it was not the image i intented, what do i do?\",\n answer:\n \"No problem there, just look for the image and click on the 'x' sign on the corner, that will remove that image from the upload queue and there you go, problem solved.\",\n },\n {\n id: 2,\n question:\n \"A client requested the video experience to be sented to a different email address and not the one it has registered on mindBody, how do i do that?\",\n answer:\n \"In the edit notes page you can see a field that has a label 'Send photos to' it has the mindbody email by default, but you can edit that value into any other email the client provides.\",\n },\n ],\n },\n {\n categoryName: \"2FA and Form\",\n id: 5,\n items: [\n {\n id: 0,\n question:\n \"A client requested a validation code to be sent to the wrong destination, what should she/he do?\",\n answer:\n \"A new verification code can be requested in just 3 minutes, so she/he need to wait 3 minutes and request a new code in the correct destination.\",\n },\n {\n id: 1,\n question:\n \"The client says the submit button on the form is disabled, why is that?\",\n answer:\n \"The submit button is disabled on the form until the user fills all the mandatory fields with valid values, and agrees to the terms and put down his signature and/or initials.\",\n },\n {\n id: 2,\n question: \"Where can the clients recieve the authorization code?\",\n answer:\n \"An authorization code can be sent to the MindBody email address or mobile phone.\",\n },\n ],\n },\n {\n categoryName: \"Daily Report\",\n id: 6,\n items: [\n {\n id: 0,\n question:\n \"Why is the save and create PDF button disabled after pressing it?\",\n answer:\n \"This means that you have completed the process of entering the data necessary for the daily closing and decided to send them to generate the pdf, therefore the button is deactivated because you have already completed the process and you should not continue pressing.\",\n },\n {\n id: 1,\n question:\n \"Can I send the Daily Report from one location to multiple emails?\",\n answer:\n \"Yes, they must be registered in the foldersConfig file in the location, in the email item indicate the emails separated by commas (,). Example “email”: [“email1@gmail.com”, ”email2@gmail.com”, ”email3@domain.com”,].\",\n },\n {\n id: 2,\n question: \"How can I add another employee to record their information?\",\n answer:\n \"When you press the purple word 'add', all the fields will appear below to add another employee with their corresponding information, in addition to enabling the 'delete' option in case you want to delete everything about that employee.\",\n },\n {\n id: 3,\n question:\n \"How can I know if the information uploaded created the pdf and was sent by email?\",\n answer:\n \"After pressing the save and create PDF button, a success message will appear later.\",\n },\n {\n id: 4,\n question: \"How can I add more reasons?\",\n answer:\n \"By clicking on the purple words 'add reason' another field will appear to add a new reason and its value, in addition to a 'delete' option will now appear in case you add by accident or if you change your mind and no longer you want to add it.\",\n },\n {\n id: 5,\n question: \"How are the Withdrawals calculated?\",\n answer:\n \"Withdrawals is the sum of the values of each reason, as you add or remove reasons with their respective values, the Withdrawals field will be affected.\",\n },\n {\n id: 6,\n question: \"How is Ending Cash calculated?\",\n answer:\n \"Ending Cash will be equal to Opening Cash + Cash Payments - Withdrawals.\",\n },\n {\n id: 7,\n question: \"What email will the Daily Report be sent to?\",\n answer:\n \"To the email indicated in the configuration file (foldersconfig) of each location.\",\n },\n {\n id: 8,\n question: \"What happens if I press the cancel button?\",\n answer:\n \"This will show you a warning if you want to delete the data you had uploaded, if you press that if the data of the entered form will be deleted and you can fill it all again, if you want to only keep your data and return to the screen select no.\",\n },\n ],\n },\n];\n\nexport const adminQuestionsOnly = [\n {\n categoryName: \"Review Report\",\n id: 7,\n items: [\n {\n id: 0,\n question: \"Why can I update some parts of the report and not others?\",\n answer:\n \"Review report is intented to view old reports and make minor updates on them, for security, only a small portion can be changed to correct mistakes\",\n },\n ],\n },\n {\n categoryName: \"Business Snapshot\",\n id: 8,\n items: [\n {\n id: 0,\n question: \"What does the Simple/Detailed button does?\",\n answer:\n \"It shows the two modes of viewing the report, on simple mode, services are grouped by its nature and ignores its price, on detailed mode, services are separated by their prices\",\n },\n {\n id: 1,\n question: \"Can I see the report for only one day?\",\n answer:\n \"Yes, you can see the snapshot for only one day if you choose the same date for the start and end date\",\n },\n {\n id: 2,\n question:\n \"I see that the services that have more appointments are listed first, can I change that?\",\n answer:\n \"Yes, you can sort the tables by clicking on Service or Quantiy at the head of the table\",\n },\n {\n id: 3,\n question: \"How does the Search bar works?\",\n answer:\n \"You can type the name of a technician and it will update the reports in real time by matching what you type\",\n },\n {\n id: 4,\n question: \"What are the fields at the bottom of every table?\",\n answer:\n \"Service appointments is the total of paid appoinments served, CBFF Appointments is the total of Come Back for Free appointments served, Total appointments is the sum of those two, CBFF provided is the amount of come back for free coupons that the technician served, CBFF ratio is the ratio of CBFF provided against the total of appointments served\",\n },\n {\n id: 5,\n question: \"What happens when I click create and Send PDF?\",\n answer:\n \"A detailed PDF covering all locations and all services for the date range is send to the emails on the configuration file\",\n },\n ],\n },\n {\n categoryName: \"Configuration Files\",\n id: 9,\n items: [\n {\n id: 0,\n question: \"Where do I find the configuration file?\",\n answer:\n \"In Little Bellies Dropbox ... it's a txt file called foldersConfig.\",\n },\n {\n id: 1,\n question: \"How to add a new location to the configuration file?\",\n answer: `Open the foldersConfig file located at the bottom before the closing bracket (]) you must copy and paste the content between braces {} including the comma and fill in the data for instance: { \"site\": \"newsite-newlocation\", \"folder\": \"/ foldername /\", \"email\": [\"email1@domain.com\",] } newsite = site code to create; newlocation = location code; folder = short name of the new location; email = email to send the location reports `,\n },\n ],\n },\n];\n\nexport const months = {\n 0: \"January\",\n 1: \"February\",\n 2: \"March\",\n 3: \"April\",\n 4: \"May\",\n 5: \"June\",\n 6: \"July\",\n 7: \"August\",\n 8: \"September\",\n 9: \"October\",\n 10: \"November\",\n 11: \"December\",\n};\n\nexport const blocks = [\n {\n id: 1,\n segment: \"08:30 AM\",\n endSegment: \"09:00 AM\",\n appointment: {},\n },\n {\n id: 2,\n segment: \"09:00 AM\",\n endSegment: \"09:30 AM\",\n appointment: {},\n },\n {\n id: 3,\n segment: \"09:30 AM\",\n endSegment: \"10:00 AM\",\n appointment: {},\n },\n {\n id: 4,\n segment: \"10:00 AM\",\n endSegment: \"10:30 AM\",\n appointment: {},\n },\n {\n id: 5,\n segment: \"10:30 AM\",\n endSegment: \"11:00 AM\",\n appointment: {},\n },\n {\n id: 6,\n segment: \"11:00 AM\",\n endSegment: \"11:30 AM\",\n appointment: {},\n },\n {\n id: 7,\n segment: \"11:30 AM\",\n endSegment: \"12:00 PM\",\n appointment: {},\n },\n {\n id: 8,\n segment: \"12:00 PM\",\n endSegment: \"12:30 PM\",\n appointment: {},\n },\n {\n id: 9,\n segment: \"12:30 PM\",\n endSegment: \"01:00 PM\",\n appointment: {},\n },\n {\n id: 10,\n segment: \"01:00 PM\",\n endSegment: \"01:30 PM\",\n appointment: {},\n },\n {\n id: 11,\n segment: \"01:30 PM\",\n endSegment: \"02:00 PM\",\n appointment: {},\n },\n {\n id: 12,\n segment: \"02:00 PM\",\n endSegment: \"02:30 PM\",\n appointment: {},\n },\n {\n id: 13,\n segment: \"02:30 PM\",\n endSegment: \"03:00 PM\",\n appointment: {},\n },\n {\n id: 14,\n segment: \"03:00 PM\",\n endSegment: \"03:30 PM\",\n appointment: {},\n },\n {\n id: 15,\n segment: \"03:30 PM\",\n endSegment: \"04:00 PM\",\n appointment: {},\n },\n {\n id: 16,\n segment: \"04:00 PM\",\n endSegment: \"04:30 PM\",\n appointment: {},\n },\n {\n id: 17,\n segment: \"04:30 PM\",\n endSegment: \"05:00 PM\",\n appointment: {},\n },\n {\n id: 18,\n segment: \"05:00 PM\",\n endSegment: \"05:30 PM\",\n appointment: {},\n },\n {\n id: 19,\n segment: \"05:30 PM\",\n endSegment: \"06:00 PM\",\n appointment: {},\n },\n {\n id: 20,\n segment: \"06:00 PM\",\n endSegment: \"06:30 PM\",\n appointment: {},\n },\n {\n id: 21,\n segment: \"06:30 PM\",\n endSegment: \"07:00 PM\",\n appointment: {},\n },\n {\n id: 22,\n segment: \"07:00 PM\",\n endSegment: \"07:30 PM\",\n appointment: {},\n },\n {\n id: 23,\n segment: \"07:30 PM\",\n endSegment: \"08:00 PM\",\n appointment: {},\n },\n];\n\nexport const timeZones = [\n {\n value: \"Hawaiian Standard Time\",\n abbr: \"HST\",\n offset: -10,\n isdst: false,\n text: \"(UTC-10:00) Hawaii\",\n utc: [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\",\n ],\n },\n\n {\n value: \"Pacific Daylight Time\",\n abbr: \"PDT\",\n offset: -7,\n isdst: true,\n text: \"(UTC-07:00) Pacific Time (US & Canada)\",\n utc: [\"America/Los_Angeles\", \"America/Tijuana\", \"America/Vancouver\"],\n },\n {\n value: \"Pacific Standard Time\",\n abbr: \"PST\",\n offset: -8,\n isdst: false,\n text: \"(UTC-08:00) Pacific Time (US & Canada)\",\n utc: [\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"PST8PDT\",\n ],\n },\n {\n value: \"US Mountain Standard Time\",\n abbr: \"UMST\",\n offset: -7,\n isdst: false,\n text: \"(UTC-07:00) Arizona\",\n utc: [\n \"America/Creston\",\n \"America/Dawson\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"America/Whitehorse\",\n \"Etc/GMT+7\",\n ],\n },\n {\n value: \"Mountain Standard Time\",\n abbr: \"MDT\",\n offset: -6,\n isdst: true,\n text: \"(UTC-07:00) Mountain Time (US & Canada)\",\n utc: [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\",\n ],\n },\n {\n value: \"Central Standard Time\",\n abbr: \"CDT\",\n offset: -5,\n isdst: true,\n text: \"(UTC-06:00) Central Time (US & Canada)\",\n utc: [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\",\n ],\n },\n {\n value: \"Eastern Standard Time\",\n abbr: \"EST\",\n offset: -5,\n isdst: false,\n text: \"(UTC-05:00) Eastern Time (US & Canada)\",\n utc: [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n ],\n },\n {\n value: \"Eastern Daylight Time\",\n abbr: \"EDT\",\n offset: -4,\n isdst: true,\n text: \"(UTC-04:00) Eastern Daylight Time (US & Canada)\",\n utc: [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n ],\n },\n {\n value: \"US Eastern Standard Time\",\n abbr: \"UEDT\",\n offset: -5,\n isdst: false,\n text: \"(UTC-05:00) Indiana (East)\",\n utc: [\n \"America/Indiana/Marengo\",\n \"America/Indiana/Vevay\",\n \"America/Indianapolis\",\n ],\n },\n {\n value: \"UTC-02\",\n abbr: \"U\",\n offset: -2,\n isdst: false,\n text: \"(UTC-02:00) Coordinated Universal Time-02\",\n utc: [\"America/Noronha\", \"Atlantic/South_Georgia\", \"Etc/GMT+2\"],\n },\n];\n","export default __webpack_public_path__ + \"static/media/logo.6b75ca7e.png\";","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSignOutAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { Link, Redirect } from \"react-router-dom\";\nimport {\n singleMenuOptions,\n bookingMenuOptions,\n directorsMenuOptions,\n managementMenuOptions,\n} from \"../config/constants.js\";\nimport Select from \"react-select\";\nimport logo from \"../logo.png\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport \"../../node_modules/bootstrap/dist/js/bootstrap.min.js\";\n\nfunction NavBar({ appState, setAppState }) {\n const [menuOptions, setMenuOptions] = useState([]);\n const [authType, setAuthType] = useState(\"\");\n const [authRole, setAuthRole] = useState(\"\");\n const [sites, setSites] = useState([]);\n\n useEffect(() => {\n let menuOptions = \"\";\n const type = appState.authType;\n\n if (type === \"director\") {\n menuOptions = appState.managementMode ? managementMenuOptions : directorsMenuOptions;\n setSites(\n appState.directorsAuth.locationsAuth.map((el) => {\n return {\n value: el.siteLocation,\n label: el.siteName,\n };\n })\n );\n } else if (type === \"booking\") {\n menuOptions = bookingMenuOptions;\n setSites(appState.bookingAuth.sitesSelect);\n } else if (type === \"single\") {\n menuOptions = singleMenuOptions;\n setAuthRole(appState.singleAuth.role);\n }\n setAuthType(type);\n setMenuOptions(menuOptions);\n }, []);\n\n useEffect(() => {\n if (sites.length > 0 && authType === \"director\") {\n handleLocationChange(sites[0]);\n }\n }, [sites]);\n\n const logOut = async () => {\n if (appState.nav.status !== \"logingOut\") {\n try {\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n status: \"logingOut\",\n },\n }));\n const logOutMethod = {\n method: \"DELETE\",\n headers: {\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n const logOutResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/userToken/revoke`,\n logOutMethod\n );\n const data = await logOutResponse.json();\n if (logOutResponse.ok) {\n setAppState((appState) => ({\n ...appState,\n authType: \"\",\n nav: {\n status: \"loading\",\n message: \"\",\n siteId: null,\n locationId: null,\n siteName: \"\",\n redirect: false,\n },\n singleAuth: {\n token: null,\n userId: null,\n userName: null,\n role: null,\n allowedPermissions: null,\n },\n bookingAuth: {\n status: \"\",\n message: \"\",\n authorizationTokens: [],\n },\n directorsAuth: {\n status: \"\",\n message: \"\",\n authorizationTokens: [],\n locationsAuth: [],\n siteId: \"\",\n locationId: \"\",\n siteName: \"\",\n token: \"\",\n },\n }));\n } else {\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n status: \"logOutError\",\n message: \"Request Error: \" + JSON.stringify(data),\n },\n }));\n }\n } catch (error) {\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n status: \"error\",\n message: \"Logout Error: \" + JSON.stringify(error.message),\n },\n }));\n }\n }\n };\n\n const multiLogOut = async () => {\n const singleLogout = async ({ siteId, token }) => {\n const logOutMethod = {\n method: \"DELETE\",\n headers: {\n siteid: siteId,\n authorization: token,\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/userToken/revoke`,\n logOutMethod\n );\n if (response.ok) {\n return await response.json();\n } else {\n return Promise.reject(\n new Error(\"Failed to log out against \" + siteId.toString())\n );\n }\n };\n\n const auths = appState.directorsAuth.authorizationTokens;\n\n try {\n const logoutAttempts = auths.map((auth) => {\n const siteId = auth.siteId;\n const token = auth.auth.accesssToken;\n return singleLogout({ siteId: siteId, token: token });\n });\n await Promise.all(logoutAttempts);\n\n setAppState((appState) => ({\n ...appState,\n authType: \"\",\n directorsAuth: {\n ...appState.directorsAuth,\n authorizationTokens: [],\n },\n nav: {\n ...appState.nav,\n status: \"MultilogedOut\",\n },\n }));\n } catch (e) {\n console.error(e);\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n message: \"There was an error while login out\",\n status: \"error\",\n },\n }));\n }\n };\n\n const handleLocationChange = (selectedOption) => {\n const siteId = selectedOption.value.split(\"-\")[0];\n const locationId = selectedOption.value.split(\"-\")[1];\n const siteName = selectedOption.label;\n const authObject = appState.directorsAuth.authorizationTokens.find(\n (el) => el.siteId.toString() === siteId\n );\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n },\n directorsAuth: {\n ...appState.directorsAuth,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n token: authObject.auth.accesssToken,\n },\n singleAuth: {\n ...appState.singleAuth,\n token: authObject.auth.accesssToken,\n userId: authObject.auth.userId,\n userName: authObject.auth.userName,\n role: authObject.auth.userRol,\n },\n }));\n };\n\n const handleBookingLocationChange = (selectedOption) => {\n if('label' in appState.bookingAuth.selectedSite){\n setAppState((appState) => ({\n ...appState,\n bookingAuth: {\n ...appState.bookingAuth,\n selectedSite: selectedOption,\n },\n }));\n }\n else{\n setAppState((appState) => ({\n ...appState,\n bookingAuth: {\n ...appState.bookingAuth,\n selectedSite: selectedOption,\n prevSelectedSite: selectedOption,\n },\n }));\n }\n };\n\n return (\n <>\n \n\n {appState.nav.status === \"error\" && (\n
\n
\n
\n \n {appState.nav.message}\n \n
\n
\n
\n )}\n\n {appState.nav.status === \"logedOut\" && (\n \n )}\n\n {appState.nav.status === \"MultilogedOut\" && (\n \n )}\n \n );\n}\n\nNavBar.propTypes = {\n appState: PropTypes.object.isRequired,\n setAppState: PropTypes.func.isRequired,\n};\nexport default NavBar;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\n\nclass ErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true, error: error };\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return

{`Something went wrong. error: ${this.state.error}`}

;\n }\n\n return this.props.children;\n }\n}\nexport default ErrorBoundary;\n\nErrorBoundary.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n","import React, { useEffect, useState } from \"react\";\nimport \"../styles/global.css\";\nimport { QRCode } from \"react-qr-svg\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { useParams, Redirect } from \"react-router-dom\";\nimport moment from \"moment\";\nimport logo from \"../logo.png\";\nimport { PropTypes } from \"prop-types\";\nimport { sitesList } from \"../config/constants.js\"\n\nfunction Home({ appState }) {\n const [state, setstate] = useState({\n emailOrPhone: null,\n status: \"IDLE\",\n validate: \"default\",\n error: null,\n clientName: null,\n appoimentDate: null,\n appointmentId: \"\",\n fillForm: \"\",\n });\n const [authState, setAuthState] = useState({\n status: \"\",\n siteId: \"\",\n siteName: \"\",\n });\n const [search, setSearch] = useState({\n searchTerm: \"\",\n locationTerm: \"\",\n facilities: [],\n });\n\n const dateAppoiment = moment(state.appoimentDate).calendar();\n const isPast = moment() > moment(state.appoimentDate);\n const params = useParams();\n\n useEffect(() => {\n const results = sitesList;\n\n const paramSite = results.find((item) => item.siteId === params.siteId);\n if (paramSite !== undefined) {\n setAuthState((authState) => ({\n ...authState,\n status: \"checkinstep\",\n siteId: paramSite.siteId,\n siteName: paramSite.name,\n }));\n } else {\n if (appState.nav.siteId !== null) {\n const site = results.find((item) => item.siteId === appState.nav.siteId);\n setAuthState((authState) => ({\n ...authState,\n status: \"checkinstep\",\n siteId: site.siteId,\n siteName: site.name,\n }));\n } else {\n setAuthState((authState) => ({\n ...authState,\n status: \"facilityStep\",\n siteId: \"\",\n siteName: \"\",\n }));\n }\n }\n }, [appState.nav.siteId, params.siteId]);\n\n useEffect(() => {\n const results = sitesList.filter((facility) =>\n facility.name.toLowerCase().includes(search.searchTerm.toLowerCase())\n );\n setSearch((search) => ({\n ...search,\n facilities: results,\n }));\n }, [search.searchTerm]);\n\n const handleTermChange = (event) => {\n setSearch((search) => ({\n ...search,\n searchTerm: event.target.value,\n }));\n };\n\n const handleClick = (id, name) => async (event) => {\n event.preventDefault();\n setAuthState((authState) => ({\n ...authState,\n status: \"checkinstep\",\n siteId: id,\n siteName: name,\n }));\n };\n\n const handleOnBlur = (event) => {\n const value = event.target.value;\n let cleanValue = \"\";\n const emailRegex = /^\\S+@\\S+\\.\\S+$/;\n const phoneRegex = /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;\n if (phoneRegex.test(value)) {\n cleanValue = value.replace(/[-.() ]/g, \"\");\n setstate({\n ...state,\n validate: true,\n emailOrPhone: cleanValue,\n });\n } else {\n if (emailRegex.test(value.replace(\" \", \"\"))) {\n setstate({\n ...state,\n validate: true,\n emailOrPhone: value.replace(\" \", \"\"),\n });\n } else {\n setstate({\n ...state,\n validate: false,\n emailOrPhone: cleanValue,\n });\n }\n }\n };\n\n const handleOnClickCheck = async (event) => {\n event.preventDefault();\n if (state.validate) {\n setstate({ ...state, status: \"REQUESTING_EMAIL_VALITADION\" });\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authState.siteId,\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${state.emailOrPhone}/validate`,\n getMethod\n );\n const data = await response.json();\n const { clients = [], appoimnets = [] } = data;\n\n if (response.ok) {\n if (\n appoimnets[0].Status !== \"Arrived\" &&\n appoimnets[0].Status !== \"Completed\"\n ) {\n setstate({\n ...state,\n clientName: `${clients[0].FirstName} ${clients[0].LastName}`,\n appoimentDate: appoimnets[0].StartDateTime,\n appointmentId: appoimnets[0].Id,\n fillForm: clients[0].YellowAlert !== \"\" + appoimnets[0].Id,\n });\n try {\n const putPayload = {\n Execute: \"arrive\",\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authState.siteId,\n allowedpermissions: false,\n },\n body: JSON.stringify(putPayload),\n };\n const putResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${appoimnets[0].Id}`,\n putMethod\n );\n const putData = await putResponse.json();\n if (putResponse.ok) {\n const dynamoPayload = {\n appointmentId: parseInt(appoimnets[0].Id),\n locationId: parseInt(appoimnets[0].LocationId),\n clientName: `${clients[0].FirstName} ${clients[0].LastName}`,\n appointmentDate: appoimnets[0].StartDateTime,\n staffId: \"\" + appoimnets[0].StaffId,\n arrived: moment(new Date()).toString(),\n clientId: appoimnets[0].ClientId,\n };\n try {\n const putDynamo = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${authState.siteId}/sales`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n setstate({\n ...state,\n status: \"SUCCESS_REQUESTING_EMAIL_CONFIRMATION\",\n clientName: `${clients[0].FirstName} ${clients[0].LastName}`,\n appoimentDate: appoimnets[0].StartDateTime,\n appointmentId: appoimnets[0].Id,\n fillForm:\n clients[0].YellowAlert !== \"\" + appoimnets[0].Id,\n });\n } else {\n setstate({\n ...state,\n status: \"ERROR_REQUESTING_EMAIL_CONFIRMATION\",\n error:\n \"Dynamo Response Error: \" + JSON.stringify(dynamoData),\n });\n }\n } catch (error) {\n setstate({\n ...state,\n status: \"ERROR_REQUESTING_EMAIL_CONFIRMATION\",\n error: \"Dynamo Request Error: \" + JSON.stringify(error),\n });\n }\n } else {\n setstate({\n ...state,\n status: \"ERROR_REQUESTING_EMAIL_CONFIRMATION\",\n error: \"Arrive Response Error: \" + JSON.stringify(putData),\n });\n }\n } catch (error) {\n setstate({\n ...state,\n status: \"ERROR_REQUESTING_EMAIL_CONFIRMATION\",\n error: \"Arrive Request Error: \" + JSON.stringify(error),\n });\n }\n // todo: crear estados para cuando el cliente no existe y para cuando el cliente existe y el appoiment no\n } else {\n if (appoimnets[0].Status === \"Completed\") {\n setstate({\n ...state,\n status: \"APPOINTMENT_ALREADY_ARRIVED\",\n error: \"Appointment has already been completed.\",\n fillForm: false,\n });\n }\n if (appoimnets[0].Status === \"Arrived\") {\n setstate({\n ...state,\n appointmentId: appoimnets[0].Id,\n fillForm: clients[0].YellowAlert !== \"\" + appoimnets[0].Id,\n status: \"APPOINTMENT_ALREADY_ARRIVED\",\n error: \"Appointment has already been arrived.\",\n });\n }\n }\n } else {\n setstate({\n ...state,\n status: \"FAILD_REQUESTING_EMAIL_CONFIRMATION\",\n error: \"Validate Response Error: \" + JSON.stringify(data),\n });\n }\n } catch (error) {\n setstate({\n ...state,\n status: \"FAILD_REQUESTING_EMAIL_CONFIRMATION\",\n error: \"Validate Request Error: \" + JSON.stringify(error.message),\n });\n }\n }\n };\n\n return (\n
\n {authState.status === \"facilityStep\" && (\n <>\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Select the facility

\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n {search.facilities.map((facility) => {\n return (\n
\n
\n
\n \n
\n
\n
\n {facility.name}\n
\n
\n
\n \n SELECT\n \n
\n
\n
\n
\n );\n })}\n
\n \n )}\n\n {authState.status === \"checkinstep\" && (\n <>\n
\n
\n \"little\n

\n Welcome to {authState.siteName}\n

\n
\n \n Please enter your email or phone number to start the check-in\n process\n \n \n
\n {!state.validate && (\n \n Invalid email or phone number, please enter a valid email or\n phone number\n \n )}\n
\n \n {state.status === \"REQUESTING_EMAIL_VALITADION\" ? (\n
\n Loading...\n
\n ) : (\n \"Check Appointment\"\n )}\n \n\n {state.status === \"SUCCESS_REQUESTING_EMAIL_CONFIRMATION\" && (\n \n
\n Welcome {state.clientName}\n
\n
\n {isPast\n ? \"Your last appointment was \" + dateAppoiment\n : \"Your next appointment is \" + dateAppoiment}\n
\n {!state.fillForm && (\n
\n Thank you for submitting the check-in, your information is\n now being processed. Please take a seat until your turn is\n called.\n
\n )}\n
\n )}\n\n {(state.status === \"ERROR_REQUESTING_EMAIL_CONFIRMATION\" ||\n state.status === \"APPOINTMENT_ALREADY_ARRIVED\") && (\n \n
\n {state.error}\n
\n
\n )}\n\n {state.status === \"FAILD_REQUESTING_EMAIL_CONFIRMATION\" && (\n \n
\n Sorry you do not have appoiments today.\n
\n {state.error}\n
\n
\n )}\n\n {state.fillForm && (\n <>\n
\n To proceed to the check-in process, we have sent an email\n
with the URL or you can{\" \"}\n \n
\n \n )}\n
\n
\n
\n
\n
\n

Or do it yourself on your device.

\n \n
\n
\n
\n \n )}\n
\n );\n}\n\nHome.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default Home;\n","\nexport const formatAmount = (amount) =>{\n\tconst value = parseFloatLocale(amount);\n\treturn value.toLocaleString(\"en-US\", {\n\t\tminimumFractionDigits: 2,\n\t\tmaximumFractionDigits: 2,\n\t});\n};\n\nexport const parseFloatLocale = (amount) => {\n\tconst strNum = String(amount); \n\tconst noComma = strNum.replaceAll(\",\", \"\");\n\treturn parseFloat(noComma);\n};\n\n\nexport const parseNumberPhoneUS = (phone) => {\n\tconst x = phone.toString().replace(/\\D/g, '').match(/(\\d{0,3})(\\d{0,3})(\\d{0,4})/);\n\treturn !x[2] ? x[1] : '(' + x[1] + ') ' + x[2] + (x[3] ? '-' + x[3] : '' );\n};\n\n","import React, { useEffect, useRef } from \"react\";\nimport PropTypes from 'prop-types';\nimport { Link } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\nimport {parseNumberPhoneUS } from \"../util/formatNumbers.js\";\n\n\nconst FormUltraSound = ({ \n state,\n formData,\n formSubmited,\n setFormSubmited,\n setModalsState,\n modalsState,\n setFormData,\n msgData,\n}) => {\n\n const requiredFields = {\n firstName: useRef(null),\n lastName: useRef(null),\n email: useRef(null),\n address_line_1: useRef(null),\n city: useRef(null),\n state: useRef(null),\n zip_code: useRef(null),\n phone_cel: useRef(null),\n due_date: useRef(null),\n birth_date: useRef(null),\n doctor_facilities: useRef(null),\n pregnancy_problem: useRef(null),\n ultrasounds: useRef(null),\n about_us: useRef(null),\n terms_checkbox: useRef(null),\n waiver_checkbox: useRef(null),\n };\n\n useEffect(() => {\n const filledFirstAppointmentData = ((formData.firstName !== null && \n formData.firstName !== \"\" && \n formData.lastName !== null && \n formData.lastName !== \"\" && \n formData.email !== null && \n formData.email !== \"\" && \n formData.address_line_1 !== null && \n formData.address_line_1 !== \"\" && \n formData.city !== null && \n formData.city !== \"\" && \n formData.state !== null && \n formData.state !== \"\" && \n formData.zip_code !== null && \n formData.zip_code !== \"\" && \n formData.phone_cel !== null && \n formData.phone_cel !== \"\" && \n formData.phone_cel.length === 14 && \n formData.due_date !== null && \n formData.due_date !== \"\" && \n formData.due_date > moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\") && \n formData.birth_date !== null && \n formData.birth_date !== \"\" && \n formData.birth_date < moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\") && \n formData.doctor_facilities !== null && \n formData.doctor_facilities !== \"\" && \n formData.pregnancy_problem !== null && \n formData.pregnancy_problem !== \"\" &&\n formData.ultrasounds !== null && \n formData.ultrasounds !== \"\" && \n formData.about_us !== null && \n formData.about_us !== \"\" && \n formData.about_us !== \"null\" && \n formData.terms_checkbox) ||\n formData.fullData) &&\n formData.waiver_checkbox && formData.terms_checkbox;\n\n if (filledFirstAppointmentData) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"ready\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"not-ready\",\n }));\n }\n }, [formData]);\n\n\n useEffect(() => {\n if (\n modalsState.initialsImage !== \"\"\n ) {\n setFormData((formData) => ({\n ...formData,\n terms_checkbox: true,\n }));\n }\n if (\n modalsState.waiverSignatureImage !== \"\"\n ) {\n setFormData((formData) => ({\n ...formData,\n waiver_checkbox: true,\n }));\n }\n }, [modalsState]);\n\n\n const handleChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n \n if(name === \"phone_cel\"){\n \n const phoneNumber = parseNumberPhoneUS(value); \n\n setFormData((formData) => ({\n ...formData,\n [name]: phoneNumber,\n }));\n \n }else{\n \n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n \n }\n \n };\n\n const handleCheckbox = (event) => {\n event.preventDefault();\n const name = event.target.name;\n const id = event.target.id;\n if (name === \"terms_checkbox\" || id === \"terms_link\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsCheckboxModal: \"visible\",\n }));\n } else {\n if (name === \"waiver_checkbox\" || id === \"waiver_link\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverCheckboxModal: \"visible\",\n }));\n }\n }\n };\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (formSubmited.status === \"sending\") {\n return;\n }\n const fields = [\n \"firstName\",\n \"lastName\",\n \"email\",\n \"address_line_1\",\n \"city\",\n \"state\",\n \"zip_code\",\n \"phone_cel\",\n \"due_date\",\n \"birth_date\",\n \"doctor_facilities\",\n \"pregnancy_problem\",\n \"ultrasounds\",\n \"about_us\",\n \"terms_checkbox\",\n \"waiver_checkbox\",\n ];\n\n const firstRef = fields.map((name) => {\n\n let validFiel = false;\n\n if(name === \"phone_cel\" && formData[name].length === 14){\n validFiel = true;\n }\n\n else if(name === \"firstName\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"lastName\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"email\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"address_line_1\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"city\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"state\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"zip_code\" && formData[name] !== \"\"){\n validFiel = true;\n }\n \n else if(name === \"due_date\" && formData[name] !== \"\" && formData[name] > moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\")){\n validFiel = true;\n }\n\n else if(name === \"birth_date\" && formData[name] !== \"\" && formData[name] < moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\")){\n validFiel = true;\n }\n\n else if(name === \"doctor_facilities\" && formData[name]){\n validFiel = true;\n }\n\n else if(name === \"pregnancy_problem\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"ultrasounds\" && formData[name] !== \"\"){\n validFiel = true;\n }\n\n else if(name === \"about_us\" && formData[name] !== \"\" && formData[name] !== \"null\"){\n validFiel = true;\n }\n else if(name === \"terms_checkbox\" && formData[name]){\n validFiel = true;\n } \n else if(name === \"waiver_checkbox\" && formData[name]){\n validFiel = true;\n }\n else{\n return name;\n }\n return validFiel;\n });\n\n const badValue = firstRef.find((i) => i !== true);\n\n if(!formData.fullData){\n if(badValue !== undefined) {\n requiredFields[badValue].current.scrollIntoView();\n }\n }\n\n\n if (formSubmited.required !== \"ready\") {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n inputRequiredClass: \"lb-form-validated-error\",\n attempt: true,\n }));\n } else {\n setFormData((formData) => ({\n ...formData,\n signatureDate: moment(new Date()).toString(),\n }));\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"sending\",\n inputRequiredClass: \"\",\n attempt: false,\n }));\n let pdfData = {};\n try {\n \n const formDataPdf = new FormData();\n\n const birthDate = new Date(formData.birth_date.concat(\"T00:00:00\"));\n const dueDate = new Date(formData.due_date.concat(\"T00:00:00\"));\n const appointmentDate = new Date(msgData.appointmentDate);\n let ultrasoundDate = \"\";\n if (formData.last_ultrasound_date !== \"\") {\n const lastUltrasoundDate = new Date(\n formData.last_ultrasound_date.concat(\"T00:00:00\")\n );\n ultrasoundDate =\n lastUltrasoundDate.getMonth() +\n 1 +\n \" / \" +\n lastUltrasoundDate.getDate() +\n \" / \" +\n lastUltrasoundDate.getFullYear();\n }\n\n let pdfPayload = {};\n\n const firstAppointment = formData.firstAppointment || formData.missingData;\n if(firstAppointment){\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n initialsFile: modalsState.initialsImage, \n signatureFile: modalsState.waiverSignatureImage,\n email: formData.email,\n addressLine1: formData.address_line_1,\n addressLine2: formData.address_line_2,\n birthDate: birthDate.getMonth() + 1 + \" / \" +birthDate.getDate() +\" / \" +birthDate.getFullYear(),\n city: formData.city,\n state: formData.state,\n postalCode: formData.zip_code,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n referredBy: formData.about_us === \"null\" ? \"\" : formData.about_us,\n spousePartner: formData.spouse_partner,\n dueDate:formData.due_date === \"\"? \"\": dueDate.getMonth() +1 +\" / \" +dueDate.getDate() +\" / \" +dueDate.getFullYear(),\n phisicianName: formData.phisician_name,\n phisicianPhone: formData.phisician_phone,\n pregnancyProblem: formData.pregnancy_problem,\n pregnancyProblemExplain: formData.pregnancy_problem_explain,\n ultrasounds: formData.ultrasounds,\n lastUltrasoundDate: ultrasoundDate,\n normalResults: formData.normal_results,\n normalResultsExplain: formData.normal_results_explain,\n doctorFacilities: formData.doctor_facilities,\n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: formData.firstAppointment || formData.missingData, // esto se debe ajustar si falta algun campo obligatorio\n appointmentId: state.appointmentId,\n appointmentDate:appointmentDate.getMonth() +1 +\" / \" +appointmentDate.getDate() +\" / \" +appointmentDate.getFullYear(),\n programId: state.programId\n };\n }\n else{\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n signatureFile: modalsState.waiverSignatureImage,\n initialsFile: modalsState.initialsImage, \n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: firstAppointment, // esto se debe ajustar si falta algun campo obligatorio\n appointmentId: state.appointmentId,\n appointmentDate: appointmentDate.getMonth() +1 +\" / \" +appointmentDate.getDate() +\" / \" +appointmentDate.getFullYear(),\n programId: state.programId\n };\n }\n\n const keys = Object.keys(pdfPayload);\n\n keys.forEach((key, index) => {\n formDataPdf.append(`${key}`, pdfPayload[key]);\n });\n\n const pdfPutMethod = {\n method: \"PUT\",\n headers: {\n siteid: state.siteId,\n },\n body: formDataPdf,\n };\n const pdfResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/uploadPdf/signature`,\n pdfPutMethod\n );\n pdfData = await pdfResponse.json();\n\n if (pdfResponse.ok) {\n const bucketOk = pdfData.Aws.Key === pdfData.Aws.key && pdfData.Aws.Key !== undefined;\n let mindBodyOk = false;\n if ( (pdfData.MindBody.Error !== undefined && pdfData.MindBody.Error.Message === \"File already exists.\") || (pdfData.MindBody.FileName !== undefined && pdfData.MindBody.FileName !== \"\") ) {\n mindBodyOk = true;\n }\n\n if (bucketOk && mindBodyOk) {\n try {\n const clientPayload = {\n id: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n name: formData.firstName + \" \" + formData.lastName,\n email: formData.email,\n addressLine1: formData.address_line_1,\n addressLine2: formData.address_line_2,\n birthDate: formData.birth_date.concat(\"T00:00:00\"),\n city: formData.city,\n state: formData.state,\n postalCode: formData.zip_code,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n homePhone: formData.phone_home,\n workPhone: formData.phone_work,\n referredBy:\n formData.about_us === \"null\" ? \"\" : formData.about_us,\n spousePartner: formData.spouse_partner,\n dueDate:\n formData.due_date !== \"\"\n ? formData.due_date.concat(\"T00:00:00\")\n : \"\",\n phisicianName: formData.phisician_name,\n phisicianPhone: formData.phisician_phone,\n pregnancyProblem: formData.pregnancy_problem,\n pregnancyProblemExplain: formData.pregnancy_problem_explain,\n ultrasounds: formData.ultrasounds,\n lastUltrasoundDate:\n formData.last_ultrasound_date !== \"\"\n ? formData.last_ultrasound_date.concat(\"T00:00:00\")\n : \"\",\n normalResults: formData.normal_results,\n normalResultsExplain: formData.normal_results_explain,\n doctorFacilities: formData.doctor_facilities,\n siteId: state.siteId,\n locationId: formData.locationId,\n };\n const clientPutMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(clientPayload),\n };\n const clientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/clients`,\n clientPutMethod\n );\n const clientData = await clientResponse.json();\n if (clientResponse.ok) {\n try {\n const payload = {\n Client: {\n FirstName: formData.firstName,\n LastName: formData.lastName,\n AddressLine1: formData.address_line_1,\n AddressLine2: formData.address_line_2,\n BirthDate: formData.birth_date.concat(\"T00:00:00\"),\n City: formData.city,\n State: formData.state,\n PostalCode: formData.zip_code,\n MobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n ReferredBy:\n formData.about_us === \"null\" ? \"\" : formData.about_us,\n Email: formData.email,\n Id: formData.client_id,\n YellowAlert: \"\" + state.appointmentId,\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${formData.client_id}`,\n putMethod\n );\n\n const data = await response.json();\n if (response.ok) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"success\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(clientData),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(pdfData),\n }));\n }\n } catch (error) {\n console.log(error)\n if (pdfData.Aws !== undefined && pdfData.MindBody !== undefined) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n }\n }\n };\n\nreturn(\n\n\n
\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n \n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n
\n
\n )}\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n
\n
\n )}\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n \n
\n
\n )}\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n
\n  \n \n
\n\n
\n \n )}\n \n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n \n moment(state.currentDate)\n ? \"lb-form-control lb-border-0 lb-inputBackground\"\n : \"lb-form-control \" +\n formSubmited.inputRequiredClass\n }\n name=\"due_date\"\n value={formData.due_date}\n onChange={handleChange}\n data-cy=\"due_date\"\n />\n
\n
\n )}\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n \n
\n \n )}\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n Have you informed your doctor of your visit to our\n facilities? / ¿Ha informado a su médico de su visita a\n nuestras instalaciones?\n * \n \n
\n \n \n \n
\n \n \n \n
\n \n \n \n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n Have you had any problem with your current pregnacy? /\n ¿Has tenido algún problema con tu embarazo actual?{\" \"}\n * \n \n
\n \n \n \n
\n \n \n \n
\n \n \n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n
\n
\n \n \n
\n\n
\n \n \n
\n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n )}\n\n
\n
\n \n Terms and conditions\n \n
\n
\n \n Waiver\n \n
\n
\n\n
\n
\n \n \n \n I agree with the terms of use\n * \n \n
\n \n \n \n I agree with the waiver conditions\n * \n \n
\n \n \n\n {formSubmited.status === \"success\" && (\n \n \n Thank you for submitting the form, your information is now\n being processed. You can now close this page.\n \n \n )}\n {formSubmited.status === \"responseError\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n )}\n {formSubmited.status === \"pdfError\" && (\n \n {formSubmited.message}\n \n )}\n {formSubmited.status === \"requestError\" && (\n
\n \n Woops, this is weird. Something went wrong with the form,\n please reload the page and try filling it again.{\" \"}\n {formSubmited.message}\n \n
\n )}\n {formSubmited.required !== \"ready\" && formSubmited.attempt && (\n
\n \n Please fill all the required fields before submitting\n \n
\n )}\n\n
\n
\n {formSubmited.status !== \"success\" && (\n \n {formSubmited.status === \"sending\" ? (\n
\n Loading...\n
\n ) : (\n \"Submit\"\n )}\n \n )}\n {formSubmited.status === \"success\" &&\n state.bypass2fa === true && (\n \n GO BACK\n \n )}\n
\n
\n \n \n\n)\n };\n \n FormUltraSound.propTypes = {\n state : PropTypes.object.isRequired,\n formData: PropTypes.object.isRequired,\n formSubmited: PropTypes.object.isRequired,\n setFormSubmited : PropTypes.func.isRequired,\n setModalsState: PropTypes.func.isRequired,\n modalsState: PropTypes.object.isRequired,\n setFormData: PropTypes.func.isRequired,\n msgData: PropTypes.object.isRequired,\n };\n export default FormUltraSound;\n ","import PropTypes from 'prop-types';\nimport SignatureCanvas from \"react-signature-canvas\";\nimport React, {useRef } from \"react\";\n\nconst ModalFormMassage = ({\n modalsState,\n state,\n setModalsState,\n setFormData,\n formData\n}) =>{\n\n\nconst conditionsAndTermsSignatureRef = useRef({});\n\n\nconst urltoFile = (url, filename, mimeType) => {\n return (fetch(url)\n .then(function(res){return res.arrayBuffer();})\n .then(function(buf){return new File([buf], filename,{type:mimeType});})\n );\n }\n\n const validateSignatureConditionsAndTerms = () => {\n let signatureLength = 0;\n\n conditionsAndTermsSignatureRef.current.toData().forEach((element) => {\n signatureLength += element.length;\n });\n\n setModalsState((modalsState) => ({\n ...modalsState,\n termsAndConditionsSignatureClass:\n signatureLength > 20\n ? \"lb-btn my-auto text-lb-btn-submit lb-submitButton\"\n : \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n termsAndConditionsSignatureButtonDisabled: signatureLength <= 20,\n }));\n };\n\n const handleLanguageChange = (language) => (event) => {\n setModalsState((modalsState) => ({\n ...modalsState,\n [event.target.name]: language,\n }));\n };\n\n \n const closeModal = (event) => {\n const name = event.target.id;\n \n if (name === \"termsAndConditionOverlay\" || name === \"closeTermsAndConditionModal\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsAndConditionsCheckboxModal: \"hidden\",\n }));\n }\n \n };\n\nconst handleMedicalConditions = async (e) => {\nconst {value} = e.target;\n\nsetModalsState((modalsState) => ({\n...modalsState,\nmedicalConditions: value,\n}));\n\n};\n\n const handleModalSubmit = async (event) => {\n event.preventDefault();\n const name = event.target.name; \n \n const termsAndConditionsSignatureName = `signature-${state.siteId}-${state.appointmentId}.png`\n \n if (name === \"termsAndConditionsSignatureButton\") {\n const signatureImagePNG = await urltoFile(conditionsAndTermsSignatureRef.current .getTrimmedCanvas()\n .toDataURL(\"image/png\"), termsAndConditionsSignatureName,'image/png');\n\n setModalsState((modalsState) => ({\n ...modalsState,\n termsAndConditionsCheckboxModal: \"hidden\",\n termsAndConditionsSignatureClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n termsAndConditionsSignatureButtonDisabled: true,\n termsAndConditionsImage: signatureImagePNG\n }));\n\n }\n };\n\n\nreturn (\n\n \n \n ×\n \n
\n \n
\n
\n {modalsState.termsAndConditionsLenguage === \"english\" \n ?

Prenatal Massage.

\n :

Masaje Prenatal.

\n }\n
\n
\n \n ENGLISH\n \n \n ESPAÑOL\n \n
\n
\n\n {modalsState.termsAndConditionsLenguage === \"english\" && (\n\n <>\n
\n

I understand that massage therapy during pregnancy,\n can help with muscle and tension relaxation as well as stress relief.   By signing below, \n I understand that massage therapy is not an alternative to medical/prenatal \n case and that I am under the care of a physician for this pregnancy.   Below is a list\n of pregnancy complications.    By signing below, I verify that I do not have \n any of the following complications or risk factors that are conditions \n contraindicated to having a prenatal massage.

\n
    \n
  • 1. First trimester (up to 13 weeks gestation);
  • \n
  • 2. Pre‐term labor/possible miscarriage: discharge of blood, amniotic bag ruptured,\n Contractions;
  • \n
  • 3. Pre‐eclampsia: unusually high weight gain, protein in urine, high blood pressure
  • \n
  • 4. Eclampsia (Toxemia): severe water retention, headaches, back pain, vomiting, visual\n disturbances
  • \n
  • 5. Gestational Diabetes: abnormal appetite/thirst, sugar in urine
  • \n
  • 6. Deep Vein Thrombosis: pain, redness, or swelling isolated to one leg
  • \n
\n
\n

I have had the opportunity to ask the massage therapist any questions I may have about\n pregnancy massage and I have discussed this with my physician or other health care\n practitioner.  I will immediately let my massage therapist know of any pain or discomfort \n so that pressure and strokes can be adjusted to my level of comfort.

\n
\n\n
\n \n handleMedicalConditions(e)}\n value={modalsState.medicalConditions}\n rows=\"3\"\n type=\"text\"\n name=\"medical_condition\"\n data-cy=\"medical_condition\"\n />\n
\n\n
\n

I know that massage can be harmful in some circumstances; I am voluntarily seeking a \n prenatal massage and fully assume responsibility for receiving massage therapy at \n Pancitas and release and discharge the licensed massage therapist and Pancitas from \n any and all claims, liabilities, damages, actions arising from or related to massage therapy \n received.   I fully and truthfully answered the questions above and will tell the massage \n therapist promptly if anything changes.

\n
\n\n
\n

I verify the accuracy of the information above. I authorize Little Bellies to disclose \n information to my healthcare provider if necessary. I agree that I am financially \n responsible for charges related to this massage.

\n
\n \n )}\n {modalsState.termsAndConditionsLenguage === \"spanish\" && (\n <>\n
\n

Yo entiendo que la terapia de masaje durante el embarazo puede ayudar a relajar los músculos\n y la tensión, así como a aliviar el estrés. Al firmar a continuación, \n entiendo que la terapia de masaje no es una alternativa al caso médico/prenatal\n y que estoy bajo el cuidado de un médico durante este embarazo.   \n A continuación se muestra una lista de complicaciones del embarazo.    Al firmar a continuación, \n verifico que no tengo ninguna de las siguientes complicaciones o factores de \n riesgo que son condiciones contraindicadas para recibir un masaje prenatal.

\n
    \n
  • 1. Primer trimestre (hasta 13 semanas de gestación);
  • \n
  • 2. Trabajo de parto prematuro/posible aborto espontáneo: secreción de sangre, bolsa amniótica rota, Contracciones;
  • \n
  • 3. Preeclampsia: aumento de peso inusualmente alto, proteína en la orina, presión arterial alta
  • \n
  • 4. Eclampsia (Toxemia): retención severa de agua, dolores de cabeza, dolor de espalda, vómitos, trastornos visuales
  • \n
  • 5. Diabetes gestacional: apetito anormal/sed, azúcar en la orina
  • \n
  • 6. Trombosis venosa profunda: dolor, enrojecimiento o hinchazón aislada en una pierna
  • \n
\n
\n

He tenido la oportunidad de hacerle al masajista todas las preguntas\n que pueda tener sobre el masaje durante el embarazo y lo he discutido con mi médico u otro\n profesional de la salud.    Inmediatamente informaré a mi masajista sobre cualquier dolor \n o molestia para que la presión y las caricias puedan ajustarse a mi nivel de comodidad.

\n
\n\n
\n \n handleMedicalConditions(e)}\n value={modalsState.medicalConditions}\n rows=\"3\"\n type=\"text\"\n name=\"medical_condition\"\n data-cy=\"medical_condition\"\n />\n
\n\n
\n

Yo sé que el masaje puede ser dañino en algunas circunstancias; Estoy buscando voluntariamente un masaje prenatal\n y asumo completamente la responsabilidad de recibir terapia de masaje en Pancitas y libero\n al terapeuta de masaje con licencia y a Pancitas de cualquier reclamo, responsabilidad, \n daño, acción que surja de o esté relacionado con la terapia de masaje recibida.   \n Respondí completa y sinceramente las preguntas anteriores y le informaré al masajista de inmediato\n si algo cambia.

\n
\n\n
\n

Verifico la exactitud de la información anterior. Autorizo a Little Bellies a divulgar\n información a mi proveedor de atención médica si es necesario. Acepto que soy financieramente\n responsable de los cargos relacionados con este masaje.

\n
\n\n \n )}\n \n\n

Please sign here.

\n\n \n
\n \n \n
\n \n Accept\n \n
\n\n \n \n\n\n\n\n\n)\n\n\n\n};\n\n\nModalFormMassage.propTypes = {\n modalsState: PropTypes.object.isRequired,\n state: PropTypes.object.isRequired,\n setModalsState: PropTypes.func.isRequired,\n setFormData: PropTypes.func.isRequired,\n formData: PropTypes.object.isRequired,\n };\n export default ModalFormMassage;\n ","import React, { useEffect, useRef } from \"react\";\nimport PropTypes from 'prop-types';\nimport { Link } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\nimport ModalFormMassage from \"./modals/modalFormMassage\";\nimport {parseNumberPhoneUS } from \"../util/formatNumbers.js\";\n\nconst FormMassage = ({\n state,\n formData,\n formSubmited,\n setFormSubmited,\n setModalsState,\n modalsState,\n setFormData,\n msgData,\n}) => {\n\n const requiredFields = {\n firstName: useRef(null),\n lastName: useRef(null),\n email: useRef(null),\n address_line_1: useRef(null),\n city: useRef(null),\n state: useRef(null),\n zip_code: useRef(null),\n phone_cel: useRef(null),\n birth_date: useRef(null),\n doctor_facilities: useRef(null),\n pregnancy_problem: useRef(null),\n massages: useRef(null),\n about_us: useRef(null),\n terms_conditions_checkbox: useRef(null),\n };\n\n\n useEffect(() => {\n const filledFirstAppointmentData = ((formData.firstName !== null &&\n formData.firstName !== \"\" &&\n formData.lastName !== null &&\n formData.lastName !== \"\" &&\n formData.email !== null &&\n formData.email !== \"\" &&\n formData.address_line_1 !== null &&\n formData.address_line_1 !== \"\" &&\n formData.city !== null &&\n formData.city !== \"\" &&\n formData.state !== null &&\n formData.state !== \"\" &&\n formData.zip_code !== null &&\n formData.zip_code !== \"\" &&\n formData.phone_cel !== null &&\n formData.phone_cel !== \"\" &&\n formData.phone_cel.length === 14 &&\n formData.birth_date !== null &&\n formData.birth_date !== \"\" &&\n formData.birth_date < moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\") &&\n formData.doctor_facilities !== null && \n formData.doctor_facilities !== \"\" && \n formData.pregnancy_problem !== null && \n formData.pregnancy_problem !== \"\" && \n formData.massages !== null && \n formData.massages !== \"\" && \n formData.about_us !== null && \n formData.about_us !== \"\" && \n formData.about_us !== \"null\" && \n formData.terms_conditions_checkbox) ||\n formData.fullData) &&\n formData.terms_conditions_checkbox;\n\n if (filledFirstAppointmentData) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"ready\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"not-ready\",\n }));\n }\n }, [formData]);\n\n\n const handleCheckbox = (event) => {\n event.preventDefault();\n const name = event.target.name;\n const id = event.target.id;\n\n if (name === \"terms_conditions_checkbox\" || id === \"terms_and_conditions_link\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsAndConditionsCheckboxModal: \"visible\",\n termsAndConditionsSignatureClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n termsAndConditionsSignatureButtonDisabled: true,\n }));\n }\n };\n\n const handleChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n \n if(name === \"phone_cel\"){\n \n const phoneNumber = parseNumberPhoneUS(value);\n \n setFormData((formData) => ({\n ...formData,\n [name]: phoneNumber,\n }));\n\n } else {\n\n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n\n }\n\n };\n\n useEffect(() => {\n if (modalsState.termsAndConditionsImage !== \"\") {\n setFormData((formData) => ({\n ...formData,\n terms_conditions_checkbox: true,\n }));\n }\n }, [modalsState]);\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (formSubmited.status === \"sending\") {\n return;\n }\n\n const fields = [\n \"firstName\",\n \"lastName\",\n \"email\",\n \"address_line_1\",\n \"city\",\n \"state\",\n \"zip_code\",\n \"phone_cel\",\n \"birth_date\",\n \"doctor_facilities\",\n \"pregnancy_problem\",\n \"massages\",\n \"about_us\",\n \"terms_conditions_checkbox\",\n ];\n\n const firstRef = fields.map((name) => {\n\n let validFiel = false;\n\n if (name === \"phone_cel\" && formData[name].length === 14) {\n validFiel = true;\n }\n\n else if (name === \"firstName\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"lastName\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"email\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"address_line_1\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"city\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"state\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"zip_code\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"birth_date\" && formData[name] !== \"\" && formData[name] < moment(state.currentDate.toISOString()).format(\"YYYY-MM-DD\")) {\n validFiel = true;\n }\n\n else if (name === \"doctor_facilities\" && formData[name]) {\n validFiel = true;\n }\n\n else if (name === \"pregnancy_problem\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"massages\" && formData[name] !== \"\") {\n validFiel = true;\n }\n\n else if (name === \"about_us\" && formData[name] !== \"\" && formData[name] !== \"null\") {\n validFiel = true;\n }\n else if (name === \"terms_conditions_checkbox\" && formData[name]) {\n validFiel = true;\n } else {\n return name;\n }\n return validFiel;\n\n });\n\n const badValue = firstRef.find((i) => i !== true);\n\n if (!formData.fullData) {\n if (badValue !== undefined) {\n requiredFields[badValue].current.scrollIntoView();\n }\n }\n\n\n if (formSubmited.required !== \"ready\") {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n inputRequiredClass: \"lb-form-validated-error\",\n attempt: true,\n }));\n } else {\n setFormData((formData) => ({\n ...formData,\n signatureDate: moment(new Date()).toString(),\n }));\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"sending\",\n inputRequiredClass: \"\",\n attempt: false,\n }));\n let pdfData = {};\n try {\n\n const formDataPdf = new FormData();\n\n const birthDate = new Date(formData.birth_date.concat(\"T00:00:00\"));\n const appointmentDate = new Date(msgData.appointmentDate);\n\n let massageDate = \"\";\n if (formData.last_massage_date !== \"\") {\n const lastMassageDate = new Date(\n formData.last_massage_date.concat(\"T00:00:00\")\n );\n massageDate =\n lastMassageDate.getMonth() +\n 1 +\n \" / \" +\n lastMassageDate.getDate() +\n \" / \" +\n lastMassageDate.getFullYear();\n }\n\n let pdfPayload = {};\n\n const firstAppointment = formData.firstAppointment || formData.missingData;\n if (firstAppointment) {\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n signatureFile: modalsState.termsAndConditionsImage,\n medicalConditions: modalsState.medicalConditions,\n email: formData.email,\n addressLine1: formData.address_line_1,\n addressLine2: formData.address_line_2,\n birthDate: birthDate.getMonth() + 1 + \" / \" + birthDate.getDate() + \" / \" + birthDate.getFullYear(),\n city: formData.city,\n state: formData.state,\n postalCode: formData.zip_code,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n referredBy: formData.about_us === \"null\" ? \"\" : formData.about_us,\n spousePartner: formData.spouse_partner,\n phisicianName: formData.phisician_name,\n phisicianPhone: formData.phisician_phone,\n pregnancyProblem: formData.pregnancy_problem,\n pregnancyProblemExplain: formData.pregnancy_problem_explain,\n massages: formData.massages,\n lastMassageDate: massageDate,\n problemsMassages: formData.problems_massages,\n problemsMassagesExplain: formData.problems_massages_explain,\n doctorFacilities: formData.doctor_facilities,\n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: formData.firstAppointment || formData.missingData,\n appointmentId: state.appointmentId,\n appointmentDate: appointmentDate.getMonth() + 1 + \" / \" + appointmentDate.getDate() + \" / \" + appointmentDate.getFullYear(),\n programId: state.programId\n };\n }\n else {\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n signatureFile: modalsState.termsAndConditionsImage,\n medicalConditions: modalsState.medicalConditions,\n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: firstAppointment,\n appointmentId: state.appointmentId,\n appointmentDate: appointmentDate.getMonth() + 1 + \" / \" + appointmentDate.getDate() + \" / \" + appointmentDate.getFullYear(),\n programId: state.programId\n };\n }\n const keys = Object.keys(pdfPayload);\n\n keys.forEach((key, index) => {\n formDataPdf.append(`${key}`, pdfPayload[key]);\n });\n\n const pdfPutMethod = {\n method: \"PUT\",\n headers: {\n siteid: state.siteId,\n },\n body: formDataPdf,\n };\n const pdfResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/uploadPdf/signature`,\n pdfPutMethod\n );\n\n pdfData = await pdfResponse.json();\n\n if (pdfResponse.ok) {\n const bucketOk = pdfData.Aws.Key === pdfData.Aws.key && pdfData.Aws.Key !== undefined;\n let mindBodyOk = false;\n if ((pdfData.MindBody.Error !== undefined && pdfData.MindBody.Error.Message === \"File already exists.\") || (pdfData.MindBody.FileName !== undefined && pdfData.MindBody.FileName !== \"\")) {\n mindBodyOk = true;\n }\n\n if (bucketOk && mindBodyOk) {\n try {\n const clientPayload = {\n id: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n name: formData.firstName + \" \" + formData.lastName,\n email: formData.email,\n addressLine1: formData.address_line_1,\n addressLine2: formData.address_line_2,\n birthDate: formData.birth_date.concat(\"T00:00:00\"),\n city: formData.city,\n state: formData.state,\n postalCode: formData.zip_code,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n homePhone: formData.phone_home,\n workPhone: formData.phone_work,\n referredBy:\n formData.about_us === \"null\" ? \"\" : formData.about_us,\n spousePartner: formData.spouse_partner,\n phisicianName: formData.phisician_name,\n phisicianPhone: formData.phisician_phone,\n pregnancyProblem: formData.pregnancy_problem,\n pregnancyProblemExplain: formData.pregnancy_problem_explain,\n massages: formData.massages,\n lastMassageDate:\n formData.last_massage_date !== \"\"\n ? formData.last_massage_date.concat(\"T00:00:00\")\n : \"\",\n problemsMassages: formData.problems_massages,\n problemsMassagesExplain: formData.problems_massages_explain,\n doctorFacilities: formData.doctor_facilities,\n siteId: state.siteId,\n locationId: formData.locationId,\n };\n const clientPutMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(clientPayload),\n };\n const clientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/clients`,\n clientPutMethod\n );\n const clientData = await clientResponse.json();\n if (clientResponse.ok) {\n try {\n const payload = {\n Client: {\n FirstName: formData.firstName,\n LastName: formData.lastName,\n AddressLine1: formData.address_line_1,\n AddressLine2: formData.address_line_2,\n BirthDate: formData.birth_date.concat(\"T00:00:00\"),\n City: formData.city,\n State: formData.state,\n PostalCode: formData.zip_code,\n MobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, ''),\n ReferredBy:\n formData.about_us === \"null\" ? \"\" : formData.about_us,\n Email: formData.email,\n Id: formData.client_id,\n YellowAlert: \"\" + state.appointmentId,\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${formData.client_id}`,\n putMethod\n );\n\n const data = await response.json();\n if (response.ok) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"success\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(clientData),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(pdfData),\n }));\n }\n } catch (error) {\n console.log(error)\n if (pdfData.Aws !== undefined && pdfData.MindBody !== undefined) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n }\n }\n };\n\n return (\n
\n\n {modalsState.termsAndConditionsCheckboxModal === \"visible\" && (\n\n \n )}\n\n
\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n
\n
\n )}\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n
\n
\n )}\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n \n
\n
\n )}\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n
\n  \n \n
\n\n
\n \n )}\n \n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n \n \n \n
\n
\n )}\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n Have you informed your doctor of your visit to our\n facilities? / ¿Ha informado a su médico de su visita a\n nuestras instalaciones?\n * \n \n
\n \n \n \n
\n \n \n \n
\n \n \n \n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n Have you had any problem with your current pregnacy? /\n ¿Has tenido algún problema con tu embarazo actual?{\" \"}\n * \n \n
\n \n \n \n
\n \n \n \n
\n \n \n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n
\n
\n \n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n
\n
\n \n \n
\n \n
\n \n \n
\n
\n
\n
\n )}\n\n {formData.firstAppointment && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n )}\n\n \n
\n
\n
\n \n \n \n I agree with the terms of use\n * \n \n
\n
\n \n\n {formSubmited.status === \"success\" && (\n \n \n Thank you for submitting the form, your information is now\n being processed. You can now close this page.\n \n \n )}\n {formSubmited.status === \"responseError\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n )}\n {formSubmited.status === \"pdfError\" && (\n \n {formSubmited.message}\n \n )}\n {formSubmited.status === \"requestError\" && (\n
\n \n Woops, this is weird. Something went wrong with the form,\n please reload the page and try filling it again.{\" \"}\n {formSubmited.message}\n \n
\n )}\n {formSubmited.required !== \"ready\" && formSubmited.attempt && (\n
\n \n Please fill all the required fields before submitting\n \n
\n )}\n\n
\n
\n
\n {formSubmited.status !== \"success\" && (\n \n {formSubmited.status === \"sending\" ? (\n
\n Loading...\n
\n ) : (\n \"Submit\"\n )}\n \n )}\n {formSubmited.status === \"success\" &&\n state.bypass2fa === true && (\n \n GO BACK\n \n )}\n
\n
\n \n \n \n )\n};\n\nFormMassage.propTypes = {\n state: PropTypes.object.isRequired,\n formData: PropTypes.object.isRequired,\n formSubmited: PropTypes.object.isRequired,\n setFormSubmited: PropTypes.func.isRequired,\n setModalsState: PropTypes.func.isRequired,\n modalsState: PropTypes.object.isRequired,\n setFormData: PropTypes.func.isRequired,\n msgData: PropTypes.object.isRequired,\n};\nexport default FormMassage;\n","import React, { useEffect, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\nimport { parseNumberPhoneUS } from \"../util/formatNumbers.js\";\n\nconst FormDNA = ({\n state,\n formData,\n formSubmited,\n setFormSubmited,\n setModalsState,\n modalsState,\n setFormData,\n msgData,\n}) => {\n const requiredFields = {\n firstName: useRef(null),\n lastName: useRef(null),\n waiver_checkbox_dna: useRef(null),\n };\n\n useEffect(() => {\n const filledFirstAppointmentData =\n ((formData.firstName !== null &&\n formData.firstName !== \"\" &&\n formData.lastName !== null &&\n formData.lastName !== \"\") ||\n formData.fullData) &&\n formData.waiver_checkbox_dna;\n\n if (filledFirstAppointmentData) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"ready\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n required: \"not-ready\",\n }));\n }\n }, [formData]);\n\n useEffect(() => {\n if (modalsState.waiverSignatureImage !== \"\") {\n setFormData((formData) => ({\n ...formData,\n waiver_checkbox_dna: true,\n }));\n }\n }, [modalsState]);\n\n const handleChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n\n if (name === \"phone_cel\") {\n const phoneNumber = parseNumberPhoneUS(value);\n\n setFormData((formData) => ({\n ...formData,\n [name]: phoneNumber,\n }));\n } else {\n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n }\n };\n\n const handleCheckbox = (event) => {\n event.preventDefault();\n const name = event.target.name;\n const id = event.target.id;\n\n if (name === \"waiver_checkbox_dna\" || id === \"waiver_link_dna\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverCheckboxModal: \"visible\",\n }));\n }\n };\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (formSubmited.status === \"sending\") {\n return;\n }\n const fields = [\"firstName\", \"lastName\", \"waiver_checkbox_dna\"];\n\n const firstRef = fields.map((name) => {\n let validFiel = false;\n\n if (name === \"firstName\" && formData[name] !== \"\") {\n validFiel = true;\n } else if (name === \"lastName\" && formData[name] !== \"\") {\n validFiel = true;\n } else if (name === \"waiver_checkbox_dna\" && formData[name]) {\n validFiel = true;\n } else {\n return name;\n }\n return validFiel;\n });\n\n const badValue = firstRef.find((i) => i !== true);\n\n if (!formData.fullData) {\n if (badValue !== undefined) {\n requiredFields[badValue].current.scrollIntoView();\n }\n }\n\n if (formSubmited.required !== \"ready\") {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n inputRequiredClass: \"lb-form-validated-error\",\n attempt: true,\n }));\n } else {\n setFormData((formData) => ({\n ...formData,\n signatureDate: moment(new Date()).toString(),\n }));\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"sending\",\n inputRequiredClass: \"\",\n attempt: false,\n }));\n let pdfData = {};\n try {\n const formDataPdf = new FormData();\n const appointmentDate = new Date(msgData.appointmentDate);\n\n let pdfPayload = {};\n\n const firstAppointment =\n formData.firstAppointment || formData.missingData;\n if (firstAppointment) {\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n initialsFile: modalsState.initialsImage,\n signatureFile: modalsState.waiverSignatureImage,\n email: formData.email,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, \"\"),\n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: formData.firstAppointment || formData.missingData, // esto se debe ajustar si falta algun campo obligatorio\n appointmentId: state.appointmentId,\n appointmentDate:\n appointmentDate.getMonth() +\n 1 +\n \" / \" +\n appointmentDate.getDate() +\n \" / \" +\n appointmentDate.getFullYear(),\n programId: state.programId,\n };\n } else {\n pdfPayload = {\n clientId: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n signatureFile: modalsState.waiverSignatureImage,\n initialsFile: modalsState.initialsImage,\n siteId: state.siteId,\n locationId: formData.locationId,\n signatureDate: moment(new Date()).toString(),\n ipAddress: formData.ipv4,\n firstAppointment: firstAppointment, // esto se debe ajustar si falta algun campo obligatorio\n appointmentId: state.appointmentId,\n appointmentDate:\n appointmentDate.getMonth() +\n 1 +\n \" / \" +\n appointmentDate.getDate() +\n \" / \" +\n appointmentDate.getFullYear(),\n programId: state.programId,\n };\n }\n\n const keys = Object.keys(pdfPayload);\n\n keys.forEach((key, index) => {\n formDataPdf.append(`${key}`, pdfPayload[key]);\n });\n\n const pdfPutMethod = {\n method: \"PUT\",\n headers: {\n siteid: state.siteId,\n },\n body: formDataPdf,\n };\n const pdfResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/uploadPdf/signature`,\n pdfPutMethod\n );\n pdfData = await pdfResponse.json();\n\n if (pdfResponse.ok) {\n const bucketOk =\n pdfData.Aws.Key === pdfData.Aws.key &&\n pdfData.Aws.Key !== undefined;\n let mindBodyOk = false;\n if (\n (pdfData.MindBody.Error !== undefined &&\n pdfData.MindBody.Error.Message === \"File already exists.\") ||\n (pdfData.MindBody.FileName !== undefined &&\n pdfData.MindBody.FileName !== \"\")\n ) {\n mindBodyOk = true;\n }\n\n if (bucketOk && mindBodyOk) {\n try {\n const clientPayload = {\n id: \"\" + formData.client_id,\n firstName: formData.firstName,\n lastName: formData.lastName,\n name: formData.firstName + \" \" + formData.lastName,\n email: formData.email,\n mobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, \"\"),\n siteId: state.siteId,\n locationId: formData.locationId,\n };\n const clientPutMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(clientPayload),\n };\n const clientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/clients`,\n clientPutMethod\n );\n const clientData = await clientResponse.json();\n if (clientResponse.ok) {\n try {\n const payload = {\n Client: {\n FirstName: formData.firstName,\n LastName: formData.lastName,\n MobilePhone: formData.phone_cel.replace(/[^0-9.]+/g, \"\"),\n Email: formData.email,\n Id: formData.client_id,\n YellowAlert: \"\" + state.appointmentId,\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${formData.client_id}`,\n putMethod\n );\n\n const data = await response.json();\n if (response.ok) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"success\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(clientData),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(pdfData),\n }));\n }\n } catch (error) {\n console.log(error);\n if (pdfData.Aws !== undefined && pdfData.MindBody !== undefined) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: JSON.stringify(error.message),\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"pdfError\",\n message:\n \"There was a problem creating the mindbody pdf, please try again\",\n }));\n }\n }\n }\n };\n\n return (\n
\n
\n
\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n
\n \n \n
\n
\n
\n )}\n\n {(formData.firstAppointment ||\n (!formData.firstAppointment && formData.missingData)) && (\n
\n
\n
\n \n \n
\n
\n\n
\n
\n \n
\n \n  \n \n
\n
\n
\n
\n )}\n\n
\n \n
\n\n
\n
\n \n \n \n I agree with the waiver conditions\n * \n \n
\n
\n
\n\n {formSubmited.status === \"success\" && (\n \n \n Thank you for submitting the form, your information is now being\n processed. You can now close this page.\n \n
\n )}\n {formSubmited.status === \"responseError\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n )}\n {formSubmited.status === \"pdfError\" && (\n \n {formSubmited.message}\n \n )}\n {formSubmited.status === \"requestError\" && (\n
\n \n Woops, this is weird. Something went wrong with the form, please\n reload the page and try filling it again. {formSubmited.message}\n \n
\n )}\n {formSubmited.required !== \"ready\" && formSubmited.attempt && (\n
\n \n Please fill all the required fields before submitting\n \n
\n )}\n\n
\n
\n {formSubmited.status !== \"success\" && (\n \n {formSubmited.status === \"sending\" ? (\n
\n Loading...\n
\n ) : (\n \"Submit\"\n )}\n \n )}\n {formSubmited.status === \"success\" &&\n state.bypass2fa === true && (\n \n GO BACK\n \n )}\n
\n
\n \n \n \n );\n};\n\nFormDNA.propTypes = {\n state: PropTypes.object.isRequired,\n formData: PropTypes.object.isRequired,\n formSubmited: PropTypes.object.isRequired,\n setFormSubmited: PropTypes.func.isRequired,\n setModalsState: PropTypes.func.isRequired,\n modalsState: PropTypes.object.isRequired,\n setFormData: PropTypes.func.isRequired,\n msgData: PropTypes.object.isRequired,\n};\nexport default FormDNA;\n","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport logo from \"../logo.png\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {faMobile,faEnvelope,} from \"@fortawesome/free-solid-svg-icons\";\n\nconst RequestOtpCode = ({\nmsgData,\nformData,\nsetState,\nstate\n}) =>{\n\n const requestOtpCode = (target) => async (event) => {\n event.preventDefault();\n \n setState((state) => ({\n ...state,\n otpTarget: target,\n requestOtpStatus: \"validating\",\n }));\n try {\n const payload = {\n email: target === \"email\",\n clientId: \"\" + formData.client_id,\n appointmentId: \"\" + state.appointmentId,\n contact:\n target === \"email\" ? formData.email : parseInt(formData.phone_cel.replace(/[^0-9.]+/g, '')),\n };\n \n const requestCode = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n \n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/oneTimePassword/generate`,\n requestCode\n );\n const data = await response.json();\n if (response.ok) {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"\",\n status: \"verifyOtpCode\",\n }));\n } else {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"error\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"error\",\n message: \"Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n\nreturn(\n\n
\n
\n
\n \"little\n

Welcome to {msgData.siteName}

\n

\n To continue with the checkin form process we will send you a\n secret code to your email or phone\n

\n
\n
\n
\n
\n
\n
\n Where would you like to recieve the code\n
\n
\n
\n
\n
\n
\n {formData.phone_cel !== \"\" && formData.phone_cel !== null && (\n
\n \n \n
\n Get it on your phone\n
\n \n {formData.phone_cel}\n \n \n
\n )}\n {formData.email !== \"\" && formData.email !== null && (\n
\n \n \n
\n Get it on your email\n
\n \n {formData.email}\n \n \n
\n )}\n
\n {state.requestOtpStatus === \"error\" && (\n \n
\n Whoops an error has occurred.
\n {state.message}\n
\n \n )}\n
\n\n\n);\n};\n\nRequestOtpCode.propTypes = {\nmsgData : PropTypes.object,\nformData: PropTypes.object,\nsetState: PropTypes.func,\nstate: PropTypes.object\n\n};\n\nexport default RequestOtpCode;\n","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport logo from \"../logo.png\";\nimport NumberFormat from \"react-number-format\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {faSpinner,} from \"@fortawesome/free-solid-svg-icons\";\nimport { CountdownCircleTimer } from \"react-countdown-circle-timer\";\n\nconst VerifyOtpCode = ({\n msgData,\n state,\n setState,\n formData\n}) =>{\n\n\n const expiredCodeRequest = async (event) => {\n event.preventDefault();\n setState((state) => ({\n ...state,\n requestOtpStatus: \"validating\",\n regenerateToken: \"\",\n }));\n try {\n const payload = {\n email: state.otpTarget === \"email\",\n clientId: \"\" + formData.client_id,\n appointmentId: \"\" + state.appointmentId,\n contact:\n state.otpTarget === \"email\"\n ? formData.email\n : parseInt(formData.phone_cel.replace(/[^0-9.]+/g, '')),\n };\n \n const requestCode = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n \n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/oneTimePassword/generate`,\n requestCode\n );\n const data = await response.json();\n if (response.ok) {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"\",\n regenerateToken: \"success\",\n }));\n } else {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"error\",\n regenerateToken: \"\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n requestOtpStatus: \"error\",\n regenerateToken: \"\",\n message: \"Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n \n\n const handleOtpChange = (values) => {\n setState((state) => ({\n ...state,\n otpToken: values.value,\n }));\n };\n \n const verifyOtpCode = async (event) => {\n event.preventDefault();\n \n setState((state) => ({\n ...state,\n checkOtpStatus: \"validating\",\n }));\n try {\n const payload = {\n ip: \"\" + formData.ipv4,\n clientId: \"\" + formData.client_id,\n appointmentId: \"\" + state.appointmentId,\n otpToken: \"\" + state.otpToken,\n };\n \n const verifyCode = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n \n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/oneTimePassword/verify`,\n verifyCode\n );\n const data = await response.json();\n if (response.ok) {\n setState((state) => ({\n ...state,\n checkOtpStatus: \"\",\n status: \"form\",\n }));\n } else {\n setState((state) => ({\n ...state,\n checkOtpStatus: \"wrong\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n checkOtpStatus: \"error\",\n message: \"Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n\n const renderTime = ({ remainingTime }) => {\n if (remainingTime === 0) {\n return (\n \n Request a new code\n \n );\n }\n return (\n
\n
Your code
\n
will expire
\n
in {remainingTime}s
\n
\n );\n };\n\n\nreturn(\n\n
\n\n
\n
\n
\n \"little\n

Welcome to {msgData.siteName}

\n
\n
\n
\n
\n
\n
\n
\n
\n Please enter the code that we sent you\n
\n \n \n {state.checkOtpStatus === \"validating\" ? (\n
\n Loading...\n
\n ) : (\n \"Verify code\"\n )}\n \n
\n
\n
\n \n {renderTime}\n \n
\n
\n\n {state.checkOtpStatus === \"wrong\" && (\n \n \n Sorry{\" \"}\n {\n \"The code you entered is incorrect, please check the code and try again. If it expired don't worry we've sent you a brand new one to your email or phone, just click the request new code button\"\n }\n
\n \n )}\n {state.checkOtpStatus === \"error\" && (\n \n
\n Whoops an error has occurred.
\n {state.message}\n
\n
\n )}\n
\n\n\n \n \n);\n\n\n\n\n\n};\n\n\nVerifyOtpCode.propTypes = {\n msgData : PropTypes.object,\n state : PropTypes.object,\n setState: PropTypes.func,\n formData : PropTypes.object,\n\n};\n\nexport default VerifyOtpCode;","import React from \"react\";\nimport PropTypes from 'prop-types'\n\nfunction GoGreenModal ({closeModal}) {\n return(\n \n \n ×\n \n
\n \n
\n
\n
\n \n Hi everyone!!! How are you?
\n
\n HELP US GO GREEN ♻️, no more paper 📝
\n
\n We’ve been trying for a few months now to go green ♻️and\n we’ve come a long way but we need your help to go all the\n way.
\n
\n Please no more paper!❌
\n
\n Please fill all the information that the system requires for\n your check in
\n
\n ♻️THINK GREEN, THINK CLEAN ♻️\n
\n
\n
\n \n
\n
\n \n Close\n \n
\n
\n
\n
\n \n \n );\n};\n\nGoGreenModal.propTypes = {\n closeModal: PropTypes.func\n};\n\nexport default GoGreenModal;","import React, { useEffect, useRef, useState } from \"react\";\nimport { useParams, useLocation, Link } from \"react-router-dom\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\nimport \"../styles/formScroll.css\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport FormUltraSound from \"../components/formUltraSound\";\nimport FormMassage from \"../components/formMassage\";\nimport FormDNA from \"../components/formDNA\";\nimport RequestOtpCode from \"../components/requestOtpCode\";\nimport VerifyOtpCode from \"../components/verifyOtpCode\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport \"../App.css\";\n// import moment from \"moment\";\nimport logo from \"../logo.png\";\nimport publicIp from \"public-ip\";\nimport SignatureCanvas from \"react-signature-canvas\";\nimport { sitesList } from \"../config/constants.js\";\nimport GoGreenModal from \"../components/modals/goGreenModal\";\n\n/**\n * Form page, clients are supposed to fill this form before this appointment can be completed\n * this component may recieve a state with the bypass2fa attribute depending on the way to\n * arrive to this page, this particular case is when the user is a logged in person that used\n * the \"form dashboard\" to get to this page.\n * @component\n */\nfunction FormPage() {\n const params = useParams();\n const location = useLocation();\n\n const spanishWaiverContent = (\n <>\n
\n Little Bellies no es un proveedor de atención médica. Little Bellies\n entiende la importancia de una atención médica prenatal adecuada tanto\n para la futura madre como para el feto. Por lo tanto, para proporcionar\n a nuestros clientes una imagen de ultrasonido de "recuerdo"\n significativa, Little Bellies exige que yo: (i) certifique sinceramente\n que estoy bajo el cuidado de un médico u otro proveedor de atención\n médica para mi embarazo y que no estoy obteniendo este ultrasonido como\n reemplazo o en lugar de la atención médica prenatal estándar, y (ii)\n notificará a mi médico o proveedor de atención médica actual con\n respecto al ultrasonido de recuerdo que recibí de Pancitas.\n
\n Little Bellies me solicita que presente a Little Bellies un acuse de\n recibo de este aviso, firmado por mi médico o proveedor de salud, antes\n de que Little Bellies realice el ultrasonido de recuerdo. En el caso de\n que no pueda notificar a mi médico o proveedor de salud antes de la\n realización del ultrasonido de recuerdo, asumo la responsabilidad\n exclusiva de notificarlo tan pronto como sea práctico después de la\n realización del ultrasonido de recuerdo.\n
\n Como condición adicional para recibir los servicios de ultrasonido de\n Little Bellies, por la presente reconozco, comprendo y acepto las\n siguientes declaraciones.\n
\n
    \n
  • \n Este ultrasonido: (i) es un procedimiento electivo no médico que\n solicité voluntariamente y (ii) no pretende reemplazar el\n ultrasonido de diagnóstico o cualquier otra prueba o tratamiento que\n haya sido recomendado por mi médico. o proveedor de salud.\n
  • \n
  • \n Debido a su naturaleza optativa, no médica, este ultrasonido\n generalmente no está cubierto por el seguro. Por lo tanto, se\n requiere el pago por adelantado.\n
  • \n
  • \n El técnico que realiza el ultrasonido, aunque está calificado para\n brindar dichos servicios de ultrasonido, no es un médico, una\n enfermera o un proveedor de atención médica y no puede interpretar,\n diagnosticar condiciones médicas u ofrecer consejos médicos con\n respecto a las imágenes producidas.\n \n {\" \"}\n Este ultrasonido no será leído ni interpretado por ningún médico,\n enfermera u otro proveedor de atención médica en ningún momento.\n \n
  • \n
  • \n Este ultrasonido de recuerdo está diseñado para proporcionar\n imágenes mejoradas con el fin de ver el movimiento fetal en el\n útero. El técnico no hará ningún intento de garantizar un\n ultrasonido o un bienestar fetal que incluya una inclusión médica.\n
  • \n
  • \n Entiendo que soy responsable de contactar a mi propio proveedor de\n atención médica si tengo alguna pregunta relacionada con este\n ultrasonido de recuerdo o cualquier otro aspecto de mi embarazo.\n
  • \n
  • \n {\" \"}\n Entiendo que la calidad del ultrasonido de recuerdo y el DVD, u\n otros medios audiovisuales, dependen de muchos factores que\n incluyen: el contenido de tejido corporal, la etapa de desarrollo y\n la posición fetal.\n
  • \n
  • \n Entiendo que Pancitas no garantiza la calidad del DVD u otros medios\n audiovisuales, ni la capacidad de visualizar ninguna característica\n del feto.\n
  • \n
  • \n Entiendo que la publicación, presentación o distribución de\n cualquier video tomado durante la sesión de ultrasonido, no\n proporcionado por Pancitas,\n está estrictamente prohibido. \n
  • \n
  • \n Entiendo que todas las imágenes y videoclips tomados durante mi\n sesión pueden ser utilizados con fines promocionales por Pancitas.\n
  • \n
  • \n {/* Acepto recibir encuestas por mensajes de texto y / o correo\n electrónico de Pancitas para mejorar el servicio proporcionado. */}\n Acepto recibir comunicaciones por correo electrónico y SMS\n de Little Bellies y sus afiliados, socios y proveedores de\n servicios, incluidas encuestas, ofertas promocionales y \n otras comunicaciones de marketing.\n
  • \n
  • \n Acepto recibir las imágenes y videos de mi sesión en mi correo\n electrónico y teléfono inteligente.\n
  • \n
  • Como lo demuestra mi firma a continuación,
  • \n
\n Entiendo que los factores que están más allá del control de Little\n Bellies también pueden afectar la capacidad para determinar con\n precisión el género del feto, y que Little Bellies no puede proporcionar\n ninguna garantía o garantía en cuanto a la exactitud de dicha\n determinación.\n
\n Además, entiendo y acepto el riesgo de que, si bien se cree que el\n ultrasonido no tiene efectos perjudiciales para la madre o el feto,\n investigaciones futuras u otra información pueden revelar efectos\n dañinos o adversos que actualmente se desconocen.
\n EN CONSIDERACIÓN DE LOS SERVICIOS PRESTADOS, ACEPTO LIBERAR A LITTLE\n BELLIES, SUS AGENTES, AFILIADOS, MIEMBROS, ADMINISTRADORES Y EMPLEADOS\n DE CUALQUIER Y TODAS LAS RECLAMACIONES O CAUSAS DE ACCIONES POR\n LESIONES, ARMAS, DAÑOS O OTRAS RESPONSABILIDADES QUE SEAN DETENIDOS EN\n EL ÁREA DE PARTE, EL PACIENTE, EL ÓRGENERO, EL ÓRGENERO, EL ÓRGENERO DE\n LOS ESTADOS UNIDOS HAN RESULTADO DE ESTO, HACER ULTIMASISMO, INCLUYENDO\n PERO NO LIMITADO A, EL FALLO DE UN ULTRASONIDO DE LITTLE BELLIES PARA\n DETERMINAR EXACTAMENTE EL GÉNERO FETAL O DE OTRA CARACTERÍSTICA.
\n “He leído cuidadosamente este documento y al firmar en la parte\n inferior, reconozco que entiendo completamente y acepto su contenido.”\n
\n \n );\n\n const englishWaiverContent = (\n <>\n
\n Little Bellies is not a health care provider. Little Bellies understands\n the importance of proper prenatal medical care for both the expectant\n mother and the fetus. Therefore, in order to provide our clients with a\n meaningful “keepsake” ultrasound image, Little Bellies requires that I:\n (i) truthfully certify that I am under the care of a physician or other\n health care provider for my pregnancy and that I am not obtaining this\n ultrasound as a replacement for, or in lieu of, standard prenatal\n medical care, and (ii) notify my current physician or health care\n provider regarding the keepsake ultrasound I receive from Little\n Bellies.\n
\n Little Bellies requests that I present to Little Bellies an\n acknowledgement of receipt of this notice, signed by my physician or\n health provider, prior to Little Bellies’ performance of the keepsake\n ultrasound. In the event I am unable to notify my physician or health\n provider prior to performance of the keepsake ultrasound, I assume sole\n responsibility for notifying him or her as soon as practical following\n performance of the keepsake ultrasound.\n
\n As further condition to my receiving ultrasound services from Little\n Bellies, I hereby acknowledge, understand and agree to the following\n statements.\n
\n
    \n
  • \n This ultrasound: (i) is an elective non-medical procedure that I\n have voluntarily requested and (ii) is not intended to take the\n place of a diagnostic ultrasound or any other test or treatment that\n has been or may be recommended by my physician or healthcare\n provider.\n
  • \n
  • \n Because of its elective, non-medical nature, this ultrasound is\n generally not covered by insurance. Therefore, advance payment is\n required.\n
  • \n
  • \n The technician who performs the ultrasound, while qualified to\n provide such ultrasound services, is not a doctor, nurse, or\n healthcare provider and cannot interpret, diagnose medical\n conditions from, or otherwise offer medical advice regarding the\n images produced.\n \n {\" \"}\n This ultrasound will not be read or interpreted by any physician,\n nurse or other healthcare provider at any time.\n \n
  • \n
  • \n This keepsake ultrasound is intended to provide enhanced images for\n the purpose of my viewing fetal movement in utero. The technician\n will make no attempt to guarantee a medically inclusive ultrasound\n or fetal well being.\n
  • \n
  • \n I understand that I am responsible for contacting my own healthcare\n provider if I have any questions concerning this keepsake ultrasound\n or any other aspect of my pregnancy.\n
  • \n
  • \n {\" \"}\n I understand that the quality of the keepsake ultrasound and the\n DVD, or other audio visual media, depends upon many factors\n including: body tissue content, developmental stage and fetal\n position.\n
  • \n
  • \n I understand that Little Bellies does not guarantee the quality of\n the DVD, or other audio visual media, or the ability to visualize\n any characteristics of the fetus.\n
  • \n
  • \n I understand that publication, presentation or distribution of any\n video taken during the ultrasound session, not provided by Little\n Bellies, is strictly prohibited. \n
  • \n
  • \n I understand that all the images and video clips taken during my\n session can be used for promotional purposes by Little Bellies.\n
  • \n
  • \n {/* I agree to receive E-mail and SMS from Little Bellies, as well as\n surveys, promotional offers and marketing. */}\n I agree to receive email and SMS communications from Little\n Bellies and its affiliates, partners, and service providers,\n including surveys, promotional offers, and other marketing\n communications.\n
  • \n
  • \n I accept to receive the images and videos of my session in my E-mail\n and Smartphone.\n
  • \n
  • As evidenced by my signature below,
  • \n
\n I understand that factors beyond Little Bellies’ control may also affect\n the ability to accurately determine the gender of the fetus, and that\n Little Bellies can provide no warranty or guaranty as to the accuracy of\n any such determination.
\n I further understand and accept the risk that, while ultrasound is\n believed to have no harmful effect on the mother or the fetus, future\n research or other information may disclose harmful or adverse effects\n that are presently unknown.
\n IN CONSIDERATION OF THE SERVICES RENDERED, I AGREE TO RELEASE LITTLE\n BELLIES, ITS AGENTS, AFFILIATES, MEMBERS, MANAGERS AND EMPLOYEES FROM\n ANY AND ALL CLAIMS OR CAUSES OF ACTIONS FOR INJURY, HARM, DAMAGE, OR\n OTHER LIABILITY WHICH RESULTS FROM, OR ARE ALLEGED TO HAVE RESULTED\n FROM, THIS KEEPSAKE ULTRASOUND, INCLUDING BUT NOT LIMITED TO, THE\n FAILURE OF A LITTLE BELLIES ULTRASOUND TO ACCURATELY DETERMINE FETAL\n GENDER OR OTHER CHARACTERISTICS OR ANOMOLIES AND ANY DAMAGES OR INJURIES\n RESULTING FROM ULTRASOUND WHICH ARE NOT NOW KNOWN TO OCCUR.
\n “I have carefully read this document and by signing at the bottom,\n acknowledge that I fully understand and agree to its contents.”\n
\n \n );\n\n const englishWaiverContentDNA = (\n <>\n
\n Little Bellies is not a health care provider. Little Bellies recognizes\n the significance of appropriate prenatal medical care for both the\n expectant mother and the fetus. To provide our clients with a meaningful\n DNA gender test, Little Bellies requires that I: (i) truthfully certify\n that I am under the care of a physician or other health care provider\n for my pregnancy and that I am not obtaining this test as a replacement\n for, or in lieu of, standard prenatal medical care, and (ii) notify my\n current physician or health care provider regarding the DNA gender test\n I receive from Little Bellies.\n
\n Little Bellies requests that I present to Little Bellies an\n acknowledgement of receipt of this notice, signed by my physician or\n health provider, prior to Little Bellies’ performance of the DNA gender\n test. In the event I am unable to notify my physician or health provider\n prior to performance of the DNA gender test, I assume sole\n responsibility for notifying him or her as soon as practical following\n performance of the DNA gender test.\n
\n As a further condition to my receiving DNA gender test services from\n Little Bellies, I hereby acknowledge, understand and agree to the\n following statements.\n
\n
    \n
  • \n This test: (i) is an elective non-medical procedure that I have\n voluntarily requested and (ii) is not intended to take the place of\n a diagnostic DNA test or any other test or treatment that has been\n or may be recommended by my physician or healthcare provider.\n
  • \n
  • \n Because of its elective, non-medical nature, this test is generally\n not covered by insurance. Therefore, advance payment is required.\n
  • \n
  • \n The qualified person who performs the test, while qualified to\n provide such services, is not a doctor, nurse, or healthcare\n provider and cannot interpret, diagnose medical conditions from, or\n otherwise offer medical advice regarding the results produced.\n \n This test will not be read or interpreted by any physician, nurse\n or other healthcare provider at any time.\n \n
  • \n
  • \n This DNA gender test is intended to provide a prediction of the\n baby's gender. The technician will make no attempt to guarantee\n a medically inclusive test or fetal well being.\n
  • \n
  • \n I understand that I am responsible for contacting my own healthcare\n provider if I have any questions concerning this DNA gender test or\n any other aspect of my pregnancy.\n
  • \n
  • \n I understand that the accuracy of the DNA gender test results\n depends upon various factors including: gestational age, sample\n collection, and fetal DNA concentration. I understand that Little\n Bellies does not guarantee the accuracy of the test or the ability\n to predict the gender of the fetus.\n
  • \n
  • \n I understand that publication, presentation or distribution of any\n results from the DNA gender test, not provided by Little Bellies, is\n strictly prohibited.\n
  • \n
  • \n I understand that all the images and video clips taken during my\n session can be used for promotional purposes by Little Bellies.\n
  • \n
  • \n I agree to receive E-mail and SMS from Little Bellies, as well as\n surveys, promotional offers, and marketing.\n
  • \n
  • \n I accept to receive the results of my test in my E-mail and\n Smartphone.\n
  • \n
  • \n The DNA Gender Test will be analyzed by a third-party laboratory\n company. Little Bellies is not responsible for any errors in the\n results and is released from any liability arising from the test\n analysis or the results provided by the third-party laboratory. I\n understand that any discrepancies or concerns about the test results\n should be addressed directly with the laboratory or my healthcare\n provider.\n
  • \n
  • \n I acknowledge and understand that the blood extraction necessary for\n the DNA Gender Test will be carried out by a qualified phlebotomist.\n I agree that Little Bellies is not responsible or liable for any\n error, injury, or harm that may occur during or as a result of this\n procedure. By signing this waiver, I voluntarily release and forever\n discharge Little Bellies, its agents, affiliates, members, managers,\n and employees from any and all claims, lawsuits, damages, or causes\n of action, present or future, whether known or unknown, for any\n harm, injury, or damages that may occur due to the blood extraction.\n
  • \n
  • As evidenced by my signature below,
  • \n
\n I understand that factors beyond Little Bellies’ control may also affect\n the ability to accurately predict the gender of the fetus, and that\n Little Bellies can provide no warranty or guaranty as to the accuracy of\n any such prediction.
\n I further understand and accept the risk that, while DNA gender testing\n is believed to have no harmful effect on the mother or the fetus, future\n research or other information may disclose harmful or adverse effects\n that are presently unknown.\n
\n IN CONSIDERATION OF THE SERVICES RENDERED, I AGREE TO RELEASE LITTLE\n BELLIES, ITS AGENTS, AFFILIATES, MEMBERS, MANAGERS AND EMPLOYEES FROM\n ANY AND ALL CLAIMS OR CAUSES OF ACTIONS FOR INJURY, HARM, DAMAGE, OR\n OTHER LIABILITY WHICH RESULTS FROM, OR ARE ALLEGED TO HAVE RESULTED\n FROM, THIS DNA GENDER TEST, INCLUDING BUT NOT LIMITED TO, THE FAILURE OF\n A LITTLE BELLIES TEST TO ACCURATELY DETERMINE FETAL GENDER OR OTHER\n CHARACTERISTICS OR ANOMALIES AND ANY DAMAGES OR INJURIES RESULTING FROM\n THE TEST WHICH ARE NOT NOW KNOWN TO OCCUR.
\n “I have carefully read this document and by signing at the bottom,\n acknowledge that I fully understand and agree to its contents.”\n
\n \n );\n\n const spanishWaiverContentDNA = (\n <>\n
\n Little Bellies no es un proveedor de atención médica. Little Bellies\n reconoce la importancia de la atención médica prenatal adecuada tanto\n para la futura madre como para el feto. Para proporcionar a nuestros\n clientes una prueba de género de ADN significativa, Little Bellies\n requiere que: (i) certifique sinceramente que estoy bajo el cuidado de\n un médico u otro proveedor de atención médica para mi embarazo y que no\n estoy obteniendo esta prueba como reemplazo de, o en lugar de, la\n atención médica prenatal estándar, y (ii) notifique a mi médico o\n proveedor de atención médica actual sobre la prueba de género de ADN que\n recibo de Little Bellies.\n
\n Little Bellies solicita que presente a Little Bellies un acuse de recibo\n de este aviso, firmado por mi médico o proveedor de salud, antes de que\n Little Bellies realice la prueba de género de ADN. En el caso de que no\n pueda notificar a mi médico o proveedor de salud antes de la realización\n de la prueba de género de ADN, asumo la responsabilidad exclusiva de\n notificarle tan pronto como sea posible después de la realización de la\n prueba de género de ADN.\n
\n Como condición adicional para recibir servicios de pruebas de género de\n ADN de Little Bellies, por la presente reconozco, entiendo y acepto las\n siguientes declaraciones.\n
\n
    \n
  • \n Esta prueba: (i) es un procedimiento electivo no médico que he\n solicitado voluntariamente y (ii) no está destinado a reemplazar una\n prueba de ADN de diagnóstico o cualquier otra prueba o tratamiento\n que haya sido o pueda ser recomendado por mi médico o proveedor de\n atención médica.\n
  • \n
  • \n Debido a su naturaleza electiva, no médica, esta prueba generalmente\n no está cubierta por el seguro. Por lo tanto, se requiere el pago\n por adelantado.\n
  • \n
  • \n La persona calificada que realiza la prueba, aunque está calificada\n para proporcionar dichos servicios, no es un médico, enfermera o\n proveedor de atención médica y no puede interpretar, diagnosticar\n afecciones médicas u ofrecer asesoramiento médico con respecto a los\n resultados producidos.\n \n Esta prueba no será leída ni interpretada por ningún médico,\n enfermera u otro proveedor de atención médica en ningún momento.\n \n
  • \n
  • \n Esta prueba de ADN de género está destinada a proporcionar una\n predicción del sexo del bebé. El técnico no hará ningún intento de\n garantizar una prueba médicamente inclusiva o el bienestar fetal.\n
  • \n
  • \n Entiendo que soy responsable de contactar a mi propio proveedor de\n atención médica si tengo alguna pregunta sobre esta prueba de ADN de\n género o cualquier otro aspecto de mi embarazo.\n
  • \n
  • \n Entiendo que la precisión de los resultados de la prueba de género\n de ADN depende de varios factores, entre ellos: edad gestacional,\n recolección de muestras y concentración de ADN fetal. Entiendo que\n Little Bellies no garantiza la precisión de la prueba o la capacidad\n de predecir el sexo del feto.\n
  • \n
  • \n Entiendo que la publicación, presentación o distribución de\n cualquier resultado de la prueba de género de ADN, no proporcionada\n por Little Bellies, está estrictamente prohibida.\n
  • \n
  • \n Entiendo que todas las imágenes y videoclips tomados durante mi\n sesión pueden ser utilizados con fines promocionales por Little\n Bellies\n
  • \n
  • \n {/* Acepto recibir correos electrónicos y SMS de Little Bellies, así\n como encuestas, ofertas promocionales y marketing. */}\n Acepto recibir comunicaciones por correo electrónico y SMS\n de Little Bellies y sus afiliados, socios y proveedores de\n servicios, incluidas encuestas, ofertas promocionales y \n otras comunicaciones de marketing.\n
  • \n
  • \n Acepto recibir los resultados de mi prueba en mi E-mail y\n Smartphone.\n
  • \n
  • \n La prueba de género de ADN será analizada por una empresa de\n laboratorio externa. Little Bellies no es responsable de ningún\n error en los resultados y se libera de cualquier responsabilidad\n derivada del análisis de prueba o los resultados proporcionados por\n el laboratorio de terceros. Entiendo que cualquier discrepancia o\n inquietud sobre los resultados de la prueba debe abordarse\n directamente con el laboratorio o mi proveedor de atención médica.\n
  • \n
  • \n Reconozco y entiendo que la extracción de sangre necesaria para la\n prueba de género de ADN será llevada a cabo por un flebotomista\n calificado. Estoy de acuerdo en que Little Bellies no es responsable\n de ningún error, lesión o daño que pueda ocurrir durante o como\n resultado de este procedimiento. Al firmar esta renuncia, libero\n voluntariamente y libero para siempre a Little Bellies, sus agentes,\n afiliados, miembros, gerentes y empleados de todos y cada uno de los\n reclamos, demandas, daños o causas de acción, presentes o futuros,\n ya sean conocidos o desconocidos, por cualquier daño, lesión o daño\n que pueda ocurrir debido a la extracción de sangre.\n
  • \n
  • Como lo demuestra mi firma a continuación,
  • \n
\n Entiendo que los factores más allá del control de Little Bellies también\n pueden afectar la capacidad de predecir con precisión el género del\n feto, y que Little Bellies no puede proporcionar ninguna garantía o\n garantía en cuanto a la precisión de dicha predicción\n
\n Además, entiendo y acepto el riesgo de que, si bien se cree que las\n pruebas de ADN de género no tienen ningún efecto dañino en la madre o el\n feto, las investigaciones futuras u otra información pueden revelar\n efectos dañinos o adversos que actualmente se desconocen.\n
\n EN CONSIDERACIÓN DE LOS SERVICIOS PRESTADOS, ACEPTO LIBERAR A LITTLE\n BELLIES, SUS AGENTES, AFILIADOS, MIEMBROS, GERENTES Y EMPLEADOS DE TODOS\n Y CADA UNO DE LOS RECLAMOS O CAUSAS DE ACCIONES POR LESIONES, DAÑOS,\n DAÑOS U OTRA RESPONSABILIDAD QUE RESULTE DE, O SUPUESTAMENTE HAYA\n RESULTADO DE, ESTA PRUEBA DE GÉNERO DE ADN, INCLUYENDO PERO NO LIMITADO\n A, EL FRACASO DE UNA PRUEBA DE VIENTRES PEQUEÑOS PARA DETERMINAR CON\n PRECISIÓN EL SEXO FETAL U OTRAS CARACTERÍSTICAS O ANOMALÍAS Y CUALQUIER\n DAÑO O LESIONES RESULTANTES DE LA PRUEBA QUE AHORA NO SE SABE QUE\n OCURREN.\n
\n “He leído cuidadosamente este documento y, al firmar en la parte\n inferior, reconozco que entiendo completamente y estoy de acuerdo con su\n contenido”.\n
\n \n );\n\n const [state, setState] = useState({\n status: \"loading\",\n message: \"\",\n siteId: \"\",\n siteName: \"\",\n checkStatus: \"\",\n formStatus: \"\",\n validate: \"default\",\n requestOtpStatus: \"\",\n checkOtpStatus: \"\",\n clientName: \"\",\n appoimentDate: \"\",\n appointmentId: \"\",\n currentDate: \"\",\n otpTarget: null,\n otpToken: \"\",\n regenerateToken: \"\",\n bypass2fa: false,\n programId: 0,\n });\n const [msgData, setMsgData] = useState({\n firstName: \"\",\n lastName: \"\",\n fullName: \"\",\n appointmentDate: \"\",\n serviceRequired: \"\",\n initials: \"\",\n siteName: \"\",\n });\n const [formData, setFormData] = useState({\n client_id: \"\",\n firstName: \"\",\n lastName: \"\",\n spouse_partner: \"\",\n address_line_1: \"\",\n address_line_2: \"\",\n city: \"\",\n state: \"\",\n zip_code: \"\",\n phone_home: \"\",\n phone_work: \"\",\n phone_cel: \"\",\n due_date: \"\",\n birth_date: \"\",\n phisician_name: \"\",\n phisician_phone: \"\",\n pregnancy_problem_explain: \"\",\n ultrasounds: \"\",\n massages: \"\",\n last_ultrasound_date: \"\",\n last_massage_date: \"\",\n\n normal_results_explain: \"\",\n problems_massages_explain: \"\",\n about_us: \"null\",\n pregnancy_problem: \"\",\n doctor_facilities: \"\",\n normal_results: \"\",\n problems_massages: \"\",\n\n terms_checkbox: false,\n waiver_checkbox: false,\n terms_conditions_checkbox: false,\n email: \"\",\n locationId: \"\",\n firstAppointment: \"\",\n ipv4: \"\",\n signatureDate: \"\",\n missingData: \"\",\n fullData: \"\",\n signatureImage: \"\",\n initialsImage: \"\",\n });\n const [formSubmited, setFormSubmited] = useState({\n status: \"IDLE\",\n message: \"\",\n required: \"not-ready\",\n inputRequiredClass: false,\n attempt: false,\n });\n const [modalsState, setModalsState] = useState({\n termsCheckboxModal: \"hidden\",\n waiverCheckboxModal: \"hidden\",\n initialsModal: \"hidden\",\n termsAndConditionsCheckboxModal: \"hidden\",\n initialsImage: \"\",\n waiverSignatureModal: \"hidden\",\n termsAndConditionsImage: \"\",\n medicalConditions: \"\",\n waiverSignatureImage: \"\",\n termsButtonClass: \"lb-btn my-auto text-lb-btn-submit lb-submitButton\",\n waiverButtonClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n initialsButtonClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n termsAndConditionsSignatureClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n waiverSignatureButtonClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n termsButtonDisabled: false,\n waiverButtonDisabled: true,\n initialsButtonDisabled: true,\n waiverSignatureButtonDisabled: true,\n termsAndConditionsSignatureButtonDisabled: true,\n termsLanguage: \"english\",\n waiverLanguage: \"english\",\n termsAndConditionsLenguage: \"english\",\n goGreenModal: \"visible\",\n });\n const [search, setSearch] = useState({\n searchTerm: \"\",\n locationTerm: \"\",\n facilities: [],\n });\n const initialsRef = useRef({});\n const waiverSignatureRef = useRef({});\n // const requiredFields\n\n const urltoFile = (url, filename, mimeType) => {\n return fetch(url)\n .then(function (res) {\n return res.arrayBuffer();\n })\n .then(function (buf) {\n return new File([buf], filename, { type: mimeType });\n });\n };\n\n /**\n * On page load it stores the current local date, the clients ip address, the it checks\n * if the appointment's id is on the URL params.\n * If this is the case it will request the client's data, then it checks if the\n * YellowAlert attribute of this client is the same value of the appointment's id,\n * this meaning that the form has already been filled, if this is the case the page\n * will display a message about it. If the form hasn't been filled it checks if the\n * skip2fa attribute is pressent it sets the page into the \"form\" step, if the\n * attribute is not present then it will set the page into the \"requestOtpCode\" step.\n * If the appointment's id is not on the URL params, it will check if the site param\n * is on the URL params, if this is the case, it will set the page into the \"check\"\n * step, if not it will set the app into the \"facility\" step.\n */\n useEffect(() => {\n const currentDate = new Date();\n const getIp = async () => {\n const ipAdress = await publicIp.v4();\n setFormData((formData) => ({\n ...formData,\n ipv4: ipAdress,\n }));\n };\n getIp();\n\n if (params.appointmentId !== undefined) {\n const getClient = async () => {\n const ipAdress = await publicIp.v4();\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: params.siteId,\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${params.appointmentId}`,\n getMethod\n );\n const appointmentData = await response.json();\n if (response.ok) {\n const apptDate = new Date(appointmentData.StartDateTime);\n const site = sitesList.find(\n (site) => site.siteId === params.siteId\n );\n const siteName = site.name;\n\n setState((state) => ({\n ...state,\n programId: appointmentData.ProgramId,\n }));\n\n setMsgData((msgData) => ({\n ...msgData,\n firstName: appointmentData.Client.FirstName,\n lastName: appointmentData.Client.LastName,\n fullName:\n appointmentData.Client.FirstName +\n \" \" +\n appointmentData.Client.LastName,\n appointmentDate: apptDate.toDateString(),\n serviceRequired: appointmentData.Service.Name,\n initials:\n appointmentData.Client.FirstName[0] +\n \" \" +\n appointmentData.Client.LastName[0],\n siteName: siteName,\n }));\n const missingData =\n appointmentData.Client.FirstName === null ||\n appointmentData.Client.FirstName === \"\" ||\n appointmentData.Client.LastName === null ||\n appointmentData.Client.LastName === \"\" ||\n appointmentData.Client.AddressLine1 === null ||\n appointmentData.Client.AddressLine1 === \"\" ||\n appointmentData.Client.City === null ||\n appointmentData.Client.City === \"\" ||\n appointmentData.Client.State === null ||\n appointmentData.Client.State === \"\" ||\n appointmentData.Client.PostalCode === null ||\n appointmentData.Client.PostalCode === \"\" ||\n appointmentData.Client.MobilePhone === null ||\n appointmentData.Client.MobilePhone === \"\" ||\n appointmentData.Client.BirthDate === null ||\n appointmentData.Client.BirthDate === \"\" ||\n appointmentData.Client.Email === null ||\n appointmentData.Client.Email === \"\";\n\n const fullData =\n appointmentData.FirstAppointment === false &&\n missingData === false;\n\n let numberFormat = \"\";\n try {\n const x = appointmentData.Client.MobilePhone.substr(0, 10)\n .toString()\n .replace(/\\D/g, \"\")\n .match(/(\\d{0,3})(\\d{0,3})(\\d{0,4})/);\n numberFormat = !x[2]\n ? x[1]\n : \"(\" + x[1] + \") \" + x[2] + (x[3] ? \"-\" + x[3] : \"\");\n } catch (error) {\n console.error(error);\n numberFormat = \"\";\n }\n\n setFormData((formData) => ({\n ...formData,\n client_id:\n appointmentData.ClientId === null\n ? \"\"\n : appointmentData.ClientId,\n firstName:\n appointmentData.Client.FirstName === null\n ? \"\"\n : appointmentData.Client.FirstName,\n lastName:\n appointmentData.Client.LastName === null\n ? \"\"\n : appointmentData.Client.LastName,\n address_line_1:\n appointmentData.Client.AddressLine1 === null\n ? \"\"\n : appointmentData.Client.AddressLine1,\n address_line_2:\n appointmentData.Client.AddressLine2 === null\n ? \"\"\n : appointmentData.Client.AddressLine2,\n city:\n appointmentData.Client.City === null\n ? \"\"\n : appointmentData.Client.City,\n state:\n appointmentData.Client.State === null\n ? \"\"\n : appointmentData.Client.State,\n zip_code:\n appointmentData.Client.PostalCode === null\n ? \"\"\n : appointmentData.Client.PostalCode,\n phone_home:\n appointmentData.Client.HomePhone === null\n ? \"\"\n : appointmentData.Client.HomePhone,\n phone_work:\n appointmentData.Client.WorkPhone === null\n ? \"\"\n : appointmentData.Client.WorkPhone,\n phone_cel:\n appointmentData.Client.MobilePhone === null ? \"\" : numberFormat,\n birth_date:\n appointmentData.Client.BirthDate === null\n ? \"\"\n : appointmentData.Client.BirthDate.substr(0, 10),\n email:\n appointmentData.Client.Email === null\n ? \"\"\n : appointmentData.Client.Email,\n locationId: appointmentData.LocationId,\n firstAppointment: appointmentData.FirstAppointment,\n terms_checkbox: false,\n terms_conditions_checkbox: false,\n ipv4: ipAdress,\n missingData: missingData,\n fullData: fullData,\n }));\n if (\n appointmentData.Client.YellowAlert !==\n \"\" + appointmentData.Id\n ) {\n let bypass2fa = false;\n\n if (location.state !== undefined) {\n bypass2fa = location.state.skip2fa;\n }\n setState((state) => ({\n ...state,\n siteId: params.siteId,\n appointmentId: params.appointmentId,\n status: bypass2fa === true ? \"form\" : \"requestOtpCode\",\n currentDate: currentDate,\n bypass2fa,\n }));\n } else {\n let bypass2fa = false;\n if (location.state !== undefined) {\n bypass2fa = location.state.skip2fa;\n }\n setState((state) => ({\n ...state,\n status: \"form-filled-already\",\n bypass2fa,\n message:\n \"You have already filled this form. You can now close this page.\",\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n status: \"no-data-found\",\n message: JSON.stringify(appointmentData),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: JSON.stringify(error.message),\n }));\n }\n };\n getClient();\n } else {\n const results = sitesList;\n\n const paramSite = results.find((item) => item.siteId === params.siteId);\n if (paramSite !== undefined) {\n setState((state) => ({\n ...state,\n status: \"check\",\n siteId: paramSite.siteId,\n siteName: paramSite.name,\n currentDate: currentDate,\n }));\n setMsgData((msgData) => ({\n ...msgData,\n siteName: paramSite.name,\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"facility\",\n siteId: \"\",\n siteName: \"\",\n currentDate: currentDate,\n }));\n }\n }\n }, [params]);\n // }, [location.state, params]);\n\n /**\n * When the search term inside the search state changes it will filter the results\n * displayed into the facility list in the \"facility\" state of the page\n */\n useEffect(() => {\n const results = sitesList.filter((facility) =>\n facility.name.toLowerCase().includes(search.searchTerm.toLowerCase())\n );\n setSearch((search) => ({\n ...search,\n facilities: results,\n }));\n }, [search.searchTerm]);\n\n /**\n * When the formData state changes it will check if all the information required\n * to allow the form send is present to change its \"required\" attribute to ready\n * and this activates the submit button\n */\n // yes useEffect(() [formData]\n\n /**\n * Sets the terms and conditions and waiver checkboxes to true when the\n * client has already signed or puts its initials in the respective fields\n */\n // yes useEffect(() modalsState\n\n /**\n * Handles the inputs changes, stores the value of the input in the respective\n * formData state attribute\n * @param {object} event Event object of the input on change action\n */\n // yes handleChange\n\n /**\n * Handles the checkbox or links click, this method set the respective modal\n * visible for displaying the terms and conditions or waiver content according\n * to what element the client just clicked\n * @param {object} event Event object of the button click action\n */\n // yes handleCheckbox\n\n /**\n * Handles the modal overlay or close button click, this method set the\n * respective modal hidden according to what element the client just clicked\n * @param {object} event Event object of the overlay or button click action\n */\n // yes modal\n const closeModal = (event) => {\n const name = event.target.id;\n if (name === \"termsOverlay\" || name === \"closeTermsModal\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsCheckboxModal: \"hidden\",\n }));\n }\n\n if (name === \"initialsOverlay\" || name === \"closeInitialsModal\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n initialsModal: \"hidden\",\n }));\n }\n\n if (\n name === \"termsSignatureOverlay\" ||\n name === \"closeTermsSignatureModal\"\n ) {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsSignatureModal: \"hidden\",\n }));\n }\n\n if (name === \"waiverOverlay\" || name === \"closeWaiverModal\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverCheckboxModal: \"hidden\",\n }));\n }\n\n if (\n name === \"waiverSignatureOverlay\" ||\n name === \"closeWaiverSignatureModal\"\n ) {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverSignatureModal: \"hidden\",\n }));\n }\n\n if (\n name === \"goGreenModalOverlay\" ||\n name === \"closeGoGreenModal\" ||\n name === \"goGreenModalCloseButton\"\n ) {\n setModalsState((modalsState) => ({\n ...modalsState,\n goGreenModal: \"hidden\",\n }));\n }\n };\n\n /**\n * Calculates if the client has scrolled to the bottom of the temrms and\n * conditions content, if this is the case it will activate the proceed button\n * @param {object} event Event object of the scrolling element\n */\n // yes\n const handleTermsScroll = (event) => {\n const target = event.target;\n if (target.scrollHeight - target.scrollTop <= target.clientHeight) {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsButtonClass: \"lb-btn my-auto text-lb-btn-submit lb-submitButton\",\n termsButtonDisabled: false,\n }));\n }\n };\n\n /**\n * Calculates if the client has scrolled to the bottom of the waiver content,\n * if this is the case it will activate the proceed button\n * @param {object} event Event object of the scrolling element\n */\n // yes modal\n const handleWaiverScroll = (event) => {\n const target = event.target;\n if (target.scrollHeight - target.scrollTop <= target.clientHeight + 120) {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverButtonClass: \"lb-btn my-auto text-lb-btn-submit lb-submitButton\",\n waiverButtonDisabled: false,\n }));\n }\n };\n\n /**\n * Handles the modal proceed button, it sets the modal's next step, and if is\n * the case it will also stores the signature or initials into the corresponding\n * state and then close the modal\n * @param {object} event Event object of the button click action\n */\n // yes modal\n const handleModalSubmit = async (event) => {\n event.preventDefault();\n const name = event.target.name;\n\n const initialSignatureName = `initials-${state.siteId}-${state.appointmentId}.png`;\n const waiverSignatureName = `signature-${state.siteId}-${state.appointmentId}.png`;\n\n if (name === \"termsButton\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n termsCheckboxModal: \"hidden\",\n initialsModal: \"visible\",\n initialsButtonClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n initialsButtonDisabled: true,\n }));\n }\n if (name === \"initialsButton\") {\n const initialsImagePNG = await urltoFile(\n initialsRef.current.getTrimmedCanvas().toDataURL(\"image/png\"),\n initialSignatureName,\n \"image/png\"\n );\n\n setModalsState((modalsState) => ({\n ...modalsState,\n initialsModal: \"hidden\",\n initialsImage: initialsImagePNG,\n }));\n }\n if (name === \"waiverButton\") {\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverCheckboxModal: \"hidden\",\n waiverSignatureModal: \"visible\",\n waiverSignatureButtonClass:\n \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n waiverSignatureButtonDisabled: true,\n }));\n }\n if (name === \"waiverSignatureButton\") {\n const signatureImagePNG = await urltoFile(\n waiverSignatureRef.current.getTrimmedCanvas().toDataURL(\"image/png\"),\n waiverSignatureName,\n \"image/png\"\n );\n\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverSignatureModal: \"hidden\",\n waiverSignatureImage: signatureImagePNG,\n }));\n }\n };\n\n /**\n * Submits the clients data, in case there is a missing field it scrolls back to that field,\n * api calls are, in this order, first the upload pdf request, after that update client's data\n * on DynamoDB, and finally updates client's data in MindBody.\n * @param {object} event Event object of the button click action\n */\n // yes handleSubmit\n\n /**\n * Checks if the inputs value is a valid phone or valid email and if not it will set the\n * validate attribute to the corresponding value\n * @param {object} event Event object of input that just blured\n */\n const handleOnBlur = (event) => {\n const value = event.target.value;\n let cleanValue = \"\";\n const emailRegex = /^\\S+@\\S+\\.\\S+$/;\n const phoneRegex = /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;\n if (phoneRegex.test(value)) {\n cleanValue = value.replace(/[-.() ]/g, \"\");\n setState({\n ...state,\n validate: true,\n emailOrPhone: cleanValue,\n });\n } else {\n if (emailRegex.test(value)) {\n cleanValue = value;\n setState({\n ...state,\n validate: true,\n emailOrPhone: cleanValue,\n });\n } else {\n if (value === \"\") {\n setState({\n ...state,\n validate: \"default\",\n emailOrPhone: \"\",\n });\n } else {\n setState({\n ...state,\n validate: false,\n emailOrPhone: cleanValue,\n });\n }\n }\n }\n };\n\n /**\n * Handles the check appointment button click, it checks if the client has an\n * appointment and if this is the case and the user hasn't filled the form already\n * it will set the page to the \"requestOtp\" step, if the appointment exist but the\n * form has already been filled it will display the filled form message, if the\n * client has no appointment or the client doesn't exist it will display the\n * corresponding message\n * @param {object} event Event object of the button click action\n */\n const handleOnClickCheck = async (event) => {\n event.preventDefault();\n if (state.validate) {\n setState((state) => ({\n ...state,\n checkStatus: \"validating\",\n }));\n try {\n const date = new Date();\n const formatedDate =\n date.getMonth() + 1 + \"/\" + date.getDate() + \"/\" + date.getFullYear();\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n startdate: formatedDate,\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${state.emailOrPhone}/validate`,\n getMethod\n );\n const data = await response.json();\n const { clients = [], appoimnets = [] } = data;\n\n if (response.ok) {\n setState((state) => ({\n ...state,\n clientName: `${clients[0].FirstName} ${clients[0].LastName}`,\n appoimentDate: appoimnets[0].StartDateTime,\n appointmentId: appoimnets[0].Id,\n programId: appoimnets[0].ProgramId,\n }));\n\n const ipAdress = await publicIp.v4();\n try {\n const appointmentGetMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n };\n const appointmentResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${appoimnets[0].Id}`,\n appointmentGetMethod\n );\n const appointmentData = await appointmentResponse.json();\n\n if (appointmentResponse.ok) {\n const apptDate = new Date(appointmentData.StartDateTime);\n setMsgData((msgData) => ({\n ...msgData,\n firstName: appointmentData.Client.FirstName,\n lastName: appointmentData.Client.LastName,\n fullName:\n appointmentData.Client.FirstName +\n \" \" +\n appointmentData.Client.LastName,\n appointmentDate: apptDate.toDateString(),\n serviceRequired: appointmentData.Service.Name,\n initials:\n appointmentData.Client.FirstName[0] +\n \" \" +\n appointmentData.Client.LastName[0],\n siteName: state.siteName,\n }));\n\n const missingData =\n appointmentData.Client.FirstName === null ||\n appointmentData.Client.FirstName === \"\" ||\n appointmentData.Client.LastName === null ||\n appointmentData.Client.LastName === \"\" ||\n appointmentData.Client.AddressLine1 === null ||\n appointmentData.Client.AddressLine1 === \"\" ||\n appointmentData.Client.City === null ||\n appointmentData.Client.City === \"\" ||\n appointmentData.Client.State === null ||\n appointmentData.Client.State === \"\" ||\n appointmentData.Client.PostalCode === null ||\n appointmentData.Client.PostalCode === \"\" ||\n appointmentData.Client.MobilePhone === null ||\n appointmentData.Client.MobilePhone === \"\" ||\n appointmentData.Client.BirthDate === null ||\n appointmentData.Client.BirthDate === \"\" ||\n appointmentData.Client.Email === null ||\n appointmentData.Client.Email === \"\";\n\n const fullData =\n appointmentData.FirstAppointment === false &&\n missingData === false;\n let numberFormat = \"\";\n try {\n const x = appointmentData.Client.MobilePhone.substr(0, 10)\n .toString()\n .replace(/\\D/g, \"\")\n .match(/(\\d{0,3})(\\d{0,3})(\\d{0,4})/);\n numberFormat = !x[2]\n ? x[1]\n : \"(\" + x[1] + \") \" + x[2] + (x[3] ? \"-\" + x[3] : \"\");\n } catch (error) {\n console.error(error);\n numberFormat = \"\";\n }\n\n setFormData((formData) => ({\n ...formData,\n client_id:\n appointmentData.ClientId === null\n ? \"\"\n : appointmentData.ClientId,\n firstName:\n appointmentData.Client.FirstName === null\n ? \"\"\n : appointmentData.Client.FirstName,\n lastName:\n appointmentData.Client.LastName === null\n ? \"\"\n : appointmentData.Client.LastName,\n address_line_1:\n appointmentData.Client.AddressLine1 === null\n ? \"\"\n : appointmentData.Client.AddressLine1,\n address_line_2:\n appointmentData.Client.AddressLine2 === null\n ? \"\"\n : appointmentData.Client.AddressLine2,\n city:\n appointmentData.Client.City === null\n ? \"\"\n : appointmentData.Client.City,\n state:\n appointmentData.Client.State === null\n ? \"\"\n : appointmentData.Client.State,\n zip_code:\n appointmentData.Client.PostalCode === null\n ? \"\"\n : appointmentData.Client.PostalCode,\n phone_home:\n appointmentData.Client.HomePhone === null\n ? \"\"\n : appointmentData.Client.HomePhone,\n phone_work:\n appointmentData.Client.WorkPhone === null\n ? \"\"\n : appointmentData.Client.WorkPhone,\n phone_cel:\n appointmentData.Client.MobilePhone === null\n ? \"\"\n : numberFormat,\n birth_date:\n appointmentData.Client.BirthDate === null\n ? \"\"\n : appointmentData.Client.BirthDate.substr(0, 10),\n email:\n appointmentData.Client.Email === null\n ? \"\"\n : appointmentData.Client.Email,\n locationId: appointmentData.LocationId,\n firstAppointment: appointmentData.FirstAppointment,\n terms_checkbox: false,\n ipv4: ipAdress,\n missingData: missingData,\n fullData: fullData,\n }));\n if (\n appointmentData.Client.YellowAlert !==\n \"\" + appointmentData.Id\n ) {\n setState((state) => ({\n ...state,\n status: \"requestOtpCode\",\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"form-filled-already\",\n message:\n \"You have already filled this form. You can now close this page.\",\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n checkStatus: \"failed\",\n message: JSON.stringify(appointmentData),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n checkStatus: \"error\",\n message: JSON.stringify(error.message),\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n checkStatus: \"failed\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n checkStatus: \"error\",\n message: \"Error: \" + JSON.stringify(error.message),\n }));\n }\n }\n };\n\n /**\n * Handles the search term change and stores the value inside the search state\n * for the results to be filtered\n * @param {object} event Event object of the changing input\n */\n const handleTermChange = (event) => {\n setSearch((search) => ({\n ...search,\n searchTerm: event.target.value,\n }));\n };\n\n /**\n * Stores the information of the selected facility for further use on the page\n * @param {object} event Event object of the button click action\n * @param {string} id String value of the Facility's Id\n * @param {string} name String value of the Facility's Name\n */\n const handleClick = (id, name) => async (event) => {\n event.preventDefault();\n setMsgData((msgData) => ({\n ...msgData,\n siteName: name,\n }));\n setState((state) => ({\n ...state,\n status: \"check\",\n siteId: id,\n siteName: name,\n }));\n };\n\n /**\n * Stores the language in wich the user wants to read the terms and conditions\n * or waiver\n * @param {object} event Event object of the button click action\n * @param {string} language String value corresponding to the language\n */\n // yes\n const handleLanguageChange = (language) => (event) => {\n setModalsState((modalsState) => ({\n ...modalsState,\n [event.target.name]: language,\n }));\n };\n\n /**\n * Validates the length of the initials drawn into the signature pad, if the\n * initials has more of 20 points it will activate the proceed button\n */\n // yes\n const validateInitials = () => {\n let signatureLength = 0;\n\n initialsRef.current.toData().forEach((element) => {\n signatureLength += element.length;\n });\n\n setModalsState((modalsState) => ({\n ...modalsState,\n initialsButtonClass:\n signatureLength > 20\n ? \"lb-btn my-auto text-lb-btn-submit lb-submitButton\"\n : \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n initialsButtonDisabled: !signatureLength > 20,\n }));\n };\n\n /**\n * Validates the length of the signature drawn into the signature pad, if the\n * signature has more of 20 points it will activate the proceed button\n */\n // yes\n const validateSignature = () => {\n let signatureLength = 0;\n\n waiverSignatureRef.current.toData().forEach((element) => {\n signatureLength += element.length;\n });\n\n setModalsState((modalsState) => ({\n ...modalsState,\n waiverSignatureButtonClass:\n signatureLength > 20\n ? \"lb-btn my-auto text-lb-btn-submit lb-submitButton\"\n : \"lb-btn my-auto text-lb-btn-submit lb-submitButtonDisabled\",\n waiverSignatureButtonDisabled: signatureLength <= 20,\n }));\n };\n\n const isDNA = state.programId > 3;\n return (\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {state.status === \"error\" && (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n {state.message}\n
\n
\n
\n
\n
\n )}\n {state.status === \"form-filled-already\" && (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Whoops

\n

\n Seems like this form has already been filled\n

\n \n {state.message}\n
\n
\n
\n {state.bypass2fa === true && (\n
\n
\n \n GO BACK\n \n
\n
\n )}\n
\n
\n )}\n {state.status === \"no-data-found\" && (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Nothing found

\n

Seems like nothing was found

\n
\n {state.message}\n
\n
\n
\n
\n
\n )}\n {state.status === \"facility\" && (\n <>\n
\n
\n
\n \n \"Little\n \n
\n
\n
\n
\n
\n
\n

Select the facility

\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n {search.facilities.map((facility) => {\n return (\n
\n
\n
\n \n
\n
\n
\n {facility.name}\n
\n
\n
\n \n SELECT\n \n
\n
\n
\n
\n );\n })}\n
\n \n )}\n {state.status === \"check\" && (\n <>\n
\n \"little\n

\n Welcome to {msgData.siteName}\n

\n
\n \n Please enter your email or phone number to begin filling out\n your form\n \n \n
\n {!state.validate && (\n \n Invalid email or phone number, please enter a valid email or\n phone number\n \n )}\n
\n \n {state.checkStatus === \"validating\" ? (\n
\n Loading...\n
\n ) : (\n \"Check Appoiment\"\n )}\n \n\n {state.checkStatus === \"failed\" && (\n \n
\n Sorry your form is not available at this\n moment.
\n {state.message}\n
\n
\n )}\n {state.checkStatus === \"error\" && (\n \n
\n Whoops an error has occurred.
\n {state.message}\n
\n
\n )}\n
\n \n )}\n {state.status === \"requestOtpCode\" && (\n <>\n \n \n )}\n {state.status === \"verifyOtpCode\" && (\n <>\n \n \n )}\n\n {state.status === \"form\" && (\n
\n {modalsState.goGreenModal === \"visible\" && (\n \n )}\n
\n
\n
\n \n \"Little\n \n
\n
\n
\n
\n
\n
\n

\n \n Welcome{\" \"}\n \n {msgData.fullName}{\" \"}\n \n to Little Bellies {msgData.siteName}\n \n
\n \n You have an apointment for{\" \"}\n {msgData.appointmentDate}\n \n

\n

\n Your required services are:\n
\n \n {msgData.serviceRequired}\n \n

\n

Please fill the following form:

\n
\n {state.bypass2fa && (\n
\n \n GO BACK\n \n
\n )}\n
\n
\n\n {state.programId === 3 ? (\n \n ) : isDNA ? (\n \n ) : (\n \n )}\n {modalsState.termsCheckboxModal === \"visible\" && (\n \n \n ×\n \n
\n \n
\n
\n

Little Bellies Terms of services.

\n
\n
\n \n ENGLISH\n \n \n ESPAÑOL\n \n
\n
\n\n {modalsState.termsLanguage === \"english\" && (\n <>\n

\n I am receiving ongoing prenatal care.
\n
\n I have undergone a medical diagnostic ultrasound\n prescribed by my OB provider in regard to this\n pregnancy.
\n
I understand that my OB provider ultimately will\n confirm my due date, screen for fetal abnormalities\n and/or any issues/concerns related to my pregnancy.{\" \"}\n
\n
Little Bellies is not a medical provider and will\n not do any of the foregoing.
\n
I understand that this ultrasound may not last\n more than 25 minutes and will focus on my pelvic area.{\" \"}\n
\n
\n I understand that this is a limited non-medical\n ultrasound and does not replace any diagnostic\n ultrasound ordered by my OB provider.
\n
\n I understand that there is a possibility that the wrong\n gender may be assigned to my baby.
\n
\n

\n
\n \n I verify the accuracy of the information above. I\n authorize Little Bellies to disclose medical\n information to my healthcare provider if necessary. I\n agree that I am financially responsible for charges\n related to this ultrasound.\n

\n
\n \n )}\n {modalsState.termsLanguage === \"spanish\" && (\n <>\n

\n Estoy recibiendo atención prenatal en curso.
\n
\n Me sometí a un ultrasonido de diagnóstico médico\n recetado por mi proveedor de OB en lo que respecta a\n este embarazo.
\n
\n Entiendo que mi proveedor de obstetricia finalmente\n confirmará mi fecha de parto, la detección de anomalías\n fetales y / o cualquier problema / preocupación\n relacionado con mi embarazo.
\n
Pancitas no es un proveedor médico y no hará nada\n de lo anterior.
\n
\n Entiendo que este ultrasonido no puede durar más de 25\n minutos y se enfocará en mi área pélvica.
\n
\n Entiendo que este es un ultrasonido no médico limitado y\n no reemplaza ningún ultrasonido de diagnóstico\n solicitado por mi proveedor de OB.
\n
\n Entiendo que existe la posibilidad de que se asigne el\n género equivocado a mi bebé.
\n
\n

\n
\n \n Verifico la exactitud de la información anterior.\n Autorizo a Little Bellies a divulgar información\n médica a mi proveedor de atención médica si es\n necesario. Acepto que soy financieramente responsable\n de los cargos relacionados con este ultrasonido.\n

\n
\n \n )}\n
\n
\n \n Accept\n \n
\n
\n
\n )}\n\n {modalsState.initialsModal === \"visible\" && (\n \n \n ×\n \n
\n \n

Please sign your initials here.

\n \n
\n
\n \n Sign\n \n
\n \n \n )}\n\n {modalsState.waiverCheckboxModal === \"visible\" && (\n \n \n ×\n \n
\n \n
\n
\n

Waiver Terms of services.

\n
\n
\n \n ENGLISH\n \n \n ESPAÑOL\n \n
\n
\n\n {isDNA\n ? modalsState.waiverLanguage === \"spanish\"\n ? spanishWaiverContentDNA\n : englishWaiverContentDNA\n : modalsState.waiverLanguage === \"spanish\"\n ? spanishWaiverContent\n : englishWaiverContent}\n
\n
\n \n Accept\n \n
\n \n \n )}\n\n {modalsState.waiverSignatureModal === \"visible\" && (\n \n \n ×\n \n
\n \n

Please sign here.

\n \n
\n
\n \n Sign\n \n
\n \n \n )}\n \n )}\n \n );\n}\n\nexport default FormPage;\n","import \"../styles/bootstrap-grid.min.css\";\nimport { fromBuffer } from \"file-type/core\";\nimport React, { useEffect, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n\tfaExclamationTriangle,\n\tfaSpinner,\n\tfaCheck,\n\tfaTimes,\n\tfaEye,\n\tfaStickyNote,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { Link } from \"react-router-dom\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport { PropTypes } from \"prop-types\";\nimport moment from \"moment\";\n\n// import pdfFile from \"./sample.pdf\";\n\nimport { Document, Page, pdfjs } from \"react-pdf\";\n\npdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;\n\nconst AppointmentsListPage = ({ appState, displayForms }) => {\n\tconst [apidata, setApiData] = useState([]);\n\tconst [rooms, setRooms] = useState([]);\n\tconst [state, setState] = useState({\n\t\tstatus: \"loading\",\n\t\tmessage: \"\",\n\t});\n\tconst [hoverIndex, setHoverIndex] = useState(\"\");\n\tconst [hoverIndexNotes, setHoverIndexNotes] = useState(\"\");\n\tconst [arrivedStatus, setArrivedStatus] = useState({\n\t\tstatus: \"OK\",\n\t\tmessage: \"\",\n\t});\n\tconst [showForm, setShowForm] = useState(false);\n\n\tconst [modalURL, setModalURL] = useState(\"\");\n\tconst appointmentStatusClass = [\n\t\t\"lb-card-1-arrived\",\n\t\t\"lb-card-1-booked\",\n\t\t\"lb-card-1-confirmed\",\n\t\t\"lb-card-1-noShow\",\n\t\t\"lb-card-2-arrived\",\n\t\t\"lb-card-2-booked\",\n\t\t\"lb-card-2-confirmed\",\n\t\t\"lb-card-2-noShow\",\n\t\t\"lb-card-3-arrived\",\n\t\t\"lb-card-3-booked\",\n\t\t\"lb-card-3-confirmed\",\n\t\t\"lb-card-3-noShow\",\n\t\t\"lb-card-4-arrived\",\n\t\t\"lb-card-4-booked\",\n\t\t\"lb-card-4-confirmed\",\n\t\t\"lb-card-4-noShow\",\n\t];\n\tconst tabsStatusClass = [\"lb-room-1\", \"lb-room-2\", \"lb-room-3\", \"lb-room-4\"];\n\tconst [search, setSearch] = useState({\n\t\tsearchTerm: \"\",\n\t\tappointments: [],\n\t\troom: -1,\n\t});\n\n\tconst maskedPhoneNumber = (phoneNumber) => {\n\t\tconst maskedPhone = phoneNumber.replace(/\\d(?=\\d{4})/g, \"*\");\n\t\treturn maskedPhone;\n\t};\n\n\tuseEffect(() => {\n\t\tconst months = {\n\t\t\t0: \"January\",\n\t\t\t1: \"February\",\n\t\t\t2: \"March\",\n\t\t\t3: \"April\",\n\t\t\t4: \"May\",\n\t\t\t5: \"June\",\n\t\t\t6: \"July\",\n\t\t\t7: \"August\",\n\t\t\t8: \"September\",\n\t\t\t9: \"October\",\n\t\t\t10: \"November\",\n\t\t\t11: \"December\",\n\t\t};\n\n\t\tconst getAppointmentList = async () => {\n\t\t\tsetState((state) => ({\n\t\t\t\t...state,\n\t\t\t\tstatus: \"loading\",\n\t\t\t}));\n\t\t\ttry {\n\t\t\t\tconst getMethod = {\n\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\t\tsiteid: appState.nav.siteId,\n\t\t\t\t\t\tauthorization: appState.singleAuth.token,\n\t\t\t\t\t\tlocationid: appState.nav.locationId,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tconst response = await fetch(`${process.env.REACT_APP_API_URL}/api/appointments`, getMethod);\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (response.ok) {\n\t\t\t\t\tconst appointmentsData = data.map((item) => {\n\t\t\t\t\t\tconst mutableItem = item;\n\t\t\t\t\t\tconst apptDate = new Date(mutableItem.StartDateTime);\n\t\t\t\t\t\tmutableItem.apptDateYear = apptDate.getFullYear();\n\t\t\t\t\t\tmutableItem.arrived = \"\";\n\t\t\t\t\t\tmutableItem.apptDateMonth = months[apptDate.getMonth()];\n\t\t\t\t\t\tmutableItem.apptDateDate = apptDate.getDate();\n\t\t\t\t\t\tconst minutes = apptDate.getMinutes() === 0 ? \"00\" : apptDate.getMinutes();\n\t\t\t\t\t\tif (apptDate.getHours() >= 12) {\n\t\t\t\t\t\t\tif (apptDate.getHours() === 12) {\n\t\t\t\t\t\t\t\tmutableItem.apptHour = \"12:\" + minutes + \" PM\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmutableItem.apptHour = apptDate.getHours() - 12 + \":\" + minutes + \" PM\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (apptDate.getHours() === 0) {\n\t\t\t\t\t\t\t\tmutableItem.apptHour = \"12:\" + minutes + \" AM\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmutableItem.apptHour = apptDate.getHours() + \":\" + minutes + \" AM\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn mutableItem;\n\t\t\t\t\t});\n\n\t\t\t\t\tconst filteredRooms = new Set();\n\t\t\t\t\tconst filteredArr = appointmentsData.filter((el) => {\n\t\t\t\t\t\tconst duplicate = filteredRooms.has(el.staffId);\n\t\t\t\t\t\tfilteredRooms.add(el.staffId);\n\t\t\t\t\t\treturn !duplicate;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (appState.nav.siteId === \"549974\") {\n\t\t\t\t\t\tsetRooms(filteredArr.sort((a, b) => (a.staffId < b.staffId ? 1 : -1)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetRooms(filteredArr);\n\t\t\t\t\t}\n\n\t\t\t\t\tappointmentsData.forEach((item) => {\n\t\t\t\t\t\tswitch (item.status) {\n\t\t\t\t\t\t\tcase \"Arrived\":\n\t\t\t\t\t\t\t\titem.class = filteredArr.findIndex((x) => x.staffId === item.staffId) * 4 + 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"Booked\":\n\t\t\t\t\t\t\t\titem.class = filteredArr.findIndex((x) => x.staffId === item.staffId) * 4 + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"Confirmed\":\n\t\t\t\t\t\t\t\titem.class = filteredArr.findIndex((x) => x.staffId === item.staffId) * 4 + 2;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"NoShow\":\n\t\t\t\t\t\t\t\titem.class = filteredArr.findIndex((x) => x.staffId === item.staffId) * 4 + 3;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"Completed\":\n\t\t\t\t\t\t\t\titem.class = filteredArr.findIndex((x) => x.staffId === item.staffId) * 4 + 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tconst arrivedAppointments = appointmentsData.filter((appointment) => appointment.status === \"Arrived\");\n\n\t\t\t\t\tconst notArrivedAppointments = appointmentsData.filter((appointment) => appointment.status !== \"Arrived\");\n\n\t\t\t\t\tconst sortedAppointments = arrivedAppointments\n\t\t\t\t\t\t.sort((a, b) => (a.StartDateTime > b.StartDateTime ? 1 : -1))\n\t\t\t\t\t\t.concat(notArrivedAppointments.sort((a, b) => (a.StartDateTime > b.StartDateTime ? 1 : -1)));\n\n\t\t\t\t\tsetApiData(sortedAppointments);\n\t\t\t\t\tsetSearch((search) => ({\n\t\t\t\t\t\t...search,\n\t\t\t\t\t\tappointments: sortedAppointments,\n\t\t\t\t\t}));\n\t\t\t\t\tsetState((state) => ({\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\tstatus: \"ready\",\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\tsetState((state) => ({\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\tstatus: \"no-data-found\",\n\t\t\t\t\t\tmessage: JSON.stringify(data),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tsetState((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\tmessage: \"Onload page Error: \" + JSON.stringify(error.message),\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t\tgetAppointmentList();\n\t}, [appState.nav.locationId, appState.nav.siteId, appState.singleAuth.token, displayForms]);\n\n\tuseEffect(() => {\n\t\tconst list =\n\t\t\tsearch.room === -1\n\t\t\t\t? apidata\n\t\t\t\t: apidata.filter((appointment) => appointment.staffId === rooms[search.room].staffId);\n\t\tconst results = list.filter((appointment) =>\n\t\t\tappointment.name.toLowerCase().includes(search.searchTerm.toLowerCase())\n\t\t);\n\t\tsetSearch((search) => ({\n\t\t\t...search,\n\t\t\tappointments: results,\n\t\t}));\n\t}, [apidata, search.searchTerm, search.room, rooms]);\n\n\tconst handleOnChange = (event) => {\n\t\tsetSearch((search) => ({\n\t\t\t...search,\n\t\t\tsearchTerm: event.target.value,\n\t\t}));\n\t};\n\n\tconst handleCheckin = (id) => async (event) => {\n\t\tevent.preventDefault();\n\t\tconst appointment = apidata.find((item) => item.id === id);\n\t\tif (appointment.status !== \"Arrived\") {\n\t\t\tlet appointments = apidata.map((item) => {\n\t\t\t\tif (item.id === id) {\n\t\t\t\t\treturn { ...item, status: \"Sending\" };\n\t\t\t\t} else {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t});\n\t\t\tsetApiData(appointments);\n\t\t\ttry {\n\t\t\t\tconst payload = {\n\t\t\t\t\tExecute: \"arrive\",\n\t\t\t\t};\n\t\t\t\tconst putMethod = {\n\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\t\tsiteid: appState.nav.siteId,\n\t\t\t\t\t\tauthorization: appState.singleAuth.token,\n\t\t\t\t\t\tlocationid: appState.nav.locationId,\n\t\t\t\t\t\tallowedpermissions: appState.singleAuth.allowedPermissions,\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify(payload),\n\t\t\t\t};\n\t\t\t\tconst response = await fetch(`${process.env.REACT_APP_API_URL}/api/appointments/${id}`, putMethod);\n\t\t\t\tconst data = await response.json();\n\t\t\t\tif (response.ok) {\n\t\t\t\t\tlet selectedAppointment = {};\n\t\t\t\t\tappointments = apidata.map((item) => {\n\t\t\t\t\t\tif (item.id === id) {\n\t\t\t\t\t\t\tselectedAppointment = item;\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\tstatus: \"Arrived\",\n\t\t\t\t\t\t\t\tclass: rooms.findIndex((x) => x.staffId === item.staffId) * 4,\n\t\t\t\t\t\t\t\tarrived: moment(new Date()).toString(),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tsetApiData(appointments);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst dynamoPayload = {\n\t\t\t\t\t\t\tappointmentId: parseInt(selectedAppointment.id),\n\t\t\t\t\t\t\tclientName: \"\" + selectedAppointment.name,\n\t\t\t\t\t\t\tlocationId: parseInt(appState.nav.locationId),\n\t\t\t\t\t\t\tstaffId: selectedAppointment.staffId,\n\t\t\t\t\t\t\tappointmentDate: selectedAppointment.StartDateTime,\n\t\t\t\t\t\t\tarrived: moment(new Date()).toString(),\n\t\t\t\t\t\t\tclientId: data.Appointment.ClientId,\n\t\t\t\t\t\t\tformFilled: selectedAppointment.formFilled === id,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst putDynamo = {\n\t\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbody: JSON.stringify(dynamoPayload),\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst dynamoResponse = await fetch(\n\t\t\t\t\t\t\t`${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${appState.nav.siteId}/sales`,\n\t\t\t\t\t\t\tputDynamo\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst dynamoData = await dynamoResponse.json();\n\t\t\t\t\t\tif (dynamoResponse.ok) {\n\t\t\t\t\t\t\tconsole.log(dynamoResponse);\n\t\t\t\t\t\t\tsetArrivedStatus((arrivedStatus) => ({\n\t\t\t\t\t\t\t\t...arrivedStatus,\n\t\t\t\t\t\t\t\tstatus: \"OK\",\n\t\t\t\t\t\t\t\tmessage: \"\",\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetArrivedStatus((arrivedStatus) => ({\n\t\t\t\t\t\t\t\t...arrivedStatus,\n\t\t\t\t\t\t\t\tstatus: \"fail\",\n\t\t\t\t\t\t\t\tmessage: JSON.stringify(dynamoData),\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tsetArrivedStatus((arrivedStatus) => ({\n\t\t\t\t\t\t\t...arrivedStatus,\n\t\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\t\tmessage: \"Arrived error: \" + JSON.stringify(error.message),\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tappointments = apidata.map((item) => {\n\t\t\t\t\t\tif (item.id === id) {\n\t\t\t\t\t\t\treturn appointment;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tsetApiData(appointments);\n\t\t\t\t\tsetArrivedStatus((arrivedStatus) => ({\n\t\t\t\t\t\t...arrivedStatus,\n\t\t\t\t\t\tstatus: \"fail\",\n\t\t\t\t\t\tmessage: JSON.stringify(data),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tappointments = apidata.map((item) => {\n\t\t\t\t\tif (item.id === id) {\n\t\t\t\t\t\treturn appointment;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn item;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsetApiData(appointments);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleRoomChange = (index) => (event) => {\n\t\tevent.preventDefault();\n\t\tsetSearch((search) => ({\n\t\t\t...search,\n\t\t\troom: index,\n\t\t}));\n\t};\n\n\tconst handleModalCloseForm = () => {\n\t\tsetShowForm(false);\n\t};\n\n\t/**\n\t * its in charge of updating the modal's data with the appointment's form URL and make the modal visible\n\t * @param {object} appointment it contains all information of an aapointment\n\t *\n\t */\n\tconst handleModalOpenForm = (appointment) => () => {\n\t\tsetModalURL(appointment.urlForms);\n\t\tsetShowForm(true);\n\t};\n\n\treturn (\n\t\t
\n\t\t\t{state.status === \"loading\" && (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t)}\n\t\t\t{state.status !== \"loading\" && (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{arrivedStatus.status === \"fail\" && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{arrivedStatus.message}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{arrivedStatus.status === \"error\" && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{arrivedStatus.message}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(state.status === \"error\" || appState.nav.status === \"logOutError\") && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t

Error

\n\t\t\t\t\t\t\t\t\t\t

Seems like there has been an error

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{appState.nav.status === \"logOutError\" ? appState.nav.message : state.message}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{state.status === \"no-data-found\" && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t

Nothing found

\n\t\t\t\t\t\t\t\t\t\t

Seems like nothing was found

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{state.message}\n\t\t\t\t\t\t\t\t\t\t
\n\t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\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.redAlert ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.redAlert?.split(\"before\").join(\"\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t setHoverIndexNotes(appointment.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => setHoverIndexNotes(\"\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={faStickyNote}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t setHoverIndex(appointment.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => setHoverIndex(\"\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={faEye}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!displayForms && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.status === \"Arrived\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrived\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : appointment.status === \"Sending\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCheck-in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.status === \"Arrived\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCheckout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.status !== \"Arrived\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCheckout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{displayForms && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFill form\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.name}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.email}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.status === \"Arrived\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? appointment.phone\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: maskedPhoneNumber(appointment.phone)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\"Last Visit: \" + (appointment.lastVisitDate ?? \"N/R\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.lastVisitServiceName}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t{appointment.lastVisitNote !== \"\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tappointment.lastVisitNote?.split(\"\\n\").map((i) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

{`${i}\\n`}

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t\t\t\t{search.appointments.length === 0 && search.searchTerm !== \"\" && (\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

No appointments that match this search

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nAppointmentsListPage.defaultProps = {\n\tdisplayForms: false,\n};\n\nAppointmentsListPage.propTypes = {\n\tappState: PropTypes.object.isRequired,\n\tdisplayForms: PropTypes.bool.isRequired,\n};\nexport default AppointmentsListPage;\n\n/**\n * A Wrapper component that its in charge of downloading the file as a blob\n * and creates a URL for it to avoid CORS issues\n * @param {object} link contains a URL that points to the client's PDF form\n * @returns a JSX fragment that will contain a PDFViewer component\n */\nconst DocumentsViewer = ({ link }) => {\n\tconst [file, setFile] = React.useState({});\n\tReact.useEffect(() => {\n\t\t/**\n\t\t * its in charge of downloading the file and updating the component's state when its ready\n\t\t * @param {string} link a URL for a PDF file\n\t\t */\n\t\tconst getBlob = async (link) => {\n\t\t\ttry {\n\t\t\t\tconst blob = await getBlobFromS3URL(link);\n\t\t\t\tconst buffer = await blob.arrayBuffer();\n\t\t\t\tconst fileType = await fromBuffer(buffer);\n\t\t\t\tsetFile({ blob, fileType });\n\t\t\t} catch (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t}\n\t\t};\n\t\tgetBlob(link);\n\t}, [link]);\n\tconst { blob, fileType } = file;\n\treturn (\n\t\t<>\n\t\t\t{!fileType && Loading...}\n\t\t\t{fileType && }\n\t\t\n\t);\n};\nDocumentsViewer.propTypes = {\n\tlink: PropTypes.string,\n};\n\n/**\n * its a component to present a PDF file and navigate it\n * @param {object} object.link an object with a link property that contains a PDF URL\n * @returns a JSX object with one page of the document and two buttons to move between pages\n */\nconst PDFViewer = ({ link }) => {\n\tconst [numPages, setNumPages] = React.useState(null);\n\tconst [pageNumber, setPageNumber] = React.useState(1);\n\n\tfunction onDocumentLoadSuccess({ numPages }) {\n\t\tsetNumPages(numPages);\n\t\tsetPageNumber(1);\n\t}\n\n\tfunction changePage(offset) {\n\t\tsetPageNumber((prevPageNumber) => prevPageNumber + offset);\n\t}\n\n\tfunction previousPage() {\n\t\tchangePage(-1);\n\t}\n\n\tfunction nextPage() {\n\t\tchangePage(1);\n\t}\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\tPage {pageNumber || (numPages ? 1 : \"--\")} of {numPages || \"--\"}\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nPDFViewer.propTypes = {\n\tlink: PropTypes.string,\n};\n\nconst getBlobFromS3URL = async (url) => {\n\ttry {\n\t\tconst blob = await fetch(url).then((r) => {\n\t\t\treturn r.blob();\n\t\t});\n\t\treturn Promise.resolve(blob);\n\t} catch (err) {\n\t\tconsole.log(err);\n\t}\n};\n","import \"../styles/bootstrap-grid.min.css\";\nimport React, { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport { PropTypes } from \"prop-types\";\n\nfunction VideoRemakePage({ appState }) {\n const [appointmentsData, setAppointmentsData] = useState([]);\n const [state, setState] = useState({\n status: \"ready\",\n message: \"\",\n searchTerm: \"\",\n clientName: \"\",\n clientPhone: \"\",\n clientEmail: \"\",\n date: new Date().toISOString().substr(0, 10),\n });\n\n const getAppointmentList = async (event) => {\n event.preventDefault();\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n\n const splittedDate = state.date.split(\"-\");\n const formatedDate =\n splittedDate[1] + \"/\" + splittedDate[2] + \"/\" + splittedDate[0];\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${state.searchTerm}/visits?startDate=${formatedDate}`,\n getMethod\n );\n const data = await response.json();\n if (response.ok) {\n const appointmentsData = data.visits.map((item) => {\n const mutableItem = item;\n const date = mutableItem.StartDateTime.split(\"T\")[0].split(\"-\");\n mutableItem.formatedDate =\n date[1] + \" / \" + date[2] + \" / \" + date[0];\n return mutableItem;\n });\n\n setAppointmentsData(appointmentsData);\n\n setState((state) => ({\n ...state,\n status: \"ready\",\n clientName:\n data.clients[0].FirstName + \" \" + data.clients[0].LastName,\n clientPhone: data.clients[0].MobilePhone,\n clientEmail: data.clients[0].Email,\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"no-data-found\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n\n const handleSearchTermChange = (event) => {\n setState((state) => ({\n ...state,\n searchTerm: event.target.value,\n }));\n };\n\n const handleDateChange = (event) => {\n setState((state) => ({\n ...state,\n date: event.target.value,\n }));\n };\n\n return (\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n Search\n \n
\n
\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {state.status === \"ready\" && (\n <>\n
\n
\n {appointmentsData.length > 0 && (\n

Appointments

\n )}\n {appointmentsData.length === 0 && (\n

\n Please enter a mail or phone number\n

\n )}\n
\n
\n
\n {appointmentsData.map((appointment) => {\n return (\n \n
\n
\n {state.clientName}\n
\n
\n
    \n
  • \n {state.clientPhone}.\n
  • \n
  • \n {state.clientEmail}\n
  • \n
  • \n {appointment.formatedDate}\n
  • \n
  • \n {appointment.ServiceName}\n
  • \n
\n
\n
\n \n Remake video\n \n
\n
\n
\n );\n })}\n
\n \n )}\n
\n {(state.status === \"error\") && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n \n {state.message}\n \n
\n
\n
\n
\n )}\n {state.status === \"no-data-found\" && (\n
\n
\n
\n

Nothing found

\n

Seems like nothing was found

\n
\n {state.message}\n
\n
\n
\n
\n )}\n
\n
\n );\n}\n\nVideoRemakePage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default VideoRemakePage;\n","export { formatDate2string, formatDate2object, transformSites };\n\nfunction formatDate2string(date) {\n\tif (typeof date === \"string\") {\n\t\tconst ddmmyyyy = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;\n\n\t\tif (ddmmyyyy.test(date)) {\n\t\t\tconst dateParts = date.split(\"-\");\n\t\t\tconst dd = dateParts[0].padStart(2, \"0\");\n\t\t\tconst mm = dateParts[1].padStart(2, \"0\");\n\t\t\tconst yyyy = dateParts[2];\n\t\t\tconst formattedDate = mm + \"/\" + dd + \"/\" + yyyy;\n\t\t\treturn formattedDate;\n\t\t}\n\t} else if (date instanceof Date) {\n\t\tconst dd = date.getDate().toString().padStart(2, \"0\");\n\t\tconst mm = (date.getMonth() + 1).toString().padStart(2, \"0\");\n\t\tconst yyyy = date.getFullYear().toString();\n\t\tconst formattedDate = mm + \"/\" + dd + \"/\" + yyyy;\n\t\treturn formattedDate;\n\t}\n\treturn null;\n}\n\nfunction formatDate2object(date) {\n\tif (typeof date === \"string\") {\n\t\tconst ddmmyyyy = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;\n\n\t\tif (ddmmyyyy.test(date)) {\n\t\t\tconst dateParts = date.split(\"-\");\n\t\t\tconst dd = dateParts[0].padStart(2, \"0\");\n\t\t\tconst mm = dateParts[1].padStart(2, \"0\");\n\t\t\tconst yyyy = dateParts[2];\n\t\t\tconst formattedDate = {\n\t\t\t\tdd: dd,\n\t\t\t\tmm: mm,\n\t\t\t\tyyyy: yyyy,\n\t\t\t};\n\t\t\treturn formattedDate;\n\t\t} else {\n\t\t\treturn \"error\";\n\t\t}\n\t} else if (date instanceof Date) {\n\t\tconst dd = date.getDate().toString().padStart(2, \"0\");\n\t\tconst mm = (date.getMonth() + 1).toString().padStart(2, \"0\");\n\t\tconst yyyy = date.getFullYear().toString();\n\t\tconst formattedDate = {\n\t\t\tdd: dd,\n\t\t\tmm: mm,\n\t\t\tyyyy: yyyy,\n\t\t};\n\t\treturn formattedDate;\n\t}\n\treturn null;\n}\n\nfunction transformSites({\n\tsites,\n\tfilterSiteId\n }) {\n\tconst transformedSites = [];\n \n\tfor (const site of sites) {\n\t const [siteId, id] = site.site.split('-');\n\t if (siteId === filterSiteId) {\n\t\ttransformedSites.push({\n\t\t siteId: Number(siteId.trim()),\n\t\t id: Number(id.trim()),\n\t\t name: site.name\n\t\t});\n\t }\n \n\t}\n \n\treturn transformedSites;\n}\n \n","import \"../styles/bootstrap-grid.min.css\";\nimport React, { useEffect, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faSpinner,\n faTrash,\n faSearch,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport logo from \"../logo.png\";\nimport { useParams, useLocation, Link } from \"react-router-dom\";\nimport NumberFormat from \"react-number-format\";\nimport { PropTypes } from \"prop-types\";\nimport roundHalfEven from \"round-half-even\";\nimport { formatDate2object } from \"../util\";\nimport moment from \"moment\";\n\nfunction CheckoutPage({ appState }) {\n const discountPercentage = 20;\n const [cart, setCart] = useState([]);\n const [additionals, setAdditionals] = useState([]);\n const [staff, setStaff] = useState([]);\n const [totalPurchase, setTotalPurchase] = useState({\n beforeTip: 0,\n afterTip: 0,\n });\n const [state, setState] = useState({\n status: \"loading\",\n message: \"\",\n dicomStatus: \"IDLE\",\n dicomMessage: \"\",\n });\n\n const { appointmentid } = useParams();\n const [formSubmited, setFormSubmited] = useState({\n status: \"\",\n message: \"\",\n });\n const [tip, setTip] = useState({\n amount: 0,\n staffId: \"\",\n value: 0,\n });\n const [summary, setSummary] = useState({\n subtotal: 0,\n discount: 0,\n tax: 0,\n });\n const [paymentMethods, setPaymentMethods] = useState({\n cash: 0,\n cashEnabled: false,\n creditCard: 0,\n creditCardEnabled: false,\n giftCard: 0,\n giftCardEnabled: false,\n giftCardBalance: 0,\n giftCardCode: \"\",\n status: \"\",\n message: \"\",\n });\n\n const [modalData, setModalData] = useState({\n itemId: \"\",\n discountReason: \"\",\n });\n\n const [receipt, setReceipt] = useState({\n enabled: true,\n });\n\n const handleReceiptCheckbox = (event) => {\n setReceipt((receipt) => ({\n ...receipt,\n enabled: !receipt.enabled,\n }));\n };\n\n const [checkoutStatus, setCheckoutStatus] = useState(\"not-ready\");\n\n const [errorDiscount, showErrorDiscount] = useState(false);\n\n const withValueLimit = (inputObj) => {\n const { value } = inputObj;\n if (value <= discountPercentage) {\n showErrorDiscount(false);\n return inputObj;\n } else {\n showErrorDiscount(true);\n }\n };\n\n const withSumLimit = (onlinePrice) => (inputObj) => {\n const { value } = inputObj;\n if (value <= onlinePrice * (discountPercentage / 100)) {\n showErrorDiscount(false);\n return inputObj;\n } else {\n showErrorDiscount(true);\n }\n };\n\n const [show, setShow] = useState(false);\n\n const handleModalClose = (e) => {\n if (e.target.id === \"modal-background\") {\n const data = {\n itemId: \"\",\n discountReason: \"\",\n };\n setModalData(data);\n setShow(false);\n }\n };\n\n const handleModalOpen = (item) => () => {\n const reason = item.discountReason;\n const modal = {\n itemId: item.Id,\n discountReason: reason,\n };\n setModalData(modal);\n setShow(true);\n };\n\n const closeModal = () => {\n const data = {\n itemId: \"\",\n discountReason: \"\",\n };\n setModalData(data);\n setShow(false);\n };\n\n const giftCardValueLimit = (inputObj) => {\n const { value } = inputObj;\n if (value <= paymentMethods.giftCardBalance) return inputObj;\n };\n const location = useLocation();\n\n useEffect(() => {\n const getAppt = async () => {\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/checkout/${appointmentid}`,\n getMethod\n );\n const data = await response.json();\n if (response.ok) {\n console.log(data);\n const filteredProducts = new Set();\n const arr = data.products;\n const filteredArr = arr.filter((el) => {\n const duplicate = filteredProducts.has(el.Id);\n filteredProducts.add(el.Id);\n return !duplicate;\n });\n const servicesArray = data.services.map((item) => {\n return {\n ...item,\n Id: item.ProductId,\n Name: item.Name,\n OnlinePrice: item.Price,\n multiple: false,\n qty: 1,\n removable: false,\n type: \"Service\",\n discount: 0,\n discountedPrice: item.Price,\n discountType: \"percentage\",\n taxedPrice: item.Price + item.Price * (item.TaxRate ?? 0),\n TaxRate: item.TaxRate ?? 0,\n };\n });\n const cartItem = servicesArray[0];\n setCart((cart) => [...cart, cartItem]);\n\n const newTotal =\n data.services[0].Price +\n data.services[0].Price *\n (data.services[0].Price * (data.services[0].TaxRate ?? 0));\n setTotalPurchase((totalPurchase) => ({\n ...totalPurchase,\n beforeTip: roundWithEpsilon(newTotal),\n afterTip: roundWithEpsilon(newTotal),\n }));\n\n const productsArray = filteredArr.map((item) => {\n return {\n ...item,\n OnlinePrice: item.Price,\n qty: 1,\n multiple: true,\n removable: true,\n type: \"Product\",\n discount: 0,\n discountedPrice: item.Price,\n discountType: \"percentage\",\n // TaxRate: taxRate,\n taxedPrice: item.Price + item.Price * item.TaxRate,\n };\n });\n setAdditionals(productsArray);\n setStaff(data.staffMembers);\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"no-data-found\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n getAppt();\n }, [\n appointmentid,\n appState.nav.locationId,\n appState.singleAuth.token,\n appState.nav.siteId,\n ]);\n\n const handleAddToCart = (Id) => (event) => {\n event.preventDefault();\n const item = additionals.find((item) => item.Id === Id);\n setCart((cart) => [...cart, item]);\n setAdditionals(additionals.filter((item) => item.Id !== Id));\n };\n\n const handleRemoveFromCart = (Id) => (event) => {\n event.preventDefault();\n const item = cart.find((item) => item.Id === Id);\n if (item.removable) {\n setAdditionals((additionals) => [...additionals, item]);\n setCart(cart.filter((item) => item.Id !== Id));\n }\n };\n\n const handleMinusQty = (Id) => (event) => {\n event.preventDefault();\n const items = [...additionals];\n const index = items.findIndex((item) => item.Id === Id);\n if (items[index].qty > 1) {\n items[index].qty = items[index].qty - 1;\n }\n setAdditionals(items);\n };\n\n const handlePlusQty = (Id) => (event) => {\n event.preventDefault();\n const items = [...additionals];\n const index = items.findIndex((item) => item.Id === Id);\n items[index].qty = items[index].qty + 1;\n setAdditionals(items);\n };\n\n const handleNumChange = (event) => {\n event.preventDefault();\n };\n\n const processMedia = async (dataInfo) => {\n const date = formatDate2object(new Date());\n\n const payload = {\n siteId: appState.nav.siteId,\n locationId: appState.nav.locationId,\n clientId: appointmentid,\n email: location.state.clientEmail,\n clientName: location.state.clientName,\n date: date.yyyy + date.mm + date.dd,\n sendMail: location.state.sendMail,\n files: location.state.files,\n staffName: dataInfo.staffName,\n };\n\n try {\n const targetURL = `api/dicom/images/${location.state.clientPhone}`;\n const postMethod = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n allowedpermissions: appState.singleAuth.allowedPermissions,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/${targetURL}`,\n postMethod\n );\n if (!response.ok) {\n setState((state) => ({\n ...state,\n dicomStatus: \"failed\",\n dicomMessage: \"Could not connect with DICOM server\",\n }));\n }\n } catch (e) {\n setState((state) => ({\n ...state,\n dicomStatus: \"error\",\n dicomMessage: \"DICOM Error: \" + JSON.stringify(e),\n }));\n }\n };\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (!(tip.value > 0 && (tip.staffId === \"\" || tip.staffId === \"null\"))) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"sending\",\n }));\n try {\n let payLoaddItems = cart;\n const tipItem = {\n Item: {\n Type: \"Tip\",\n Metadata: {\n StaffId: tip.staffId,\n Amount: tip.amount,\n },\n },\n Quantity: 1,\n };\n const cashPaymentItem = {\n Type: \"Cash\",\n Metadata: {\n Amount: paymentMethods.cash,\n },\n };\n const giftCardPaymentItem = {\n Type: \"GiftCard\",\n Metadata: {\n Amount: paymentMethods.giftCard,\n CardNumber: paymentMethods.giftCardCode,\n },\n };\n const creditCardPaymentItem = {\n Type: \"Custom\",\n Metadata: {\n Amount: paymentMethods.creditCard,\n Id: 17,\n },\n };\n const paymentItem = [];\n if (paymentMethods.cash !== 0 || totalPurchase.afterTip === 0) {\n paymentItem.push(cashPaymentItem);\n }\n if (paymentMethods.giftCard !== 0) {\n paymentItem.push(giftCardPaymentItem);\n }\n if (paymentMethods.creditCard !== 0) {\n paymentItem.push(creditCardPaymentItem);\n }\n\n if (tip.amount > 0) {\n payLoaddItems = cart.concat(tipItem);\n }\n\n const staffObject = staff.find(\n (item) => item.Id === Number.parseInt(tip.staffId)\n );\n\n const payload = {\n ClientId: location.state.clientId,\n totalAmount:\n tip.amount > 0 ? totalPurchase.afterTip : totalPurchase.beforeTip,\n tip: tip.amount,\n staffName: staffObject.Name,\n Items: payLoaddItems.map((item) => {\n if (item.type === \"Service\") {\n return {\n Item: {\n Type: item.type,\n Metadata: {\n Id: item.Id,\n },\n },\n AppointmentIds: [appointmentid],\n Quantity: item.qty,\n DiscountAmount:\n (item.OnlinePrice - item.discountedPrice) * item.qty,\n };\n } else {\n if (item.type === \"Product\") {\n return {\n Item: {\n Type: item.type,\n Metadata: {\n Id: item.Id,\n },\n },\n Quantity: item.qty,\n DiscountAmount:\n (item.OnlinePrice - item.discountedPrice) * item.qty,\n };\n } else {\n return tipItem;\n }\n }\n }),\n Payments: paymentItem,\n notes: location.state.notes,\n discount: roundWithEpsilon(summary.discount),\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n allowedpermissions: appState.singleAuth.allowedPermissions,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/checkout/${appointmentid}`,\n putMethod\n );\n\n const data = await response.json();\n if (response.ok) {\n if (location.state.programId !== 3) {\n const dataInfo = {\n staffName: staffObject.Name,\n };\n\n processMedia(dataInfo);\n }\n\n try {\n const discountReasons = cart\n .map((item) => {\n return item.discountReason;\n })\n .filter((discountReason) => discountReason)\n .join(\"-,-\");\n\n const dynamoPayload = {\n appointmentId: parseInt(appointmentid),\n staffName: \"\" + staffObject.Name,\n tip: tip.value,\n totalPurchase: totalPurchase.afterTip,\n completed: moment(new Date()).toString(),\n cash: paymentMethods.cash,\n giftCard: paymentMethods.giftCard,\n creditCard: paymentMethods.creditCard,\n locationId: appState.nav.locationId,\n appointmentDate: location.state.startDateTime,\n discount: roundWithEpsilon(summary.discount),\n discountReasons: discountReasons,\n clientName: location.state.clientName,\n arrived: location.state.arrived,\n clientPhone: location.state.clientPhone,\n formFilled:\n parseInt(appointmentid) === location.state.YellowAlert,\n };\n console.log(\"put checkout\", dynamoPayload);\n\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${\n \"\" + appState.nav.siteId\n }/sales`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n try {\n const clientPayload = {\n Client: {\n Id: location.state.clientId,\n YellowAlert: \"\",\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const clientPutMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n body: JSON.stringify(clientPayload),\n };\n const clientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${location.state.clientId}`,\n clientPutMethod\n );\n const clientData = await clientResponse.json();\n if (clientResponse.ok) {\n if (receipt.enabled) {\n const receiptOfPayment = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n };\n const invoiceDate = moment(new Date().toString());\n const receiptResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${location.state.clientId}/invoices?startDate=${invoiceDate}`,\n receiptOfPayment\n );\n const receiptData = await receiptResponse.json();\n if (!receiptResponse.ok) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(receiptData),\n }));\n }\n }\n\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"success\",\n }));\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(clientData),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message:\n \"Client request Error: \" + JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(dynamoData),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: \"Dynamo request Error: \" + JSON.stringify(error.message),\n }));\n }\n } else {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"responseError\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setFormSubmited((formSubmited) => ({\n ...formSubmited,\n status: \"requestError\",\n message: \"Main request error: \" + JSON.stringify(error.message),\n }));\n }\n }\n };\n\n const handleValueChange = (values) => {\n if (values.value === \"\") {\n setTip((tip) => ({\n ...tip,\n value: 0,\n amount: 0,\n }));\n } else {\n setTip((tip) => ({\n ...tip,\n value: values.floatValue,\n amount: values.floatValue,\n }));\n }\n };\n\n const handleSelectChange = (event) => {\n setTip((tip) => ({\n ...tip,\n staffId: event.target.value,\n }));\n };\n\n const handleRadioChange = (Id) => (event) => {\n const updatedCart = cart.map((item) => {\n if (item.Id === Id) {\n const updatedItem = {\n ...item,\n discountType: event.target.value,\n discount: 0,\n discountedPrice: item.OnlinePrice,\n taxedPrice: item.OnlinePrice + item.OnlinePrice * item.TaxRate,\n };\n return updatedItem;\n } else {\n return item;\n }\n });\n showErrorDiscount(false);\n setCart(updatedCart);\n };\n\n const handleDiscountReasonChange = (Id) => (event) => {\n const input = event.target.value;\n const updatedCart = cart.map((item) => {\n if (item.Id === Id) {\n item.discountReason = input;\n }\n return item;\n });\n setCart(updatedCart);\n };\n\n const handleDiscountChange = (Id) => (values) => {\n const updatedCart = cart.map((item) => {\n if (item.Id === Id) {\n let discountedPrice = 0;\n let taxedPrice = 0;\n if (item.discountType === \"percentage\") {\n discountedPrice = roundWithEpsilon(\n values.value === \"\"\n ? item.OnlinePrice\n : item.OnlinePrice - (item.OnlinePrice * values.floatValue) / 100\n );\n taxedPrice = discountedPrice + discountedPrice * item.TaxRate;\n } else {\n discountedPrice = roundWithEpsilon(\n values.value === \"\"\n ? item.OnlinePrice\n : item.OnlinePrice - values.floatValue\n );\n taxedPrice =\n discountedPrice + roundHalfEven(discountedPrice * item.TaxRate);\n }\n const updatedItem = {\n ...item,\n discount:\n values.value === \"\"\n ? 0\n : values.floatValue <= 100\n ? values.floatValue\n : 100,\n discountedPrice: discountedPrice,\n taxedPrice: taxedPrice,\n };\n return updatedItem;\n } else {\n return item;\n }\n });\n setCart(updatedCart);\n };\n\n const handlePaymentChange = (payment) => (values) => {\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n [payment]: values.value === \"\" ? 0 : values.floatValue,\n }));\n };\n\n const handleGiftCardCode = (event) => {\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n giftCardCode: event.target.value,\n }));\n };\n\n const clearGiftCardStatus = (event) => {\n event.preventDefault();\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n giftCard: 0,\n giftCardBalance: 0,\n giftCardCode: \"\",\n status: \"\",\n message: \"\",\n }));\n };\n\n const handleGiftCardSearch = async (event) => {\n event.preventDefault();\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/giftCardBalance/${paymentMethods.giftCardCode}`,\n getMethod\n );\n const data = await response.json();\n if (response.ok) {\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n status: \"card-balance-ready\",\n giftCardBalance: data.RemainingBalance,\n }));\n } else {\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n status: \"card-balance-failed\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n status: \"card-balance-error\",\n message: \"GiftCard request Error: \" + JSON.stringify(error.message),\n }));\n }\n };\n\n useEffect(() => {\n if (tip.staffId === \"\" || tip.staffId === \"null\") {\n setCheckoutStatus(\"not-ready\");\n } else {\n if (\n roundWithEpsilon(\n paymentMethods.creditCard +\n paymentMethods.giftCard +\n paymentMethods.cash\n ) !== totalPurchase.afterTip\n ) {\n setCheckoutStatus(\"not-ready\");\n } else {\n setCheckoutStatus(\"ready\");\n }\n }\n }, [tip, paymentMethods, totalPurchase]);\n\n useEffect(() => {\n let newTotal = 0;\n let newSubtotal = 0;\n let newDiscount = 0;\n let newTax = 0;\n cart.forEach((item) => {\n newTotal += roundHalfEven(item.taxedPrice * item.qty, 2);\n newSubtotal += item.OnlinePrice * item.qty;\n newDiscount += (item.OnlinePrice - item.discountedPrice) * item.qty;\n newTax += roundHalfEven(\n item.discountedPrice * item.TaxRate * item.qty,\n 2\n );\n });\n\n setSummary((summary) => ({\n ...summary,\n subtotal: newSubtotal,\n discount: newDiscount,\n tax: newTax,\n }));\n\n setTotalPurchase((totalPurchase) => ({\n ...totalPurchase,\n beforeTip: roundWithEpsilon(newTotal),\n afterTip: roundWithEpsilon(newTotal + tip.amount),\n }));\n }, [tip.amount, cart]);\n\n const handleGiftCheckbox = (event) => {\n const checkboxName = event.target.name;\n const currentIpuntEnabled = paymentMethods[checkboxName];\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n [checkboxName]: !currentIpuntEnabled,\n }));\n };\n\n const handleCheckbox = (event) => {\n const checkboxName = event.target.name;\n const currentIpuntEnabled = paymentMethods[checkboxName];\n const currentInput = checkboxName.split(\"Enabled\")[0].trim();\n let currentInputValue = 0;\n const otherInput = currentInput === \"cash\" ? \"creditCard\" : \"cash\";\n const otherInputEnabled = paymentMethods[otherInput + \"Enabled\"];\n const otherInputValue = paymentMethods[otherInput];\n\n if (otherInputEnabled) {\n currentInputValue =\n totalPurchase.afterTip - otherInputValue > 0\n ? totalPurchase.afterTip - otherInputValue\n : 0;\n } else {\n currentInputValue = totalPurchase.afterTip;\n }\n\n setPaymentMethods((paymentMethods) => ({\n ...paymentMethods,\n [checkboxName]: !currentIpuntEnabled,\n [currentInput]: !currentIpuntEnabled ? currentInputValue : 0,\n }));\n };\n\n return (\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {state.status === \"error\" && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n {state.message}\n
\n
\n
\n
\n )}\n {state.status === \"no-data-found\" && (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Nothing found

\n

Seems like nothing was found

\n
\n {state.message}\n
\n
\n
\n
\n
\n )}\n {state.status === \"ready\" && (\n
\n
\n
\n
\n

\n Client: {location.state.clientName}\n

\n
\n
\n \n BACK\n \n
\n
\n
\n
\n

Cart

\n
\n {errorDiscount === true && (\n
\n
\n The discount must be less than {discountPercentage}% of the\n price\n
\n
\n )}\n
\n
\n
\n
Product name
\n
\n
\n
Unit Price
\n
\n
\n
TAX%
\n
\n
\n
Qty
\n
\n
\n
Discount
\n
\n
\n
Reason
\n
\n
\n
Amount
\n
\n
\n
Actions
\n
\n
\n {cart.map((item) => {\n return (\n
\n
\n
\n
{item.Name}
\n
\n
\n
\n ${roundWithEpsilon(item.OnlinePrice)}\n
\n
\n
\n
\n {(item.TaxRate * 100).toFixed(2)}\n
\n
\n\n
\n
{item.qty}
\n
\n
\n {item.discountType === \"value\" && (\n \n )}\n {item.discountType === \"percentage\" && (\n \n )}\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n\n
\n \n +\n \n
\n\n
\n
\n ${roundHalfEven(item.taxedPrice * item.qty, 2)}\n
\n
\n
\n {item.removable && (\n
\n \n \n \n \n \n
\n )}\n
\n
\n
\n );\n })}\n\n
\n
\n \n \n {staff.map((item) => {\n return (\n \n );\n })}\n \n
\n\n
\n
\n
\n \n \n
\n
\n
\n
\n\n
\n
\n

Cart summary

\n
\n
\n

Payment methods

\n
\n
\n\n
\n
\n
\n SubTotal: \n {summary.subtotal.toFixed(2)}\n
\n
\n Discount: \n {summary.discount.toFixed(2)}\n
\n
\n TAX: \n {summary.tax.toFixed(2)}\n
\n

\n Total Amount: ${totalPurchase.afterTip}\n

\n
\n\n
\n
\n
\n \n \n
\n 0 ? paymentMethods.cash : \"\"}\n className=\"ml-2 lb-w-60 lb-form-control lb-inputBackground lb-text-center lb-rounded-0\"\n onValueChange={handlePaymentChange(\"cash\")}\n disabled={!paymentMethods.cashEnabled}\n data-cy=\"cash-payment\"\n />\n
\n
\n
\n \n \n
\n\n 0\n ? paymentMethods.creditCard\n : \"\"\n }\n prefix={\"$\"}\n className=\"ml-2 lb-w-60 lb-form-control lb-inputBackground lb-text-center lb-rounded-0\"\n onValueChange={handlePaymentChange(\"creditCard\")}\n data-cy=\"credit-card-payment\"\n />\n
\n\n {paymentMethods.status === \"\" && (\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )}\n {paymentMethods.status === \"card-balance-failed\" ||\n (paymentMethods.status === \"card-balance-error\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n ))}\n {paymentMethods.status === \"card-balance-ready\" && (\n <>\n
\n \n The gift card balance is:{\" \"}\n {paymentMethods.giftCardBalance}\n \n
\n \n clear\n \n
\n
\n \n \n
\n \n )}\n\n {paymentMethods.creditCard +\n paymentMethods.giftCard +\n paymentMethods.cash !==\n totalPurchase.afterTip && (\n
\n

\n {paymentMethods.creditCard +\n paymentMethods.giftCard +\n paymentMethods.cash <\n totalPurchase.afterTip\n ? \"Pending Balance: \"\n : \"Over Balance: \"}\n \n $\n {Math.abs(\n roundWithEpsilon(\n totalPurchase.afterTip -\n (paymentMethods.creditCard +\n paymentMethods.giftCard +\n paymentMethods.cash)\n )\n )}\n \n

\n
\n )}\n
\n
\n
\n\n {tip.value > 0 && (tip.staffId === \"\" || tip.staffId === \"null\") && (\n
\n Please select a staff member.\n
\n )}\n
\n \n \n
\n
\n
\n {(state.dicomStatus === \"failed\" ||\n state.dicomStatus === \"error\") && (\n
\n {state.dicomMessage}\n
\n )}\n {formSubmited.status === \"success\" && (\n <>\n
\n \n Thank you, your purchase is now being processed\n \n
\n \n GO BACK\n \n \n )}\n {formSubmited.status === \"responseError\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n )}\n {formSubmited.status === \"requestError\" && (\n
\n \n {formSubmited.message === \"\"\n ? \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\"\n : formSubmited.message}\n \n
\n )}\n {formSubmited.status !== \"success\" && (\n \n {formSubmited.status === \"sending\" ? (\n \n Loading...\n \n ) : (\n \n CHECKOUT\n \n )}\n \n )}\n
\n
\n\n
\n\n
\n

Additional Items

\n

Product name

\n
    \n {additionals.map((item) => {\n return (\n
  • \n
    \n
    \n
    \n {item.Name}\n {\". \"}\n {item.ShortDescription}\n
    \n
    \n
    \n
    ${item.OnlinePrice}
    \n
    \n
    \n {item.multiple === true && (\n
    \n
    \n \n -\n \n \n \n +\n \n \n \n Add to cart\n \n \n
    \n
    \n )}\n {item.multiple === false && (\n
    \n
    \n \n \n Add to cart\n \n \n
    \n
    \n )}\n
    \n
    \n
  • \n );\n })}\n
\n
\n
\n )}\n \n
\n
\n );\n}\n\nCheckoutPage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default CheckoutPage;\n\nfunction roundWithEpsilon(numbeToRound) {\n return Math.round((numbeToRound + Number.EPSILON) * 100) / 100;\n}\n","// import { getSignedUrl } from \"@aws-sdk/s3-request-presigner\";\nconst { CognitoIdentityClient } = require(\"@aws-sdk/client-cognito-identity\");\nconst {\n fromCognitoIdentityPool,\n} = require(\"@aws-sdk/credential-provider-cognito-identity\");\nconst { S3Client, PutObjectCommand, ListObjectsCommand, DeleteObjectCommand } = require(\"@aws-sdk/client-s3\");\n\n// Set the AWS Region\nconst REGION = \"us-east-2\"; // REGION\nconst albumPhotosKey = \"client_pictures/\";\n// Initialize the Amazon Cognito credentials provider\nconst s3 = new S3Client({\n region: REGION,\n credentials: fromCognitoIdentityPool({\n client: new CognitoIdentityClient({ region: REGION }),\n identityPoolId: \"us-east-2:cf6ad14e-0c13-4dab-bfeb-a171931d18fa\", // IDENTITY_POOL_ID\n }),\n});\n\nconst albumBucketName = \"littlebellies-landing.storage\"; // BUCKET_NAME\n\n// const aws = require('aws-sdk');\n// const AWS_ACCESS_KEY = \"AKIAZVNPBUVTXPBPIRPB\";\n// const AWS_SECRET_KEY = \"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\"\n// aws.config.update({\n// accessKeyId: AWS_ACCESS_KEY,\n// secretAccessKey: AWS_SECRET_KEY\n// });\n\n// var albumBucketName = \"BUCKET_NAME\";\n// var bucketRegion = \"REGION\";\n// var IdentityPoolId = \"IDENTITY_POOL_ID\";\n\n// AWS.config.update({\n// region: bucketRegion,\n// credentials: new AWS.CognitoIdentityCredentials({\n// IdentityPoolId: IdentityPoolId\n// })\n// });\n\n// const s3 = new AWS.S3({\n// apiVersion: \"2006-03-01\",\n// params: { Bucket: albumBucketName }\n// });\n export const getAlbum = async (appointmentid) => {\n const data = await s3.send(\n new ListObjectsCommand({\n Prefix: albumPhotosKey + appointmentid + '/',\n Bucket: albumBucketName,\n })\n );\n return data;\n };\n\n export const remove = async (file, appointmentid) => {\n \n // const s3 = new aws.S3();\n const photoKey = file;\n const uploadParams = {\n Bucket: albumBucketName,\n Key: photoKey,\n // Body: file,\n // ACL: 'public-read'\n // Expires: 60,\n // ContentType: filetype\n };\n console.log(uploadParams);\n try {\n await s3.send(new DeleteObjectCommand(uploadParams));\n return {message: \"Successfully remove photo.\"}\n } catch (err) {\n return {message: \"There was an error uploading your photo\", error: err.message};\n }\n \n // const command = new GetObjectCommand(uploadParams);\n // console.log(command);\n // // const data = await s3.send(\n // // new ListObjectsCommand({ Delimiter: \"/\", Bucket: albumBucketName })\n // // );\n // console.log(\"data:\");\n // console.log(data);\n // const result = await getSignedUrl(s3, command, { expiresIn: 3600 });\n // console.log(result)\n // return result;\n }\n\n export const sign = async (file, appointmentid) => {\n \n // const s3 = new aws.S3();\n const photoKey = albumPhotosKey + appointmentid + '/' + file.name;\n const uploadParams = {\n Bucket: albumBucketName,\n Key: photoKey,\n Body: file,\n ACL: 'public-read'\n // Expires: 60,\n // ContentType: filetype\n };\n // console.log(params);\n try {\n await s3.send(new PutObjectCommand(uploadParams));\n return {message: \"Successfully uploaded photo.\"}\n } catch (err) {\n return {message: \"There was an error uploading your photo\", error: err.message};\n }\n \n // const command = new GetObjectCommand(uploadParams);\n // console.log(command);\n // // const data = await s3.send(\n // // new ListObjectsCommand({ Delimiter: \"/\", Bucket: albumBucketName })\n // // );\n // console.log(\"data:\");\n // console.log(data);\n // const result = await getSignedUrl(s3, command, { expiresIn: 3600 });\n // console.log(result)\n // return result;\n }\n","// import http from \"../http-common\";\nimport {sign, getAlbum, remove} from './aws'\n\nclass UploadFilesService {\n remove = async (file, appointmentid) => {\n\n console.log(\"remove...\");\n console.log(file);\n const response = await remove(file, appointmentid);\n console.log(response);\n return response;\n } \n\n upload = async (file, appointmentid, onUploadProgress) => {\n\n // const formData = new FormData();\n console.log(\"upload...\");\n console.log(file);\n const response = await sign(file, appointmentid);\n\n console.log(response);\n return response;\n // formData.append(\"file\", file);\n\n // return http.put(url, file, {\n // headers: {\n // \"Content-Type\": file.type,\n // },\n // onUploadProgress,\n // });\n }\n\n getFiles = async (appointmentid) => {\n return await getAlbum(appointmentid);\n }\n}\n\nexport default new UploadFilesService();\n","import React, { Component } from \"react\";\nimport LinearProgress from \"@material-ui/core/LinearProgress\";\nimport { Box, Typography, Button, withStyles } from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport UploadService from \"../services/upload-files.service\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport \"../styles/global.css\";\nconst REGION = \"us-east-2\";\nconst albumBucketName = \"littlebellies-landing.storage\";\nconst href = \"https://s3.\" + REGION + \".amazonaws.com/\";\nconst bucketUrl = href + albumBucketName + \"/\";\nconst BorderLinearProgress = withStyles((theme) => ({\n root: {\n height: 15,\n borderRadius: 5,\n },\n colorPrimary: {\n backgroundColor: \"#EEEEEE\",\n },\n bar: {\n borderRadius: 5,\n backgroundColor: \"#1a90ff\",\n },\n}))(LinearProgress);\n\nclass UploadImages extends Component {\n constructor(props) {\n super(props);\n this.selectFile = this.selectFile.bind(this);\n this.upload = this.upload.bind(this);\n this.deleteS3 = this.deleteS3.bind(this);\n this.state = {\n currentFile: [],\n previewImage: [],\n progress: 0,\n\n message: \"\",\n isError: false,\n imageInfos: [],\n\n uploadStatus: \"IDLE\",\n };\n }\n\n componentDidMount() {\n UploadService.getFiles(this.props.appointmentid).then((response) => {\n this.setState({\n imageInfos: response.Contents,\n });\n this.props.updateImages(response.Contents);\n });\n }\n\n selectFile(event) {\n const files = event.target.files;\n let currentFile = this.state.currentFile;\n let previewImage = this.state.previewImage;\n for (let i = 0; i < files.length; i++) {\n currentFile = [...currentFile, files[i]];\n previewImage = [...previewImage, URL.createObjectURL(files[i])];\n }\n this.setState({\n currentFile,\n previewImage,\n progress: 0,\n message: \"\",\n });\n }\n\n delete(index) {\n const currentFile = this.state.currentFile;\n const previewImage = this.state.previewImage;\n\n previewImage.splice(index, 1);\n currentFile.splice(index, 1);\n this.setState({\n currentFile,\n previewImage,\n });\n }\n\n deleteS3(file) {\n UploadService.remove(file, this.props.appointmentid)\n .then((response) => {\n this.setState({\n message: response.message,\n isError: false,\n });\n return UploadService.getFiles(this.props.appointmentid);\n })\n .then((files) => {\n this.setState({\n imageInfos: files.Contents,\n });\n\n this.props.updateImages(files.Contents);\n })\n .catch((err) => {\n this.setState({\n progress: 0,\n message: \"Could not remove the image! \" + err.message,\n currentFile: undefined,\n isError: true,\n });\n });\n }\n\n upload() {\n const currentFile = this.state.currentFile;\n this.setState({\n progress: 0,\n uploadStatus: \"uploading\",\n });\n currentFile.forEach((file) => {\n UploadService.upload(file, this.props.appointmentid, (event) => {\n this.setState({\n progress: Math.round((100 * event.loaded) / event.total),\n });\n })\n .then((response) => {\n this.setState({\n message: response.message,\n isError: false,\n });\n return UploadService.getFiles(this.props.appointmentid);\n })\n .then((files) => {\n this.setState({\n imageInfos: files.Contents,\n uploadStatus: \"success\",\n });\n\n this.props.updateImages(files.Contents);\n })\n .catch((err) => {\n this.setState({\n progress: 0,\n message: \"Could not upload the image! \" + err.message,\n currentFile: undefined,\n isError: true,\n uploadStatus: \"error\",\n });\n });\n });\n }\n\n _renderListItim(image, index) {\n if (image.Key.slice(-1) === \"/\") return null;\n return (\n
\n \n this.deleteS3(image.Key)}\n >\n ×\n \n {image.Key}\n
\n );\n }\n\n render() {\n const {\n currentFile,\n previewImage,\n progress,\n message,\n imageInfos,\n isError,\n } = this.state;\n return (\n <>\n
\n
\n
\n
\n
\n \n
\n {currentFile\n ? currentFile.map((file) => file.name + \":\")\n : null}\n
\n
\n
\n\n {currentFile && (\n \n \n \n \n \n {`${progress}%`}\n \n \n )}\n\n {previewImage && !imageInfos && (\n <>\n
\n
\n \n Images to be uploaded\n \n
\n
\n
\n {previewImage.map((item, index) => (\n \n \n this.delete(index)}\n >\n ×\n \n
\n ))}\n
\n \n )}\n\n {message && (\n \n {message}\n \n )}\n\n {imageInfos && (\n <>\n
\n
\n \n Uploaded images\n \n
\n
\n
\n {imageInfos &&\n imageInfos.map((image, index) =>\n this._renderListItim(image, index)\n )}\n
\n \n )}\n
\n
\n \n
\n
\n {this.props.statusVideo && (\n
\n {this.props.statusVideo}\n
\n )}\n {previewImage && !imageInfos && (\n \n {this.state.uploadStatus === \"uploading\" ? (\n
\n Uploading...\n
\n ) : (\n
Upload
\n )}\n \n )}\n \n
\n {this.props.isSending ? (\n \n CREATING...\n \n ) : (\n \"CREATE VIDEO\"\n )}\n
\n \n
\n
\n \n );\n }\n}\n\nUploadImages.propTypes = {\n appointmentid: PropTypes.string,\n isSending: PropTypes.bool,\n imgCount: PropTypes.number,\n minImageCount: PropTypes.number,\n statusVideo: PropTypes.string,\n updateImages: PropTypes.func,\n sendRequest: PropTypes.func,\n innerRef: PropTypes.object,\n};\nexport default React.forwardRef((props, ref) => (\n \n));\n","import \"../styles/bootstrap-grid.min.css\";\nimport React, { useEffect, useState, useRef, useCallback } from \"react\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport logo from \"../logo.png\";\nimport { useParams, Link, useLocation } from \"react-router-dom\";\nimport UploadImages from \"../components/upload-images.component\";\nimport { PropTypes } from \"prop-types\";\nimport moment from \"moment\";\nconst REGION = \"us-east-2\";\nconst albumBucketName = \"littlebellies-landing.storage\";\nconst href = \"https://s3.\" + REGION + \".amazonaws.com/\";\nconst bucketUrl = href + albumBucketName + \"/\";\nconst baseImagesUrl = [\n \"https://dl.dropboxusercontent.com/s/25t8iooqjm4lt8e/image01.jpg\",\n \"https://dl.dropboxusercontent.com/s/2nyizfd0ib5dmky/image02.jpg\",\n \"https://dl.dropboxusercontent.com/s/ujnikms4uj69lln/image03.jpg\",\n \"https://dl.dropboxusercontent.com/s/eprautry181ez5x/image04.jpg\",\n \"https://dl.dropboxusercontent.com/s/6kr2vf48j5vi42m/image05.jpg\",\n];\nconst baseLogoUrl = [\n \"https://dl.dropboxusercontent.com/s/cam54htmyr3umud/littlebellies.jpg\",\n];\nconst minImageCount = 1;\nfunction ImgUploadPage({ appState }) {\n const params = useParams();\n const [isSending, setIsSending] = useState(false);\n const isMounted = useRef(true);\n const [imgCount, setImgCount] = useState(0);\n const [images, setImages] = useState([]);\n const [statusVideo, setStatusVideo] = useState(\"\");\n const location = useLocation();\n const [state, setState] = useState({\n clientName: null,\n email: null,\n services: null,\n dateStartAppointment: null,\n dateEndAppointment: null,\n apptDateYearStart: null,\n apptDateMonthStart: null,\n apptDateDateStart: null,\n apptHourStart: null,\n apptHourFinish: null,\n locationId: null,\n status: \"loading\",\n message: \"\",\n });\n\n useEffect(() => {\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n const sendRequest = useCallback(async () => {\n if (isSending) return;\n setIsSending(true);\n const dynamoPayload = {\n email: \"\" + state.email,\n dateTime: moment(new Date()).toString(),\n locationId: \"\" + state.locationId,\n siteId: appState.nav.siteId,\n images: images,\n };\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/video`,\n putDynamo\n );\n if (dynamoResponse.ok) {\n setStatusVideo(\"Video created successfully\");\n }\n\n if (isMounted.current) setIsSending(false);\n }, [isSending, state.email, state.locationId, appState.nav.siteId, images]);\n\n useEffect(() => {\n try {\n const months = {\n 0: \"January\",\n 1: \"February\",\n 2: \"March\",\n 3: \"April\",\n 4: \"May\",\n 5: \"June\",\n 6: \"July\",\n 7: \"August\",\n 8: \"September\",\n 9: \"October\",\n 10: \"November\",\n 11: \"December\",\n };\n\n const clientName = location.state.clientName;\n const newEmail = location.state.email;\n const services = location.state.service;\n const dateStartAppointment = new Date(location.state.startDateTime);\n const dateEndAppointment = new Date(location.state.endDateTime);\n const locationId = location.state.locationId;\n const apptDateYearStart = dateStartAppointment.getFullYear();\n const apptDateMonthStart = months[dateStartAppointment.getMonth()];\n const apptDateDateStart = dateStartAppointment.getDate();\n let apptHourStart = dateStartAppointment.getDate();\n let apptHourFinish = dateStartAppointment.getDate();\n\n const minutes =\n dateStartAppointment.getMinutes() === 0\n ? \"00\"\n : dateStartAppointment.getMinutes();\n if (dateStartAppointment.getHours() >= 12) {\n if (dateStartAppointment.getHours() === 12) {\n apptHourStart = \"12:\" + minutes + \" PM\";\n } else {\n apptHourStart =\n dateStartAppointment.getHours() - 12 + \":\" + minutes + \" PM\";\n }\n } else {\n if (dateStartAppointment.getHours() === 0) {\n apptHourStart = \"12:\" + minutes + \" AM\";\n } else {\n apptHourStart =\n dateStartAppointment.getHours() + \":\" + minutes + \" AM\";\n }\n }\n /* PARA LA HORA FINAL */\n\n const minutesEnd =\n dateEndAppointment.getMinutes() === 0\n ? \"00\"\n : dateEndAppointment.getMinutes();\n if (dateEndAppointment.getHours() >= 12) {\n if (dateEndAppointment.getHours() === 12) {\n apptHourFinish = \"12:\" + minutesEnd + \" PM\";\n } else {\n apptHourFinish =\n dateEndAppointment.getHours() - 12 + \":\" + minutesEnd + \" PM\";\n }\n } else {\n if (dateEndAppointment.getHours() === 0) {\n apptHourFinish = \"12:\" + minutesEnd + \" AM\";\n } else {\n apptHourFinish =\n dateEndAppointment.getHours() + \":\" + minutesEnd + \" AM\";\n }\n }\n\n setState((state) => ({\n ...state,\n clientName: clientName,\n email: newEmail,\n services: services,\n dateStartAppointment: dateStartAppointment,\n dateEndAppointment: dateEndAppointment,\n apptDateYearStart: apptDateYearStart,\n apptDateMonthStart: apptDateMonthStart,\n apptDateDateStart: apptDateDateStart,\n apptHourStart: apptHourStart,\n apptHourFinish: apptHourFinish,\n locationId: locationId,\n status: \"ready\",\n }));\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n }));\n }\n }, [params.appointmentid, location]);\n\n const _renderLoading = () => (\n
\n
\n
\n );\n const _renderError = () => (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n \n { state.message }\n \n
\n
\n
\n
\n
\n );\n const _updateImages = (images) => {\n if (images) {\n const imageUrl = images.map(\n (item) => bucketUrl + encodeURIComponent(item.Key)\n );\n\n setImages([\n ...baseLogoUrl,\n ...baseImagesUrl,\n ...imageUrl,\n ...baseLogoUrl,\n ]);\n setImgCount(imageUrl.length);\n }\n };\n return (\n
\n {state.status === \"loading\" && _renderLoading()}\n {(state.status === \"error\") &&\n _renderError()}\n {state.status === \"ready\" && (\n
\n
\n
\n
\n {state.clientName}\n
\n Services:{\" \"}\n \n {state.services}\n \n
\n Appointment date:\n
\n \n {state.apptDateMonthStart} {state.apptDateDateStart},{\" \"}\n {state.apptDateYearStart}{\" \"}\n \n \n {state.apptHourStart} {\"-\"} {state.apptHourFinish}\n \n
\n
\n
\n
\n {location.state.programId !== \"\" && (\n \n BACK\n \n )}\n {location.state.programId === \"\" && (\n \n BACK\n \n )}\n
\n
\n \n
\n )}\n
\n );\n}\nImgUploadPage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default ImgUploadPage;\n","import React, { useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport NumberFormat from \"react-number-format\";\nimport { Redirect, Link } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faEdit, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\n\n\nconst NotePageUltraSound = ({ \n state,\n setModalsState,\n modalsState,\n params,\n originalService,\n service,\n notes,\n setNotes,\n services,\n originalNotes,\n appState,\n location,\n setState,\n setService\n}) => {\n\n const MAX_VAL = 200;\n const withValueLimit = (inputObj) => {\n const { value } = inputObj;\n if (value < MAX_VAL) return inputObj;\n };\n\n useEffect(() => {\n if (\n (!state.cbffEnabled || state.cbffDenied || state.cbff !== \"\") &&\n notes.files > 0\n ) {\n setState((state) => ({\n ...state,\n submitStatus: \"ready\",\n }));\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"default\",\n }));\n }\n }, [state.cbff, notes.files, state.cbffEnabled, state.cbffDenied]);\n\n \n const handleRadioChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n console.log(\"updating: \", name, value);\n setState((state) => ({\n ...state,\n [name]: value,\n }));\n };\n\n \n const openModal = async (event) => {\n event.preventDefault();\n setModalsState((modalsState) => ({\n ...modalsState,\n status: \"visible\",\n }));\n };\n\n \n const closeModal = () => {\n setModalsState((modalsState) => ({\n ...modalsState,\n status: \"hidden\",\n }));\n };\n\n \n const handleInputChange = (name) => (event) => {\n setNotes((notes) => ({\n ...notes,\n [name]: event.target.value.trim(),\n }));\n };\n\n const handleChange = (event) => {\n setNotes((notes) => ({\n ...notes,\n language: \" \" + event.target.value.trim(),\n }));\n };\n\n \n const handleFilesChange = (values) => {\n setNotes((notes) => ({\n ...notes,\n files: values.floatValue,\n }));\n };\n\n const handleExtrasChange = (event) => {\n setNotes((notes) => ({\n ...notes,\n extras: event.target.value,\n }));\n };\n\n const handleServiceChange = (Id) => (event) => {\n event.preventDefault();\n const newItem = services.find((item) => item.sessionTypeId === Id);\n setService(newItem);\n };\n\n \n const handleSubmit = async (event) => {\n event.preventDefault();\n if (state.submitStatus === \"sending\") {\n return;\n }\n try {\n setState((state) => ({\n ...state,\n submitStatus: \"sending\",\n }));\n const sendNotes =\n notes.extras +\n \"\" +\n (originalNotes.email === notes.email\n ? \"\"\n : \"Send photos to: \" + notes.email);\n const payload =\n originalService.Id !== service.Id && originalNotes !== notes\n ? {\n SessionTypeId:\n service.Id === undefined ? service.sessionTypeId : service.Id,\n Notes:\n \"Weeks: \" +\n notes.weeks +\n \"\\n\" +\n \"Language:\" +\n notes.language +\n \"\\n\" +\n \"Files: \" +\n notes.files +\n \"\\n\" +\n sendNotes,\n }\n : originalService.Id !== service.Id && originalNotes === notes\n ? {\n SessionTypeId:\n service.Id === undefined ? service.sessionTypeId : service.Id,\n }\n : {\n Notes:\n \"Weeks: \" +\n notes.weeks +\n \"\\n\" +\n \"Language:\" +\n notes.language +\n \"\\n\" +\n \"Files: \" +\n notes.files +\n \"\\n\" +\n sendNotes,\n };\n\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n allowedpermissions: appState.singleAuth.allowedPermissions,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${state.appointmendId}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n try {\n const dynamoPayload = {\n appointmentId: parseInt(state.appointmendId),\n serviceName:\n service.Name === undefined ? service.name : service.Name,\n cbff:\n state.cbff === \"yes\" \n ? \"\" +\n moment().add(state.cbffWeeks, \"week\").format(\"MM/DD/YYYY\")\n : \"nA\",\n files: \"\" + notes.files,\n weeks: \"\" + notes.weeks,\n notes: \"\" + notes.extras,\n email: notes.email,\n appointmentDate: state.startDateTime,\n locationId: appState.nav.locationId,\n clientPhone: state.MobilePhone,\n clientName: state.clientName,\n formFilled : state.YellowAlert === state.appointmendId,\n };\n\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${appState.nav.siteId}/sales`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n const cbffPayload = {\n Client: {\n Id: state.clientId,\n RedAlert:\n state.cbff === \"yes\"\n ? (state.lastCbff ? \"last - \" : \"\") +\n \"CBFF before \" +\n moment().add(state.cbffWeeks, \"week\").format(\"MM/DD/YYYY\")\n : \"\",\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const cbffUpdate = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n body: JSON.stringify(cbffPayload),\n };\n const cbffResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${state.clientId}`,\n cbffUpdate\n );\n const jsonResponse = await cbffResponse.json();\n if (cbffResponse.ok) {\n setState((state) => ({\n ...state,\n submitStatus: \"sent\",\n }));\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"cbffFailed\",\n cbffMessage:\n \"ComeBackForFree request error: \" +\n JSON.stringify(jsonResponse),\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage:\n \"DynamoDB request failed: \" + JSON.stringify(dynamoData),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"DynamoDB request error: \" + JSON.stringify(error),\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"Main request failed: \" + JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"Main request error: \" + JSON.stringify(error),\n }));\n }\n };\nreturn(\n\n
\n
\n
\n
\n {state.clientName}\n
\n Services:{\" \"}\n \n {originalService.Name}\n \n
\n Appointment date:\n
\n \n {state.apptDateMonthStart} {state.apptDateDateStart},{\" \"}\n {state.apptDateYearStart}{\" \"}\n \n \n {state.apptHourStart} {\"-\"} {state.apptHourFinish}\n \n
\n
\n
\n
\n \n BACK\n \n
\n
\n
\n
\n
\n
\n
\n Current service:{\" \"}\n {service.Name === undefined ? service.name : service.Name}\n
\n
\n
\n \n \n Edit service\n \n \n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n {state.cbffEnabled && !state.cbffDenied && (\n
\n \n
\n
\n \n \n
\n
\n \n \n
\n
\n )}\n {state.cbffDenied && state.cbffEnabled && (\n \n \n The current client has already two consecutive come back\n for free services, if there is the need to give another\n come back for free please contact your manager, you may\n continue the checkout process{\" \"}\n \n
\n )}\n
\n
\n\n {modalsState.status === \"visible\" && (\n \n \n ×\n \n
\n \n

Please select the service.

\n
\n {services.map((item) => {\n if (\n appState.singleAuth.allowedPermissions ||\n item.price >= originalService.price\n ) {\n return (\n \n
{item.name}
\n
\n \n \n Select\n \n
\n
\n
\n );\n } else {\n return \"\";\n }\n })}\n
\n
\n \n \n )}\n
\n
\n
\n {(state.dicomStatus === \"failed\" ||\n state.dicomStatus === \"error\") && (\n
\n {state.dicomMessage}\n
\n )}\n {state.submitStatus === \"failed\" && (\n
\n {state.submitMessage}\n
\n )}\n {state.submitStatus === \"cbffFailed\" && (\n
\n {state.cbffMessage}\n
\n )}\n \n Create video\n \n \n {state.submitStatus === \"sending\" ? (\n \n \n \n ) : (\n \n Proceed to checkout\n \n )}\n {(state.submitStatus === \"sent\" ||\n state.submitStatus === \"skipped\") && (\n \n )}\n \n
\n
\n \n \n \n)\n };\n \n NotePageUltraSound.propTypes = {\n state : PropTypes.object.isRequired,\n setModalsState : PropTypes.func.isRequired,\n modalsState : PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n originalService:PropTypes.object.isRequired,\n service:PropTypes.object.isRequired,\n notes:PropTypes.object.isRequired,\n setNotes: PropTypes.func.isRequired,\n services: PropTypes.array.isRequired,\n originalNotes: PropTypes.object.isRequired,\n appState: PropTypes.object.isRequired,\n location : PropTypes.object.isRequired,\n setState : PropTypes.func.isRequired,\n setService: PropTypes.func.isRequired\n };\n export default NotePageUltraSound;\n ","import React, { useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport NumberFormat from \"react-number-format\";\nimport { Redirect, Link } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faEdit, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\n \n\nconst NotePageMassage = ({ \n state,\n setModalsState,\n modalsState,\n params,\n originalService,\n service,\n notes,\n setNotes,\n services,\n originalNotes,\n appState,\n location,\n setState,\n setService\n}) => {\n\n const MAX_VAL = 200;\n const withValueLimit = (inputObj) => {\n const { value } = inputObj;\n if (value < MAX_VAL) return inputObj;\n };\n\n useEffect(() => {\n if (!state.cbffEnabled || state.cbffDenied || state.cbff !== \"\") {\n\n setState((state) => ({\n ...state,\n submitStatus: \"ready\",\n }));\n\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"default\",\n }));\n }\n }, [state.cbff, state.cbffEnabled, state.cbffDenied]);\n \n const handleRadioChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n console.log(\"updating: \", name, value);\n setState((state) => ({\n ...state,\n [name]: value,\n }));\n };\n\n \n const openModal = async (event) => {\n event.preventDefault();\n setModalsState((modalsState) => ({\n ...modalsState,\n status: \"visible\",\n }));\n };\n\n \n const closeModal = () => {\n setModalsState((modalsState) => ({\n ...modalsState,\n status: \"hidden\",\n }));\n };\n\n const handleServiceChange = (Id) => (event) => {\n event.preventDefault();\n const newItem = services.find((item) => item.sessionTypeId === Id);\n setService(newItem);\n };\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (state.submitStatus === \"sending\") {\n return;\n }\n try {\n\n setState((state) => ({\n ...state,\n submitStatus: \"sending\",\n }));\n const sendNotes =\n notes.extras +\n \"\" +\n (originalNotes.email === notes.email\n ? \"\"\n : \"Send photos to: \" + notes.email);\n\n \n const payload =\n originalService.Id !== service.Id && originalNotes !== notes\n ? {\n SessionTypeId:\n service.Id === undefined ? service.sessionTypeId : service.Id,\n Notes:\n \"Weeks: \" +\n notes.weeks +\n \"\\n\" +\n \"Language: \" +\n (notes.language === \" null\" ? \"english\" : notes.language)\n +\n \"\\n\" +\n \"Files: \" +\n notes.files +\n \"\\n\" +\n sendNotes,\n }\n : originalService.Id !== service.Id && originalNotes === notes\n ? {\n SessionTypeId:\n service.Id === undefined ? service.sessionTypeId : service.Id,\n }\n : {\n Notes:\n \"Weeks: \" +\n notes.weeks +\n \"\\n\" +\n \"Language: \" +\n (notes.language === \" null\" ? \"english\" : notes.language) +\n \"\\n\" +\n \"Files: \" +\n notes.files +\n \"\\n\" +\n sendNotes,\n };\n\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n allowedpermissions: appState.singleAuth.allowedPermissions,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${state.appointmendId}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n try {\n const dynamoPayload = {\n appointmentId: parseInt(state.appointmendId),\n serviceName:\n service.Name === undefined ? service.name : service.Name,\n cbff:\n state.cbff === \"yes\" \n ? \"\" +\n moment().add(state.cbffWeeks, \"week\").format(\"MM/DD/YYYY\")\n : \"nA\",\n files: \"\" + notes.files,\n weeks: \"\" + notes.weeks,\n notes: \"\" + notes.extras,\n email: notes.email,\n appointmentDate: state.startDateTime,\n locationId: appState.nav.locationId,\n clientPhone: state.MobilePhone,\n clientName: state.clientName,\n formFilled : state.YellowAlert === state.appointmendId,\n };\n\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${appState.nav.siteId}/sales`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n const cbffPayload = {\n Client: {\n Id: state.clientId,\n RedAlert:\n state.cbff === \"yes\"\n ? (state.lastCbff ? \"last - \" : \"\") +\n \"CBFF before \" +\n moment().add(state.cbffWeeks, \"week\").format(\"MM/DD/YYYY\")\n : \"\",\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const cbffUpdate = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n body: JSON.stringify(cbffPayload),\n };\n const cbffResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${state.clientId}`,\n cbffUpdate\n );\n const jsonResponse = await cbffResponse.json();\n if (cbffResponse.ok) {\n setState((state) => ({\n ...state,\n submitStatus: \"sent\",\n }));\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"cbffFailed\",\n cbffMessage:\n \"ComeBackForFree request error: \" +\n JSON.stringify(jsonResponse),\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage:\n \"DynamoDB request failed: \" + JSON.stringify(dynamoData),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"DynamoDB request error: \" + JSON.stringify(error),\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"Main request failed: \" + JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n submitStatus: \"failed\",\n submitMessage: \"Main request error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const handleInputChange = (name) => (event) => {\n setNotes((notes) => ({\n ...notes,\n [name]: event.target.value.trim(),\n }));\n };\n \n const handleChange = (event) => {\n setNotes((notes) => ({\n ...notes,\n language: \" \" + event.target.value.trim(),\n }));\n };\n \n const handleExtrasChange = (event) => {\n setNotes((notes) => ({\n ...notes,\n extras: event.target.value,\n }));\n };\n\n useEffect(() =>{\n setNotes((notes) => ({\n ...notes,\n files: 0,\n }));\n },[])\n\n \nreturn(\n\n
\n
\n
\n
\n {state.clientName}\n
\n Services:{\" \"}\n \n {originalService.Name}\n \n
\n Appointment date:\n
\n \n {state.apptDateMonthStart} {state.apptDateDateStart},{\" \"}\n {state.apptDateYearStart}{\" \"}\n \n \n {state.apptHourStart} {\"-\"} {state.apptHourFinish}\n \n
\n
\n
\n
\n \n BACK\n \n
\n
\n
\n
\n
\n
\n
\n Current service:{\" \"}\n {service.Name === undefined ? service.name : service.Name}\n
\n
\n
\n \n \n Edit service\n \n \n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n {state.cbffEnabled && !state.cbffDenied && (\n
\n \n
\n
\n \n \n
\n
\n \n \n
\n
\n )}\n {state.cbffDenied && state.cbffEnabled && (\n \n \n The current client has already two consecutive come back\n for free services, if there is the need to give another\n come back for free please contact your manager, you may\n continue the checkout process{\" \"}\n \n
\n )}\n
\n
\n\n {modalsState.status === \"visible\" && (\n \n \n ×\n \n
\n \n

Please select the service.

\n
\n {services.map((item) => {\n if (\n appState.singleAuth.allowedPermissions ||\n item.price >= originalService.price\n ) {\n return (\n \n
{item.name}
\n
\n \n \n Select\n \n
\n
\n
\n );\n } else {\n return \"\";\n }\n })}\n
\n \n \n \n )}\n
\n
\n
\n {(state.dicomStatus === \"failed\" ||\n state.dicomStatus === \"error\") && (\n
\n {state.dicomMessage}\n
\n )}\n {state.submitStatus === \"failed\" && (\n
\n {state.submitMessage}\n
\n )}\n {state.submitStatus === \"cbffFailed\" && (\n
\n {state.cbffMessage}\n
\n )}\n \n Create video\n \n \n {state.submitStatus === \"sending\" ? (\n \n \n \n ) : (\n \n Proceed to checkout\n \n )}\n {(state.submitStatus === \"sent\" ||\n state.submitStatus === \"skipped\") && (\n \n )}\n \n
\n
\n \n \n \n)\n };\n \n NotePageMassage.propTypes = {\n state : PropTypes.object.isRequired,\n setModalsState : PropTypes.func.isRequired,\n modalsState : PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n originalService:PropTypes.object.isRequired,\n service:PropTypes.object.isRequired,\n notes:PropTypes.object.isRequired,\n setNotes: PropTypes.func.isRequired,\n services: PropTypes.array.isRequired,\n originalNotes: PropTypes.object.isRequired,\n appState: PropTypes.object.isRequired,\n location : PropTypes.object.isRequired,\n setState : PropTypes.func.isRequired,\n setService: PropTypes.func.isRequired\n };\n export default NotePageMassage;\n ","import React, { useEffect, useState } from \"react\";\n// import { useParams, useLocation, Redirect, Link } from \"react-router-dom\";\nimport { useParams, useLocation, Link } from \"react-router-dom\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport logo from \"../logo.png\";\nimport { PropTypes } from \"prop-types\";\nimport NotePageUltraSound from \"../components/notePageUltraSound\";\nimport NotePageMassage from \"../components/notePageMassage\";\n\nfunction NotePage({ appState }) {\n const [state, setState] = useState({\n clientFirstName: \"\",\n clientLastName: \"\",\n clientId: null,\n appointmendId: null,\n clientName: null,\n email: null,\n services: null,\n serviceId: null,\n dateStartAppointment: null,\n dateEndAppointment: null,\n apptDateYearStart: null,\n apptDateMonthStart: null,\n apptDateDateStart: null,\n apptHourStart: null,\n apptHourFinish: null,\n submitStatus: \"default\",\n submitMessage: \"\",\n cbff: \"\",\n cbffEnabled: \"\",\n cbffDenied: \"\",\n cbffMessage: \"\",\n cbffWeeks: \"\",\n lastCbff: null,\n status: \"loading\",\n message: \"\",\n startDateTime: \"\",\n endDateTime: \"\",\n isSendMail: \"true\",\n dicomStatus: \"IDLE\",\n dicomMessage: \"\",\n duration: null,\n YellowAlert: null,\n ProgramId: 0,\n });\n const [modalsState, setModalsState] = useState({\n status: \"hidden\",\n });\n\n const [services, setServices] = useState([]);\n const [service, setService] = useState({\n Type: \"\",\n DefaultTimeLength: \"\",\n Id: \"\",\n Name: \"\",\n NumDeducted: \"\",\n ProgramId: \"\",\n });\n const [notes, setNotes] = useState({\n weeks: 0,\n language: \"null\",\n files: \"\",\n extras: \"\",\n cbff: \"\",\n email: \"\",\n });\n const [originalNotes, setOriginalNotes] = useState({\n weeks: 0,\n language: \"null\",\n files: 0,\n extras: \"\",\n cbff: \"\",\n email: \"\",\n });\n const [originalService, setOriginalService] = useState({});\n const location = useLocation();\n const params = useParams();\n\n useEffect(() => {\n const months = {\n 0: \"January\",\n 1: \"February\",\n 2: \"March\",\n 3: \"April\",\n 4: \"May\",\n 5: \"June\",\n 6: \"July\",\n 7: \"August\",\n 8: \"September\",\n 9: \"October\",\n 10: \"November\",\n 11: \"December\",\n };\n const weeks = {\n early: 4,\n gender: 3,\n meet: 2,\n special: 2,\n come: 2,\n };\n getAppointment();\n async function getAppointment() {\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${params.id}`,\n getMethod\n );\n const appointment = await response.json();\n\n const ProgramId = appointment.ProgramId;\n if (response.ok === true) {\n const serviceName =\n appointment.Service.Name.toLowerCase().split(\" \")[0];\n const clientId = appointment.Client.Id;\n const YellowAlert = parseInt(appointment.Client.YellowAlert);\n const appointmendId = appointment.Id;\n const clientFirstName = appointment.Client.FirstName;\n const clientLastName = appointment.Client.LastName;\n const clientName =\n appointment.Client.FirstName + \" \" + appointment.Client.LastName;\n const MobilePhone = appointment.Client.MobilePhone;\n const newEmail = appointment.Client.Email;\n const services = appointment.Service.Name;\n const serviceId = appointment.Service.Id;\n const dateStartAppointment = new Date(appointment.StartDateTime);\n const dateEndAppointment = new Date(appointment.EndDateTime);\n const startDateTime = appointment.StartDateTime;\n const endDateTime = appointment.EndDateTime;\n const duration = appointment.Duration;\n const apptDateYearStart = dateStartAppointment.getFullYear();\n const apptDateMonthStart = months[dateStartAppointment.getMonth()];\n const apptDateDateStart = dateStartAppointment.getDate();\n let apptHourStart = dateStartAppointment.getDate();\n let apptHourFinish = dateStartAppointment.getDate();\n const redAlert = \"\" + appointment.Client.RedAlert;\n const submitMessage = \"\";\n const cbff = \"\";\n const cbffDenied = redAlert.includes(\"last\");\n const cbffEnabled =\n weeks[\"\" + serviceName] !== undefined &&\n !(\n appointment.Service.Name.toLowerCase().includes(\n \"meet your baby\"\n ) && appointment.Service.Name.toLowerCase().includes(\"15 min\")\n );\n const cbffMessage = \"\";\n const cbffWeeks = weeks[\"\" + serviceName];\n const lastCbff =\n appointment.Service.Name === \"Come back for free\" &&\n redAlert.includes(\"CBFF\");\n const minutes =\n dateStartAppointment.getMinutes() === 0\n ? \"00\"\n : dateStartAppointment.getMinutes();\n if (dateStartAppointment.getHours() >= 12) {\n if (dateStartAppointment.getHours() === 12) {\n apptHourStart = \"12:\" + minutes + \" PM\";\n } else {\n apptHourStart =\n dateStartAppointment.getHours() - 12 + \":\" + minutes + \" PM\";\n }\n } else {\n if (dateStartAppointment.getHours() === 0) {\n apptHourStart = \"12:\" + minutes + \" AM\";\n } else {\n apptHourStart =\n dateStartAppointment.getHours() + \":\" + minutes + \" AM\";\n }\n }\n /* PARA LA HORA FINAL */\n\n const minutesEnd =\n dateEndAppointment.getMinutes() === 0\n ? \"00\"\n : dateEndAppointment.getMinutes();\n if (dateEndAppointment.getHours() >= 12) {\n if (dateEndAppointment.getHours() === 12) {\n apptHourFinish = \"12:\" + minutesEnd + \" PM\";\n } else {\n apptHourFinish =\n dateEndAppointment.getHours() - 12 + \":\" + minutesEnd + \" PM\";\n }\n } else {\n if (dateEndAppointment.getHours() === 0) {\n apptHourFinish = \"12:\" + minutesEnd + \" AM\";\n } else {\n apptHourFinish =\n dateEndAppointment.getHours() + \":\" + minutesEnd + \" AM\";\n }\n }\n let files = \"\";\n if (appointment.Notes !== null) {\n let newExtras = \"\";\n const notesArray = appointment.Notes.split(\"\\n\");\n notesArray.forEach((item) => {\n if (item.toLowerCase().includes(\"weeks:\")) {\n const splitedItem = item.split(\":\");\n setNotes((notes) => ({\n ...notes,\n weeks: splitedItem[1],\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n weeks: splitedItem[1],\n }));\n } else {\n if (item.toLowerCase().includes(\"language:\")) {\n const splitedItem = item.split(\":\");\n setNotes((notes) => ({\n ...notes,\n language: splitedItem[1].toLowerCase(),\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n language: splitedItem[1].toLowerCase(),\n }));\n } else {\n if (item.toLowerCase().includes(\"files:\")) {\n const splitedItem = item.split(\":\");\n files = splitedItem[1].trim();\n setNotes((notes) => ({\n ...notes,\n files: splitedItem[1].trim(),\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n files: splitedItem[1].trim(),\n }));\n } else {\n if (item.toLowerCase().includes(\"cbff:\")) {\n const splitedItem = item.split(\":\");\n setNotes((notes) => ({\n ...notes,\n cbff: splitedItem[1].trim(),\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n cbff: splitedItem[1].trim(),\n }));\n } else {\n newExtras += item.toString() + \"\\n\";\n }\n }\n }\n }\n setNotes((notes) => ({\n ...notes,\n extras: newExtras,\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n extras: newExtras,\n }));\n });\n }\n setNotes((notes) => ({\n ...notes,\n email: newEmail,\n }));\n setOriginalNotes((originalNotes) => ({\n ...originalNotes,\n email: newEmail,\n }));\n\n const submitStatus =\n cbffEnabled && (files !== \"\" || appointment.Notes === null)\n ? \"default\"\n : \"ready\";\n\n setState((state) => ({\n ...state,\n clientFirstName,\n clientLastName,\n clientId,\n appointmendId,\n clientName,\n email: newEmail,\n services,\n serviceId,\n dateStartAppointment,\n dateEndAppointment,\n apptDateYearStart,\n apptDateMonthStart,\n apptDateDateStart,\n apptHourStart,\n apptHourFinish,\n submitStatus,\n submitMessage,\n cbff,\n cbffDenied,\n cbffEnabled,\n cbffMessage,\n cbffWeeks,\n lastCbff,\n startDateTime,\n endDateTime,\n MobilePhone,\n duration,\n YellowAlert,\n ProgramId,\n }));\n\n const getMethod2 = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n locationid: appState.nav.locationId,\n },\n };\n const servicesResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sessionTypes/${location.state.programId}`,\n getMethod2\n );\n const data = await servicesResponse.json();\n if (servicesResponse.ok) {\n setServices(data.services);\n\n const currentServicePrice = data.services.find(\n (element) => element.name === appointment.Service.Name\n ).price;\n const mutableService = appointment.Service;\n mutableService.price = currentServicePrice;\n setService(mutableService);\n setOriginalService(mutableService);\n } else {\n setState((state) => ({\n ...state,\n status: \"no-services-found\",\n }));\n }\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"no-data-found\",\n message: JSON.stringify(appointment),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n }));\n }\n }\n }, [\n params.id,\n location.state.programId,\n appState.nav.siteId,\n appState.singleAuth.token,\n appState.nav.locationId,\n ]);\n\n return (\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {(state.status === \"error\" || appState.nav.status === \"logOutError\") && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n \n {appState.nav.status === \"logOutError\"\n ? appState.nav.message\n : state.message}\n \n
\n
\n
\n
\n )}\n {state.status === \"no-data-found\" && (\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Nothing found

\n

Seems like nothing was found

\n
\n {state.message}\n
\n
\n
\n
\n
\n )}\n\n {state.status === \"ready\" &&\n (state.ProgramId === 3 ? (\n \n ) : (\n \n ))}\n
\n );\n}\nNotePage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default NotePage;\n","import React, { useEffect, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Redirect, useParams, useHistory } from \"react-router-dom\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport logo from \"../logo.png\";\nimport { PropTypes } from \"prop-types\";\nimport { sitesList } from \"../config/constants.js\";\nimport * as crypto from \"crypto-js\";\nimport { transformSites } from \"../util\";\n\nfunction LoginPage({ appState, setAppState }) {\n\tconst [localAuthState, setLocalAuthState] = useState({\n\t\tstatus: \"facilityStep\",\n\t\tusername: \"\",\n\t\tpassword: \"\",\n\t\tsiteId: \"\",\n\t\tsiteName: \"\",\n\t});\n\tconst [search, setSearch] = useState({\n\t\tsearchTerm: \"\",\n\t\tlocationTerm: \"\",\n\t\tfacilities: [],\n\t});\n\tconst [locations, setLocations] = useState([]);\n\tconst [submitStatus, setSubmitStatus] = useState({\n\t\tstatus: \"IDLE\",\n\t\tmessage: \"\",\n\t});\n\tconst params = useParams();\n\tconst history = useHistory();\n\n\tuseEffect(() => {\n\t\tconsole.log(\"14-aug-2023 V-0.6.6 deploy 1\");\n\t\tconst results = sitesList;\n\n\t\tconst paramSite = results.find((item) => item.siteId === params.siteId);\n\t\tif (paramSite !== undefined) {\n\t\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t\t...localAuthState,\n\t\t\t\tstatus: \"loginStep\",\n\t\t\t\tsiteId: \"\" + paramSite.siteId,\n\t\t\t\tsiteName: \"\" + paramSite.name,\n\t\t\t}));\n\t\t\tsetAppState((appState) => ({\n\t\t\t\t...appState,\n\t\t\t\tnav: {\n\t\t\t\t\t...appState.nav,\n\t\t\t\t\tsiteId: \"\" + paramSite.siteId,\n\t\t\t\t\tsiteName: paramSite.name,\n\t\t\t\t},\n\t\t\t}));\n\t\t} else {\n\t\t\thistory.replace(`/login/`);\n\t\t}\n\t}, [appState.nav.siteId, history, params.siteId, setAppState]);\n\n\tuseEffect(() => {\n\t\tif (appState.nav.status === \"logedOut\") {\n\t\t\tsetAppState((appState) => ({\n\t\t\t\t...appState,\n\t\t\t\tnav: {\n\t\t\t\t\t...appState.nav,\n\t\t\t\t\tstatus: \"\",\n\t\t\t\t\tmessage: \"\",\n\t\t\t\t\tsiteName: \"\",\n\t\t\t\t},\n\t\t\t}));\n\t\t}\n\t\tconst results = sitesList.filter((facility) =>\n\t\t\tfacility.name.toLowerCase().includes(search.searchTerm.toLowerCase())\n\t\t);\n\t\tsetSearch((search) => ({\n\t\t\t...search,\n\t\t\tfacilities: results,\n\t\t}));\n\t}, [search.searchTerm, appState.nav, setAppState]);\n\n\tconst handleTermChange = (event) => {\n\t\tsetSearch((search) => ({\n\t\t\t...search,\n\t\t\tsearchTerm: event.target.value,\n\t\t}));\n\t};\n\n\tconst handleClick = (siteId, siteName) => (event) => {\n\t\tevent.preventDefault();\n\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t...localAuthState,\n\t\t\tstatus: \"loginStep\",\n\t\t\tsiteId: siteId,\n\t\t\tsiteName: siteName,\n\t\t}));\n\t\tsetAppState((appState) => ({\n\t\t\t...appState,\n\t\t\tnav: {\n\t\t\t\t...appState.nav,\n\t\t\t\tsiteId: \"\" + siteId,\n\t\t\t\tsiteName: siteName,\n\t\t\t},\n\t\t}));\n\t\thistory.replace(`/login/${siteId}`);\n\t};\n\n\tconst handleBack = (event) => {\n\t\tevent.preventDefault();\n\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t...localAuthState,\n\t\t\tstatus: \"facilityStep\",\n\t\t\tusername: \"\",\n\t\t\tpassword: \"\",\n\t\t}));\n\t\tsetAppState((appState) => ({\n\t\t\t...appState,\n\t\t\tnav: {\n\t\t\t\t...appState.nav,\n\t\t\t\tsiteId: null,\n\t\t\t},\n\t\t}));\n\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t...submitStatus,\n\t\t\tstatus: \"IDLE\",\n\t\t\tmessage: \"\",\n\t\t}));\n\t\thistory.replace(\"/login\");\n\t};\n\tconst handleLocationClick = (locId) => (event) => {\n\t\tevent.preventDefault();\n\t\tsetAppState((appState) => ({\n\t\t\t...appState,\n\t\t\tnav: {\n\t\t\t\t...appState.nav,\n\t\t\t\tlocationId: \"\" + locId,\n\t\t\t},\n\t\t}));\n\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t...localAuthState,\n\t\t\tstatus: \"logedIn\",\n\t\t}));\n\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t...submitStatus,\n\t\t\tstatus: \"success\",\n\t\t\tmessage: \"Success. You will be redirected soon.\",\n\t\t}));\n\t\tsetAppState((appState) => ({\n\t\t\t...appState,\n\t\t\tauthType: \"single\",\n\t\t\tnav: {\n\t\t\t\t...appState.nav,\n\t\t\t\tredirect: true,\n\t\t\t},\n\t\t}));\n\t};\n\n\tconst handleLoginInput = (attribute) => (event) => {\n\t\tif (attribute === \"username\") {\n\t\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t\t...localAuthState,\n\t\t\t\tusername: event.target.value,\n\t\t\t}));\n\t\t} else {\n\t\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t\t...localAuthState,\n\t\t\t\tpassword: event.target.value,\n\t\t\t}));\n\t\t}\n\t};\n\n\tconst handleSubmit = async (event) => {\n\t\tevent.preventDefault();\n\n\t\tif (setSubmitStatus.status === \"sending\") {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t...submitStatus,\n\t\t\t\tstatus: \"sending\",\n\t\t\t}));\n\t\t\tconst payload = {\n\t\t\t\tUsername: localAuthState.username,\n\t\t\t\tPassword: localAuthState.password,\n\t\t\t};\n\t\t\tconst key = process.env.REACT_APP_ENCRYPTION_KEY;\n\t\t\tconst encrypted = crypto.AES.encrypt(JSON.stringify(payload), key).toString();\n\t\t\tconst body = { data: encrypted };\n\n\t\t\tconst putMethod = {\n\t\t\t\tmethod: \"PUT\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\tsiteid: appState.nav.siteId,\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(body),\n\t\t\t};\n\t\t\tconst response = await fetch(`${process.env.REACT_APP_API_URL}/api/userToken/`, putMethod);\n\t\t\tconst data = await response.json();\n\t\t\tif (response.ok) {\n\t\t\t\tsetAppState((appState) => ({\n\t\t\t\t\t...appState,\n\t\t\t\t\tsingleAuth: {\n\t\t\t\t\t\t...appState.singleAuth,\n\t\t\t\t\t\ttoken: data.accesssToken,\n\t\t\t\t\t\tuserId: data.userId,\n\t\t\t\t\t\tuserName: data.userName,\n\t\t\t\t\t\trole: data.userRol,\n\t\t\t\t\t},\n\t\t\t\t}));\n\n\t\t\t\tconst getPermissionsMethod = {\n\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\t\tsiteid: appState.nav.siteId,\n\t\t\t\t\t\tauthorization: data.accesssToken,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tconst getPermissionsResponse = await fetch(\n\t\t\t\t\t`${process.env.REACT_APP_API_URL}/api/user/permissions/${data.userId}`,\n\t\t\t\t\tgetPermissionsMethod\n\t\t\t\t);\n\t\t\t\tconst permissionsData = await getPermissionsResponse.json();\n\t\t\t\tif (getPermissionsResponse.ok) {\n\t\t\t\t\tsetAppState((appState) => ({\n\t\t\t\t\t\t...appState,\n\t\t\t\t\t\tsingleAuth: {\n\t\t\t\t\t\t\t...appState.singleAuth,\n\t\t\t\t\t\t\tallowedPermissions: permissionsData.allowedPermissions,\n\t\t\t\t\t\t},\n\t\t\t\t\t}));\n\t\t\t\t\tconst getMethod = {\n\t\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\"Content-type\": \"application/json; charset=UTF-8\",\n\t\t\t\t\t\t\tsiteid: appState.nav.siteId,\n\t\t\t\t\t\t\tauthorization: data.accesssToken,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tconst getResponse = await fetch(`${process.env.REACT_APP_API_URL}/api/config/sites`, getMethod);\n\t\t\t\t\tconst siteResponse = await getResponse.json();\n\t\t\t\t\tconst locationData = transformSites({\n\t\t\t\t\t\tsites: siteResponse.sites,\n\t\t\t\t\t\tfilterSiteId: appState.nav.siteId,\n\t\t\t\t\t});\n\t\t\t\t\tif (getResponse.ok) {\n\t\t\t\t\t\tif (locationData.length > 1) {\n\t\t\t\t\t\t\tsetLocations(locationData);\n\t\t\t\t\t\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t\t\t\t\t\t...localAuthState,\n\t\t\t\t\t\t\t\tstatus: \"locationstep\",\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAppState((appState) => ({\n\t\t\t\t\t\t\t\t...appState,\n\t\t\t\t\t\t\t\tnav: {\n\t\t\t\t\t\t\t\t\t...appState.nav,\n\t\t\t\t\t\t\t\t\tlocationId: \"\" + locationData[0].id,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tsetLocalAuthState((localAuthState) => ({\n\t\t\t\t\t\t\t\t...localAuthState,\n\t\t\t\t\t\t\t\tstatus: \"logedIn\",\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tsetAppState((appState) => ({\n\t\t\t\t\t\t\t\t...appState,\n\t\t\t\t\t\t\t\tauthType: \"single\",\n\t\t\t\t\t\t\t\tnav: {\n\t\t\t\t\t\t\t\t\t...appState.nav,\n\t\t\t\t\t\t\t\t\tredirect: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t\t\t\t...submitStatus,\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\tmessage: \"Success. You will be redirected soon.\",\n\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t\t\t\t...submitStatus,\n\t\t\t\t\t\t\tstatus: \"fail\",\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\tlocationData.Error.Message !== undefined\n\t\t\t\t\t\t\t\t\t? locationData.Error.Message\n\t\t\t\t\t\t\t\t\t: locationData.message !== undefined\n\t\t\t\t\t\t\t\t\t? locationData.message\n\t\t\t\t\t\t\t\t\t: JSON.stringify(locationData),\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t\t\t...submitStatus,\n\t\t\t\t\t\tstatus: \"fail\",\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\tpermissionsData.Error.Message !== undefined\n\t\t\t\t\t\t\t\t? permissionsData.Error.Message\n\t\t\t\t\t\t\t\t: permissionsData.message !== undefined\n\t\t\t\t\t\t\t\t? permissionsData.message\n\t\t\t\t\t\t\t\t: JSON.stringify(permissionsData),\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t\t...submitStatus,\n\t\t\t\t\tstatus: \"fail\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\tdata.Error.Message !== undefined\n\t\t\t\t\t\t\t? data.Error.Message\n\t\t\t\t\t\t\t: data.message !== undefined\n\t\t\t\t\t\t\t? data.message\n\t\t\t\t\t\t\t: JSON.stringify(data),\n\t\t\t\t}));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tsetSubmitStatus((submitStatus) => ({\n\t\t\t\t...submitStatus,\n\t\t\t\tstatus: \"error\",\n\t\t\t\tmessage:\n\t\t\t\t\t\"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\" +\n\t\t\t\t\tJSON.stringify(error.message),\n\t\t\t}));\n\t\t}\n\t};\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{localAuthState.status === \"facilityStep\" && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Select the facility:

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{search.facilities.map((facility) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\"Little\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
{facility.name}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\t\t\t\t\t{localAuthState.status === \"loginStep\" && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Login

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t{submitStatus.status === \"success\" && (\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t{submitStatus.message}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{(submitStatus.status === \"fail\" || submitStatus.status === \"error\") && (\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{submitStatus.message}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{submitStatus.status === \"sending\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\tLOGIN\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\n\t\t\t\t\t{localAuthState.status === \"locationstep\" && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Select the location

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{locations.map((location) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\"Little\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
{location.name}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\t\t\t\t\t{appState.nav.redirect === true && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n}\n\nLoginPage.propTypes = {\n\tappState: PropTypes.object,\n\tsetAppState: PropTypes.func,\n};\nexport default LoginPage;\n","import React from \"react\";\n\nfunction LogsDashboardPage() {\n\n return (\n
\n
\n
\n
\n \n
\n
\n
\n
\n );\n}\n\nexport default LogsDashboardPage;\n","import \"../styles/bootstrap-grid.min.css\";\nimport React from \"react\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport { ExpandMore } from \"@material-ui/icons\";\nimport {\n Accordion,\n AccordionSummary,\n AccordionDetails,\n} from \"@material-ui/core\";\nimport { PropTypes } from \"prop-types\";\nimport { questions, adminQuestionsOnly } from \"../config/constants.js\"\n\nfunction FaqPage({ appState }) {\n \n let questionsDisplay = questions;\n\n if (appState.singleAuth.role === \"Directiva\") {\n questionsDisplay = questions.concat(adminQuestionsOnly);\n }\n\n return (\n
\n
\n
\n {questionsDisplay.map((category) => {\n return (\n
\n
\n

{category.categoryName}

\n
\n {category.items.map((item) => {\n return (\n \n \n }>\n {item.question}\n \n \n \n {item.answer}\n \n \n \n
\n );\n })}\n
\n );\n })}\n
\n
\n
\n );\n}\n\nFaqPage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default FaqPage;\n","import React from \"react\";\nimport PropTypes from 'prop-types'\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faQuestion,\n faCheck,\n faBug,\n faSpinner\n} from \"@fortawesome/free-solid-svg-icons\";\n\nfunction ConfirmationAction({ confirmationAction, setConfirmationAction }) {\n\n const handleConfirmationAction = () => {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: true,\n }));\n }\n\n const handleCleanData = () => {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n data: \"\",\n infoBody: \"\",\n infoTittle: \"\",\n nameAction: \"\",\n response: \"\",\n text: \"\",\n info: false,\n }));\n }\n return (\n <>\n
\n
\n
\n\n
\n\n {confirmationAction.info && (\n
\n
\n\n

\n \n

\n\n
\n
\n\n {confirmationAction.infoBody}\n\n
\n
\n\n
\n
\n )}\n\n
\n
\n
\n\n {confirmationAction.response === \"default\" && ()}\n {confirmationAction.response === \"success\" && ()}\n {confirmationAction.response === \"error\" && ()}\n {confirmationAction.response === \"process\" && ()}\n\n
\n
\n
\n\n

\n {confirmationAction.text}\n

\n\n
\n
\n\n {confirmationAction.response !== \"success\" && (\n confirmationAction.response !== \"error\" && (\n <>\n \n \n \n ))}\n\n {(confirmationAction.response === \"success\" || confirmationAction.response === \"error\") && (\n \n )}\n
\n
\n\n
\n
\n
\n
\n\n \n \n )\n\n};\n\nConfirmationAction.propTypes = {\n confirmationAction: PropTypes.object.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n};\n\nexport default ConfirmationAction;","import React, { useEffect, useState } from \"react\";\nimport { useHistory, useParams, useLocation } from \"react-router-dom\";\nimport { formatAmount, parseFloatLocale } from \"../util/formatNumbers.js\";\nimport { formatDate2object } from \"../util/index.js\";\nimport NumberFormat from \"react-number-format\";\nimport { PropTypes } from \"prop-types\";\nimport \"../styles/global.css\";\nimport \"../styles/dailyReport.css\";\nimport moment from \"moment\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport ConfirmationAction from \"../components/modals/confirmationAction\"\n\nconst initState = {\n status: \"loading\",\n message: \"\",\n siteId: \"\",\n locationId: \"\",\n date: \"\",\n approved: false,\n};\n\nconst initTotals = {\n giftCardTotal: \"\",\n cashTotal: \"\",\n creditCardTotal: \"\",\n fullTotal: \"\",\n};\nconst initFormData = {\n openingCash: \"\",\n cashPayments: \"\",\n endingCashStore: \"\",\n};\nconst initFormDataClover = {\n cloverCreditCard: 0,\n cloverCash: 0,\n cloverTips: 0,\n};\nconst initEndingCashDif = formatAmount(0);\nconst initTotalEnding = {\n withdrawals: \"\",\n endingCash: \"\",\n tipTotal: \"\",\n};\nconst initEmployees = [];\nconst initEmployeesReview = [];\nconst initTotalEmployees = {\n totalEndingCashStore: 0,\n totalOpeningCash: 0,\n totalTips: 0,\n};\nconst initAppointmentTable = [];\nconst initPaymentAppointments = {\n cashAppointments: [],\n creditAppointments: [],\n discountAppointments: [],\n acumTipCash: 0,\n acumAmountCash: 0,\n acumTipCC: 0,\n acumAmountCC: 0,\n};\nconst initReasons = [{ reason: \"\", value: \"\" }];\nconst initObservations = \"\";\nconst initCreatedBy = \"\";\nconst initTipped = 0;\n\nfunction DailyReport({ appState }) {\n const [state, setState] = useState(initState);\n const [totals, setTotals] = useState(initTotals);\n const [formData, setFormData] = useState(initFormData);\n const [formDataClover, setFormDataClover] = useState(initFormDataClover);\n const [endigCashDiferent, setEndigCashDiferent] = useState(initEndingCashDif);\n const [totalEnding, setTotalEnding] = useState(initTotalEnding);\n const [employees, setEmployees] = useState(initEmployees);\n const [employeesReview, setEmployeesReview] = useState(initEmployeesReview);\n const [totalEmployees, setTotalEmployees] = useState(initTotalEmployees);\n const [appointmentsTable, setAppointmentsTable] =\n useState(initAppointmentTable);\n const [paymentAppointments, setPaymentAppointments] = useState(\n initPaymentAppointments\n );\n const [reasons, setReasons] = useState(initReasons);\n const [observations, setObservations] = useState(initObservations);\n const [createdBy, setCreatedBy] = useState(initCreatedBy);\n const [tipped, setTipped] = useState(initTipped);\n const [confirmationAction, setConfirmationAction] = useState({\n action: false,\n text: \"\",\n response: \"default\",\n nameAction: \"\",\n data: \"\",\n info: true,\n infoTittle: \"\",\n infoBody: \"\",\n });\n const [userSession,setUserSession] = useState({\n info: \"\",\n date: \"\",\n });\n \n const textResponse = {\n error: \"Oops, an error has occurred, contact your support team\",\n delete: \"Are you sure to delete appointment?\",\n successCancel: \"Appointment canceled successfully!\",\n };\n const params = useParams();\n\n const location = useLocation();\n\n const review = params.closeDate !== undefined;\n\n const handleReason = () => {\n setReasons([...reasons, { reason: \"\", value: \"\" }]);\n };\n\n const resetPage = () => {\n setTotals(initTotals);\n setFormDataClover(initFormDataClover);\n setEndigCashDiferent(initEndingCashDif);\n setFormData(initFormData);\n setEmployees(initEmployees);\n setTotalEnding(initTotalEnding);\n setTotalEmployees(initTotalEmployees);\n setEmployeesReview(initEmployeesReview);\n setPaymentAppointments(initPaymentAppointments);\n setAppointmentsTable(initAppointmentTable);\n setObservations(initObservations);\n setReasons(initReasons);\n setTipped(initTipped);\n setCreatedBy(initCreatedBy);\n };\n\n const clearForm = () => {\n setReasons([{ reason: \"\", value: \"\" }]);\n setFormData((formData) => ({\n ...formData,\n openingCash: \"\",\n endingCashStore: \"\",\n cashPayments: \"\",\n drawnerNotes: \"\",\n }));\n setShow(false);\n };\n\n const handleReasonsChange = ({ index, name, value }) => {\n const list = [...reasons];\n list[index][name] = value;\n setReasons(list);\n };\n\n const handleReasonDelete = (index) => {\n const list = [...reasons];\n list.splice(index, 1);\n setReasons(list);\n };\n\n const handleEmployeeChange = ({ index, name, value }) => {\n const listEmployee = [...employees];\n listEmployee[index][name] = value;\n\n const newListEmploye = [];\n let addTotalOpeningCashEmployee = 0;\n let addTotalEndingCashStoreEmployee = 0;\n let addCashEmployee = 0;\n let cashEmployee = 0;\n let employeEndingCashStore = 0;\n\n listEmployee.forEach((i) => {\n const employeeOpeningCashParseNumber = parseFloatLocale(\n i.employeeOpeningCash\n );\n\n if (review) {\n const apoimentsInfoCheckout = appointmentsTable\n .map((e) => {\n return e.infoCheckout;\n })\n .filter((e) => {\n return e.staffName === i.employeeName;\n });\n\n apoimentsInfoCheckout.forEach((eCash) => {\n addCashEmployee += eCash.cash;\n });\n\n cashEmployee = parseFloatLocale(roundWithEpsilon(addCashEmployee));\n employeEndingCashStore = employeeOpeningCashParseNumber + cashEmployee;\n } else {\n cashEmployee = parseFloatLocale(roundWithEpsilon(i.CashEmployee));\n employeEndingCashStore = employeeOpeningCashParseNumber + cashEmployee;\n }\n addTotalOpeningCashEmployee += isNaN(employeeOpeningCashParseNumber)\n ? 0\n : employeeOpeningCashParseNumber;\n addTotalEndingCashStoreEmployee += isNaN(employeEndingCashStore)\n ? 0\n : employeEndingCashStore;\n\n newListEmploye.push({\n arrivalEmployee: i.arrivalEmployee,\n checkOutEmployee: i.checkOutEmployee,\n employeeName: i.employeeName,\n employeeNotes: i.employeeNotes,\n tipEmployee: i.tipEmployee,\n CashEmployee: i.CashEmployee,\n employeeOpeningCash: employeeOpeningCashParseNumber,\n employeeEndingCashStore: isNaN(employeeOpeningCashParseNumber)\n ? formatAmount(0)\n : formatAmount(employeEndingCashStore),\n });\n });\n\n setEmployees(newListEmploye);\n setTotalEmployees((totalEmployees) => ({\n ...totalEmployees,\n totalOpeningCash: formatAmount(addTotalOpeningCashEmployee),\n totalEndingCashStore: formatAmount(addTotalEndingCashStoreEmployee),\n }));\n };\n\n const handleObservations = (e) => {\n const value = e.target.value;\n setObservations(value);\n };\n\n const handleCreatedBy = (e) => {\n const value = e.target.value;\n setCreatedBy(value);\n };\n\n const history = useHistory();\n const handleReject = () => {\n history.push(\"/reviewdailyreport\");\n };\n\n const reviewDate = params.closeDate !== undefined ? location.state.date : \"\";\n\n const handleCheckbox = (e, index) => {\n const { name } = e.target;\n const list = [...appointmentsTable];\n list[index][name] = !list[index][name];\n setAppointmentsTable(list);\n };\n\n const HandleAllEmailWhatsAppCheckboxes = (e) => {\n const { checked } = e.target;\n const newList = [];\n\n appointmentsTable.forEach((i) => {\n if (i.infoCheckout) {\n newList.push({\n appointmentDate: i.appointmentDate,\n appointmentId: i.appointmentId,\n arrived: i.arrived,\n cbff: i.cbff,\n clientName: i.clientName,\n email: i.email,\n emailSend: checked,\n completed: i.completed,\n infoCheckout: i.infoCheckout,\n files: i.files,\n formFilled: i.formFilled,\n locationId: i.locationId,\n notes: i.notes,\n serviceName: i.serviceName,\n siteId: i.siteId,\n sortDate: i.sortDate,\n weeks: i.weeks,\n });\n } else {\n newList.push({\n appointmentDate: i.appointmentDate,\n appointmentId: i.appointmentId,\n arrived: i.arrived,\n cbff: i.cbff,\n clientName: i.clientName,\n email: i.email,\n emailSend: checked,\n completed: i.completed,\n files: i.files,\n formFilled: i.formFilled,\n locationId: i.locationId,\n notes: i.notes,\n serviceName: i.serviceName,\n siteId: i.siteId,\n sortDate: i.sortDate,\n weeks: i.weeks,\n });\n }\n });\n\n setAppointmentsTable(newList);\n };\n\n const [show, setShow] = useState(false);\n\n const handleModalClose = (e) => {\n if (e.target.id === \"modal-background\") {\n setShow(false);\n }\n };\n\n const handleModalOpen = () => {\n setShow(true);\n };\n\n const closeModal = () => {\n setShow(false);\n };\n\n const handleChange = ({ name, value }) => {\n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n };\n\n const handleChangeClover = ({ name, value }) => {\n setFormDataClover((formDataClover) => ({\n ...formDataClover,\n [name]: value,\n }));\n };\n\n const handleSubmit = async (event) => {\n if (review) {\n putReview();\n } else {\n postForm();\n }\n };\n\n function timeComparison(a, b) {\n const timeFormat = /[0-9]{2}:[0-9]{2}/;\n try {\n if (\"appointmentDate\" in a) {\n a = a.appointmentDate;\n } else {\n return 1;\n }\n\n if (\"appointmentDate\" in b) {\n b = b.appointmentDate;\n } else {\n return -1;\n }\n\n let time = a.match(timeFormat);\n time = time[0];\n let tokens = time.split(\":\");\n let hours = parseInt(tokens[0], 10);\n let minutes = parseInt(tokens[1], 10);\n a = 60 * hours + minutes;\n\n time = b.match(timeFormat);\n time = time[0];\n tokens = time.split(\":\");\n hours = parseInt(tokens[0], 10);\n minutes = parseInt(tokens[1], 10);\n b = 60 * hours + minutes;\n\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else {\n return 0;\n }\n } catch (error) {\n return 0;\n }\n }\n\n const getReport = async () => {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n try {\n const ReportGetMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const qDate = moment(state.date).format(\"MM/DD/YYYY\").toString();\n console.log(\"date\", state.date);\n // console.log(\"qDate\", qDate);\n const reportResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${appState.nav.siteId}/locations/${appState.nav.locationId}/sales?sortDate=${qDate}`,\n ReportGetMethod\n );\n\n const reportData = await reportResponse.json();\n if (reportResponse.ok) {\n const list = [...reportData.Items];\n const eList = [];\n\n const paymentAppointments = {\n cashAppointments: [],\n creditAppointments: [],\n discountAppointments: [],\n acumTipCash: 0,\n acumAmountCash: 0,\n acumTipCC: 0,\n acumAmountCC: 0,\n };\n\n list.forEach((appointment) => {\n switch (appointment.infoCheckout) {\n case undefined:\n break;\n default:\n if (appointment.infoCheckout.cash > 0) {\n paymentAppointments.cashAppointments.push(appointment);\n paymentAppointments.acumTipCash += appointment.infoCheckout.tip;\n paymentAppointments.acumAmountCash +=\n appointment.infoCheckout.totalPurchase;\n }\n if (appointment.infoCheckout.creditCard > 0) {\n paymentAppointments.creditAppointments.push(appointment);\n paymentAppointments.acumTipCC += appointment.infoCheckout.tip;\n paymentAppointments.acumAmountCC +=\n appointment.infoCheckout.creditCard;\n }\n if (appointment.infoCheckout.discount > 0) {\n paymentAppointments.discountAppointments.push(appointment);\n }\n break;\n }\n });\n\n setPaymentAppointments(paymentAppointments);\n\n for (let i = 0; i < list.length; i++) {\n list[i].emailSend = false;\n\n if (\n \"cbff\" in list[i] &&\n list[i].cbff !== null &&\n list[i].cbff !== undefined\n ) {\n if (list[i].cbff.length < 6) {\n list[i].cbff = \"\";\n }\n }\n // if (\"arrived\" in list[i]) {\n // list[i].arrived = getTime(list[i].arrived);\n // }\n // if (\"completed\" in list[i]) {\n // list[i].completed = getTime(list[i].completed);\n // }\n // lista de empleados\n\n if (\"infoCheckout\" in list[i]) {\n const ttip = list[i].infoCheckout.tip;\n const tname = list[i].infoCheckout.staffName ?? \"Walkin\";\n const cash = list[i].infoCheckout.cash;\n let index = -1;\n for (let z = 0; z < eList.length; z++) {\n if (eList[z].employeeName === tname) {\n index = z;\n eList[z].tipEmployee += ttip;\n eList[z].CashEmployee += cash;\n }\n }\n if (index === -1 && tname !== \"Walkin\") {\n const temp = {};\n temp.employeeName = tname;\n temp.tipEmployee = ttip;\n temp.CashEmployee = cash;\n temp.arrivalEmployee = \"\";\n temp.checkOutEmployee = \"\";\n temp.employeeNotes = \"\";\n eList.push(temp);\n }\n }\n }\n\n list.sort(timeComparison);\n setAppointmentsTable(list);\n\n let addTipsEmployees = 0;\n for (let i = 0; i < eList.length; i++) {\n eList[i].tipEmployee = roundWithEpsilon(eList[i].tipEmployee);\n eList[i].CashEmployee = roundWithEpsilon(eList[i].CashEmployee);\n addTipsEmployees += eList[i].tipEmployee;\n }\n\n setTotalEmployees((totalEmployees) => ({\n ...totalEmployees,\n totalEndingCashStore: 0,\n totalOpeningCash: 0,\n totalTips: parseFloatLocale(roundWithEpsilon(addTipsEmployees)),\n }));\n\n setEmployees(eList);\n\n setTipped(eList.length);\n\n setFormData((formData) => ({\n ...formData,\n openingCash: !isNaN(reportData.openingCash)\n ? formatAmount(\n parseFloatLocale(roundWithEpsilon(reportData.openingCash))\n )\n : \"\",\n }));\n\n let localCloverCreditCard = 0;\n let localCloverTips = 0;\n let localCloverCash = 0;\n\n if (\"cloverCreditCard\" in reportData) {\n localCloverCreditCard = reportData.cloverCreditCard;\n }\n if (\"cloverTips\" in reportData) {\n localCloverTips = reportData.cloverTips;\n }\n if (\"cloverCash\" in reportData) {\n localCloverCash = reportData.cloverCash;\n }\n setFormDataClover((formDataClover) => ({\n ...formDataClover,\n cloverCreditCard: formatAmount(localCloverCreditCard),\n cloverTips: formatAmount(localCloverTips),\n cloverCash: formatAmount(localCloverCash),\n }));\n }\n } catch (error) {\n console.error(error);\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n };\n\n function getTime(timeString) {\n const timeFormat = /[0-9]{2}:[0-9]{2}/;\n let mTime;\n try {\n let time = timeString.match(timeFormat);\n time = time[0];\n const tokens = time.split(\":\");\n let hours = parseInt(tokens[0]);\n let minutes = parseInt(tokens[1]);\n let m = \"AM\";\n if (hours === 12) {\n m = \"PM\";\n } else if (hours === 24) {\n hours = 0;\n m = \"AM\";\n } else if (hours > 12) {\n hours -= 12;\n m = \"PM\";\n }\n hours = hours.toString();\n minutes = minutes.toString();\n while (hours.length < 2) hours = \"0\" + hours;\n while (minutes.length < 2) minutes = \"0\" + minutes;\n mTime = hours + \":\" + minutes + \" \" + m;\n } catch (error) {\n mTime = \"-\";\n }\n return mTime;\n }\n\n function roundWithEpsilon(numbeToRound) {\n return Math.round((numbeToRound + Number.EPSILON) * 100) / 100;\n }\n\n const updateTotals = () => {\n let giftCardTotal = 0;\n let cashTotal = 0;\n let creditCardTotal = 0;\n let fullTotal = 0;\n\n for (let i = 0; i < appointmentsTable.length; i++) {\n if (\"infoCheckout\" in appointmentsTable[i]) {\n if (\"giftCard\" in appointmentsTable[i].infoCheckout) {\n giftCardTotal += parseFloatLocale(\n appointmentsTable[i].infoCheckout.giftCard\n );\n }\n if (\"cash\" in appointmentsTable[i].infoCheckout) {\n cashTotal += parseFloatLocale(appointmentsTable[i].infoCheckout.cash);\n }\n if (\"creditCard\" in appointmentsTable[i].infoCheckout) {\n creditCardTotal += parseFloatLocale(\n appointmentsTable[i].infoCheckout.creditCard\n );\n }\n }\n }\n fullTotal = cashTotal + creditCardTotal;\n setTotals((totals) => ({\n ...totals,\n giftCardTotal: formatAmount(giftCardTotal),\n cashTotal: formatAmount(cashTotal),\n creditCardTotal: formatAmount(creditCardTotal),\n fullTotal: formatAmount(fullTotal),\n }));\n };\n\n const endingCashTotal = () => {\n let withdrawals = 0;\n let endingCash = 0;\n let endigCashDiferent = 0;\n\n let opening = parseFloatLocale(formData.openingCash);\n let payments = parseFloatLocale(totals.cashTotal);\n let endingCashStor = parseFloatLocale(formData.endingCashStore);\n\n opening = isNaN(opening) ? 0 : opening;\n payments = isNaN(payments) ? 0 : payments;\n endingCashStor = isNaN(endingCashStor) ? 0 : endingCashStor;\n\n const sum = opening + payments;\n\n for (let i = 0; i < reasons.length; i++) {\n if (reasons[i].value !== null && reasons[i].value.toString().length > 0) {\n withdrawals += parseFloatLocale(reasons[i].value);\n }\n }\n\n if (withdrawals === \"0\") {\n endingCash = sum;\n }\n if (withdrawals !== \"0\" && withdrawals !== \"\") {\n endingCash = sum - withdrawals;\n }\n if (withdrawals === \"\") {\n endingCash = 0;\n }\n\n const dif = endingCashStor - endingCash;\n endigCashDiferent = roundWithEpsilon(dif);\n setEndigCashDiferent(formatAmount(endigCashDiferent));\n\n let tipTotal = 0;\n for (let i = 0; i < employees.length; i++) {\n if (\n employees[i].tipEmployee !== null &&\n employees[i].tipEmployee.toString().length > 0\n ) {\n tipTotal += parseFloatLocale(employees[i].tipEmployee);\n }\n }\n\n setTotalEnding((totalEnding) => ({\n ...totalEnding,\n withdrawals: formatAmount(withdrawals),\n endingCash: formatAmount(endingCash),\n tipTotal: formatAmount(tipTotal),\n }));\n };\n\n const downloadFile = (url) => {\n const link = document.createElement(\"a\");\n link.href = url;\n const qDate = formatDate2object(new Date(state.date));\n const name =\n \"DailyReport-\" +\n appState.nav.siteId +\n \"-\" +\n appState.nav.locationId +\n \"-\" +\n qDate.mm +\n \"\" +\n qDate.dd +\n \"\" +\n qDate.yyyy +\n \".pdf\";\n link.setAttribute(\"download\", name);\n document.body.appendChild(link);\n link.click();\n link.parentNode.removeChild(link);\n };\n\n const postForm = async () => {\n try {\n const valueReasonsParseFloat = [];\n reasons.forEach((i) => {\n valueReasonsParseFloat.push({\n reason: i.reason,\n value: isNaN(parseFloatLocale(i.value))\n ? 0\n : parseFloatLocale(i.value),\n });\n });\n\n const infoForm = {\n sortDate: moment(state.date).format(\"MM/DD/YYYY\").toString(),\n cashTotal: parseFloatLocale(totals.cashTotal),\n creditCardTotal: parseFloatLocale(totals.creditCardTotal),\n giftCardTotal: !totals.giftCard ? 0 : parseFloatLocale(totals.giftCard),\n tipTotal: parseFloatLocale(totalEnding.tipTotal),\n openingCash: parseFloatLocale(formData.openingCash),\n endingCashDiferen: parseFloatLocale(endigCashDiferent),\n endingCashStore: !formData.endingCashStore\n ? 0\n : parseFloatLocale(formData.endingCashStore),\n endingCash: parseFloatLocale(totalEnding.endingCash),\n withdrawals: parseFloatLocale(totalEnding.withdrawals),\n fullTotal: parseFloatLocale(totals.fullTotal),\n cashPayments: parseFloatLocale(totals.cashTotal),\n infoReasons: valueReasonsParseFloat,\n infoEmployee: employees,\n appointments: appointmentsTable,\n locationName: appState.nav.siteName,\n observation: observations,\n createdBy: createdBy,\n cloverTips: parseFloatLocale(formDataClover.cloverTips),\n cloverCreditCard: parseFloatLocale(formDataClover.cloverCreditCard),\n cloverCash: parseFloatLocale(formDataClover.cloverCash),\n };\n\n const postMethod = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(infoForm),\n };\n const qDate = moment(state.date).format(\"MM/DD/YYYY\").toString();\n\n const responseInfo = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${appState.nav.siteId}/locations/${appState.nav.locationId}/close?sortDate=${qDate}`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n if (\"url\" in info) {\n downloadFile(info.url);\n }\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const defineDisplay = (time) => {\n if (!time) return \"\";\n const dt = new Date(\"9999-12-31 \" + time);\n let hours = dt.getHours();\n const AmOrPm = hours >= 12 ? \"p.m\" : \"a.m\";\n hours = hours % 12 || 12;\n hours = hours <= 9 ? \"0\" + hours : hours;\n let minutes = dt.getMinutes();\n minutes = minutes <= 9 ? \"0\" + minutes : minutes;\n return hours + \":\" + minutes + \" \" + AmOrPm;\n };\n\n const setArrivalCheckoutDisplays = () => {\n const employeesReviewSend = employeesReview;\n employeesReviewSend.forEach((employee, i) => {\n employeesReviewSend[i] = {\n ...employee,\n arrivalEmployeeDisplay: defineDisplay(employee.arrivalEmployee),\n checkOutEmployeeDisplay: defineDisplay(employee.checkOutEmployee),\n };\n });\n setEmployeesReview(employeesReviewSend);\n };\n\n const putReview = async () => {\n try {\n const valueReasonsParseFloat = [];\n reasons.forEach((i) => {\n valueReasonsParseFloat.push({\n reason: i.reason,\n value: isNaN(parseFloatLocale(i.value))\n ? 0\n : parseFloatLocale(i.value),\n });\n });\n setArrivalCheckoutDisplays();\n\n const infoReview = {\n sortDate: location.state.date,\n cashTotal: parseFloatLocale(totals.cashTotal),\n creditCardTotal: parseFloatLocale(totals.creditCardTotal),\n giftCardTotal: !totals.giftCard ? 0 : parseFloatLocale(totals.giftCard),\n tipTotal: parseFloatLocale(totalEnding.tipTotal),\n openingCash: parseFloatLocale(formData.openingCash),\n endingCash: parseFloatLocale(totalEnding.endingCash),\n endingCashDiferen: parseFloatLocale(endigCashDiferent),\n endingCashStore: parseFloatLocale(formData.endingCashStore),\n infoReasons: valueReasonsParseFloat,\n fullTotal: parseFloatLocale(totals.fullTotal),\n cashPayments: parseFloatLocale(totals.cashTotal),\n infoEmployee: employeesReview,\n withdrawals: parseFloatLocale(totalEnding.withdrawals),\n approved: true,\n appointments: appointmentsTable,\n locationName: location.state.locationName,\n observation: observations,\n createdBy: createdBy,\n cloverTips: parseFloatLocale(formDataClover.cloverTips),\n cloverCreditCard: parseFloatLocale(formDataClover.cloverCreditCard),\n cloverCash: parseFloatLocale(formDataClover.cloverCash),\n };\n\n const putMethodReview = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(infoReview),\n };\n\n const responsePut = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${location.state.siteId}/locations/${location.state.locationId}/dailyClose`,\n putMethodReview\n );\n\n if (responsePut.ok) {\n console.log(\"se envio\");\n getPDF();\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const getPDF = async () => {\n try {\n const ReportGetPDF = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const reportPDF = await fetch(\n `${process.env.REACT_APP_API_URL}/api/pdf/sites/${location.state.siteId}/locations/${location.state.locationId}/dailyClosePdf?sortDate=${location.state.date}`,\n ReportGetPDF\n );\n\n if (reportPDF.ok) {\n const responsePDF = await reportPDF.json();\n setState((state) => ({\n ...state,\n approved: true,\n status: \"success\",\n message:\n responsePDF.message || \"El review fue procesado exitosamente\",\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const getLocationTime = async () => {\n try {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n\n const getSitesQuery = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n getSitesQuery\n );\n const data = await response.json();\n if (response.ok) {\n const mySite = `${appState.nav.siteId}-${appState.nav.locationId}`;\n\n const foundedSite = data.sites.find((item) => item.site === mySite);\n if (foundedSite === undefined) {\n alert(\"No existe el sitio\");\n } else {\n const localDate = new Date();\n const siteDate = new Date(\n localDate.toLocaleString(\"en-US\", {\n timeZone: foundedSite.timeZone,\n })\n );\n console.table([\n { name: \"hora local\", value: localDate },\n { name: \"hora sitio\", value: siteDate },\n ]);\n setState((state) => ({\n ...state,\n date: siteDate,\n }));\n }\n } else {\n console.log(\"Fallo al obtener las fechas\");\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n useEffect(() => {\n clearForm();\n resetPage();\n if (review) {\n setState((state) => ({\n ...state,\n siteId: location.state.siteId,\n locationId: location.state.locationId,\n date: location.state.date,\n approved: location.state.approved,\n }));\n calculateReviewReport();\n } else {\n getLocationTime();\n }\n }, [params.closeDate, appState.nav.siteId]);\n\n useEffect(() => {\n if (review && confirmationAction.response === \"success\") {\n clearForm();\n resetPage();\n calculateReviewReport();\n } \n }, [confirmationAction.response]);\n\n const calculateReviewReport = async () => {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n try {\n const ReportGetMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const reportResponseReview = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${location.state.siteId}/locations/${location.state.locationId}/dailyClose?sortDate=${location.state.date}`,\n ReportGetMethod\n );\n\n const data = await reportResponseReview.json();\n\n if (reportResponseReview.ok) {\n const list = [...data.Item.appointments];\n const listReviewEmloyee = [];\n const listInfoEmployee = [data.Item];\n const eList = [];\n\n listInfoEmployee.forEach((i) => {\n i.infoEmployee.forEach((e) => {\n listReviewEmloyee.push({\n CashEmployee: e.CashEmployee,\n arrivalEmployee: e.arrivalEmployee,\n checkOutEmployee: e.checkOutEmployee,\n employeeEndingCashStore: parseFloatLocale(\n e.employeeEndingCashStore\n ),\n employeeName: e.employeeName,\n employeeNotes: e.employeeNotes,\n employeeOpeningCash: isNaN(e.employeeOpeningCash)\n ? 0\n : parseFloatLocale(e.employeeOpeningCash),\n tipEmployee: e.tipEmployee,\n });\n });\n });\n\n setEmployeesReview(listReviewEmloyee);\n\n const paymentAppointments = {\n cashAppointments: [],\n creditAppointments: [],\n discountAppointments: [],\n acumTipCash: 0,\n acumAmountCash: 0,\n acumTipCC: 0,\n acumAmountCC: 0,\n };\n\n setCreatedBy(data.Item.createdBy);\n\n list.forEach((appointment) => {\n switch (appointment.infoCheckout) {\n case undefined:\n break;\n default:\n if (appointment.infoCheckout.cash > 0) {\n paymentAppointments.cashAppointments.push(appointment);\n paymentAppointments.acumTipCash += appointment.infoCheckout.tip;\n paymentAppointments.acumAmountCash +=\n appointment.infoCheckout.cash;\n }\n if (appointment.infoCheckout.creditCard > 0) {\n paymentAppointments.creditAppointments.push(appointment);\n paymentAppointments.acumTipCC += appointment.infoCheckout.tip;\n paymentAppointments.acumAmountCC +=\n appointment.infoCheckout.creditCard;\n }\n if (appointment.infoCheckout.discount > 0) {\n paymentAppointments.discountAppointments.push(appointment);\n }\n break;\n }\n });\n setPaymentAppointments(paymentAppointments);\n\n for (let i = 0; i < list.length; i++) {\n if (\n \"cbff\" in list[i] &&\n list[i].cbff !== null &&\n list[i].cbff !== undefined\n ) {\n if (list[i].cbff.length < 6) {\n list[i].cbff = \"\";\n }\n }\n // if (\"arrived\" in list[i]) {\n // list[i].arrived = getTime(list[i].arrived);\n // }\n // if (\"completed\" in list[i]) {\n // list[i].completed = getTime(list[i].completed);\n // }\n // lista de empleados\n\n if (\"infoCheckout\" in list[i]) {\n const ttip = list[i].infoCheckout.tip;\n const tname = list[i].infoCheckout.staffName ?? \"Walkin\";\n const cash = list[i].infoCheckout.cash;\n\n let index = -1;\n for (let z = 0; z < eList.length; z++) {\n if (eList[z].employeeName === tname) {\n index = z;\n eList[z].tipEmployee += ttip;\n eList[z].CashEmployee += cash;\n }\n }\n if (index === -1 && tname !== \"Walkin\") {\n const temp = {};\n temp.employeeName = tname;\n temp.tipEmployee = ttip;\n temp.CashEmployee = cash;\n temp.arrivalEmployee = \"\";\n temp.checkOutEmployee = \"\";\n temp.employeeNotes = \"\";\n eList.push(temp);\n }\n }\n }\n list.sort(timeComparison);\n setAppointmentsTable(list);\n\n let addTipsEmployees = 0;\n for (let i = 0; i < eList.length; i++) {\n eList[i].tipEmployee = roundWithEpsilon(eList[i].tipEmployee);\n eList[i].CashEmployee = roundWithEpsilon(eList[i].CashEmployee);\n addTipsEmployees += eList[i].tipEmployee;\n }\n\n let totalEmployeeEndingCashStore = 0;\n let totalEmployeeOpeningCash = 0;\n\n listReviewEmloyee.forEach((e) => {\n totalEmployeeEndingCashStore += e.employeeEndingCashStore;\n totalEmployeeOpeningCash += e.employeeOpeningCash;\n });\n\n setTotalEmployees((totalEmployees) => ({\n ...totalEmployees,\n totalEndingCashStore: isNaN(totalEmployeeEndingCashStore)\n ? 0\n : parseFloatLocale(roundWithEpsilon(totalEmployeeEndingCashStore)),\n totalOpeningCash: isNaN(totalEmployeeOpeningCash)\n ? 0\n : parseFloatLocale(roundWithEpsilon(totalEmployeeOpeningCash)),\n totalTips: parseFloatLocale(roundWithEpsilon(addTipsEmployees)),\n }));\n\n setEmployees(eList);\n\n setTipped(eList.length);\n\n setFormData((formData) => ({\n ...formData,\n openingCash: !isNaN(data.Item.openingCash)\n ? formatAmount(\n parseFloatLocale(roundWithEpsilon(data.Item.openingCash))\n )\n : \"\",\n endingCashStore: !isNaN(data.Item.endingCashStore)\n ? formatAmount(\n parseFloatLocale(roundWithEpsilon(data.Item.endingCashStore))\n )\n : \"\",\n }));\n\n const reasons = [...data.Item.infoReasons];\n // reasons[0].value = parseFloatLocale(data.Item.withdrawals);\n setReasons(reasons);\n\n setObservations(data.Item.observation);\n\n let localCloverCreditCard = 0;\n let localCloverTips = 0;\n let localCloverCash = 0;\n\n if (\"cloverCreditCard\" in data.Item) {\n localCloverCreditCard = data.Item.cloverCreditCard;\n }\n if (\"cloverTips\" in data.Item) {\n localCloverTips = data.Item.cloverTips;\n }\n if (\"cloverCash\" in data.Item) {\n localCloverCash = data.Item.cloverCash;\n }\n setFormDataClover((formDataClover) => ({\n ...formDataClover,\n cloverCreditCard: formatAmount(localCloverCreditCard),\n cloverTips: formatAmount(localCloverTips),\n cloverCash: formatAmount(localCloverCash),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n // END OF CALCULATE REVIEW REPORT\n };\n\n useEffect(() => {\n if (!review && state.date !== \"\") {\n getReport();\n }\n }, [state.date]);\n\n useEffect(() => {\n if (!review) {\n updateTotals();\n } else {\n updateTotals();\n endingCashTotal();\n }\n }, [appointmentsTable, review]);\n\n useEffect(() => {\n endingCashTotal();\n }, [\n reasons,\n employees,\n formData.openingCash,\n formData.endingCashStore,\n formData.cashPayments,\n review,\n ]);\n\n useEffect(() => {\n endingCashTotal();\n }, [formData.openingCash]);\n\n useEffect(() => {\n function reasonUpdate() {\n let totalTip = 0;\n for (let i = 0; i < employees.length; i++) {\n if (\n employees[i].tipEmployee !== null &&\n employees[i].tipEmployee.toString().length > 0\n ) {\n totalTip += parseFloatLocale(employees[i].tipEmployee);\n }\n }\n totalTip = roundWithEpsilon(totalTip);\n const r = reasons;\n r[0].reason = \"Tip\";\n r[0].value = totalTip;\n setReasons(r);\n endingCashTotal();\n }\n if (!review) {\n reasonUpdate();\n }\n }, [employees]);\n\n \n useEffect(() => {\n\n let userName;\n\n const auth = {\n single: appState.singleAuth,\n directors: appState.directorsAuth,\n booking: appState.bookingAuth\n }\n\n const searchBySite = `${state.siteId}-${state.locationId}`;\n if (auth.single) {\n if (auth.single.userName !== null) userName = auth.single;\n }\n if (auth.booking.authorizationTokens.length > 0) {\n userName = auth.booking.authorizationTokens.find(i => `${i.siteId}-${i.locationId}` === searchBySite);\n }\n if (auth.directors.locationsAuth.length > 0) {\n userName = auth.directors.locationsAuth.find(i => `${i.siteId}-${i.locationId}` === searchBySite);\n }\n\n setUserSession((userSession) => ({\n ...userSession,\n info : userName\n }));\n\n },[state,userSession.info])\n\n const handleDeleteServiceWalkin = async (data) => {\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"\"\n }))\n\n try {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n response: \"process\",\n }))\n const payload = {\n appointmentId: data.appointmentId,\n locationId: state.locationId,\n userName: userSession.info.userName,\n userRol: userSession.info.userRol\n };\n \n const request = {\n method: \"DELETE\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n \n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/sites/${state.siteId}/sales`,\n request\n );\n \n if (response.ok && response.status === 202) {\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"success\",\n text: textResponse.successCancel,\n data: \"\",\n nameAction: \"\"\n }))\n \n }else{\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: textResponse.error,\n data: \"\",\n nameAction: \"\"\n }));\n\n }\n } catch (error) {\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: error.message,\n data: \"\",\n nameAction: \"\"\n }));\n\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n\n }\n\n }\n\n useEffect(() => {\n\n if (confirmationAction.action && confirmationAction.nameAction === \"delete\") {\n handleDeleteServiceWalkin(confirmationAction.data)\n }\n\n }, [confirmationAction, confirmationAction.nameAction,confirmationAction.response])\n\n const estiloDiv = {\n color: \"red\",\n };\n\n const estiloOk = {\n color: \"green\",\n };\n\n const estiloNormal = {\n color: \"black\",\n };\n\n return (\n\n
\n \n\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {(state.status === \"ready\" || state.status === \"success\") && (\n
\n
\n {review && (\n \n Review Daily Report\n \n )}\n {!review && (\n \n Daily Report\n \n )}\n\n
\n
\n
\n {review && <>{location.state.locationName}}\n {!review && <>{appState.nav.siteName}}\n
\n {review && (\n
\n {reviewDate}\n
\n )}\n {!review && (\n
\n {moment(state.date).format(\"MM/DD/YYYY hh:mm A\")}\n
\n )}\n
\n
\n\n
\n
\n
\n
Billing Report
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Clover Control
\n
\n
\n
\n \n \n handleChangeClover({\n name: \"cloverCreditCard\",\n value: e.formattedValue,\n })\n }\n data-cy=\"input-clover-credit-card\"\n value={formDataClover.cloverCreditCard}\n />\n
\n\n
\n \n \n handleChangeClover({\n name: \"cloverCash\",\n value: e.formattedValue,\n })\n }\n data-cy=\"input-clover-cash\"\n value={formDataClover.cloverCash}\n />\n
\n\n
\n \n \n handleChangeClover({\n name: \"cloverTips\",\n value: e.formattedValue,\n })\n }\n data-cy=\"input-clover-tips\"\n value={formDataClover.cloverTips}\n />\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Drawer Control
\n
\n
\n
\n \n \n handleChange({\n name: \"openingCash\",\n value: e.formattedValue,\n })\n }\n />\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n\n
\n \n \n handleChange({\n name: \"endingCashStore\",\n value: e.formattedValue,\n })\n }\n data-cy=\"input-ending-cash-store\"\n value={formData.endingCashStore}\n />\n
\n\n
\n \n = 3\n ? estiloOk\n : parseFloatLocale(endigCashDiferent) <= -3\n ? estiloDiv\n : estiloNormal\n }\n type=\"text\"\n className=\"form-control text-end\"\n aria-describedby=\"endigCashDiferent\"\n name=\"endigCashDiferent\"\n value={endigCashDiferent}\n data-cy=\"input-ending-cash-diferent\"\n readOnly\n />\n
\n\n {reasons.map((reason, i) => {\n return (\n
\n \n
\n
\n \n handleReasonsChange({\n index: i,\n name: \"reason\",\n value: e.target.value,\n })\n }\n readOnly={i === 0}\n />\n
\n
\n \n handleReasonsChange({\n index: i,\n name: \"value\",\n value: e.formattedValue,\n })\n }\n value={reason.value}\n />\n
\n
\n
\n );\n })}\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n Employee Schedule Control\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Employee\n \n Arrival\n \n Check-out\n \n Tip\n \n OpeningCash\n \n EndingCash\n
\n {review && (\n
\n {employeesReview.map((employee, i) => {\n return (\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"employeeName\",\n value: e.target.value,\n })\n }\n readOnly={i < tipped || review}\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"arrivalEmployee\",\n value: e.target.value,\n })\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"checkOutEmployee\",\n value: e.target.value,\n })\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"tipEmployee\",\n value: e.formattedValue,\n })\n }\n data-cy={`input-tip-employee-${i}`}\n value={employee.tipEmployee}\n readOnly={\n i < tipped ||\n (employee.employeeName !== null &&\n employee.employeeName.length < 5) ||\n review\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"employeeOpeningCash\",\n value: e.formattedValue,\n })\n }\n data-cy={`input-openingcash-employee-${i}`}\n value={employee.employeeOpeningCash}\n />\n
\n
\n \n
\n
\n );\n })}\n
\n )}\n {!review && (\n
\n {employees.map((employee, i) => {\n return (\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"employeeName\",\n value: e.target.value,\n })\n }\n readOnly={i < tipped || review}\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"arrivalEmployee\",\n value: e.target.value,\n })\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"checkOutEmployee\",\n value: e.target.value,\n })\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"tipEmployee\",\n value: e.formattedValue,\n })\n }\n data-cy={`input-tip-employee-${i}`}\n value={employee.tipEmployee}\n readOnly={\n i < tipped ||\n (employee.employeeName !== null &&\n employee.employeeName.length < 5) ||\n review\n }\n />\n
\n
\n \n handleEmployeeChange({\n index: i,\n name: \"employeeOpeningCash\",\n value: e.formattedValue,\n })\n }\n data-cy={`input-openingcash-employee-${i}`}\n value={employee.openingCash}\n />\n
\n
\n \n
\n
\n );\n })}\n
\n )}\n
\n
\n
\n
\n Total\n
\n
\n {totalEmployees.totalTips}\n
\n
\n {totalEmployees.totalOpeningCash}\n
\n
\n {totalEmployees.totalEndingCashStore}\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n Observations\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n

\n Clients Check in - Check out Times\n

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n {review && (\n \n )}\n \n \n \n {appointmentsTable.map((appointment, i) => {\n return (\n \n \n \n \n \n \n \n \n \n \n {review && (\n \n )}\n \n );\n })}\n \n
\n Appoitment Time\n \n Name\n \n Check-in\n \n Check-out\n \n Files\n \n Email  \n \n HandleAllEmailWhatsAppCheckboxes(e)\n }\n data-cy={`check-all-forms-table`}\n name=\"checkAll\"\n id=\"checkAll\"\n />\n WhatsApp\n \n Form\n \n CBFF\n \n Service\n \n {\"\"}\n
\n {getTime(appointment.appointmentDate)}\n \n {appointment.clientName}\n \n {getTime(appointment.arrived)}\n \n {getTime(appointment.completed)}\n {appointment.files}\n handleCheckbox(e, i)}\n data-cy={`check-email-table-${i}`}\n name=\"emailSend\"\n id=\"emailSend\"\n checked={appointment.emailSend}\n />\n \n handleCheckbox(e, i)}\n data-cy={`check-form-table-${i}`}\n name=\"formFilled\"\n id=\"form\"\n checked={appointment.formFilled}\n />\n {appointment.cbff}\n {appointment.serviceName}\n \n { /* appointment.clientName?.toLowerCase().replace(/[-.()+\\s]/g, \"\").search(\"walkin\") === 0 ? */\n !state.approved ?\n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"delete\",\n text: textResponse.delete,\n response: \"default\",\n data: appointment,\n info: true,\n infoTittle: `${appointment.clientName}`,\n infoBody:\n <>\n
\n Email: {appointment.email}\n
\n
\n Service: {appointment.serviceName}\n
\n \n }))\n }} \n />\n :\n
\n }\n
\n
\n
\n
\n\n
\n
\n

Cash payments

\n
\n \n \n \n \n \n \n \n \n \n \n \n {paymentAppointments.cashAppointments.map(\n (appointment, i) => {\n return (\n \n \n \n \n \n \n \n );\n }\n )}\n \n\n \n \n \n\n \n \n \n \n \n \n
\n Client Name\n \n Service\n \n Staff Name\n \n Tip\n \n Amount\n
\n {\" \"}\n {appointment.clientName}{\" \"}\n \n {appointment.serviceName}\n \n {appointment.infoCheckout.staffName}\n \n {formatAmount(\n parseFloatLocale(appointment.infoCheckout.tip)\n )}\n \n {formatAmount(\n parseFloatLocale(\n appointment.infoCheckout.cash\n )\n )}\n
\n Total\n \n {roundWithEpsilon(paymentAppointments.acumTipCash)}\n \n {roundWithEpsilon(paymentAppointments.acumAmountCash)}\n
\n
\n
\n
\n\n
\n
\n

\n Credit Card payments\n

\n
\n \n \n \n \n \n \n \n \n \n \n \n {paymentAppointments.creditAppointments.map(\n (appointment, i) => {\n return (\n \n \n \n \n \n \n \n );\n }\n )}\n \n \n \n \n\n \n \n \n \n \n \n
\n Client Name\n \n Service\n \n Staff Name\n \n Tip\n \n Amount\n
\n {\" \"}\n {appointment.clientName}{\" \"}\n \n {appointment.serviceName}\n \n {appointment.infoCheckout.staffName}\n \n {formatAmount(\n parseFloatLocale(appointment.infoCheckout.tip)\n )}\n \n {formatAmount(\n parseFloatLocale(\n appointment.infoCheckout.creditCard\n )\n )}\n
\n Total\n \n {roundWithEpsilon(paymentAppointments.acumTipCC)}\n \n {roundWithEpsilon(paymentAppointments.acumAmountCC)}\n
\n
\n
\n
\n\n
\n
\n

Discounts

\n
\n \n \n \n \n \n \n \n \n \n \n \n {paymentAppointments.discountAppointments.map(\n (appointment, i) => {\n return (\n \n \n \n \n \n \n \n );\n }\n )}\n \n
\n Client Name\n \n Service\n \n Staff Name\n \n Reason\n \n Discount\n
\n {\" \"}\n {appointment.clientName}{\" \"}\n \n {appointment.serviceName}\n \n {appointment.infoCheckout.staffName}\n \n {appointment.infoCheckout.discountReasons}\n \n {formatAmount(\n parseFloatLocale(\n appointment.infoCheckout.discount\n )\n )}\n
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n \n {review && <>Approve}\n {!review && <>Accept}\n \n {review && (\n \n Reject\n \n )}\n {!review && (\n \n Cancel\n \n )}\n
\n
\n {state.status === \"success\" && (\n \n {state.message}\n
\n )}\n \n
\n\n \n
\n
\n )}\n \n );\n}\n\nDailyReport.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default DailyReport;\n","export const ItemTypes = {\n APPOINTMENT: 'appointment',\n}\n","import React from 'react'\nimport { ItemTypes } from './ItemTypes'\nimport { useDrop } from 'react-dnd'\nimport { PropTypes } from \"prop-types\";\n\nfunction DroppableSidebar({ updateFunction }) {\n const [{canDrop }, drop] = useDrop(() => ({\n accept: ItemTypes.APPOINTMENT,\n drop: (item, monitor) => {\n updateFunction(item)},\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n }))\n\n return (\n  \n {canDrop && (\n \n Drop appointment here\n \n )}\n \n );\n}\n\nDroppableSidebar.propTypes = {\n block: PropTypes.object,\n updateFunction: PropTypes.func,\n};\nexport default DroppableSidebar","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { useDrag } from 'react-dnd';\nimport { ItemTypes } from './ItemTypes'\n\nfunction DraggableSidebar({ appointment}) {\n const [{isDragging}, drag] = useDrag(() => ({\n type: ItemTypes.APPOINTMENT,\n item: appointment,\n collect: monitor => ({\n isDragging: !!monitor.isDragging(),\n }),\n }));\n\n return (\n \n {appointment.name +\": \" +appointment.sessionTypeName}\n \n );\n}\n\nDraggableSidebar.propTypes = {\n appointment: PropTypes.object,\n};\nexport default DraggableSidebar;","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { useDrag } from 'react-dnd';\nimport { ItemTypes } from './ItemTypes'\n\nfunction DraggableBlock({ appointment, isWeekRange, displayAll, blocks, indice, customClass }) {\n const [{isDragging}, drag] = useDrag(() => ({\n type: ItemTypes.APPOINTMENT,\n item: appointment,\n collect: monitor => ({\n isDragging: !!monitor.isDragging(),\n }),\n }));\n\n const hideName = ( appointment, blocks, indice) => {\n let hide = false;\n \n if(indice > 0 && indice < blocks.length-1){\n if(blocks[indice-1].appointment.id !== undefined){\n if(blocks[indice-1].appointment.id === appointment.id){\n hide = true;\n }\n }\n }\n if(indice === blocks.length){\n if(blocks[indice-1].appointment.id !== undefined){\n if(blocks[indice-1].appointment.id === appointment.id){\n hide = true;\n }\n }\n }\n return hide;\n };\n \n return (\n \n {isWeekRange && !hideName(appointment, blocks, indice) && (appointment.name +\": \" +appointment.sessionTypeName)}\n {displayAll && !hideName(appointment, blocks, indice) && !isWeekRange && (appointment.name +\": \" +appointment.sessionTypeName)}\n {!displayAll && !hideName(appointment, blocks, indice) && !isWeekRange && (appointment.name +\": \" +appointment.sessionTypeName)}\n {hideName(appointment, blocks, indice) && (\"\\u00a0\")}\n \n );\n}\n\nDraggableBlock.propTypes = {\n appointment: PropTypes.object,\n isWeekRange: PropTypes.bool,\n displayAll: PropTypes.bool,\n blocks: PropTypes.array,\n indice: PropTypes.number,\n type: PropTypes.string,\n customClass: PropTypes.string,\n};\nexport default DraggableBlock;","import React from 'react'\nimport { ItemTypes } from './ItemTypes'\nimport { useDrop } from 'react-dnd'\nimport { PropTypes } from \"prop-types\";\nimport moment from \"moment\";\n\nfunction DroppableBlock({ block, updateFunction }) {\n const [{ isOver }, drop] = useDrop(() => ({\n accept: ItemTypes.APPOINTMENT,\n drop: (item, monitor) => {\n if((item.status === \"Booked\" || item.status === \"Confirmed\" || item.status === \"NoShow\")){\n updateFunction(item.id, moment(block.blockDate).format(\"YYYY-MM-DD[T]HH:mm:ss\").toString(), moment(block.blockDate).add(30, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\").toString(), item.sessionTypeId, item.notes, block.staffId, block.authorization, block.siteId, block.locationId, block.isWeekRange) \n }\n },\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n }))\n\n return (\n  \n {isOver && (\n \n )}\n \n );\n}\n\nDroppableBlock.propTypes = {\n block: PropTypes.object,\n updateFunction: PropTypes.func,\n};\nexport default DroppableBlock","import React from \"react\";\nimport PropTypes from 'prop-types'\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {faExclamationTriangle} from \"@fortawesome/free-solid-svg-icons\";\n\nfunction HoverCard({ cardClass, appointment, segment, endSegment }) {\n\n return (\n <>\n
\n
\n {appointment.name}\n {appointment.phone}\n
\n\n
\n {appointment.sessionTypeName}\n
\n\n
\n {`${segment} - ${endSegment}`}\n
\n\n
\n \n
\n\n
\n \n \n   {appointment.redAlert}\n \n\n \n \n  {appointment.formFilled}\n \n
\n
\n \n )\n\n};\n\nHoverCard.propTypes = {\n cardClass: PropTypes.string.isRequired,\n appointment: PropTypes.object.isRequired,\n segment: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n};\n\nexport default HoverCard;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\nimport DraggableBlock from \"./draggableBlock\";\nimport DroppableBlock from \"./droppableBlock\";\nimport HoverCard from \"./hoverCard\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction DnaBlock({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChange,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n searchClientVisits\n}) {\n return (\n <>\n {appointments.map((appt)=>{\n return(\n <>\n {appt.sessionTypeName === undefined && (\n <>\n {setHoverIndex(\"\" + id + appt.id);}}\n onMouseLeave={() =>setHoverIndex(\"\")}\n >\n {available && (\n \n )}\n {!available && (\n
\n {`${getBlockDescription(available,roomAppointments.blocks,index)}`}\n
\n )}\n \n {available && (\n \n {handleSidebarChange(segment,roomAppointments.staffId,available ? \"searchOrCreateClient\" : \"restricted\",blockDate,null,id);}}\n >\n Book appointment\n \n \n )}\n \n )}\n {appt.sessionTypeName !== undefined && (<>\n {setHoverIndex(\"\" + id + appt.id);}}\n onMouseLeave={() =>setHoverIndex(\"\")}\n >\n \n {hoverIndex ===\"\" + id + appt.id && (\n \n )}\n \n\n \n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"cancel\",\n text: textResponse.cancel,\n data: appt,\n response: \"default\",\n info: true,\n infoTittle: `${appt.firstName} ${appt.lastName}, ${appt.sessionTypeName}`,\n infoBody:<>\n
\n Date: {moment(startDate).format(\"YY-MM-DD\")}, \n {moment(appt.StartDateTime).format(\"hh:mm A\")} - {moment(appt.endDateTime).format(\"hh:mm A\")}\n
\n
\n Phone: {appt.phone}\n
\n
\n Email: {appt.email}\n
\n \n }))\n }}\n >\n Cancel\n \n {confirmAppointment(appt.id);}}>\n Confirm\n \n handleSidebarChange(segment,roomAppointments.staffId,\"editAppointment\",blockDate,appt,id)}>\n Edit / Reschedule\n \n viewLastVisit(appt)}>\n Last Visit\n \n {searchClientVisits(appt.clientId); handleClose()}}\n >\n Visits History\n \n )}\n \n )\n })}\n \n );\n}\n\nDnaBlock.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChange: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n searchClientVisits: PropTypes.func.isRequired,\n};\n\nexport default DnaBlock;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\nimport DraggableBlock from \"./draggableBlock\";\nimport DroppableBlock from \"./droppableBlock\";\nimport HoverCard from \"./hoverCard\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction DnaBlockW({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChangeWeek,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n dayIndex,\n displayableBlocks,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n onClickArgument,\n}) {\n return (\n <>\n {appointments.map((appt)=>{\n return(\n <>\n {appt.sessionTypeName === undefined && (\n <>\n { setHoverIndex( \"\" + id + appt.id );}}\n onMouseLeave={() => setHoverIndex(\"\")}\n >\n {available && (\n \n )}\n {!available && (\n <>\n {\"\" + getBlockDescription(available,roomAppointments.blocks,index)}\n \n )}\n \n {available && (\n \n {\n // clearSidebar();\n handleSidebarChangeWeek(\n segment,\n displayableBlocks.staffId,\n available\n ? \"searchOrCreateClient\"\n : \"restricted\",\n blockDate,\n null,\n id,\n roomAppointments.index\n );\n }\n }\n >\n Book appointment\n \n \n )}\n \n )}\n {appt.sessionTypeName !== undefined && (\n <>\n { setHoverIndex( \"\" + id + appt.id );}}\n onMouseLeave={() => setHoverIndex(\"\")}\n className={getBlockClass(available,appt,roomAppointments.blocks,index,id,displayableBlocks.staffId,roomAppointments.index,false) + \" dna-block p-0\"}\n >\n \n {hoverIndex === \"\" + id + appt.id && (\n \n )}\n \n\n \n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"cancel\",\n text: textResponse.cancel,\n response: \"default\",\n data: appt,\n info: true,\n infoTittle: `${appt.firstName} ${appt.lastName}, ${appt.sessionTypeName}`,\n infoBody:\n <>\n
\n Date: {moment(startDate).format(\"YY-MM-DD\")}, \n {moment(appt.StartDateTime).format(\"hh:mm A\")} - {moment(appt.endDateTime).format(\"hh:mm A\")}\n
\n
\n Phone: {appt.phone}\n
\n
\n Email: {appt.email}\n
\n \n }))\n }}\n >\n Cancel\n \n {confirmAppointment(appt.id);}}\n >\n Confirm\n \n handleSidebarChangeWeek( segment,displayableBlocks.staffId,\"editAppointment\",blockDate,appt,id,roomAppointments.index)}\n >\n Edit / Reschedule\n \n viewLastVisit(appt)}\n >\n Last Visit\n \n \n \n )}\n \n )\n })}\n \n );\n}\n\nDnaBlockW.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChangeWeek: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n dayIndex: PropTypes.number.isRequired,\n displayableBlocks: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n onClickArgument: PropTypes.string,\n};\n\nexport default DnaBlockW;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\nimport DraggableBlock from \"./draggableBlock\";\nimport HoverCard from \"./hoverCard\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction DefaultBlock({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChange,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n onClickArgument,\n searchClientVisits\n}) {\n return (\n <>\n {setHoverIndex(\"\" + id + appointment.id);}}\n onMouseLeave={() =>setHoverIndex(\"\")}\n >\n \n {hoverIndex ===\"\" + id + appointment.id && (\n \n )}\n \n\n \n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"cancel\",\n text: textResponse.cancel,\n data: appointment,\n response: \"default\",\n info: true,\n infoTittle: `${appointment.firstName} ${appointment.lastName}, ${appointment.sessionTypeName}`,\n infoBody:<>\n
\n Date: {moment(startDate).format(\"YY-MM-DD\")}, \n {moment(appointment.StartDateTime).format(\"hh:mm A\")} - {moment(appointment.endDateTime).format(\"hh:mm A\")}\n
\n
\n Phone: {appointment.phone}\n
\n
\n Email: {appointment.email}\n
\n \n }))\n }}\n >\n Cancel\n \n {\n confirmAppointment(\n appointment.id\n );\n }}\n >\n Confirm\n \n \n handleSidebarChange(\n segment,\n roomAppointments.staffId,\n \"editAppointment\",\n blockDate,\n appointment,\n id\n )\n }\n >\n Edit / Reschedule\n \n \n viewLastVisit(\n appointment\n )\n }\n >\n Last Visit\n \n {searchClientVisits(appointment.clientId); handleClose()}}\n >\n Visits History\n \n \n \n );\n}\n\nDefaultBlock.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChange: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n onClickArgument: PropTypes.string.isRequired,\n searchClientVisits: PropTypes.func.isRequired,\n};\n\nexport default DefaultBlock;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\nimport DraggableBlock from \"./draggableBlock\";\nimport HoverCard from \"./hoverCard\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction DefaultBlockW({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChangeWeek,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n dayIndex,\n displayableBlocks,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n onClickArgument,\n}) {\n return (\n <>\n { setHoverIndex( \"\" + id + appointment.id );}}\n onMouseLeave={() => setHoverIndex(\"\")}\n >\n \n {hoverIndex === \"\" + id + appointment.id && (\n \n )}\n \n\n \n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"cancel\",\n text: textResponse.cancel,\n response: \"default\",\n data: appointment,\n info: true,\n infoTittle: `${appointment.firstName} ${appointment.lastName}, ${appointment.sessionTypeName}`,\n infoBody:\n <>\n
\n Date: {moment(startDate).format(\"YY-MM-DD\")}, \n {moment(appointment.StartDateTime).format(\"hh:mm A\")} - {moment(appointment.endDateTime).format(\"hh:mm A\")}\n
\n
\n Phone: {appointment.phone}\n
\n
\n Email: {appointment.email}\n
\n \n }))\n }}\n >\n Cancel\n \n {confirmAppointment(appointment.id);}}\n >\n Confirm\n \n handleSidebarChangeWeek( segment,displayableBlocks.staffId,\"editAppointment\",blockDate,appointment,id,roomAppointments.index)}\n >\n Edit / Reschedule\n \n viewLastVisit(appointment)}\n >\n Last Visit\n \n \n \n );\n}\n\nDefaultBlockW.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChangeWeek: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n dayIndex: PropTypes.number.isRequired,\n displayableBlocks: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n onClickArgument: PropTypes.string,\n};\n\nexport default DefaultBlockW;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport DroppableBlock from \"./droppableBlock\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction EmptyBlockW({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChangeWeek,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n dayIndex,\n displayableBlocks,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n onClickArgument,\n}) {\n return (\n <>\n { setHoverIndex( \"\" + id + appointment.id );}}\n onMouseLeave={() => setHoverIndex(\"\")}\n >\n {available && (\n \n )}\n {!available && (\n <>\n {\"\" + getBlockDescription(available,roomAppointments.blocks,index)}\n \n )}\n \n {available && (\n \n {\n // clearSidebar();\n handleSidebarChangeWeek(\n segment,\n displayableBlocks.staffId,\n available\n ? \"searchOrCreateClient\"\n : \"restricted\",\n blockDate,\n null,\n id,\n roomAppointments.index\n );\n }\n }\n >\n Book appointment\n \n \n )}\n \n );\n}\n\nEmptyBlockW.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChangeWeek: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n dayIndex: PropTypes.number.isRequired,\n displayableBlocks: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n onClickArgument: PropTypes.string,\n};\n\nexport default EmptyBlockW;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport DroppableBlock from \"./droppableBlock\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nfunction EmptyBlock({\n getBlockClass,\n handleClick,\n setHoverIndex,\n handleChangeBlockOnDrop,\n getBlockDescription,\n handleClose,\n handleSidebarChange,\n setConfirmationAction,\n confirmAppointment,\n viewLastVisit,\n id,\n appointment,\n appointments,\n available,\n segment,\n blockDate,\n type,\n endSegment,\n occupied,\n index,\n state,\n datesState,\n roomAppointments,\n hoverIndex,\n textResponse,\n startDate,\n roomIndex,\n highlight,\n onClickArgument,\n dayIndex,\n}) {\n return (\n <>\n {setHoverIndex(\"\" + id + appointment.id);}}\n onMouseLeave={() =>setHoverIndex(\"\")}\n >\n {available && (\n \n )}\n {!available && (\n <>\n {`${getBlockDescription(available,roomAppointments.blocks,index)}`}\n \n )}\n \n {available && (\n \n {datesState.isWeekRange && (\n {handleSidebarChange(segment,roomAppointments.staffId,available ? \"searchOrCreateClient\" : \"restricted\",blockDate,null,id);}}\n >\n Book appointment\n \n )}\n {!datesState.isWeekRange && (\n {handleSidebarChange(segment,roomAppointments.staffId,available ? \"searchOrCreateClient\" : \"restricted\",blockDate,null,id, dayIndex);}}\n >\n Book appointment\n \n )}\n \n )}\n \n );\n}\n\nEmptyBlock.propTypes = {\n getBlockClass: PropTypes.func.isRequired,\n handleClick: PropTypes.func.isRequired,\n setHoverIndex: PropTypes.func.isRequired,\n handleChangeBlockOnDrop: PropTypes.func.isRequired,\n getBlockDescription: PropTypes.func.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleSidebarChange: PropTypes.func.isRequired,\n setConfirmationAction: PropTypes.func.isRequired,\n confirmAppointment: PropTypes.func.isRequired,\n viewLastVisit: PropTypes.func.isRequired,\n id: PropTypes.array.isRequired,\n appointment: PropTypes.object.isRequired,\n appointments: PropTypes.array.isRequired,\n available: PropTypes.bool.isRequired,\n segment: PropTypes.string.isRequired,\n blockDate: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n endSegment: PropTypes.string.isRequired,\n occupied: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n state: PropTypes.object.isRequired,\n datesState: PropTypes.object.isRequired,\n roomAppointments: PropTypes.object.isRequired,\n hoverIndex: PropTypes.string.isRequired,\n textResponse: PropTypes.object.isRequired,\n startDate: PropTypes.object.isRequired,\n roomIndex: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n ]),\n highlight: PropTypes.bool.isRequired,\n onClickArgument: PropTypes.string.isRequired,\n dayIndex: PropTypes.number,\n};\n\nexport default EmptyBlock;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport moment from \"moment\";\nimport Visibility from '@material-ui/icons/Visibility';\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\n\nimport \"../styles/booking.css\";\n\n/**\n * Booking dashboard for call center employees to book and manage clients appoointments.\n * @param {object} appState Required object from app state that stores authorization tokens for all locations.\n */\n\nfunction VisitsTable({ visits, client }) {\n return (\n
\n
\n
\n

Client

\n

Name: {client.FirstName} {client.LastName}

\n

Email: {client.Email}

\n

Phone: {client.MobilePhone}

\n
\n

Appointments

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {visits.map((visit, index) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n })}\n \n
IDDateStartEndStatusServiceStaffTotalMethodTipNotes
{visit.appointmentId} {moment(visit.startDateTime).format(\"MM/DD/YYYY\").toString()} {moment(visit.startDateTime).format(\"LT\").toString()} {moment(visit.endDateTime).format(\"LT\").toString()} {visit.appointmentStatus} {visit.name} {visit.infoCheckout?.staffName??\"-\"} {visit.infoCheckout?.totalPurchase??\"-\"} \n {visit.infoCheckout?.creditCard > 0 ? \"Credit Card \" : \"\"}\n {visit.infoCheckout?.cash > 0 ? \"Cash \" : \"\"} \n {visit.infoCheckout?.giftCard > 0 ? \"GiftCard \" : \"\"} \n {(visit.infoCheckout?.giftCard === 0 && visit.infoCheckout?.cash === 0 && visit.infoCheckout?.creditCard === 0) ? \"-\" : \"\"}\n {(visit.infoCheckout?.totalPurchase === undefined) ? \"-\" : \"\"} \n {visit.infoCheckout?.tip??\"-\"} \n \n \n \n \n \n
\n
\n
\n
\n );\n}\n\nVisitsTable.propTypes = {\n visits: PropTypes.array.isRequired,\n client: PropTypes.object.isRequired,\n};\nexport default VisitsTable;\n","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport DatePicker from \"react-datepicker\";\nimport \"react-datepicker/dist/react-datepicker.css\";\nimport Select from \"react-select\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSearch, faExclamationTriangle, faSpinner, faTimesCircle, faAngleDoubleLeft, faAngleDoubleRight, faRedoAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport moment from \"moment\";\nimport { DndProvider } from \"react-dnd\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport DroppableSidebar from \"../components/booking/droppableSidebar\";\nimport DraggableSidebar from \"../components/booking/draggableSidebar\";\nimport DnaBlock from \"../components/booking/dnaBlock\";\nimport DnaBlockW from \"../components/booking/dnaBlockW\";\nimport DefaultBlock from \"../components/booking/defaultBlock\";\nimport DefaultBlockW from \"../components/booking/defaultBlockW\";\nimport EmptyBlockW from \"../components/booking/emptyBlockW\";\nimport EmptyBlock from \"../components/booking/emptyBlock\";\nimport { blocks } from \"../config/constants.js\"\nimport \"../styles/booking.css\";\nimport ConfirmationAction from \"../components/modals/confirmationAction\";\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\nimport Dialog from '@material-ui/core/Dialog';\nimport Slide from '@material-ui/core/Slide';\nimport VisitsTable from \"../components/visitsTable\";\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport \"../styles/modalScroll.css\";\n\n\nconst useStyles = makeStyles((theme) => ({\n appBar: {\n position: 'relative',\n },\n title: {\n marginLeft: theme.spacing(2),\n flex: 1,\n },\n}));\n\nconst Transition = React.forwardRef(function Transition(props, ref) {\n return ;\n});\n\n/**\n * Booking dashboard for call center employees to book and manage clients appoointments.\n * @param {object} appState Required object from app state that stores authorization tokens for all locations.\n */\n\nfunction BookingPage({ appState, setAppState }) {\n const [state, setState] = useState({\n status: \"\",\n message: \"\",\n mouseX: null,\n mouseY: null,\n appointmentId: \"\",\n siteId: \"\",\n locationId: \"\",\n staffId: \"\",\n displayAll: true,\n totalCounter: {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n },\n requesting: \"IDLE\",\n selectedLocation: \"\",\n });\n const [userAction, setUserAction] = useState({\n info: \"\",\n date: \"\",\n });\n const [sidebarState, setSidebarState] = useState({\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n siteId: \"\",\n locationId: \"\",\n authorization: \"\",\n searchTerm: \"\",\n searchResults: [],\n client: {},\n editedClient: {\n firstName: \"\",\n lastName: \"\",\n mobilePhone: \"\",\n email: \"\",\n },\n firstName: null,\n lastName: null,\n mobilePhone: null,\n email: null,\n staffId: \"\",\n service: null,\n serviceName: \"\",\n block: \"\",\n blockDate: \"\",\n appointment: null,\n editedAppointment: null,\n blockId: \"\",\n dayIndex: \"\",\n availableBlocks: [],\n createNotes: \"\",\n statusDisabled: false,\n lastVisit: {\n client: {},\n appointments: [],\n }\n });\n const [startDate, setStartDate] = useState(new Date());\n const [endDate, setEndDate] = useState(new Date());\n const [currentDate, setCurrentDate] = useState(new Date());\n const [datesState, setDatesState] = useState({ isWeekRange: false });\n const [rooms, setRooms] = useState([]);\n const [blocksPerRoom, setBlocksPerRoom] = useState([]);\n const [blocksPerWeek, setBlocksPerWeek] = useState([]);\n const [displayableBlocks, setDisplayableBlocks] = useState({});\n const [fetchServices, setFetchServices] = useState(false);\n const [services, setServices] = useState([]);\n const [location, setLocation] = useState({});\n const [hoverIndex, setHoverIndex] = useState(\"\");\n\n const [confirmationAction, setConfirmationAction] = useState({\n action: false,\n text: \"\",\n response: \"default\",\n nameAction: \"\",\n data: \"\",\n info: true,\n infoTittle: \"\",\n infoBody: \"\",\n });\n\n const textResponse = {\n error: \"Oops, an error has occurred, contact your support team\",\n cancel: \"Are you sure to cancel appointment?\",\n successCancel: \"Appointment canceled successfully!\",\n reschedule: \"Are you sure to reschedule/edit appointment?\",\n successReschedule: \"Appointment scheduled/edited successfully!\"\n };\n\n const [rebookSidebar, setRebookSidebar] = useState({\n appointment: {},\n });\n const [clientVisits, setClientVisits] = useState({\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n inputValue: \"\",\n visits: [],\n client: {},\n });\n const classes = useStyles();\n const [sitesInfo, setSitesInfo] = useState([]);\n\n\n useEffect(() => {\n const mutableDate = new Date(startDate.toString());\n mutableDate.setDate(mutableDate.getDate() + 6);\n setEndDate(mutableDate);\n }, [startDate]);\n\n\n useEffect(() => {\n const dateTime = new Date();\n if(location !== undefined){\n const siteDate = dateTime.toLocaleString('en-US', { timeZone: location.timeZone});\n setCurrentDate(siteDate);\n }\n })\n\n useEffect(() => {\n if (state.siteId === \"\") {\n return;\n }\n clearSidebar();\n setBlocksPerWeek([]);\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"useeffect 1\");\n handleLocationChange(params);\n }\n }, [startDate, state.siteId, state.locationId]);\n\n useEffect(() => {\n clearAppointmentSidebar();\n }, [state.siteId, state.locationId]);\n\n const handleClick = (appointmentId) => (event) => {\n event.preventDefault();\n if (state.appointmentId !== appointmentId) {\n setState((state) => ({\n ...state,\n mouseX: event.clientX - 2,\n mouseY: event.clientY - 4,\n appointmentId: appointmentId,\n }));\n }\n if (state.appointmentId === appointmentId) {\n setState((state) => ({\n ...state,\n mouseX: null,\n mouseY: null,\n appointmentId: \"\",\n }));\n }\n };\n\n const consultServices = async (siteId, locationId, token) => {\n try {\n const consultedServices = [];\n const connectionRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: siteId,\n authorization: token,\n locationid: locationId,\n },\n };\n const ultrasoundResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sessionTypes/2`,\n connectionRequest\n );\n const ultrasoundsData = await ultrasoundResponse.json();\n if (ultrasoundResponse.ok) {\n ultrasoundsData.services.forEach((item) => {\n const mutableItem = {\n value: item.sessionTypeId,\n label: item.name,\n };\n consultedServices.push(mutableItem);\n });\n }\n const massageResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sessionTypes/3`,\n connectionRequest\n );\n const massageData = await massageResponse.json();\n if (massageResponse.ok) {\n massageData.services.forEach((item) => {\n const mutableItem = {\n value: item.sessionTypeId,\n label: item.name,\n };\n consultedServices.push(mutableItem);\n });\n }\n const otherResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sessionTypes/6`,\n connectionRequest\n );\n const otherData = await otherResponse.json();\n if (otherResponse.ok) {\n otherData.services.forEach((item) => {\n const mutableItem = {\n value: item.sessionTypeId,\n label: item.name,\n };\n consultedServices.push(mutableItem);\n });\n }\n setServices(consultedServices);\n } catch (error) {\n console.error(error);\n }\n };\n\n const handleSidebarChange = (\n segment,\n staffId,\n action,\n blockDate,\n appointment,\n blockId\n ) => {\n handleClose();\n if (sidebarState.status === action) {\n clearSidebar();\n\n setTimeout(() => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: action,\n block: segment,\n staffId: staffId,\n blockDate: moment(blockDate).format(\"YYYY-MM-DD[T]HH:mm:ss\"),\n appointment: appointment,\n editedAppointment: { ...appointment },\n blockId: blockId,\n message: \"\",\n requesting: \"IDLE\",\n }));\n if (action === \"editAppointment\") {\n availableBlocks(staffId);\n }\n }, 500);\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: action,\n block: segment,\n staffId: staffId,\n blockDate: moment(blockDate).format(\"YYYY-MM-DD[T]HH:mm:ss\"),\n appointment: appointment,\n editedAppointment: { ...appointment },\n blockId: blockId,\n message: \"\",\n requesting: \"IDLE\",\n }));\n if (action === \"editAppointment\") {\n availableBlocks(staffId);\n }\n }\n };\n\n const handleSidebarChangeWeek = (\n segment,\n staffId,\n action,\n blockDate,\n appointment,\n blockId,\n dayIndex\n ) => {\n handleClose();\n if (sidebarState.status === action) {\n clearSidebar();\n setTimeout(() => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: action,\n block: segment,\n staffId: staffId,\n blockDate: moment(blockDate).format(\"YYYY-MM-DD[T]HH:mm:ss\"),\n appointment: appointment,\n editedAppointment: { ...appointment },\n blockId: blockId,\n dayIndex: dayIndex,\n message: \"\",\n }));\n if (action === \"editAppointment\") {\n availableBlocksWeek(staffId, dayIndex);\n }\n }, 500);\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: action,\n block: segment,\n staffId: staffId,\n blockDate: moment(blockDate).format(\"YYYY-MM-DD[T]HH:mm:ss\"),\n appointment: appointment,\n editedAppointment: { ...appointment },\n blockId: blockId,\n dayIndex: dayIndex,\n message: \"\",\n }));\n if (action === \"editAppointment\") {\n availableBlocksWeek(staffId, dayIndex);\n }\n }\n };\n\n const handleClose = () => {\n setState((state) => ({\n ...state,\n mouseX: null,\n mouseY: null,\n appointmentId: \"\",\n }));\n };\n\n const setDateRange = (range) => {\n if (datesState.isWeekRange === range) {\n return;\n }\n if (state.siteId !== \"\") {\n setState((state) => ({\n ...state,\n status: \"loadingAppointments\",\n }));\n setDatesState((datesState) => ({\n ...datesState,\n isWeekRange: range === \"week\",\n }));\n clearSidebar();\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (range === \"week\") {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"setdaterange\");\n handleLocationChange(params);\n }\n } else {\n setDatesState((datesState) => ({\n ...datesState,\n isWeekRange: range === \"week\",\n }));\n }\n };\n\n const searchClient = async () => {\n if (sidebarState.requesting === \"REQUESTING\") {\n return;\n }\n try {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n const searchClientsRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n },\n };\n const searchClientsResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/clients?searchText=${sidebarState.searchTerm}`,\n searchClientsRequest\n );\n const searchClientsData = await searchClientsResponse.json();\n if (searchClientsResponse.ok) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"IDLE\",\n searchResults: searchClientsData.clients,\n }));\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"CLIENT-NO-FOUND\",\n searchResults: [],\n }));\n }\n } catch (error) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"CLIENT-ERROR\",\n message: \"Client search error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const handleClientSearchChange = (event) => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n searchTerm: event.target.value,\n }));\n };\n\n const clearSidebar = () => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n searchTerm: \"\",\n searchResults: [],\n client: {},\n editedClient: {\n firstName: \"\",\n lastName: \"\",\n mobilePhone: \"\",\n email: \"\",\n },\n firstName: null,\n lastName: null,\n mobilePhone: null,\n email: null,\n staffId: \"\",\n service: null,\n serviceName: \"\",\n block: \"\",\n blockDate: \"\",\n appointment: null,\n editedAppointment: null,\n blockId: \"\",\n availableBlocks: [],\n createNotes: \"\",\n statusDisabled: false,\n lastVisit: {\n client: {},\n appointments: [],\n }\n }));\n };\n\n const handleLocationChangeWeek = async (selectedOption) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n try {\n setBlocksPerRoom([]);\n const siteId = selectedOption.value.split(\"|\")[0];\n const locationId = selectedOption.value.split(\"|\")[1];\n const authObject = appState.bookingAuth.authorizationTokens.find(\n (item) =>\n item.siteId.toString() === siteId && item.locationId === locationId\n );\n setState((state) => ({\n ...state,\n status:\n state.status === \"IDLE\" || blocksPerWeek.length === 0\n ? \"loadingAppointments\"\n : \"refreshingAppointments\",\n siteId: authObject.siteId,\n locationId: authObject.locationId,\n authorization: authObject.token,\n selectedLocation: selectedOption,\n }));\n\n if(fetchServices){\n consultServices(\n authObject.siteId,\n authObject.locationId,\n authObject.token\n );\n setFetchServices(false);\n }\n\n const queryStartDate = moment(startDate).format(\"MM/DD/YYYY\").toString();\n const queryEndDate = moment(startDate).add(6, \"days\").format(\"MM/DD/YYYY\").toString();\n\n const blocksRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authObject.siteId,\n authorization: authObject.token,\n locationid: authObject.locationId,\n },\n };\n const blocksRequestResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${authObject.siteId}/locations/${authObject.locationId}/schedule?startDate=${queryStartDate}&endDate=${queryEndDate}`,\n blocksRequest\n );\n const blocksRequestData = await blocksRequestResponse.json();\n const appointmentsPerRoom = [];\n if (blocksRequestResponse.ok) {\n clearSidebar();\n const rooms = blocksRequestData.schedule.map((room) => {\n const roomReturn = {\n staffId: room.id,\n staffName: room.name,\n };\n return roomReturn;\n });\n setRooms(rooms);\n\n await blocksRequestData.schedule.reduce(async (memo, room, index) => {\n await memo;\n const appointmentsRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authObject.siteId,\n authorization: authObject.token,\n locationid: authObject.locationId,\n },\n };\n const appointmentsRequestResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/?appointmentDate=${queryStartDate}&endDate=${queryEndDate}&staffId=${room.id}`,\n appointmentsRequest\n );\n const appointmentsRequestData =\n await appointmentsRequestResponse.json();\n if (appointmentsRequestResponse.ok) {\n const appointmentsPerDay = [];\n const availabilitiesPerDay = [];\n const unavailabilitiesPerDay = [];\n const blocksPerDay = [];\n for (let i = 0; i < 7; i++) {\n appointmentsPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n appointments: [],\n });\n blocksPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n availabilitiesPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n unavailabilitiesPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n };\n const totalCounter = {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n };\n appointmentsRequestData.forEach((appointment) => {\n const mutableAppointment = { ...appointment };\n mutableAppointment.segment = moment(appointment.StartDateTime).format(\"hh:mm A\").toString();\n const index = appointmentsPerDay.findIndex(\n (item) => item.date === moment(appointment.StartDateTime).format(\"MM/DD/YYYY\").toString()\n );\n appointmentsPerDay[index].appointments.push(mutableAppointment);\n\n if (mutableAppointment.sessionTypeName.toLowerCase().includes('come back for free') ||\n mutableAppointment.sessionTypeName.toLowerCase().includes('cbff')\n ) {\n totalCounter.cbff++;\n }\n totalCounter[mutableAppointment.status]++;\n totalCounter.total++;\n });\n room.availabilities.forEach((blockSegment) => {\n const startSegment = moment(blockSegment.startDateTime).format(\"hh:mm A\").toString();\n const endSegment = moment(blockSegment.endDateTime).format(\"hh:mm A\").toString();\n const dateSegment = moment(blockSegment.startDateTime).format(\"MM/DD/YYYY\").toString();\n const availabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.startDateTime,\n endDateTime: blockSegment.endDateTime,\n };\n const index = availabilitiesPerDay.findIndex(\n (item) => item.date === moment(blockSegment.startDateTime).format(\"MM/DD/YYYY\").toString()\n );\n availabilitiesPerDay[index].blocks.push(availabilityInstance);\n });\n room.unavailabilities.forEach((blockSegment) => {\n const startSegment = moment(blockSegment.StartDateTime).format(\"hh:mm A\").toString();\n const endSegment = moment(blockSegment.EndDateTime).format(\"hh:mm A\").toString();\n const dateSegment = moment(blockSegment.StartDateTime).format(\"MM/DD/YYYY\").toString();\n const unAvailabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.StartDateTime,\n endDateTime: blockSegment.EndDateTime,\n description: blockSegment.Description,\n };\n const index = unavailabilitiesPerDay.findIndex(\n (item) => item.date === moment(blockSegment.StartDateTime).format(\"MM/DD/YYYY\").toString()\n );\n unavailabilitiesPerDay[index].blocks.push(unAvailabilityInstance);\n });\n\n blocksPerDay.forEach((element, index) => {\n const mutableBlocks = [...blocks];\n element.blocks = mutableBlocks.map((block) => {\n const mutableBlock = { ...block };\n const addTwelve = mutableBlock.segment.includes(\"PM\");\n const rawHours = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[0]);\n const hours = addTwelve && rawHours !== 12 ? rawHours + 12 : rawHours;\n const minutes = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[1]);\n const stringDate = moment(element.date).format(\"MM/DD/YYYY\").toString();\n const startDateTime = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n const endDateTime = moment(startDateTime).add(30, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n mutableBlock.startDateTime = startDateTime;\n mutableBlock.endDateTime = endDateTime;\n const blockDate = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").toString();\n mutableBlock.blockDate = blockDate;\n let available = false;\n let description = \" \";\n availabilitiesPerDay[index].blocks.forEach(\n (availabilityBlock) => {\n available =\n available +\n moment(blockDate).isBetween(\n availabilityBlock.startDateTime,\n availabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n }\n );\n unavailabilitiesPerDay[index].blocks.forEach(\n (unavailabilityBlock) => {\n available =\n available *\n !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n const something = !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n description = something\n ? \" \"\n : unavailabilityBlock.description;\n }\n );\n mutableBlock.available = Boolean(available);\n mutableBlock.description = description;\n mutableBlock.type = room.name.toLowerCase().includes(\"dna\") ? \"DNA\" : \"DEFAULT\";\n if(mutableBlock.type === \"DNA\"){\n const blockAppointments = appointmentsPerDay[\n index\n ].appointments.filter((appointment) =>\n moment(blockDate).isBetween(\n appointment.StartDateTime,\n appointment.endDateTime,\n undefined,\n \"[)\"\n )\n );\n mutableBlock.occupied = blockAppointments.length > 0;\n for (let i = blockAppointments.length; i < 5; i++) {\n blockAppointments.push({});\n }\n mutableBlock.appointment = {};\n mutableBlock.appointments = blockAppointments;\n }\n else{\n const blockAppointment = appointmentsPerDay[\n index\n ].appointments.find((appointment) =>\n moment(blockDate).isBetween(\n appointment.StartDateTime,\n appointment.endDateTime,\n undefined,\n \"[)\"\n )\n );\n mutableBlock.appointment = blockAppointment === undefined ? {} : blockAppointment;\n mutableBlock.appointments = [];\n mutableBlock.occupied = blockAppointment !== undefined;\n }\n\n return mutableBlock;\n });\n });\n\n appointmentsPerRoom.push({\n staffId: room.id,\n name: room.name,\n appointmentsPerDay: appointmentsPerDay,\n availabilitiesPerDay: availabilitiesPerDay,\n unavailabilitiesPerDay: unavailabilitiesPerDay,\n blocksPerDay: blocksPerDay,\n statusCounter: totalCounter,\n });\n } else {\n const appointmentsPerDay = [];\n const availabilitiesPerDay = [];\n const unavailabilitiesPerDay = [];\n const blocksPerDay = [];\n for (let i = 0; i < 7; i++) {\n appointmentsPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n appointments: [],\n });\n blocksPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n availabilitiesPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n unavailabilitiesPerDay.push({\n index: i,\n date: moment(queryStartDate)\n .add(i, \"days\")\n .format(\"MM/DD/YYYY\")\n .toString(),\n blocks: [],\n });\n };\n const totalCounter = {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n };\n room.availabilities.forEach((blockSegment) => {\n const startSegment = moment(blockSegment.startDateTime).format(\"hh:mm A\").toString();\n const endSegment = moment(blockSegment.endDateTime).format(\"hh:mm A\").toString();\n const dateSegment = moment(blockSegment.startDateTime).format(\"MM/DD/YYYY\").toString();\n const availabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.startDateTime,\n endDateTime: blockSegment.endDateTime,\n };\n const index = availabilitiesPerDay.findIndex(\n (item) => item.date === moment(blockSegment.startDateTime).format(\"MM/DD/YYYY\").toString()\n );\n availabilitiesPerDay[index].blocks.push(availabilityInstance);\n });\n room.unavailabilities.forEach((blockSegment) => {\n const startSegment = moment(blockSegment.StartDateTime).format(\"hh:mm A\").toString();\n const endSegment = moment(blockSegment.EndDateTime).format(\"hh:mm A\").toString();\n const dateSegment = moment(blockSegment.StartDateTime).format(\"MM/DD/YYYY\").toString();\n const unAvailabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.StartDateTime,\n endDateTime: blockSegment.EndDateTime,\n description: blockSegment.Description,\n };\n const index = unavailabilitiesPerDay.findIndex(\n (item) => item.date === moment(blockSegment.StartDateTime).format(\"MM/DD/YYYY\").toString()\n );\n unavailabilitiesPerDay[index].blocks.push(unAvailabilityInstance);\n });\n blocksPerDay.forEach((element, index) => {\n const mutableBlocks = [...blocks];\n element.blocks = mutableBlocks.map((block) => {\n const mutableBlock = { ...block };\n const addTwelve = mutableBlock.segment.includes(\"PM\");\n const rawHours = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[0]);\n const hours = addTwelve && rawHours !== 12 ? rawHours + 12 : rawHours;\n const minutes = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[1]);\n const stringDate = moment(element.date).format(\"MM/DD/YYYY\").toString();\n const startDateTime = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n const endDateTime = moment(startDateTime).add(30, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n mutableBlock.startDateTime = startDateTime;\n mutableBlock.endDateTime = endDateTime;\n const blockDate = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").toString();\n mutableBlock.blockDate = blockDate;\n let available = false;\n let description = \" \";\n availabilitiesPerDay[index].blocks.forEach(\n (availabilityBlock) => {\n available =\n available +\n moment(blockDate).isBetween(\n availabilityBlock.startDateTime,\n availabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n }\n );\n unavailabilitiesPerDay[index].blocks.forEach(\n (unavailabilityBlock) => {\n available =\n available *\n !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n const something = !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n description = something\n ? \" \"\n : unavailabilityBlock.description;\n }\n );\n mutableBlock.available = Boolean(available);\n mutableBlock.description = description;\n\n mutableBlock.appointment = {};\n return mutableBlock;\n });\n });\n\n appointmentsPerRoom.push({\n staffId: room.id,\n name: room.name,\n appointmentsPerDay: appointmentsPerDay,\n availabilitiesPerDay: availabilitiesPerDay,\n unavailabilitiesPerDay: unavailabilitiesPerDay,\n blocksPerDay: blocksPerDay,\n statusCounter: totalCounter,\n });\n }\n }, undefined);\n\n setBlocksPerWeek(appointmentsPerRoom);\n setDisplayableBlocks(appointmentsPerRoom[0]);\n\n setTimeout(() => {\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n displayAll: true,\n staffId: rooms[0].staffId,\n }));\n }, 500);\n } else {\n setState((state) => ({\n ...state,\n status: \"no-blocks-found\",\n message:\n \"Requesting schedule blocks error: \" +\n JSON.stringify(blocksRequestData),\n }));\n }\n } catch (error) {\n clearSidebar();\n setState((state) => ({\n ...state,\n status: \"on-load-error\",\n message:\n \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\" +\n JSON.stringify(error.message),\n }));\n }\n };\n\n const handleLocationChange = async (selectedOption) => {\n // Check if the dashboard is already loading and dismiss the method call if necesary\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n try {\n setBlocksPerWeek([]);\n const siteId = selectedOption.value.split(\"|\")[0];\n const locationId = selectedOption.value.split(\"|\")[1];\n const authObject = appState.bookingAuth.authorizationTokens.find(\n (item) => \n item.siteId.toString() === siteId && item.locationId === locationId\n );\n setState((state) => ({\n ...state,\n status:\n state.status === \"IDLE\" || blocksPerRoom.length === 0\n ? \"loadingAppointments\"\n : \"refreshingAppointments\",\n siteId: authObject.siteId,\n locationId: authObject.locationId,\n authorization: authObject.token,\n selectedLocation: selectedOption,\n }));\n if(fetchServices){\n consultServices(\n authObject.siteId,\n authObject.locationId,\n authObject.token\n );\n setFetchServices(false);\n }\n const queryStartDate = moment(startDate).format(\"MM/DD/YYYY\").toString();\n \n const fetchSchedule = async (query) => {\n if(query===\"appointments\"){\n const appointmentsRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authObject.siteId,\n authorization: authObject.token,\n locationid: authObject.locationId,\n },\n };\n const appointmentsRequestResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/?appointmentDate=${queryStartDate}`,\n appointmentsRequest\n );\n const appointmentsRequestData = await appointmentsRequestResponse.json();\n if(appointmentsRequestResponse.ok){\n return Promise.resolve({\n ok: true,\n appointmentsRequestData,\n query\n });\n }\n else{\n return Promise.resolve({\n ok: false,\n appointmentsRequestData:{},\n query\n });\n }\n }\n else{\n const blocksRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: authObject.siteId,\n authorization: authObject.token,\n locationid: authObject.locationId,\n },\n };\n const blocksRequestResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/${authObject.siteId}/locations/${authObject.locationId}/schedule?startDate=${queryStartDate}&endDate=${queryStartDate}`,\n blocksRequest\n );\n const blocksRequestData = await blocksRequestResponse.json();\n if(blocksRequestResponse.ok){\n return Promise.resolve({\n ok: true,\n blocksRequestData,\n query\n });\n }\n else{\n return Promise.resolve({\n ok: false,\n blocksRequestData:{},\n query\n });\n }\n }\n }\n const fetchOptions = [\"appointments\", \"schedule\"];\n \n const scheduleAttemps = fetchOptions.map((option) =>\n fetchSchedule(option)\n );\n const scheduleResults = await Promise.all(scheduleAttemps);\n\n console.log(scheduleResults);\n\n const appointmentsRequestResponse = scheduleResults.find(\n (item) => item.query === \"appointments\"\n );\n const appointmentsRequestData = appointmentsRequestResponse.appointmentsRequestData;\n\n console.log(\"appointmentsRequestResponse\",appointmentsRequestResponse)\n console.log(\"appointmentsRequestData\",appointmentsRequestData)\n \n const blocksRequestResponse = scheduleResults.find(\n (item) => item.query === \"schedule\"\n );\n const blocksRequestData = blocksRequestResponse.blocksRequestData;\n\n console.log(\"blocksRequestResponse\",blocksRequestResponse)\n console.log(\"blocksRequestData\",blocksRequestData)\n\n \n if (appointmentsRequestResponse.ok) {\n clearSidebar();\n \n if (blocksRequestResponse.ok) {\n const availabilityBlocks = [];\n const unavailabilityBlocks = [];\n \n blocksRequestData.schedule.forEach((room) => {\n room.availabilities.forEach((blockSegment) => {\n const startSegment = new Date(blockSegment.startDateTime).toLocaleTimeString(\"en-US\", {hour: \"2-digit\",minute: \"2-digit\",});\n const endSegment = new Date(blockSegment.endDateTime).toLocaleTimeString(\"en-US\", {hour: \"2-digit\",minute: \"2-digit\",});\n const dateSegment = moment(blockSegment.startDateTime).format(\"MM/DD/YYYY\").toString();\n const availabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.startDateTime,\n endDateTime: blockSegment.endDateTime,\n };\n availabilityBlocks.push(availabilityInstance);\n });\n room.unavailabilities.forEach((blockSegment) => {\n \n const startSegment = moment(blockSegment.StartDateTime).format(\"LT\");\n const endSegment = new Date(blockSegment.EndDateTime).toLocaleTimeString(\"en-US\", {hour: \"2-digit\",minute: \"2-digit\",});\n const dateSegment = moment(blockSegment.StartDateTime).format(\"MM/DD/YYYY\").toString();\n const unAvailabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.StartDateTime,\n endDateTime: blockSegment.EndDateTime,\n description: blockSegment.Description,\n };\n unavailabilityBlocks.push(unAvailabilityInstance);\n });\n });\n\n console.log(\"First loop over schedule\");\n console.log(\"availabilityBlocks\", availabilityBlocks);\n console.log(\"unavailabilityBlocks\", unavailabilityBlocks);\n console.log(\"==================================================\");\n \n const rooms = blocksRequestData.schedule.map((room) => {\n const roomReturn = {\n staffId: room.id,\n staffName: room.name,\n };\n return roomReturn;\n });\n setRooms(rooms);\n\n console.log(\"Second loop over schedule\");\n console.log(\"rooms\", rooms);\n console.log(\"==================================================\");\n \n const totalCounter = {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n };\n const appointmentsPerRooms = [];\n rooms.forEach((element) => {\n const statusCounter = {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n };\n const appointments = [];\n //! This could be changed for a filter instead of running over the entire array of appointment\n //! This could be changed for a filter instead of running over the entire array of appointment\n appointmentsRequestData.forEach((appointment) => {\n if (element.staffId === appointment.staffId) {\n const mutableAppointment = appointment;\n const segment = new Date(\n mutableAppointment.StartDateTime\n ).toLocaleTimeString(\"en-US\", {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n mutableAppointment.segment = segment;\n appointments.push(mutableAppointment);\n \n statusCounter[mutableAppointment.status]++;\n statusCounter.total++;\n if (mutableAppointment.sessionTypeName.toLowerCase().includes('come back for free') ||\n mutableAppointment.sessionTypeName.toLowerCase().includes('cbff')\n ){\n statusCounter.cbff++;\n }\n totalCounter[mutableAppointment.status]++;\n totalCounter.total++;\n if (mutableAppointment.sessionTypeName.toLowerCase().includes('come back for free') ||\n mutableAppointment.sessionTypeName.toLowerCase().includes('cbff')\n ){\n totalCounter.cbff++;\n }\n }\n });\n \n appointmentsPerRooms.push({\n staffId: element.staffId,\n staffName: element.staffName,\n appointments: appointments,\n counter: statusCounter,\n });\n });\n\n console.log(\"First loop over rooms\");\n console.log(\"totalCounter\", totalCounter);\n console.log(\"appointmentsPerRooms\", appointmentsPerRooms);\n console.log(\"==================================================\");\n \n rooms.forEach((room) => {\n const avBlocks = [];\n availabilityBlocks.forEach((block) => {\n if (room.staffId === block.staffId) {\n avBlocks.push(block);\n }\n });\n const unavBlocks = [];\n unavailabilityBlocks.forEach((block) => {\n if (room.staffId === block.staffId) {\n unavBlocks.push(block);\n }\n });\n const appRoomIndex = appointmentsPerRooms.findIndex(\n (item) => item.staffId === room.staffId\n );\n appointmentsPerRooms[appRoomIndex].availabilities = avBlocks;\n appointmentsPerRooms[appRoomIndex].unavailabilities = unavBlocks;\n });\n \n console.log(\"Second loop over rooms\");\n console.log(\"appointmentsPerRooms\", appointmentsPerRooms);\n console.log(\"==================================================\");\n\n const blocksPerRoom = appointmentsPerRooms.map((element) => {\n const mutableBlocks = [...blocks];\n \n const blockAppointments = mutableBlocks.map((block) => {\n const mutableBlock = { ...block };\n const addTwelve = mutableBlock.segment.includes(\"PM\"); // \"08:00 AM\",\n const rawHours = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[0]);\n const hours = addTwelve && rawHours !== 12 ? rawHours + 12 : rawHours;\n const minutes = parseInt(mutableBlock.segment.split(\" \")[0].split(\":\")[1]);\n const stringDate = moment(startDate).format(\"MM/DD/YYYY\").toString();\n const startDateTime = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n const endDateTime = moment(startDateTime).add(30, \"minutes\").format(\"YYYY-MM-DD[T]HH:mm:ss\");\n mutableBlock.startDateTime = startDateTime;\n mutableBlock.endDateTime = endDateTime;\n const blockDate = moment(stringDate).add(hours, \"hours\").add(minutes, \"minutes\").toString();\n mutableBlock.blockDate = blockDate;\n let available = false;\n let description = \" \";\n element.availabilities.forEach((availabilityBlock) => {\n available =\n available +\n moment(blockDate).isBetween(\n availabilityBlock.startDateTime,\n availabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n });\n element.unavailabilities.forEach((unavailabilityBlock) => {\n available =\n available *\n !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n const something = !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n description = something ? \" \" : unavailabilityBlock.description;\n });\n mutableBlock.available = Boolean(available);\n mutableBlock.description = description;\n mutableBlock.type = element.staffName.toLowerCase().includes(\"dna\") ? \"DNA\" : \"DEFAULT\";\n if(mutableBlock.type === \"DNA\"){\n const blockAppointments = element.appointments.filter(\n (appointment) =>\n moment(blockDate).isBetween(\n appointment.StartDateTime,\n appointment.endDateTime,\n undefined,\n \"[)\"\n )\n );\n mutableBlock.occupied = blockAppointments.length > 0;\n for (let i = blockAppointments.length; i < 5; i++) {\n blockAppointments.push({});\n }\n mutableBlock.appointment = {};\n mutableBlock.appointments = blockAppointments;\n }\n else{\n const blockAppointment = element.appointments.find(\n (appointment) =>\n moment(blockDate).isBetween(\n appointment.StartDateTime,\n appointment.endDateTime,\n undefined,\n \"[)\"\n )\n );\n mutableBlock.appointment = blockAppointment === undefined ? {} : blockAppointment;\n mutableBlock.appointments = [];\n mutableBlock.occupied = blockAppointment !== undefined;\n \n }\n return mutableBlock;\n });\n \n return {\n staffId: element.staffId,\n staffName: element.staffName,\n appointments: element.appointments,\n blocks: blockAppointments,\n statusCounter: element.counter,\n };\n });\n \n setBlocksPerRoom(blocksPerRoom);\n console.log(\"Blocks Per Room: \", blocksPerRoom);\n setDisplayableBlocks(blocksPerRoom[0]);\n setTimeout(() => {\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n displayAll: true,\n totalCounter: totalCounter,\n staffId: \"ALL\",\n }));\n }, 100);\n } else {\n setState((state) => ({\n ...state,\n status: \"no-blocks-found\",\n message:\n \"Requesting schedule blocks error: \" +\n JSON.stringify(blocksRequestData),\n }));\n }\n } else {\n if (blocksRequestResponse.ok) {\n const availabilityBlocks = [];\n const unavailabilityBlocks = [];\n \n blocksRequestData.schedule.forEach((room) => {\n room.availabilities.forEach((blockSegment) => {\n const startSegment = new Date(\n blockSegment.startDateTime\n ).toLocaleTimeString(\"en-US\", {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const endSegment = new Date(\n blockSegment.endDateTime\n ).toLocaleTimeString(\"en-US\", {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const dateSegment = moment(blockSegment.startDateTime)\n .format(\"MM/DD/YYYY\")\n .toString();\n const availabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.startDateTime,\n endDateTime: blockSegment.endDateTime,\n };\n availabilityBlocks.push(availabilityInstance);\n });\n room.unavailabilities.forEach((blockSegment) => {\n const startSegment = new Date(\n blockSegment.startDateTime\n ).toLocaleTimeString(\"en-US\", {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const endSegment = new Date(\n blockSegment.endDateTime\n ).toLocaleTimeString(\"en-US\", {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const dateSegment = moment(blockSegment.startDateTime)\n .format(\"MM/DD/YYYY\")\n .toString();\n const unAvailabilityInstance = {\n date: dateSegment,\n staffId: room.id,\n staffName: room.name,\n startTime: startSegment,\n endTime: endSegment,\n startDateTime: blockSegment.StartDateTime,\n endDateTime: blockSegment.EndDateTime,\n description: blockSegment.Description,\n };\n unavailabilityBlocks.push(unAvailabilityInstance);\n });\n });\n \n const rooms = blocksRequestData.schedule.map((room) => {\n const roomReturn = {\n staffId: room.id,\n staffName: room.name,\n };\n return roomReturn;\n });\n setRooms(rooms);\n \n const appointmentsPerRooms = [];\n rooms.forEach((element) => {\n appointmentsPerRooms.push({\n staffId: element.staffId,\n staffName: element.staffName,\n appointments: [],\n });\n });\n \n rooms.forEach((room) => {\n const avBlocks = [];\n availabilityBlocks.forEach((block) => {\n if (room.staffId === block.staffId) {\n avBlocks.push(block);\n }\n });\n const unavBlocks = [];\n unavailabilityBlocks.forEach((block) => {\n if (room.staffId === block.staffId) {\n unavBlocks.push(block);\n }\n });\n const appRoomIndex = appointmentsPerRooms.findIndex(\n (item) => item.staffId === room.staffId\n );\n appointmentsPerRooms[appRoomIndex].availabilities = avBlocks;\n appointmentsPerRooms[appRoomIndex].unavailabilities = unavBlocks;\n });\n \n const totalCounter = {\n Booked: 0,\n Confirmed: 0,\n Arrived: 0,\n Completed: 0,\n NoShow: 0,\n total: 0,\n cbff: 0,\n };\n \n const blocksPerRoom = appointmentsPerRooms.map((element) => {\n const mutableBlocks = [...blocks];\n const blockAppointments = mutableBlocks.map((block) => {\n const mutableBlock = { ...block };\n const addTwelve = mutableBlock.segment.includes(\"PM\"); // \"08:00 AM\",\n const rawHours = parseInt(\n mutableBlock.segment.split(\" \")[0].split(\":\")[0]\n );\n const hours =\n addTwelve && rawHours !== 12 ? rawHours + 12 : rawHours;\n const minutes = parseInt(\n mutableBlock.segment.split(\" \")[0].split(\":\")[1]\n );\n const stringDate = moment(startDate)\n .format(\"MM/DD/YYYY\")\n .toString();\n const blockDate = moment(stringDate)\n .add(hours, \"hours\")\n .add(minutes, \"minutes\")\n .toString();\n mutableBlock.blockDate = blockDate;\n let available = false;\n let description = \" \";\n element.availabilities.forEach((availabilityBlock) => {\n available =\n available +\n moment(blockDate).isBetween(\n availabilityBlock.startDateTime,\n availabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n });\n element.unavailabilities.forEach((unavailabilityBlock) => {\n available =\n available *\n !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n const something = !moment(blockDate).isBetween(\n unavailabilityBlock.startDateTime,\n unavailabilityBlock.endDateTime,\n undefined,\n \"[)\"\n );\n description = something ? \" \" : unavailabilityBlock.description;\n });\n mutableBlock.available = Boolean(available);\n mutableBlock.description = description;\n mutableBlock.appointment = {};\n return mutableBlock;\n });\n \n return {\n staffId: element.staffId,\n staffName: element.staffName,\n appointments: element.appointments,\n blocks: blockAppointments,\n statusCounter: totalCounter,\n };\n });\n \n setBlocksPerRoom(blocksPerRoom);\n setDisplayableBlocks(blocksPerRoom[0]);\n \n setTimeout(() => {\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n displayAll: true,\n totalCounter: totalCounter,\n staffId: \"ALL\",\n }));\n }, 500);\n } else {\n setState((state) => ({\n ...state,\n status: \"no-blocks-found\",\n message:\n \"Requesting schedule blocks error: \" +\n JSON.stringify(blocksRequestData),\n }));\n }\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"on-load-error\",\n message:\n \"Woops, this is weird. Something went wrong with the connection, please reload the page and try again.\" +\n JSON.stringify(error.message),\n }));\n }\n };\n\n const handleServiceChange = (selectedOption) => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n service: selectedOption.value,\n serviceName: selectedOption.label,\n }));\n };\n\n const handleEditServiceChange = (selectedOption) => {\n const value = selectedOption.value;\n const label = selectedOption.label;\n const appointmentEdited = sidebarState.editedAppointment;\n appointmentEdited.sessionTypeId = value;\n appointmentEdited.sessionTypeName = label;\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n editedAppointment: appointmentEdited,\n }));\n };\n\n const handleClientSelect = (index) => {\n const client = sidebarState.searchResults[index];\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"bookAppointment\",\n client: client,\n }));\n };\n\n const handleRoomChange = (staffId) => {\n setState((state) => ({\n ...state,\n status: \"loadingAppointments\",\n }));\n if (staffId === \"ALL\") {\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n staffId: staffId,\n displayAll: true,\n }));\n clearSidebar();\n } else {\n const roomIndex = blocksPerRoom.findIndex(\n (item) => item.staffId === staffId\n );\n setDisplayableBlocks(blocksPerRoom[roomIndex]);\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n staffId: staffId,\n displayAll: false,\n }));\n clearSidebar();\n }\n };\n\n const handleRoomChangeWeek = (staffId) => {\n setState((state) => ({\n ...state,\n status: \"loadingAppointments\",\n }));\n const roomIndex = blocksPerWeek.findIndex(\n (item) => item.staffId === staffId\n );\n setDisplayableBlocks(blocksPerWeek[roomIndex]);\n setState((state) => ({\n ...state,\n status: \"displayAppointments\",\n staffId: staffId,\n displayAll: false,\n }));\n clearSidebar();\n };\n\n const handleCalendarChange = (date) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setStartDate(date);\n };\n\n\n const handleAppointmentBook = async () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n try {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n const payload = {\n sessionTypeId: \"\" + sidebarState.service,\n locationId: parseInt(state.locationId),\n staffId: sidebarState.staffId,\n clientId: sidebarState.client.clientId,\n notes: sidebarState.createNotes,\n startDateTime: sidebarState.blockDate,\n };\n\n const bookAppointmentRequest = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const bookAppointmentResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments`,\n bookAppointmentRequest\n );\n const bookAppointmentData = await bookAppointmentResponse.json();\n if (bookAppointmentResponse.ok) {\n const notesArray = sidebarState.createNotes.split(\"\\n\");\n console.log(\"notesArray\", notesArray);\n let language = \"english\";\n notesArray.forEach((item) => {\n if (item.toLowerCase().includes(\"language:\")) {\n const splitedItem = item.split(\":\");\n language = splitedItem[1].toLowerCase();\n }\n });\n console.log(\"language\", language);\n const isSpanish = language.includes('es') || language.includes('spanish') || language.includes('español');\n console.log(\"isSpanish\", isSpanish);\n const mailBody = {\n locationName: location.label,\n web: \"www.littlebelliesspa.com/en/home/\",\n locationPhone: location.sitePhone,\n locationAddress: location.address,\n howArrive: isSpanish ? location.HTASpanish : location.HTAEnglish,\n appointmentId: bookAppointmentData.Appointment.Id,\n clientName: sidebarState.client.name ?? '',\n clientEmail: sidebarState.client.email ?? '',\n serviceName: sidebarState.serviceName ?? '',\n startDateTime: sidebarState.blockDate,\n }\n const postMail = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(mailBody),\n };\n const mailResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/book/sendMail`,\n postMail\n );\n\n if (!mailResponse.ok) {\n console.error(mailResponse);\n }\n\n \n \n const dateTime = new Date();\n const siteDate = dateTime.toLocaleString('en-US', { timeZone: location?.timeZone});\n const isCbff = sidebarState.serviceName.toLowerCase().includes(\"come back for free\") ||\n sidebarState.serviceName.toLowerCase().includes(\"cbff\");\n const dynamoPayload = {\n id: \"\" + bookAppointmentData.Appointment.Id,\n sessionTypeId: bookAppointmentData.Appointment.SessionTypeId,\n serviceName: sidebarState.serviceName,\n locationId: \"\" + bookAppointmentData.Appointment.LocationId,\n staffId: bookAppointmentData.Appointment.StaffId,\n clientId: bookAppointmentData.Appointment.ClientId,\n notes: bookAppointmentData.Appointment.Notes,\n startDateTime: bookAppointmentData.Appointment.StartDateTime,\n status: bookAppointmentData.Appointment.Status,\n firstAppointment: bookAppointmentData.Appointment.FirstAppointment,\n addOns: bookAppointmentData.Appointment.AddOns,\n bookDate: moment(siteDate).format(\"MM/DD/YYYY\"),\n bookTime: moment(siteDate).format(\"HH:mm\"),\n siteId: \"\" + state.siteId,\n source: \"callCenter\",\n cbff: isCbff,\n clientName: sidebarState.client.name ?? '',\n userName: userAction.info.userName,\n programId: bookAppointmentData.Appointment.ProgramId,\n };\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n // comment\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/appointments`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"IDLE\",\n }));\n clearSidebar();\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"handleappointmentbook\");\n handleLocationChange(params);\n }\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"BOOK-APPOINTMENT-FAIL\",\n message: JSON.stringify(dynamoData),\n }));\n }\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"BOOK-APPOINTMENT-FAIL\",\n message: JSON.stringify(bookAppointmentData),\n }));\n }\n } catch (error) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"BOOK-APPOINTMENT-ERROR\",\n message: \"Create appointment error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const triggerModalOnDrop = () => {\n const trigger = document.getElementById('modalOnDrop').click();\n return trigger\n }\n\n useEffect(() => {\n\n if (confirmationAction.action && confirmationAction.nameAction === \"cancel\") {\n cancelAppointment(confirmationAction.data.id, confirmationAction.data.clientId)\n }\n if (confirmationAction.action && confirmationAction.nameAction === \"reschedule\") {\n handleEditAppointment()\n }\n if (confirmationAction.nameAction === \"rescheduleOnDrop\") {\n triggerModalOnDrop();\n if (confirmationAction.action) {\n handleEditAppointmentOnDrop(confirmationAction.data)\n }\n }\n }, [confirmationAction, confirmationAction.nameAction,confirmationAction.response])\n\n useEffect(() => {\n\n let userName;\n const auth = {\n single: appState.singleAuth,\n directors: appState.directorsAuth,\n booking: appState.bookingAuth\n }\n const searchBySite = `${state.siteId}-${state.locationId}`;\n\n if (auth.single) {\n if (auth.single.userName !== null) userName = auth.single;\n }\n if (auth.booking.authorizationTokens.length > 0) {\n userName = auth.booking.authorizationTokens.find(i => `${i.siteId}-${i.locationId}` === searchBySite);\n }\n if (auth.directors.authorizationTokens.length > 0) {\n userName = auth.booking.authorizationTokens.find(i => `${i.siteId}-${i.locationId}` === searchBySite);\n }\n setUserAction((userAction) => ({\n ...userAction,\n info: userName\n }));\n\n }, [state, userAction.info])\n\n const handleChangeBlockOnDrop = (\n appointmentId,\n startDateTime,\n endDateTime,\n sessionTypeId,\n notes,\n staffId,\n authorization,\n siteId,\n locationId,\n isWeekRange\n ) => {\n\n const date = moment(startDateTime).format(\"YY-MM-DD\")\n const hourStar = moment(startDateTime).format(\"hh:mm A\")\n const hourEnd = moment(endDateTime).format(\"hh:mm A\")\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"rescheduleOnDrop\",\n response: \"default\",\n text:
Are you sure to reschedule the appointment for the date:
\n {date}, {hourStar} - {hourEnd}?
,\n info: false,\n data: {\n startDateTime,\n endDateTime,\n appointmentId,\n staffId,\n authorization,\n siteId,\n locationId,\n isWeekRange,\n sessionTypeId,\n notes,\n }\n }));\n }\n\n const cancelAppointment = async (appointmentId, clientId) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setState((state) => ({\n ...state,\n mouseX: null,\n mouseY: null,\n }));\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"\"\n }));\n try {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n response: \"process\",\n }))\n const payload = {\n Execute: \"Cancel\",\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n authorization: state.authorization,\n locationid: state.locationId,\n allowedpermissions: true,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${appointmentId}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n const dynamoPayload = {\n id: \"\" + appointmentId,\n clientId: clientId,\n userNameCancel: userAction.info.userName,\n cancel: moment(new Date).format(\"YYYY-MM-DD[T]HH:mm:ss\"),\n };\n const putDynamo = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(dynamoPayload),\n };\n const dynamoResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dynamoDB/appointments`,\n putDynamo\n );\n const dynamoData = await dynamoResponse.json();\n if (dynamoResponse.ok) {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"success\",\n text: textResponse.successCancel,\n data: \"\",\n nameAction: \"\"\n }))\n \n clearSidebar();\n setState((state) => ({\n ...state,\n appointmentId: \"\",\n }));\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"cancel appointment\");\n handleLocationChange(params);\n }\n }\n else{\n setState((state) => ({\n ...state,\n status: \"booking-fail\",\n message: JSON.stringify(dynamoData),\n }));\n }\n \n } else {\n setState((state) => ({\n ...state,\n status: \"booking-fail\",\n message: JSON.stringify(data),\n }));\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: JSON.stringify(data.Error.Message),\n data: \"\",\n nameAction: \"\"\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n }));\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: JSON.stringify(error.message),\n data: \"\",\n nameAction: \"\"\n }));\n alert(JSON.stringify(error.message));\n console.error(error);\n }\n };\n\n const confirmAppointment = async (appointmentId) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setState((state) => ({\n ...state,\n mouseX: null,\n mouseY: null,\n }));\n try {\n const payload = {\n Execute: \"Confirm\",\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: state.siteId,\n authorization: state.authorization,\n locationid: state.locationId,\n allowedpermissions: true,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${appointmentId}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n setState((state) => ({\n ...state,\n appointmentId: \"\",\n }));\n clearSidebar();\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"confirmappointment\");\n handleLocationChange(params);\n }\n } else {\n setState((state) => ({\n ...state,\n status: \"booking-fail\",\n message: JSON.stringify(data),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Cancel appointment error: \" + JSON.stringify(error.message),\n }));\n }\n };\n\n const createClient = async () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n try {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n const payload = {\n firstName: sidebarState.firstName,\n lastName: sidebarState.lastName,\n mobilePhone: sidebarState.mobilePhone,\n email: sidebarState.email,\n };\n const createClientRequest = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const createClientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients`,\n createClientRequest\n );\n const createClientData = await createClientResponse.json();\n if (createClientResponse.ok) {\n const createdClient = {\n clientId: createClientData.clientId,\n name: createClientData.name,\n phone: createClientData.phone,\n email: createClientData.email,\n };\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n client: createdClient,\n requesting: \"IDLE\",\n status: \"bookAppointment\",\n }));\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"CREATE-CLIENT-FAILED\",\n message: JSON.stringify(createClientData),\n }));\n }\n } catch (error) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"CREATE-CLIENT-ERROR\",\n message: \"Create client error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const updateClient = async () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n try {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n const payload = {\n Client: {\n FirstName: sidebarState.editedClient.firstName,\n LastName: sidebarState.editedClient.lastName,\n MobilePhone: sidebarState.editedClient.phone,\n Email: sidebarState.editedClient.email,\n Id: sidebarState.editedClient.clientId,\n },\n SendEmail: true,\n CrossRegionalUpdate: false,\n Test: false,\n };\n const updateClientRequest = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n },\n body: JSON.stringify(payload),\n };\n const updateClientResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${sidebarState.editedClient.clientId}`,\n updateClientRequest\n );\n const updateClientData = await updateClientResponse.json();\n if (updateClientResponse.ok) {\n const updatedClient = {\n clientId: updateClientData.Client.Id,\n name: `${updateClientData.Client.FirstName} ${updateClientData.Client.LastName}`,\n email: updateClientData.Client.Email,\n phone: updateClientData.Client.MobilePhone,\n };\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n client: updatedClient,\n requesting: \"IDLE\",\n status: \"bookAppointment\",\n ...(sidebarState.status === \"updateClient\" && { editedClient: updatedClient }),\n ...(sidebarState.status === \"updateClientAppointment\" && {\n editedAppointment: {\n ...sidebarState.editedAppointment,\n name: `${updateClientData.Client.FirstName} ${updateClientData.Client.LastName}`,\n email: updateClientData.Client.Email,\n phone: updateClientData.Client.MobilePhone,\n }\n }),\n }));\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"UPDATE-CLIENT-FAILED\",\n message: JSON.stringify(updateClientData),\n }));\n }\n } catch (error) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"UPDATE-CLIENT-ERROR\",\n message: \"Update client error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const handleClientFormChange = (event) => {\n event.preventDefault();\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n [event.target.name]: event.target.value,\n }));\n };\n\n const handleEditClientFormChange = (event) => {\n event.preventDefault();\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n editedClient: {\n ...sidebarState.editedClient,\n [event.target.name]: event.target.value,\n },\n }));\n };\n\n const getBlockClass = (available, appointment, blocks, index, id, staffId, roomIndex, highlight) => {\n let returnClass = \"\";\n let borderBottom = \" \";\n let borderTop = \" \";\n if (index === 0) {\n if (blocks[index + 1].appointment.id !== undefined) {\n if (blocks[index + 1].appointment.id === appointment.id) {\n borderBottom += \" border-bottom-color-\";\n }\n }\n }\n if (index > 0 && index < blocks.length - 1) {\n if (blocks[index + 1].appointment.id !== undefined) {\n if (blocks[index + 1].appointment.id === appointment.id) {\n borderBottom += \" border-bottom-color-\";\n }\n }\n if (blocks[index - 1].appointment.id !== undefined) {\n if (blocks[index - 1].appointment.id === appointment.name) {\n borderTop += \" border-top-color-\";\n }\n }\n }\n if (index === blocks.length) {\n if (blocks[index - 1].appointment.id !== undefined) {\n if (blocks[index - 1].appointment.id === appointment.id) {\n borderTop += \" border-top-color-\";\n }\n }\n }\n\n let borderEmptyBottom = \" \";\n let borderEmptyTop = \" \";\n if (index === 0) {\n if (\n blocks[index + 1].appointment.id === undefined &&\n blocks[index + 1].available === available\n ) {\n if (blocks[index + 1].description === blocks[index].description) {\n borderEmptyBottom += \" border-bottom-color-\";\n }\n }\n }\n if (index > 0 && index < blocks.length - 1) {\n if (\n blocks[index + 1].appointment.id === undefined &&\n blocks[index + 1].available === available\n ) {\n if (blocks[index + 1].description === blocks[index].description) {\n borderEmptyBottom += \" border-bottom-color-\";\n }\n }\n if (\n blocks[index - 1].appointment.id === undefined &&\n blocks[index + 1].available === available\n ) {\n if (blocks[index - 1].description === blocks[index].description) {\n borderEmptyTop += \" border-top-color-\";\n }\n }\n }\n if (index === blocks.length) {\n if (\n blocks[index - 1].appointment.id === undefined &&\n blocks[index + 1].available === available\n ) {\n if (blocks[index - 1].description === blocks[index].description) {\n borderEmptyTop += \" border-top-color-\";\n }\n }\n }\n\n if (appointment.status !== undefined) {\n switch (appointment.status) {\n case \"Booked\":\n returnClass =\n \"list-group-item lb-booked-block\" +\n borderBottom +\n \"booked \" +\n borderTop +\n \"booked \";\n break;\n case \"Confirmed\":\n returnClass =\n \"list-group-item lb-confirmed-block\" +\n borderBottom +\n \"confirmed \" +\n borderTop +\n \"confirmed \";\n break;\n case \"Arrived\":\n returnClass =\n \"list-group-item lb-arrived-block\" +\n borderBottom +\n \"arrived \" +\n borderTop +\n \"arrived \";\n break;\n case \"Completed\":\n returnClass =\n \"list-group-item lb-completed-block\" +\n borderBottom +\n \"completed \" +\n borderTop +\n \"completed \";\n break;\n case \"NoShow\":\n returnClass =\n \"list-group-item lb-noshow-block\" +\n borderBottom +\n \"noshow \" +\n borderTop +\n \"noshow \";\n break;\n }\n } else {\n returnClass = available\n ? \"list-group-item lb-available-block\"\n : \"list-group-item lb-restricted-block\" +\n borderEmptyBottom +\n \"restricted \" +\n borderEmptyTop +\n \"restricted \";\n }\n if (\n id === sidebarState.blockId &&\n staffId === sidebarState.staffId &&\n available &&\n appointment.id === undefined &&\n roomIndex === undefined\n ) {\n returnClass += \" selected\";\n }\n if (\n id === sidebarState.blockId &&\n staffId === sidebarState.staffId &&\n available &&\n appointment.id === undefined &&\n roomIndex === sidebarState.dayIndex\n ) {\n returnClass += \" selected\";\n }\n\n let clientId = null;\n\n if (sidebarState.appointment !== null) {\n if (sidebarState.appointment.clientId === appointment.clientId) {\n clientId = sidebarState.appointment.clientId;\n }\n }\n\n if (sidebarState.client.clientId !== undefined) {\n if (sidebarState.client.clientId === appointment.clientId) {\n clientId = sidebarState.client.clientId;\n }\n }\n\n const addHighlight = clientId !== null && highlight;\n\n return returnClass + (addHighlight ? \" lb-highligthed-block\" : \"\");\n };\n\n const getBlockClassSidebar = (appointment) => {\n let returnClass = \"\";\n\n if (appointment.status !== undefined) {\n switch (appointment.status) {\n case \"Booked\":\n returnClass = \"list-group-item lb-booked-block booked \";\n break;\n case \"Confirmed\":\n returnClass = \"list-group-item lb-confirmed-block confirmed \";\n break;\n case \"Arrived\":\n returnClass = \"list-group-item lb-arrived-block arrived \";\n break;\n case \"Completed\":\n returnClass = \"list-group-item lb-completed-block completed \";\n break;\n case \"NoShow\":\n returnClass = \"list-group-item lb-noshow-block noshow \";\n break;\n }\n }\n return returnClass;\n };\n\n const getBlockDescription = (available, blocks, index) => {\n let hideDescription = false;\n\n if (index > 0 && index < blocks.length - 1) {\n if (\n blocks[index - 1].appointment.id === undefined &&\n blocks[index - 1].available === available\n ) {\n if (blocks[index - 1].description === blocks[index].description) {\n hideDescription = true;\n }\n }\n }\n if (index === blocks.length) {\n if (\n blocks[index - 1].appointment.id === undefined &&\n blocks[index - 1].available === available\n ) {\n if (blocks[index - 1].description === blocks[index].description) {\n hideDescription = true;\n }\n }\n }\n\n const description = hideDescription\n ? \"\\u00a0\"\n : blocks[index].description !== \" \"\n ? blocks[index].description\n : \"Closed\";\n\n return description;\n };\n\n const availableBlocks = (staffId) => {\n const blocks = blocksPerRoom.find((item) => item.staffId === staffId);\n const mutableBlocks = { ...blocks };\n const availableBlocks = [];\n mutableBlocks.blocks.forEach((item) => {\n if (item.available && item.appointment.id === undefined) {\n availableBlocks.push(item);\n }\n });\n\n const availableBlocksForSelect = availableBlocks.map((item) => {\n const returnBlock = {\n value: item.id,\n label: item.segment,\n };\n return returnBlock;\n });\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n availableBlocks: availableBlocks,\n availableBlocksForSelect: availableBlocksForSelect,\n }));\n };\n\n const availableBlocksWeek = (staffId, dayIndex) => {\n const roomIndex = blocksPerWeek.findIndex(\n (item) => item.staffId === staffId\n );\n const blocks = blocksPerWeek[roomIndex].blocksPerDay[dayIndex].blocks;\n const mutableBlocks = [...blocks];\n const availableBlocks = [];\n mutableBlocks.forEach((item) => {\n if (item.available && item.appointment.id === undefined) {\n availableBlocks.push(item);\n }\n });\n\n const availableBlocksForSelect = availableBlocks.map((item) => {\n const returnBlock = {\n value: item.id,\n label: item.segment,\n };\n return returnBlock;\n });\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n availableBlocks: availableBlocks,\n availableBlocksForSelect: availableBlocksForSelect,\n }));\n };\n\n const handleRebooking = (selectedOption) => {\n const label = selectedOption.label;\n const apptBlocks = blocksPerRoom.find(\n (block) => block.staffId === sidebarState.staffId\n );\n const block = apptBlocks.blocks.find((item) => item.segment === label);\n\n const appointmentEdited = sidebarState.editedAppointment;\n appointmentEdited.StartDateTime = block.startDateTime;\n appointmentEdited.endDateTime = block.endDateTime;\n appointmentEdited.segment = label;\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n editedAppointment: appointmentEdited,\n }));\n };\n\n const handleRebookingWeek = (selectedOption) => {\n const label = selectedOption.label;\n const index = blocksPerWeek.findIndex(\n (block) => block.staffId === sidebarState.staffId\n );\n const apptBlocks =\n blocksPerWeek[index].blocksPerDay[sidebarState.dayIndex].blocks;\n const block = apptBlocks.find((item) => item.segment === label);\n\n const appointmentEdited = sidebarState.editedAppointment;\n appointmentEdited.StartDateTime = block.startDateTime;\n appointmentEdited.endDateTime = block.endDateTime;\n appointmentEdited.segment = label;\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n editedAppointment: appointmentEdited,\n }));\n };\n\n const handleEditedNotes = (event) => {\n const appointmentToEdit = sidebarState.editedAppointment;\n appointmentToEdit.notes = event.target.value;\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n editedAppointment: appointmentToEdit,\n }));\n };\n\n const handleCreateNotes = (event) => {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n createNotes: event.target.value,\n }));\n };\n\n const handleEditAppointment = async () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"\"\n }))\n try {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n response: \"process\",\n }))\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"REQUESTING\",\n }));\n const sendFullBody = \n sidebarState.editedAppointment.StartDateTime !== sidebarState.appointment.StartDateTime\n || sidebarState.appointment.staffId !== sidebarState.editedAppointment.staffId\n || sidebarState.editedAppointment.sessionTypeId !== sidebarState.appointment.sessionTypeId;\n const payload = {\n AppointmentId: sidebarState.editedAppointment.id,\n ...( sendFullBody && { StartDateTime: sidebarState.editedAppointment.StartDateTime }),\n ...( sendFullBody && { EndDateTime: sidebarState.editedAppointment.endDateTime }),\n ...( sendFullBody && { SessionTypeId: sidebarState.editedAppointment.sessionTypeId }),\n Notes: sidebarState.editedAppointment.notes,\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n locationid: state.locationId,\n allowedpermissions: true,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${sidebarState.appointment.id}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"success\",\n text: textResponse.successReschedule,\n data: \"\",\n nameAction: \"\"\n }))\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"IDLE\",\n }));\n clearSidebar();\n const params = { value: state.siteId + \"|\" + state.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"handleeditappointment\");\n handleLocationChange(params);\n }\n } else {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: textResponse.error,\n data: \"\",\n nameAction: \"\",\n }));\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"EDIT-FAIL\",\n message: \"Edit appointment failed: \" + JSON.stringify(data),\n }));\n clearSidebar();\n }\n } catch (error) {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: textResponse.error,\n data: \"\",\n nameAction: \"\"\n }));\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"EDIT-ERROR\",\n message: \"Edit appointment failed: \" + JSON.stringify(error),\n }));\n }\n };\n\n const handleEditAppointmentOnDrop = async (dataParams) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"\"\n }))\n try {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n response: \"process\",\n }))\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"REQUESTING-DND\",\n }));\n\n const payload = {\n AppointmentId: dataParams.appointmentId,\n StartDateTime: dataParams.startDateTime,\n EndDateTime: dataParams.endDateTime,\n SessionTypeId: dataParams.sessionTypeId,\n StaffId: dataParams.staffId,\n Notes: dataParams.notes,\n };\n const putMethod = {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: dataParams.authorization,\n siteid: dataParams.siteId,\n locationid: dataParams.locationId,\n allowedpermissions: true,\n },\n body: JSON.stringify(payload),\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/appointments/${dataParams.appointmentId}`,\n putMethod\n );\n const data = await response.json();\n if (response.ok) {\n\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"success\",\n text: textResponse.successReschedule,\n data: \"\",\n nameAction: \"\"\n }))\n triggerModalOnDrop();\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"SUCCESS-DND\",\n }));\n clearAppointmentSidebar();\n const params = { value: dataParams.siteId + \"|\" + dataParams.locationId };\n if (datesState.isWeekRange) {\n handleLocationChangeWeek(params);\n } else {\n console.log(\"handleEditAppointmentOnDrop\");\n handleLocationChange(params);\n }\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"EDIT-DND-FAIL\",\n message: \"Edit appointment failed: \" + JSON.stringify(data),\n }));\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: textResponse.error,\n data: \"\",\n show: false,\n nameAction: \"\"\n }));\n triggerModalOnDrop();\n }\n } catch (error) {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n action: false,\n response: \"error\",\n text: textResponse.error,\n data: \"\",\n nameAction: \"\"\n }));\n triggerModalOnDrop();\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"EDIT-DND-ERROR\",\n message: \"Edit appointment failed: \" + JSON.stringify(error),\n }));\n }\n };\n\n const handleEditAppointmentOnDropSidebar = (item) => {\n clearSidebar();\n setRebookSidebar((rebookSidebar) => ({\n ...rebookSidebar,\n appointment: item,\n }));\n };\n\n const clearAppointmentSidebar = () => {\n setRebookSidebar((rebookSidebar) => ({\n ...rebookSidebar,\n appointment: {},\n }));\n };\n\n const addOneWeek = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date(startDate.toString());\n mutableDate.setDate(mutableDate.getDate() + 7);\n setStartDate(mutableDate);\n };\n const addOneDay = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date(startDate.toString());\n mutableDate.setDate(mutableDate.getDate() + 1);\n setStartDate(mutableDate);\n };\n const subOneWeek = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date(startDate.toString());\n mutableDate.setDate(mutableDate.getDate() - 7);\n setStartDate(mutableDate);\n };\n const subOneDay = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date(startDate.toString());\n mutableDate.setDate(mutableDate.getDate() - 1);\n setStartDate(mutableDate);\n };\n const goToToday = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date();\n setStartDate(mutableDate);\n };\n\n const viewLastVisit = async (appointment) => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n\n try {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"REQUESTING-LAST-VISIT\",\n }));\n\n const queryStartDate = moment(startDate).subtract(6, 'months').format(\"MM/DD/YYYY\").toString();\n\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n locationid: state.locationId,\n allowedpermissions: true,\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${appointment.clientId}/visits?startDate=${queryStartDate}`,\n getMethod\n );\n const data = await response.json();\n if (response.ok) {\n const appointments = data.visits.filter(appointment => appointment.appointmentStatus === \"Completed\")\n\n if (appointments.length > 0) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n requesting: \"IDLE\",\n status: \"displayLastVisit\",\n lastVisit: {\n client: data.clients[0],\n appointments: appointments,\n }\n }));\n }\n else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"ERROR-LAST-VISIT\",\n message: \"No visits found in the last 6 months\",\n lastVisit: {\n client: {},\n appointments: [],\n }\n }));\n }\n\n } else {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"ERROR-LAST-VISIT\",\n message: \"Not Found: \" + JSON.stringify(data),\n lastVisit: {\n client: {},\n appointments: [],\n }\n }));\n }\n } catch (error) {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n requesting: \"ERROR-LAST-VISIT\",\n message: \"Error: \" + JSON.stringify(error),\n lastVisit: {\n client: {},\n appointments: [],\n }\n }));\n }\n }\n\n const getLocationsInformation = async () => {\n try {\n const getSitesData = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n getSitesData\n );\n\n const data = await response.json();\n\n if (response.ok) {\n\n const allSitesItem = data.sites.find(site => site.site === \"0-0\");\n let sitesArray = []\n if (allSitesItem !== undefined) {\n sitesArray = data.sites.filter(site => site.site !== \"0-0\");\n }\n else {\n sitesArray = data.sites;\n }\n setSitesInfo(sitesArray);\n } else {\n console.error(\"error requesting the config sites endpoint\");\n console.error(response);\n }\n } catch (error) {\n console.error(JSON.stringify(error));\n }\n }\n\n useEffect(() => {\n getLocationsInformation();\n }, []);\n\n useEffect(() => {\n if ('label' in appState.bookingAuth.selectedSite) {\n if (\n state.status !== \"loadingAppointments\" &&\n state.status !== \"refreshingAppointments\" &&\n sidebarState.requesting !== \"REQUESTING\" &&\n sidebarState.requesting !== \"REQUESTING-DND\"\n ) {\n setFetchServices(true);\n setState((state) => ({\n ...state,\n status: \"IDLE\",\n }));\n\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"IDLE\",\n message: \"\",\n }));\n\n setDisplayableBlocks([]);\n\n setBlocksPerRoom([]);\n // console.log(location);\n const siteLocation = appState.bookingAuth.selectedSite.value.replace(\"|\", \"-\");\n const siteInfo = sitesInfo.find(site => site.site === siteLocation);\n if (siteInfo) {\n setLocation({\n ...appState.bookingAuth.selectedSite,\n HTAEnglish: siteInfo.HTAEnglish ?? '',\n HTASpanish: siteInfo.HTASpanish ?? '',\n address: siteInfo.address ?? '',\n siteId: siteInfo.site.split(\"-\")[0] ?? '',\n locationId: siteInfo.site.split(\"-\")[1] ?? '',\n sitePhone: siteInfo.phone ?? '',\n timeZone: siteInfo.timeZone ?? '',\n });\n }\n else {\n setLocation(appState.bookingAuth.selectedSite);\n }\n }\n else {\n setAppState((appState) => ({\n ...appState,\n bookingAuth: {\n ...appState.bookingAuth,\n selectedSite: location,\n },\n }));\n }\n\n }\n\n }, [appState.bookingAuth.selectedSite]);\n \n useEffect(() => {\n if(location.siteId){\n setFetchServices(true);\n datesState.isWeekRange\n ? handleLocationChangeWeek(appState.bookingAuth.selectedSite)\n : handleLocationChange(appState.bookingAuth.selectedSite);\n }\n }, [location.siteId, location.locationId]);\n\n const handleSearchClientInput = (event) => {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n inputValue: event.target.value,\n visits: [],\n }));\n }\n\n const handleDialogClose = () => {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"IDLE\",\n }));\n }\n\n const reloadTable = () => {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n const mutableDate = new Date(startDate.toString());\n setStartDate(mutableDate);\n }\n\n const searchClientVisits = async (searchTerm) => {\n if (clientVisits.requesting === \"REQUESTING\") {\n return;\n }\n try {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n requesting: \"REQUESTING\",\n }));\n\n const searchClientsRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: state.authorization,\n siteid: state.siteId,\n },\n };\n const queryStartDate = moment(startDate).subtract(6, \"months\").format(\"MM/DD/YYYY\").toString();\n const queryEndDate = moment(startDate).add(6, \"months\").format(\"MM/DD/YYYY\").toString();\n const searchClientsVisitsResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${searchTerm??clientVisits.inputValue}/visits?startDate=${queryStartDate}&endDate=${queryEndDate}`,\n searchClientsRequest\n );\n\n const searchClientsData = await searchClientsVisitsResponse.json();\n if (searchClientsVisitsResponse.ok) {\n if(searchClientsData.clients[0]){\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"SHOW\",\n requesting: \"IDLE\",\n visits: searchClientsData.visits,\n client: searchClientsData.clients[0]\n }));\n }\n else{\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n requesting: \"VISITS-ERROR\",\n message: \"Visits search error\",\n }));\n }\n } else {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n requesting: \"VISITS-NO-FOUND\",\n message: \"No visits found for this client\",\n visits: [],\n }));\n }\n } catch (error) {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n requesting: \"VISITS-ERROR\",\n message: \"Visits search error: \" + JSON.stringify(error),\n }));\n }\n };\n\n return (\n
\n
\n
\n\n \n\n
\n
\n {moment(currentDate).format(\"LT Z\").toString()}\n
\n {datesState.isWeekRange && (\n
\n {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n handleCalendarChange(date);\n }}\n selected={startDate}\n selectsStart\n startDate={startDate}\n endDate={endDate}\n peekNextMonth\n showMonthDropdown\n showYearDropdown\n dropdownMode=\"select\"\n inline\n />\n
\n )}\n {!datesState.isWeekRange && (\n
\n {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n handleCalendarChange(date);\n }}\n selected={startDate}\n peekNextMonth\n showMonthDropdown\n showYearDropdown\n dropdownMode=\"select\"\n inline\n />\n
\n )}\n \n
\n \n {rebookSidebar.appointment.status !== undefined &&\n sidebarState.status === \"IDLE\" && (\n <>\n \n \n \n \n \n
\n \n )}\n
\n \n {sidebarState.status === \"searchOrCreateClient\" && (\n <>\n
Book appointment
\n
\n

Client search

\n
\n \n \n {sidebarState.requesting === \"REQUESTING\" && (\n \n )}\n {sidebarState.requesting !== \"REQUESTING\" && (\n \n )}\n \n
\n {sidebarState.searchResults.length > 0 && (\n
    \n {sidebarState.searchResults.map((clientItem, index) => {\n return (\n handleClientSelect(index)}\n >\n {clientItem.name} - {clientItem.email} -{\" \"}\n {clientItem.phone}\n \n );\n })}\n
\n )}\n {sidebarState.requesting === \"CLIENT-NO-FOUND\" && (\n
\n NO CLIENTS FOUND \n
\n )}\n {sidebarState.requesting === \"CLIENT-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n\n \n BACK\n \n {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"createClient\",\n }));\n }}\n >\n Or create a new client\n \n
\n \n )}\n {(sidebarState.status === \"editAppointment\" ||\n sidebarState.status === \"updateClientAppointment\") && (\n <>\n
Edit appointment
\n
\n
\n {sidebarState.editedAppointment.redAlert !== \"\" &&\n sidebarState.editedAppointment.redAlert !== undefined &&\n sidebarState.editedAppointment.redAlert !== null && (\n \n \n  \n {sidebarState.editedAppointment.redAlert}\n \n )}\n
\n
\n {sidebarState.editedAppointment.formFilled !== \"\" &&\n sidebarState.editedAppointment.formFilled !== undefined &&\n sidebarState.editedAppointment.formFilled !== null && (\n \n \n  \n {sidebarState.editedAppointment.formFilled}\n \n )}\n
\n
\n {sidebarState.editedAppointment.name}\n {sidebarState.editedAppointment.phone}\n
\n
\n {sidebarState.editedAppointment.email}\n
\n\n
\n \n {sidebarState.editedAppointment.sessionTypeName}\n \n
\n
\n {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"updateClientAppointment\",\n statusDisabled: true,\n editedClient: sidebarState.appointment,\n }));\n }}\n >\n Edit client\n \n
\n\n {sidebarState.status === \"updateClientAppointment\" && (\n <>\n
\n
Update Client
\n
\n \n \n \n \n\n {sidebarState.requesting === \"CREATE-CLIENT-FAIL\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting ===\n \"CREATE-CLIENT-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n
\n {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"editAppointment\",\n statusDisabled: false,\n }));\n }}\n >\n CANCEL\n \n \n {sidebarState.requesting === \"REQUESTING\" && (\n \n )}\n {sidebarState.requesting !== \"REQUESTING\" && (\n <>UPDATE\n )}\n \n
\n
\n
\n \n )}\n\n
\n \n
\n \n \n {sidebarState.requesting === \"EDIT-FAIL\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting === \"EDIT-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n
\n \n BACK\n \n {\n setConfirmationAction((confirmationAction) => ({\n ...confirmationAction,\n nameAction: \"reschedule\",\n response: \"default\",\n text: textResponse.reschedule,\n data: sidebarState.appointment,\n info: true,\n infoTittle: `${sidebarState.appointment.firstName} ${sidebarState.appointment.lastName}, ${sidebarState.appointment.sessionTypeName}`,\n infoBody:\n <>\n
\n Date: {moment(startDate).format(\"YY-MM-DD\")}, \n {moment(sidebarState.appointment.StartDateTime).format(\"hh:mm A\")} - {moment(sidebarState.appointment.endDateTime).format(\"hh:mm A\")}\n
\n
\n Phone: {sidebarState.appointment.phone}\n
\n
\n Email: {sidebarState.appointment.email}\n
\n \n }))\n }}\n\n disabled={sidebarState.statusDisabled}\n >\n {sidebarState.requesting === \"REQUESTING\" && (\n \n )}\n {sidebarState.requesting !== \"REQUESTING\" && <>SAVE}\n \n
\n
\n \n )}\n {(sidebarState.status === \"createClient\" ||\n sidebarState.status === \"updateClient\") && (\n <>\n
\n {sidebarState.status === \"createClient\"\n ? \"Create client\"\n : \"Update Client\"}\n
\n
\n \n \n \n \n\n {sidebarState.requesting === \"CREATE-CLIENT-FAIL\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting === \"CREATE-CLIENT-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n
\n \n {sidebarState.status === \"createClient\"\n ? \"BACK\"\n : \"CANCEL\"}\n \n \n {sidebarState.requesting === \"REQUESTING\" && (\n \n )}\n {sidebarState.requesting !== \"REQUESTING\" && (\n <>\n {sidebarState.status === \"createClient\"\n ? \"CREATE\"\n : \"UPDATE\"}\n \n )}\n \n
\n
\n \n )}\n {sidebarState.status === \"bookAppointment\" && (\n <>\n
Book appointment
\n
\n
\n {sidebarState.client.name}\n {sidebarState.client.phone}\n
\n
\n {sidebarState.client.email}\n
\n
\n

\n Start: {sidebarState.block}\n

\n\n {\n setSidebarState((sidebarState) => ({\n ...sidebarState,\n status: \"updateClient\",\n editedClient: sidebarState.client,\n }));\n }}\n >\n Edit client\n \n
\n \n
\n \n
\n\n {sidebarState.requesting === \"BOOK-APPOINTMENT-FAIL\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting === \"BOOK-APPOINTMENT-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n\n
\n \n BACK\n \n \n {sidebarState.requesting === \"REQUESTING\" && (\n \n )}\n {sidebarState.requesting !== \"REQUESTING\" && <>BOOK}\n \n
\n
\n \n )}\n {sidebarState.status === \"displayLastVisit\" && (\n
\n
Last Visit:
\n
\n Name: {`${sidebarState.lastVisit.client.FirstName} ${sidebarState.lastVisit.client.LastName}`}
\n Service: {sidebarState.lastVisit.appointments[0].serviceName}
\n Date: {moment(sidebarState.lastVisit.appointments[0].startDateTime).format(\"DD/MM/YYYY hh:mm\").toString()}
\n
\n
\n \n BACK\n \n
\n
\n )}\n {sidebarState.requesting === \"REQUESTING-DND\" && (\n
\n
\n
\n )}\n {sidebarState.requesting === \"SUCCESS-DND\" && (\n
\n Successful operation \n
\n )}\n {sidebarState.requesting === \"EDIT-DND-FAIL\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting === \"EDIT-DND-ERROR\" && (\n
\n {sidebarState.message} \n
\n )}\n {sidebarState.requesting === \"REQUESTING-LAST-VISIT\" && (\n
\n
\n
\n )}\n {sidebarState.requesting === \"ERROR-LAST-VISIT\" && (\n <>\n
\n {sidebarState.message} \n
\n
\n \n BACK\n \n
\n \n )}\n {state.status === \"displayAppointments\" &&\n !datesState.isWeekRange &&\n state.displayAll && (\n <>\n
\n\n
\n

{state.totalCounter.Booked} Booked

\n
\n\n
\n

{state.totalCounter.Confirmed} Confirmed

\n
\n\n
\n

{state.totalCounter.Arrived} Arrived

\n
\n\n
\n

{state.totalCounter.Completed} Completed

\n
\n\n
\n

{state.totalCounter.NoShow} NoShow

\n
\n\n
\n

{state.totalCounter.total} Total

\n
\n\n
\n

{state.totalCounter.cbff} CBFF

\n
\n\n
\n \n )}\n {state.status === \"displayAppointments\" &&\n !datesState.isWeekRange &&\n !state.displayAll && (\n <>\n
\n\n
\n

{state.totalCounter.Booked} Booked

\n
\n\n
\n

{state.totalCounter.Confirmed} Confirmed

\n
\n\n
\n

{state.totalCounter.Arrived} Arrived

\n
\n\n
\n

{state.totalCounter.Completed} Completed

\n
\n\n
\n

{state.totalCounter.NoShow} NoShow

\n
\n\n
\n

{state.totalCounter.total} Total

\n
\n\n
\n

{state.totalCounter.cbff} CBFF

\n
\n\n
\n \n )}\n {state.status === \"displayAppointments\" && datesState.isWeekRange && (\n <>\n
\n\n
\n

{state.totalCounter.Booked} Booked

\n
\n\n
\n

{state.totalCounter.Confirmed} Confirmed

\n
\n\n
\n

{state.totalCounter.Arrived} Arrived

\n
\n\n
\n

{state.totalCounter.Completed} Completed

\n
\n\n
\n

{state.totalCounter.NoShow} NoShow

\n
\n\n
\n

{state.totalCounter.total} Total

\n
\n\n
\n

{state.totalCounter.cbff} CBFF

\n
\n\n
\n \n )}\n \n\n
\n
\n
\n \n \n \n \n {moment(startDate).format(\"MM/DD/YYYY\").toString()}\n {datesState.isWeekRange && (<> - {moment(endDate).format(\"MM/DD/YYYY\").toString()} \n )}\n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n \n TODAY\n \n \n \n \n
\n\n {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setDateRange(\"day\");\n }}\n >\n Day\n \n {\n if (\n state.status === \"loadingAppointments\" ||\n state.status === \"refreshingAppointments\" ||\n sidebarState.requesting === \"REQUESTING\" ||\n sidebarState.requesting === \"REQUESTING-DND\"\n ) {\n return;\n }\n setDateRange(\"week\");\n }}\n >\n Week\n \n
\n
\n { /* AQUI */}\n { /* AQUI */}\n
\n \n searchClientVisits(null)}\n >\n {clientVisits.requesting === \"REQUESTING\" && (\n \n )}\n {clientVisits.requesting !== \"REQUESTING\" && (\n \n )}\n \n
\n
\n
\n\n
\n
\n {state.status === \"refreshingAppointments\" &&\n !datesState.isWeekRange && (\n <>\n
\n
\n \n ALL\n \n {rooms.map((room) => {\n return (\n \n {room.staffName}\n \n );\n })}\n
\n
\n {confirmationAction.response !== \"success\" && (state.status === \"refreshingAppointments\" && (\n
\n
\n
\n ))}\n
\n
\n
    \n
  • \n Name\n
  • \n {displayableBlocks.blocks.map(\n ({ id, segment }, index) => {\n return (\n \n {segment}\n \n );\n }\n )}\n
\n
\n\n
\n {state.displayAll && (\n <>\n {blocksPerRoom.map((roomAppointments) => {\n return (\n \n
\n {roomAppointments.staffName}\n
\n {roomAppointments.blocks.map(\n (\n {\n id,\n appointment,\n available,\n segment,\n blockDate,\n description,\n endSegment,\n },\n index\n ) => {\n return (\n \n {appointment.sessionTypeName !==\n undefined && (\n
\n {appointment.name +\n \": \" +\n appointment.sessionTypeName}\n
\n )}\n {appointment.sessionTypeName ===\n undefined && (\n <>\n
\n {available && <>   }\n {!available && (\n <>\n {\" \"}\n {\"\" +\n getBlockDescription(\n available,\n roomAppointments.blocks,\n index\n )}{\" \"}\n \n )}\n
\n \n )}{\" \"}\n
\n );\n }\n )}\n
\n );\n })}\n \n )}\n {!state.displayAll && (\n
\n
\n {displayableBlocks.staffName}\n
\n {displayableBlocks.blocks.map(\n (\n {\n id,\n appointment,\n available,\n segment,\n blockDate,\n description,\n endSegment,\n },\n index\n ) => {\n return (\n \n {appointment.sessionTypeName !==\n undefined && (\n
\n {appointment.name +\n \": \" +\n appointment.sessionTypeName}\n
\n )}\n {appointment.sessionTypeName ===\n undefined &&
 
}\n
\n );\n }\n )}\n
\n )}\n
\n
\n \n )\n }\n\n {state.status === \"refreshingAppointments\" &&\n datesState.isWeekRange && (\n <>\n
\n
\n {rooms.map((room) => {\n return (\n \n {room.staffName}\n \n );\n })}\n
\n
\n\n
\n {confirmationAction.response !== \"success\" && (state.status === \"refreshingAppointments\" && (\n
\n
\n
\n ))}\n\n
\n
    \n
  • \n DAY\n
  • \n {blocks.map(({ id, segment }, index) => {\n return (\n \n {segment}\n \n );\n })}\n
\n
\n\n <>\n
\n {state.status === \"refreshingAppointments\" &&\n datesState.isWeekRange && (\n <>\n {displayableBlocks.blocksPerDay.map(\n (roomAppointments, dayIndex) => {\n return (\n \n
\n \n {moment(roomAppointments.date)\n .format(\"dddd\")\n .toString()}\n \n
\n {roomAppointments.blocks.map(\n (\n {\n id,\n appointment,\n available,\n segment,\n blockDate,\n description,\n endSegment,\n },\n index\n ) => {\n return (\n \n {appointment.sessionTypeName !==\n undefined && (\n
\n {appointment.name +\n \": \" +\n appointment.sessionTypeName}\n
\n )}\n {appointment.sessionTypeName ===\n undefined && (\n <>\n
\n {available && (\n <> \n )}\n {!available && (\n <>\n {\"\" +\n getBlockDescription(\n available,\n roomAppointments.blocks,\n index\n )}\n \n )}\n
\n \n )}\n
\n );\n }\n )}\n
\n );\n }\n )}\n \n )}\n
\n \n
\n \n )\n }\n\n {state.status === \"displayAppointments\" &&\n !datesState.isWeekRange && (\n <>\n
\n
\n handleRoomChange(\"ALL\")}\n >\n ALL\n \n {rooms.map((room) => {\n return (\n handleRoomChange(room.staffId)}\n >\n {room.staffName}\n \n );\n })}\n
\n
\n\n {confirmationAction.response !== \"success\" && (state.status === \"refreshingAppointments\" && (\n
\n
\n
\n ))}\n\n
\n
\n
    \n
  • \n Name\n
  • \n {displayableBlocks.blocks.map(\n ({ id, segment }, index) => {\n return (\n \n {segment}\n \n );\n }\n )}\n
\n
\n\n
\n {state.displayAll && (\n \n {blocksPerRoom.map((roomAppointments) => {\n return (\n
\n
\n {roomAppointments.staffName}\n
\n {roomAppointments.blocks.map(\n ({id, appointment, appointments, available, segment, blockDate, type, endSegment, occupied}, index) => {\n return (\n
\n {!occupied && (\n \n )}\n {(occupied && type === \"DNA\") && (\n \n )}\n {(occupied && type !== \"DNA\") && (\n \n )}\n
\n );\n }\n )}\n
\n );\n })}\n
\n )}\n {!state.displayAll && (\n \n
\n
\n {displayableBlocks.staffName}\n
\n {displayableBlocks.blocks.map(\n ({id,appointment,appointments,available,segment,blockDate,type,description,endSegment,occupied},index) => {\n return (\n
\n {!occupied && (\n \n )}\n {(occupied && type === \"DNA\") && (\n \n )}\n {(occupied && type !== \"DNA\") && (\n \n )}\n
\n );\n }\n )}\n
\n
\n )}\n
\n
\n \n )}\n\n {state.status === \"displayAppointments\" &&\n datesState.isWeekRange && (\n <>\n
\n
\n {rooms.map((room) => {\n return (\n \n handleRoomChangeWeek(room.staffId)\n }\n >\n {room.staffName}\n \n );\n })}\n
\n
\n\n
\n {confirmationAction.response !== \"success\" && (state.status === \"refreshingAppointments\" && (\n
\n
\n
\n ))}\n\n
\n
    \n
  • \n DAY\n
  • \n {blocks.map(({ id, segment }, index) => {\n return (\n \n {segment}\n \n );\n })}\n
\n
\n\n \n
\n {(state.status === \"displayAppointments\" || state.status === \"refreshingAppointments\") &&\n datesState.isWeekRange && (\n <>\n {displayableBlocks.blocksPerDay.map(\n (roomAppointments, dayIndex) => {\n return (\n \n
\n {moment(roomAppointments.date).format(\"dddd\").toString()}\n
\n {roomAppointments.blocks.map(\n ({id,appointment,appointments,available,segment,blockDate,type,description,endSegment,occupied},index) => {\n return (\n \n {(occupied && type !== \"DNA\") && (\n \n )}\n {(occupied && type === \"DNA\") && (\n \n )}\n {!occupied && (\n \n )}\n
\n );\n }\n )}\n
\n );\n }\n )}\n \n )}\n
\n \n
\n \n )}\n\n {state.status === \"IDLE\" && (\n

\n Please select a location\n

\n )}\n\n {state.status === \"loadingAppointments\" && (\n
\n
\n
\n )}\n\n {(state.status === \"on-load-error\" ||\n state.status === \"no-blocks-found\") && (\n
\n {state.message} \n
\n )}\n
\n
\n \n\n {clientVisits.status === \"SHOW\" && (\n \n \n \n \n Visits History\n \n \n \n \n \n \n\n\n \n \n )}\n
\n
\n \n );\n}\n\nBookingPage.propTypes = {\n appState: PropTypes.object.isRequired,\n setAppState: PropTypes.func.isRequired,\n};\nexport default BookingPage;\n","import React, { useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { Redirect } from \"react-router-dom\";\nimport logo from \"../logo.png\";\nimport { PropTypes } from \"prop-types\";\nimport * as crypto from \"crypto-js\";\n\nconst createRequest = (method, headers, body) => {\n return {\n method: method,\n headers: headers,\n body: body,\n };\n};\n\nfunction BookingLoginPage({ appState, setAppState }) {\n const [state, setState] = useState({\n status: \"idle\",\n });\n const [Username, setUserName] = useState(\"\");\n const [Password, setPassword] = useState(\"\");\n\n const getSites = async () => {\n let sites;\n\n const getSitesQuery = createRequest(\"GET\", {\n \"Content-type\": \"application/json; charset=UTF-8\",\n });\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/sites/`,\n getSitesQuery\n );\n if (response.ok) {\n sites = await response.json();\n return sites;\n } else {\n return Promise.reject(\n new Error(\"Failed to retrieve the sitelist from /api/sites/sites\")\n );\n }\n };\n\n const multiLogin = async ({ Username, Password, sites }) => {\n const singleLogin = async ({ Username, Password, siteId, siteName }) => {\n const payload = {\n Username: Username,\n Password: Password,\n };\n const key = process.env.REACT_APP_ENCRYPTION_KEY;\n const encrypted = crypto.AES.encrypt(\n JSON.stringify(payload),\n key\n ).toString();\n const body = { data: encrypted };\n const putMethod = createRequest(\n \"PUT\",\n {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: siteId,\n },\n JSON.stringify(body)\n );\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/userToken/`,\n putMethod\n );\n if (response.ok) {\n const responseData = await response.json();\n console.log(responseData.userRol.trim());\n if (responseData.userRol.toLowerCase().trim() === \"technicians\") {\n return Promise.resolve({\n error:\n \"Failed to authenticate against \" +\n siteName +\n \" \" +\n siteId +\n \" NOT AUTHORIZED\",\n siteId: siteId,\n siteName: siteName,\n });\n } else {\n const data = {\n auth: responseData,\n siteId: siteId,\n siteName: siteName,\n };\n return Promise.resolve(data);\n }\n } else {\n return Promise.resolve({\n error: \"Failed to authenticate against \" + siteName + \" \" + siteId,\n siteId: siteId,\n siteName: siteName,\n });\n }\n };\n\n const authAttemps = sites.map((site) =>\n singleLogin({\n Username: Username,\n Password: Password,\n siteId: site.id,\n siteName: site.name,\n })\n );\n const authResults = await Promise.all(authAttemps);\n const successfulAuths = authResults.filter((item) => {\n return \"auth\" in item;\n });\n return Promise.resolve(successfulAuths);\n };\n\n const handleLogin = async (event) => {\n event.preventDefault();\n\n if (state.status === \"loading\") {\n return;\n }\n\n setState((state) => ({\n ...state,\n status: \"loading\",\n message: \"Loggin in\",\n }));\n try {\n const sites = await getSites();\n\n const auths = await multiLogin({\n Username: Username,\n Password: Password,\n sites: sites,\n }).catch((error) => {\n console.log(error);\n });\n\n const getAllLocations = async () => {\n const getMethod = createRequest(\"GET\", {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: auths[0].siteId,\n authorization: auths[0].auth.accesssToken,\n });\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/all/locations/`,\n getMethod\n );\n if (response.ok) {\n return response.json();\n } else {\n return Promise.reject(\n new Error(\n \"Failed to get location lists from: /api/sites/all/locations/\"\n )\n );\n }\n };\n const locations = await getAllLocations();\n const sitesForSelect = [];\n const sitesAuth = locations.siteslist\n .filter((site) => site.id !== \"0-0\")\n .map((site) => {\n const siteId = site.id.split(\"-\")[0];\n const locationId = site.id.split(\"-\")[1];\n const siteName = site.name;\n const authObject = auths.find(\n (el) => el.siteId.toString() === siteId\n );\n if (authObject !== undefined) {\n const siteForSelect = {\n value: `${siteId}|${locationId}`,\n label: siteName,\n };\n sitesForSelect.push(siteForSelect);\n return {\n token: authObject.auth.accesssToken,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n userId: authObject.auth.userId,\n userName: authObject.auth.userName,\n userRol: authObject.auth.userRol,\n status: \"OK\",\n };\n } else {\n return {\n token: null,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n siteLocation: site.id,\n };\n }\n });\n\n setState((state) => ({\n ...state,\n status: \"success\",\n message: \"Success. You will be redirected soon.\",\n }));\n\n setAppState((appState) => ({\n ...appState,\n authType: \"booking\",\n bookingAuth: {\n ...appState.bookingAuth,\n status: \"redirect\",\n authorizationTokens: sitesAuth.filter((el) => el.token !== null),\n locationsAuth: sitesAuth.filter((el) => el.token !== null),\n sitesSelect: sitesForSelect,\n },\n }));\n } catch (e) {\n console.error(e);\n setAppState((appState) => ({\n ...appState,\n bookingAuth: {\n ...appState.bookingAuth,\n authorizationTokens: [],\n },\n }));\n setState((state) => ({\n ...state,\n status: \"failed\",\n message: \"You failed to authenticate in all sites\",\n }));\n }\n };\n\n return (\n <>\n {appState.bookingAuth.status === \"redirect\" && (\n <>\n \n \n )}\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Login

\n
\n
\n
\n
\n
\n
\n setUserName(e.target.value)}\n />\n setPassword(e.target.value)}\n />\n {state.status === \"failed\" && (\n \n {state.message}\n
\n )}\n {state.status === \"success\" && (\n
\n {state.message}\n
\n )}\n {state.status !== \"loading\" ? (\n \n \n LOGIN\n \n \n ) : (\n \n \n \n )}\n
\n
\n
\n
\n \n \n );\n}\n\nBookingLoginPage.propTypes = {\n appState: PropTypes.object.isRequired,\n setAppState: PropTypes.func.isRequired,\n};\nexport default BookingLoginPage;\n","import React, { useEffect, useState } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { Link } from \"react-router-dom\";\nimport moment from \"moment\";\nimport DatePicker from \"react-datepicker\";\nimport \"react-datepicker/dist/react-datepicker.css\";\nimport Select from \"react-select\";\n\nfunction ApproveDailyReport({ appState, setAppState }) {\n const [state, setState] = useState({\n status: \"ready\",\n message: \"\",\n siteId: \"\",\n locationId: \"\",\n locationName: \"\",\n date: new Date(moment().subtract(1,\"days\").toString()),\n disableButton: true,\n approved : false,\n });\n\n const [sites, setSites] = useState([]);\n\n const handleDateChange = (date) => {\n setState((state) => ({\n ...state,\n date: date,\n disableButton : true,\n }));\n };\n\n const handleSiteChange = (site) => {\n let foundedSite = {};\n \n // sites[0].options.find((i) => i.value === site.value) === undefined ? foundedSite = sites[1].options.find((i) => i.value === site.value) : foundedSite = sites[0].options.find((i) => i.value === site.value)\n\n if(sites[1].options.find((i) => i.value === site.value) === undefined){\n\n foundedSite = sites[0].options.find((i) => i.value === site.value);\n\n setState((state) => ({\n ...state,\n siteId: site.value.split(\"-\")[0],\n locationId: site.value.split(\"-\")[1],\n locationName: site.label,\n disableButton: foundedSite === undefined,\n approved : true\n }));\n\n }else{\n\n foundedSite = sites[1].options.find((i) => i.value === site.value)\n\n setState((state) => ({\n ...state,\n siteId: site.value.split(\"-\")[0],\n locationId: site.value.split(\"-\")[1],\n locationName: site.label,\n disableButton: foundedSite === undefined,\n approved : false\n }));\n\n\n }\n\n\n };\n\n useEffect(() => {\n getSites();\n }, [state.date]);\n\n const getSites = async () => {\n try {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n\n const getSitesQuery = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n getSitesQuery\n );\n const data = await response.json();\n if (response.ok) {\n const completedSitesQuery = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const qDate = moment(state.date).format(\"MM/DD/YYYY\").toString();\n\n const completedSitesResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/dailyReport/completed?sortDate=${qDate}`,\n completedSitesQuery\n );\n const completedData = await completedSitesResponse.json();\n if (completedSitesResponse.ok) {\n\n const sitesOptions = data.sites.map((site) => {\n const siteObject = {\n value: site.site,\n label: site.name,\n };\n return siteObject;\n });\n\n sitesOptions.sort(function (a, b) {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n return 0;\n });\n\n let completedOptions = [];\n let approvedOptions = [];\n\n if (completedData.sites.length > 0) {\n completedOptions = completedData.sites.map((site) => {\n const siteId = site.site;\n const siteIndex = sitesOptions.findIndex(\n (site) => site.value === siteId\n );\n let siteObject = {};\n if (siteIndex !== -1) {\n siteObject = sitesOptions[siteIndex];\n sitesOptions.splice(siteIndex, 1);\n } else {\n console.log(\"not found\");\n }\n return siteObject;\n });\n\n completedOptions.sort(function (a, b) {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n return 0;\n });\n\n\n approvedOptions = completedData.sites.map((i) => {\n\n let approved = {};\n \n const sitios = completedOptions.find((c) => c.value === i.site)\n \n if(sitios !== undefined){\n\n if(sitios.value === i.site && i.approved){\n \n const foundSitedex = completedOptions.findIndex((c) => c.value === sitios.value);\n approved = {value: sitios.value, label: sitios.label};\n completedOptions.splice(foundSitedex,1);\n\n }\n }\n\n if(completedOptions.length === 0){\n\n completedOptions.push(\n {\n value: \"No-data\",\n label: \"No completed reports found\",\n isDisabled: true,\n });\n\n }\n\n return approved;\n \n }).filter((sitesApproved) => {\n \n return Object.entries(sitesApproved).length !== 0;\n \n }).sort((a,b) => {\n if(a.label > b.label)\n { return 1 }\n if(a.label < b.label)\n { return -1}\n return 0;\n });\n \n\n }else {\n\n approvedOptions = [\n {\n value: \"No-data\",\n label: \"No approved reports found\",\n isDisabled: true,\n },\n ];\n completedOptions = [\n {\n value: \"No-data\",\n label: \"No completed reports found\",\n isDisabled: true,\n },\n ];\n }\n\n const displayableSites = [\n {\n label: \"Approved\",\n options: approvedOptions,\n },\n {\n label: \"Completed\",\n options: completedOptions,\n },\n {\n label: \"Pending\",\n options: sitesOptions,\n },\n ];\n\n setSites(displayableSites);\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n } else {\n console.log(\"Fallo completados\");\n }\n } else {\n console.log(\"Fallo general\");\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n setSites([]);\n }\n };\n\n const groupStyles = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n };\n\n const selectStyles = {\n option: (styles, { data, isDisabled, isFocused, isSelected }) => {\n return {\n ...styles,\n fontSize: 14,\n };\n },\n };\n\n const groupTextStyles = {\n color: \"#AE678C\",\n fontSize: 16,\n textTransform: \"capitalize\",\n };\n\n const formatGroupLabel = (data) => (\n
\n {data.label}\n
\n );\n\n return (\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {state.status !== \"loading\" && (\n
\n
\n
\n
\n

\n Review Daily Report.\n

\n
\n
\n\n
\n
\n {\n handleSiteChange(site);\n }}\n />\n
\n
\n handleDateChange(date)}\n className=\"form-control\"\n />\n
\n
\n {!state.disableButton && (\n \n Review Report\n \n )}\n {state.disableButton && (\n \n Review Report\n \n )}\n
\n
\n
\n\n {(state.status === \"error\" ||\n appState.nav.status === \"logOutError\") && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n \n {appState.nav.status === \"logOutError\"\n ? appState.nav.message\n : state.message}\n \n
\n
\n
\n
\n )}\n\n {state.status === \"no-data-found\" && (\n
\n
\n
\n

No report found

\n
\n {state.message}\n
\n
\n
\n
\n )}\n
\n )}\n
\n );\n}\nApproveDailyReport.propTypes = {\n appState: PropTypes.object.isRequired,\n setAppState: PropTypes.func.isRequired,\n};\nexport default ApproveDailyReport;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { Pie } from \"react-chartjs-2\";\n\nconst PieChart = ({ labels, values, colors, borders }) => {\n const data = {\n \n labels: labels,\n datasets: [\n {\n label: \"# of Votes\",\n data: values,\n backgroundColor: colors,\n borderColor: borders,\n borderWidth: 1,\n radius: 100,\n },\n ],\n };\n\n function dataOptions(values) {\n const options = {\n plugins: {\n legend: {\n display: true,\n position: \"bottom\",\n align: \"start\",\n },\n },\n options: {\n maintainAspectRatio: false,\n },\n };\n return options;\n }\n\n return (\n <>\n \n \n );\n};\nPieChart.propTypes = {\n labels: PropTypes.array,\n values: PropTypes.array,\n colors: PropTypes.array,\n borders: PropTypes.array,\n};\nexport default PieChart;\n","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport DatePicker from \"react-datepicker\";\nimport distinctColors from \"distinct-colors\";\nimport { formatDate2string } from \"../util/index.js\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSortDown } from \"@fortawesome/free-solid-svg-icons\";\nimport \"../styles/global.css\";\nimport PieChart from \"../components/pieChart\";\nimport \"react-datepicker/dist/react-datepicker.css\";\n\nfunction ConsultTechnicians({ appState }) {\n const [staffDetails, setStaffDetails] = useState([]);\n const [palette, setPalette] = useState([]);\n const [startDate, setStartDate] = useState(new Date());\n const [endDate, setEndDate] = useState(new Date());\n const [locations, setLocations] = useState([]);\n const [selection, setSelection] = useState({});\n const [grouping, setGrouping] = useState(\"Simple\");\n const [search, setSearch] = useState(\"\");\n const groupType = [\"Simple\", \"Detailed\"];\n const [emailStatus, setEmailStatus] = useState({\n clicked: false,\n });\n const [alertMessage, setAlertMessage] = useState({\n visible: false,\n message: \"\",\n success: false,\n });\n const [state, setState] = useState({\n status: \"ready\",\n });\n\n const filterHelper = (query, value) => {\n try {\n const sSquery = new RegExp(query.trim().toLowerCase(), \"g\");\n const sValue = value.toLowerCase();\n return sSquery.test(sValue);\n } catch (error) {\n return true;\n }\n };\n\n const updateLocation = (loc) => {\n loc = loc.split(\"-\");\n const siteId = loc[0];\n const locationId = loc[1];\n\n setSelection((selection) => ({\n ...selection,\n siteId: siteId,\n locationId: locationId,\n }));\n\n setEmailStatus({ clicked: false });\n };\n const handleLocationChange = (event) => {\n updateLocation(event.target.value);\n };\n\n const handleGroupingChange = (event) => {\n setGrouping(event.target.value);\n };\n\n const handleSearchChange = (event) => {\n setSearch(event.target.value);\n };\n const getServiceName = (detailedName) => {\n if (grouping === \"Simple\") {\n const parts = detailedName.split(\"-\");\n const shortName = parts[0].trim();\n return shortName;\n } else {\n return detailedName;\n }\n };\n\n const serviceCompareCount = (a, b) => {\n try {\n if (a.count < b.count) {\n return -1;\n } else if (a.count > b.count) {\n return 1;\n } else {\n return 0;\n }\n } catch (e) {\n return 0;\n }\n };\n const serviceCompareName = (a, b) => {\n try {\n return a.serviceName.localeCompare(b.serviceName);\n } catch (e) {\n return 0;\n }\n };\n\n const sortTechnician =\n ({ name, criteria }) =>\n () => {\n const sortedStaff = staffDetails.map((staff) => {\n if (staff.staffName === name) {\n if (criteria === \"quantity\") {\n staff.services.sort(serviceCompareCount).reverse();\n } else if (criteria === \"service\") {\n staff.services.sort(serviceCompareName);\n }\n }\n return staff;\n });\n setStaffDetails(sortedStaff);\n };\n\n useEffect(() => {\n const getLocations = async () => {\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n const getResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/all/locations/`,\n getMethod\n );\n\n if (getResponse.ok && getResponse.status === 200) {\n const locationData = await getResponse.json();\n updateLocation(locationData.siteslist[0].id);\n setLocations(locationData.siteslist);\n } else {\n setLocations([]);\n }\n } catch (error) {\n setLocations([]);\n }\n };\n\n getLocations();\n }, [appState.nav.siteId, appState.singleAuth.token]);\n\n const getColorPalette = (data) => {\n const staffOnly = data.appointments.filter(\n (app) => \"serviceName\" in app && app.serviceName\n );\n const colorPalette = [];\n const services = [\n ...new Set(staffOnly.map((app) => getServiceName(app.serviceName))),\n ];\n const colors = distinctColors({\n count: services.length,\n hueMin: 270,\n hueMax: 330,\n chromaMin: 0,\n chromaMax: 100,\n lightMin: 40,\n lightMax: 100,\n });\n services.forEach((service, index) => {\n const color = {\n serviceName: service,\n color: colors[index].hex(),\n border: colors[index].brighten(0.2).hex(),\n };\n colorPalette.push(color);\n });\n return colorPalette;\n };\n\n const getStaff = (data) => {\n const staffOnly = data.appointments.filter(\n (app) =>\n \"serviceName\" in app &&\n app.serviceName &&\n \"staffName\" in app &&\n app.staffName\n );\n const staff = [...new Set(staffOnly.map((app) => app.staffName))];\n staff.unshift(\"All appointments\");\n staff.push(\"Unkown Staff\");\n return staff;\n };\n\n const getGroupedData = (staff, data) => {\n const staffData = [];\n let memberData;\n staff.forEach((member) => {\n if (member === \"Unkown Staff\") {\n memberData = data.appointments.filter(\n (app) =>\n \"serviceName\" in app &&\n app.serviceName &&\n (!(\"staffName\" in app) || app.staffName === \"\")\n );\n } else if (member === \"All appointments\") {\n memberData = data.appointments.filter(\n (app) => \"serviceName\" in app && app.serviceName\n );\n } else {\n memberData = data.appointments.filter(\n (app) =>\n \"serviceName\" in app &&\n app.serviceName &&\n \"staffName\" in app &&\n app.staffName === member\n );\n }\n\n const services = [\n ...new Set(memberData.map((app) => getServiceName(app.serviceName))),\n ];\n const memberServices = [];\n services.forEach((service) => {\n const count = memberData.filter(\n (app) => getServiceName(app.serviceName) === service\n ).length;\n const serviceCount = { serviceName: service, count: count };\n memberServices.push(serviceCount);\n });\n memberServices.sort(serviceCompareCount).reverse();\n const cbff = memberData.filter(\n (app) => \"cbff\" in app && app.cbff !== \"nA\"\n ).length;\n\n const cbffServed = memberData.filter(\n (app) => app.serviceName === \"Come back for free\"\n ).length;\n const count = memberData.length;\n const memberDetails = {\n staffName: member,\n services: memberServices,\n cbff: cbff,\n count: count,\n cbffServed: cbffServed,\n };\n staffData.push(memberDetails);\n });\n return staffData;\n };\n\n const getData = async () => {\n setState({ status: \"loading\" });\n try {\n const ReportGetMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const request = `api/dynamoDB/sites/${selection.siteId}/locations/${\n selection.locationId\n }/sales?sortDate=${formatDate2string(\n startDate\n )}&sortDateTo=${formatDate2string(endDate)}`;\n const reportResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/${request}`,\n ReportGetMethod\n );\n\n if (reportResponse.ok) {\n const data = await reportResponse.json();\n const staff = getStaff(data);\n const palette = getColorPalette(data);\n setPalette(palette);\n const staffData = getGroupedData(staff, data);\n setStaffDetails(staffData);\n setAlertMessage({ visile: false });\n } else {\n setStaffDetails([]);\n setAlertMessage({\n visible: true,\n message: \"No appointments were found\",\n success: false,\n });\n }\n } catch (error) {\n setStaffDetails([]);\n setAlertMessage({\n visible: true,\n message: \"No appointments were found\" + JSON.stringify(error),\n success: false,\n });\n }\n setState({ status: \"ready\" });\n };\n\n const getMehodPDF = async (siteId, locationId) => {\n try {\n const ReportGetMethodPDF = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const requestPDF = `api/pdf/dynamoDB/sales?sortDate=${formatDate2string(\n startDate\n )}&sortDateTo=${formatDate2string(endDate)}`;\n const reportResponsePDF = await fetch(\n `${process.env.REACT_APP_API_URL}/${requestPDF}`,\n ReportGetMethodPDF\n );\n\n if (reportResponsePDF.ok) {\n const reportDataPDF = await reportResponsePDF.json();\n setEmailStatus({\n clicked: true,\n });\n setAlertMessage({\n visible: true,\n message: reportDataPDF.message,\n success: true,\n });\n } else {\n setAlertMessage({\n visible: true,\n message: \"The PDF couldn't be send \",\n success: false,\n });\n }\n } catch (error) {\n setEmailStatus({\n clicked: true,\n });\n setAlertMessage({\n visible: true,\n message: \"The PDF couldn't be send: \" + JSON.stringify(error),\n success: false,\n });\n }\n };\n useEffect(() => {\n setEmailStatus({ clicked: false });\n setAlertMessage({\n visible: false,\n message: \"\",\n success: false,\n });\n setSearch(\"\");\n setStaffDetails([]);\n }, [startDate, endDate, selection]);\n\n useEffect(() => {\n if (staffDetails.length > 0) {\n getData();\n }\n }, [grouping]);\n\n const handlePDFButton = () => {\n setState({ status: \"loading\" });\n getMehodPDF(selection.siteId, selection.locationId);\n setState({ status: \"ready\" });\n };\n\n return (\n
\n
\n
\n

Consult Technicians

\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n {locations.map((option) => (\n \n ))}\n \n
\n
\n setStartDate(date)}\n selectsStart\n startDate={startDate}\n endDate={endDate}\n value={startDate}\n />\n
\n
\n setEndDate(date)}\n selectsEnd\n startDate={startDate}\n endDate={startDate}\n minDate={startDate}\n value={startDate}\n />\n
\n
\n \n {groupType.map((option) => (\n \n ))}\n \n
\n
\n
\n
\n \n Consult technicians\n \n
\n\n
\n \n Create and Send PDF\n \n
\n\n {alertMessage.visible && (\n \n {alertMessage.message}\n
\n )}\n
\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {staffDetails.length > 0 && (\n
\n
\n
\n \n
\n
\n
\n {staffDetails\n .filter(\n (technician) =>\n filterHelper(search, technician.staffName) &&\n technician.services.length > 0\n )\n .map((technician) => {\n const technicianKey = technician.staffName\n .normalize(\"NFD\")\n .replace(/[^a-zA-Z0-9]/g, \"\");\n\n const labels = technician.services.map(\n (service) => service.serviceName\n );\n const values = technician.services.map(\n (service) => service.count\n );\n const colors = labels.map(\n (service) =>\n palette\n .filter((color) => color.serviceName === service)\n .map((color) => color.color)[0]\n );\n const borders = labels.map(\n (service) =>\n palette\n .filter((color) => color.serviceName === service)\n .map((color) => color.border)[0]\n );\n\n return (\n \n
\n {technician.staffName}\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n {labels.map((label, index) => {\n return (\n \n \n \n \n );\n })}\n \n \n \n \n \n {technician.count - technician.cbffServed}\n \n \n \n \n \n {technician.cbffServed}\n \n \n \n \n \n {technician.count}\n \n \n \n \n \n {technician.cbff}\n \n \n\n \n \n \n \n \n
\n \n Service \n \n \n \n Quantity \n \n
{label}{values[index]}
\n Service Appointments\n
\n CBFF Appointments\n
\n Total Appointments\n
CBFF provided
CBFF ratio\n {(\n (technician.cbff * 100) /\n technician.count\n ).toFixed(2)}\n %\n
\n
\n
\n );\n })}\n
\n
\n )}\n
\n );\n}\n\nConsultTechnicians.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default ConsultTechnicians;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { Bar } from \"react-chartjs-2\";\n\nconst BarChart = ({ labels, values, maxHeight }) => {\n const data = {\n labels: labels,\n datasets: [\n {\n label: \"Appointments\",\n data: values,\n borderColor: \"#720b98\",\n backgroundColor: \"#c2608e\",\n maxBarThickness: 50,\n barThickness: 40,\n },\n ],\n };\n\n const options = {\n scales: {\n y: {\n max: maxHeight,\n },\n },\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n position: \"top\",\n },\n title: {\n display: true,\n },\n },\n };\n\n return ;\n};\nBarChart.propTypes = {\n labels: PropTypes.array,\n values: PropTypes.object,\n maxHeight: PropTypes.number,\n};\nexport default BarChart;\n","import React from \"react\";\nimport { Bar } from \"react-chartjs-2\";\nimport { PropTypes } from \"prop-types\";\n\nconst HorizontalBarChart = ({\n labels,\n values,\n colors,\n borderColors,\n chartName,\n}) => {\n /*\n const labels = [\"Call Center\", \"Online\"];\n const values = [\"75\", \"85\"];\n const colors = [\"rgba(255, 205, 86, 0.2)\", \"rgba(75, 192, 192, 0.2)\"];\n const borderColors = [\"rgb(255, 205, 86)\", \"rgb(75, 192, 192)\"];\n */\n\n const createDataSets = (labels, values) => {\n return labels.map((label, i) => {\n return {\n label: label,\n data: [values[i]],\n borderColor: borderColors[i],\n backgroundColor: colors[i],\n borderWidth: 1,\n };\n });\n };\n\n const data = {\n labels: [\"\"],\n datasets: createDataSets(labels, values),\n };\n\n const options = {\n indexAxis: \"y\",\n plugins: {\n title: {\n display: true,\n text: chartName,\n },\n legend: {\n position: \"bottom\",\n },\n },\n };\n\n return ;\n};\n\nHorizontalBarChart.propTypes = {\n labels: PropTypes.array,\n values: PropTypes.array,\n colors: PropTypes.array,\n borderColors: PropTypes.array,\n chartName: PropTypes.string,\n};\nexport default HorizontalBarChart;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport BarChart from \"../components/barChart\";\nimport HorizontalBarChart from \"../components/horizontalBarChart\";\nimport { Link } from \"react-router-dom\";\n\nconst OperationalDashboardGraph = ({\n operationalData,\n failed,\n}) => {\n\nreturn(\n\n
\n\n {operationalData.map((location) => {\n const values = {\n Pending:\n location.data.confirmed +\n location.data.booked +\n location.data.arrived,\n CBFF: location.data.cbff,\n \"No Show\": location.data.noShow,\n Attended: location.data.completed,\n };\n const labels = [\"Pending\", \"CBFF\", \"No Show\", \"Attended\"];\n\n const origin = {\n labels: [\"Call Center\", \"Online\", \"MindBody\"],\n values: [\n location.data.origin.callCenter,\n location.data.origin.online,\n location.data.origin.mindBody,\n ],\n colors: [\"rgb(255, 205, 86,0.2)\", \"rgb(75, 192, 192,0.2)\"],\n borders: [\"rgba(255, 205, 86)\", \"rgba(75, 192, 192)\"],\n chartName: \"Appointments Made by\",\n };\n\n return (\n\n \n
\n
\n

{location.siteName}

\n
\n
\n
\n \n
\n
\n
\n
\n
\n
Total Sales
\n
\n
\n
${location.data.totalSales}
\n
\n
\n
Total Completed
\n
\n
\n
{location.data.completed}
\n
\n
\n
\n
\n
\n
\n
\n
\n
Total Expected Net Sales
\n
\n
\n
${location.data.totalExpectedSales}
\n
\n
\n
Total Appointments
\n
\n
\n
{location.data.totalAppointments}
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n more details\n \n
\n
\n
\n );\n })}\n\n{failed.length > 0 &&\n failed.map((item) => {\n return (\n \n \n {item.error}\n \n \n );\n })}\n\n\n\n\n)\n\n\n};\n\n\nOperationalDashboardGraph.propTypes = {\n operationalData : PropTypes.array,\n failed : PropTypes.array,\n \n };\n export default OperationalDashboardGraph;\n ","import React, { useEffect, useState } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport {\n Document,\n Page,\n Text,\n View,\n StyleSheet,\n Image\n} from \"@react-pdf/renderer\";\nimport { formatAmount } from \"../../util/formatNumbers.js\";\nimport logo from \"../../logo.png\";\n\nconst PdfTable = ({ sitesData, viewTableColumn, reportDate, totals }) => {\n const borderColor = '#bfbfbf';\n const borderStyle = 'solid';\n const widthStyle = {\n sales: \"30%\",\n madeBy: \"18%\",\n appointments: \"11%\",\n salesAndMadeBy: \"12%\",\n salesAndAppointment: \"8%\",\n madeByAndAppointment: \"8%\",\n allColumns: \"7%\"\n };\n const fontSizeStyle = {\n oneOrTwoColumnsHeader: 18,\n allColumnsHeader: 12,\n oneOrTwoColumnsCell: 16,\n allColumnsCell: 10,\n };\n\n const [columns, setColumns] = useState({\n sales: false,\n madeBy: false,\n appointments: false,\n salesAndMadeBy: false,\n salesAndAppointment: false,\n madeByAndAppointment: false,\n all: false,\n });\n\n useEffect(() => {\n\n if (viewTableColumn.sales) {\n setColumns((columns) => ({\n ...columns,\n sales: true\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n sales: false\n }));\n }\n if (viewTableColumn.madeBy) {\n setColumns((columns) => ({\n ...columns,\n madeBy: true\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n madeBy: false\n }));\n }\n if (viewTableColumn.appointments) {\n setColumns((columns) => ({\n ...columns,\n appointments: true\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n appointments: false\n }));\n }\n if (viewTableColumn.sales && viewTableColumn.madeBy) {\n setColumns((columns) => ({\n ...columns,\n sales: false,\n madeBy: false,\n salesAndMadeBy: true,\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n salesAndMadeBy: false,\n }));\n }\n if (viewTableColumn.sales && viewTableColumn.appointments) {\n setColumns((columns) => ({\n ...columns,\n sales: false,\n appointments: false,\n salesAndAppointment: true,\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n salesAndAppointment: false,\n }));\n }\n if (viewTableColumn.madeBy && viewTableColumn.appointments) {\n setColumns((columns) => ({\n ...columns,\n madeBy: false,\n appointments: false,\n madeByAndAppointment: true,\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n madeByAndAppointment: false,\n }));\n }\n if (viewTableColumn.madeBy && viewTableColumn.appointments && viewTableColumn.sales) {\n setColumns((columns) => ({\n ...columns,\n salesAndMadeBy: false,\n salesAndAppointment: false,\n madeByAndAppointment: false,\n all: true,\n }));\n } else {\n setColumns((columns) => ({\n ...columns,\n all: false,\n }));\n }\n\n }, [viewTableColumn])\n\n const styles = StyleSheet.create({\n text:{\n marginLeft: \"10px\"\n },\n body: {\n padding: 10,\n },\n table: {\n display: \"table\",\n width: \"100%\",\n },\n tableRow: {\n margin: \"auto\",\n flexDirection: \"row\"\n },\n tableCol1Header: {\n width: columns.sales ? widthStyle.sales :\n columns.madeBy ? widthStyle.madeBy :\n columns.appointments ? widthStyle.appointments :\n columns.salesAndMadeBy ? widthStyle.salesAndMadeBy :\n columns.salesAndAppointment ? widthStyle.salesAndAppointment :\n columns.madeByAndAppointment ? widthStyle.madeByAndAppointment :\n widthStyle.allColumns,\n borderStyle: borderStyle,\n borderColor: borderColor,\n borderBottomColor: '#000',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderTopWidth: 0,\n backgroundColor: '#c2608ea9',\n color: \"white\",\n textAlign: \"center\",\n },\n tableCol1: {\n width: columns.sales ? widthStyle.sales :\n columns.madeBy ? widthStyle.madeBy :\n columns.appointments ? widthStyle.appointments :\n columns.salesAndMadeBy ? widthStyle.salesAndMadeBy :\n columns.salesAndAppointment ? widthStyle.salesAndAppointment :\n columns.madeByAndAppointment ? widthStyle.madeByAndAppointment :\n widthStyle.allColumns,\n borderStyle: borderStyle,\n borderColor: borderColor,\n borderWidth: 1,\n borderLeftWidth: 0,\n borderTopWidth: 0,\n textAlign: \"center\",\n },\n total: {\n width: columns.sales ? widthStyle.sales :\n columns.madeBy ? widthStyle.madeBy :\n columns.appointments ? widthStyle.appointments :\n columns.salesAndMadeBy ? widthStyle.salesAndMadeBy :\n columns.salesAndAppointment ? widthStyle.salesAndAppointment :\n columns.madeByAndAppointment ? widthStyle.madeByAndAppointment :\n widthStyle.allColumns,\n borderWidth: 1,\n borderTopWidth: 0,\n textAlign: \"center\",\n },\n totalCol: {\n width: columns.sales ? widthStyle.sales :\n columns.madeBy ? widthStyle.madeBy :\n columns.appointments ? widthStyle.appointments :\n columns.salesAndMadeBy ? widthStyle.salesAndMadeBy :\n columns.salesAndAppointment ? widthStyle.salesAndAppointment :\n columns.madeByAndAppointment ? widthStyle.madeByAndAppointment :\n widthStyle.allColumns,\n },\n tableCellHeader: {\n margin: 4,\n fontSize: columns.sales ? fontSizeStyle.oneOrTwoColumnsHeader :\n columns.madeBy ? fontSizeStyle.oneOrTwoColumnsHeader :\n columns.appointments ? fontSizeStyle.oneOrTwoColumnsHeader :\n columns.salesAndMadeBy ? fontSizeStyle.oneOrTwoColumnsHeader :\n columns.salesAndAppointment ? fontSizeStyle.oneOrTwoColumnsHeader :\n columns.madeByAndAppointment ? fontSizeStyle.oneOrTwoColumnsHeader :\n fontSizeStyle.allColumnsHeader,\n fontWeight: 500\n },\n tableCell: {\n margin: 4,\n fontSize: columns.sales ? fontSizeStyle.oneOrTwoColumnsCell :\n columns.madeBy ? fontSizeStyle.oneOrTwoColumnsCell :\n columns.appointments ? fontSizeStyle.oneOrTwoColumnsCell :\n columns.salesAndMadeBy ? fontSizeStyle.oneOrTwoColumnsCell :\n columns.salesAndAppointment ? fontSizeStyle.oneOrTwoColumnsCell :\n columns.madeByAndAppointment ? fontSizeStyle.oneOrTwoColumnsCell :\n fontSizeStyle.allColumnsCell,\n },\n logo: {\n width: 70,\n marginTop: 10,\n marginBottom: 20,\n heigth: 50,\n marginLeft: 10,\n },\n dateText: {\n marginTop: \"30%\",\n fontSize: 16,\n fontWeight: 500,\n marginLeft: \"13%\"\n },\n dateTextDiv: {\n width: \"15%\",\n },\n logoDiv: {\n width: \"78%\",\n }\n });\n return (\n \n \n\n \n \n\n \n \"Little\n \n \n Date: {reportDate}\n \n\n \n \n\n \n \n \n SITE\n \n {viewTableColumn.madeBy && (\n <>\n \n ONLINE\n \n \n EMPATHY CENTER\n \n \n MIND BODY\n \n \n APPOINTMENTS BOOKED\n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n DICOM\n \n \n ATTENDED\n \n \n NO SHOW\n \n \n PENDING\n \n \n CBFF\n \n \n CBFF GRANTED\n \n \n APPOINTMENTS\n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n EXPECTED SALES\n \n \n SALES\n \n \n )}\n \n {sitesData.map((location, i) => {\n return (\n \n \n {location.siteName?.split(\"-\")[1]}\n \n {viewTableColumn.madeBy && (\n <>\n \n {location.data.origin.online}\n \n \n {location.data.origin.callCenter}\n \n \n {location.data.origin.mindBody}\n \n \n {\n location.data.origin.callCenter + location.data.origin.online +\n (location.data.origin.mindBody ? location.data.origin.mindBody : 0)}\n \n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n {location.data.dicomOk}\n \n \n {location.data.completed}\n \n \n {location.data.noShow}\n \n \n {location.data.confirmed + location.data.booked + location.data.arrived}\n \n \n {location.data.cbff}\n \n \n {location.data.cbffGranted}\n \n \n {location.data.totalAppointments}\n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n ${formatAmount(location.data.totalExpectedSales)}\n \n \n ${formatAmount(location.data.totalSales)}\n \n \n )}\n \n )\n })}\n \n \n \n \n {viewTableColumn.madeBy && (\n <>\n \n {totals.online}\n \n \n {totals.callCenter}\n \n \n {totals.mindBody}\n \n \n {totals.appointmentsBooked}\n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n {totals.dicomOk}\n \n \n {totals.completed}\n \n \n {totals.noShow}\n \n \n {totals.pending}\n \n \n {totals.cbff}\n \n \n {totals.cbffGranted}\n \n \n {totals.appointments}\n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n ${formatAmount(totals.expectedSales)}\n \n \n ${formatAmount(totals.sales)}\n \n \n )}\n \n \n \n )\n};\n\nPdfTable.propTypes = {\n sitesData: PropTypes.array,\n viewTableColumn: PropTypes.object,\n reportDate: PropTypes.string,\n totals: PropTypes.object\n};\nexport default PdfTable;\n","import React, { useState, useEffect, Suspense } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faDownload, faEye, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { formatAmount } from \"../util/formatNumbers.js\";\nimport PdfTable from \"./pdfs/historicalReportPDF.js\";\nimport { PDFDownloadLink } from '@react-pdf/renderer';\nimport moment from \"moment\";\n \nconst OperationalDashboardTable = ({\n operationalData,\n state,\n realodDashboard,\n}) => {\n const table = {header: {fontSize:\"16px\"}, body: {fontSize:\"17px\"}}\n const reportDate = moment(new Date).format(\"MM/DD/YY hh:mm:ss A\");\n const [sitesData, setSitesData] = useState(operationalData);\n const [btnPdf, setBtnPdf] = useState(false);\n const [sortTable, setSortTable] = useState({\n sort: true,\n sortBySites: true,\n sortBySales: true,\n });\n const [totals, setTotals] = useState({\n online: 0,\n callCenter: 0,\n mindBody: 0,\n appointmentsBooked: 0,\n appointments: 0,\n sales: 0,\n cbffGranted: 0,\n expectedSales: 0,\n completed: 0,\n noShow: 0,\n pending: 0,\n cbff: 0,\n dicomOk: 0,\n });\n const [viewTableColumn, setViewTableColumn] = useState({\n madeBy: true,\n appointments: false,\n sales: false,\n });\n const [selectRows, setSelectRows] = useState(false);\n const [buttonSelectRows, setButtonSelectRows] = useState({\n select: false,\n viewAllRows: false,\n disabled: true,\n });\n\n const handleSortTableBySites = () => {\n setSortTable((sortTable) => ({\n ...sortTable,\n sortBySites: !sortTable.sortBySites\n }));\n if (sortTable.sortBySites) {\n sitesData.sort((a, b) => {\n if (a.siteName < b.siteName) return 1;\n if (a.siteName > b.siteName) return -1;\n return 0;\n });\n } else {\n sitesData.sort((a, b) => {\n if (a.siteName > b.siteName) return 1;\n if (a.siteName < b.siteName) return -1;\n return 0;\n });\n }\n }\n const handleSortTableBySales = () => {\n setSortTable((sortTable) => ({\n ...sortTable,\n sortBySales: !sortTable.sortBySales\n }));\n if (sortTable.sortBySales) {\n sitesData.sort((a, b) => {\n if (a.data.totalSales > b.data.totalSales) return 1;\n if (a.data.totalSales < b.data.totalSales) return -1;\n return 0;\n });\n } else {\n sitesData.sort((a, b) => {\n if (a.data.totalSales < b.data.totalSales) return 1;\n if (a.data.totalSales > b.data.totalSales) return -1;\n return 0;\n });\n }\n }\n const handleViewTableColumn = (e) => {\n const { name } = e.target;\n switch (name) {\n case \"madeBy\":\n setViewTableColumn((viewTableColumn) => ({\n ...viewTableColumn,\n madeBy: !viewTableColumn.madeBy,\n }));\n break;\n case \"sales\":\n setViewTableColumn((viewTableColumn) => ({\n ...viewTableColumn,\n sales: !viewTableColumn.sales,\n }));\n break;\n case \"appointments\":\n setViewTableColumn((viewTableColumn) => ({\n ...viewTableColumn,\n appointments: !viewTableColumn.appointments,\n }));\n break;\n default:\n break;\n }\n }\n const handleViewSelectedRows = (e) => {\n const selectedSitesRows = sitesData.filter((i) => { return i.checked === true });\n if (selectedSitesRows.length !== 0) {\n setSitesData(selectedSitesRows)\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n select: true,\n viewAllRows: true,\n }));\n }\n }\n const handleSitesSelectedByRows = (e, row) => {\n const name = \"checked\";\n const newList = [...sitesData];\n newList[row][name] = !newList[row][name];\n setSitesData(newList);\n const selectedSitesRows = sitesData.filter((i) => { return i.checked === true });\n\n if (selectedSitesRows.length !== 0) {\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n disabled: false,\n }));\n } else {\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n disabled: true,\n }));\n }\n }\n const handleViewAllRows = () => {\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n select: false,\n viewAllRows: false,\n disabled: true\n }));\n const newSitesData = [];\n operationalData.forEach(element => {\n newSitesData.push({\n data: element.data,\n locationId: element.locationId,\n siteId: element.siteId,\n siteName: element.siteName,\n checked: false,\n })\n });\n setSitesData(newSitesData);\n }\n useEffect(() => {\n const newSitesData = [];\n\n sitesData.forEach(element => {\n newSitesData.push({\n data: element.data,\n locationId: element.locationId,\n siteId: element.siteId,\n siteName: element.siteName,\n checked: false,\n });\n });\n\n setSitesData(newSitesData);\n }, [state.table, realodDashboard.action]);\n\n\n useEffect(() => {\n let totalSales = 0;\n let totalOnline = 0;\n let totalCallCenter = 0;\n let totalMindBody = 0;\n let totalColumnAppointmentBooked = 0;\n let totalAppointments = 0;\n let totalAppointmentsBooked = 0;\n let totalCbffGranted = 0;\n let totalExpectedSales = 0;\n let totalCompleted = 0;\n let totalnoShow = 0;\n let totalColumnPending = 0;\n let totalCbff = 0;\n let dicomOk = 0;\n\n sitesData.forEach(i => {\n totalOnline += i.data.origin.online;\n totalCallCenter += i.data.origin.callCenter;\n totalMindBody += i.data.origin.mindBody;\n totalAppointments += i.data.totalAppointments;\n totalSales += i.data.totalSales;\n totalExpectedSales += i.data.totalExpectedSales;\n totalCompleted += i.data.completed;\n totalnoShow += i.data.noShow;\n totalColumnPending += i.data.confirmed + i.data.booked + i.data.arrived;\n totalCbff += i.data.cbff;\n totalColumnAppointmentBooked = i.data.origin.callCenter + i.data.origin.online +\n (i.data.origin.mindBody ? i.data.origin.mindBody : 0);\n totalAppointmentsBooked += totalColumnAppointmentBooked;\n totalCbffGranted += i.data.cbffGranted;\n dicomOk += i.data.dicomOk;\n });\n\n setTotals((totals) => ({\n ...totals,\n online: totalOnline,\n callCenter: totalCallCenter,\n mindBody: isNaN(totalMindBody) ? 0 : totalMindBody,\n appointmentsBooked: totalAppointmentsBooked,\n appointments: totalAppointments,\n sales: totalSales,\n cbffGranted: isNaN(totalCbffGranted) ? 0 : totalCbffGranted,\n expectedSales: totalExpectedSales,\n completed: totalCompleted,\n noShow: totalnoShow,\n pending: totalColumnPending,\n cbff: totalCbff,\n dicomOk: dicomOk\n }));\n }, [sitesData, totals.sales])\n\n useEffect(() => {\n if (!viewTableColumn.appointments && !viewTableColumn.sales) {\n setViewTableColumn((viewTableColumn) => ({\n ...viewTableColumn,\n madeBy: true\n }));\n }\n }, [viewTableColumn.appointments, viewTableColumn.madeBy, viewTableColumn.sales]);\n\n useEffect(() => {\n const clickedButtonTrigger = document.getElementById('btn-create-pdf');\n if (clickedButtonTrigger) {\n setTimeout(() => {\n clickedButtonTrigger.click();\n clickedButtonTrigger.addEventListener('mousedown', () => { });\n }, 500);\n }\n }, [btnPdf]);\n let totalColumnAppointmentBooked = 0;\n\n return (\n
\n
\n
\n
\n {!btnPdf ?\n \n :\n \n \n } fileName={`reportHistorical.pdf`}>\n {({ loading }) => (loading\n ?\n \n \n \n :\n setBtnPdf(!btnPdf)}\n className=\"btn border pt-2 pb-2 text rounded-pill m-2 btn-sm\"\n style={{ color: \"white\", width: 65, backgroundColor: \"#c2608e\", borderColor: \"#c2608e #c2608e #fff\" }}>\n \n \n )}\n \n \n }\n
\n
\n
\n handleViewTableColumn(e)}\n style={viewTableColumn.madeBy ? { backgroundColor: \"#c2608e\", borderColor: \"#c2608e #c2608e #fff\", width: 100, color: \"white\" } : { color: \"black\", backgroundColor: \"white\", width: 100 }}>\n Made By\n \n handleViewTableColumn(e)}\n style={viewTableColumn.sales ? { backgroundColor: \"#c2608e\", borderColor: \"#c2608e #c2608e #fff\", width: 65, color: \"white\" } : { color: \"black\", backgroundColor: \"white\", width: 65 }}>\n Sales\n \n handleViewTableColumn(e)}\n style={viewTableColumn.appointments ? { backgroundColor: \"#c2608e\", borderColor: \"#c2608e #c2608e #fff\", width: 150, color: \"white\" } : { color: \"black\", backgroundColor: \"white\", width: 150 }}>\n Appointments\n \n
\n
\n\n {buttonSelectRows.viewAllRows && (\n )}\n\n \n \n \n \n \n {viewTableColumn.madeBy && (\n <>\n \n \n \n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n \n \n \n \n \n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n \n \n )}\n \n \n \n {sitesData.map((location, i) => {\n\n totalColumnAppointmentBooked = location.data.origin.callCenter + location.data.origin.online +\n (location.data.origin.mindBody ? location.data.origin.mindBody : 0);\n\n return (\n { selectRows && (handleSitesSelectedByRows(e, i)) }}\n style={selectRows ? { cursor: 'pointer' } : { color: \"black\" }}\n data-cy={`button-clicked-table-row-${i}`}>\n\n \n\n \n {viewTableColumn.madeBy && (\n <>\n \n \n \n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n \n \n \n \n \n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n \n \n )}\n )\n })}\n \n \n \n \n \n \n \n \n )}\n {viewTableColumn.appointments && (\n <>\n \n \n \n \n \n \n \n \n )}\n {viewTableColumn.sales && (\n <>\n \n \n \n )}\n \n \n
\n { setSelectRows(!selectRows) }}\n data-cy=\"button-select-rows\"\n />\n \n \n SITE\n   {sortTable.sortBySites ? \"▲\" : \"▼\"}\n \n \n ONLINE\n \n EMPATHY CENTER\n \n MIND BODY\n \n APPOINTMENTS BOOKED\n \n DICOM\n \n ATTENDED\n \n NO SHOW\n \n PENDING\n \n CBFF\n \n CBFF GRANTED\n \n APPOINTMENTS\n \n EXPECTED SALES\n \n \n SALES\n   {sortTable.sortBySales ? \"▲\" : \"▼\"}\n \n
\n {selectRows ?\n \n : \n }\n \n {location.siteName?.split(\"-\")[1]} \n \n

{location.data.origin.online}

\n
\n {location.data.origin.callCenter}\n \n {location.data.origin.mindBody}\n \n {totalColumnAppointmentBooked}\n \n {location.data.dicomOk}\n \n {location.data.completed}\n \n {location.data.noShow}\n \n {location.data.confirmed + location.data.booked + location.data.arrived}\n \n {location.data.cbff}\n \n {location.data.cbffGranted}\n \n {location.data.totalAppointments}\n \n ${formatAmount(location.data.totalExpectedSales)}\n \n ${formatAmount(location.data.totalSales)}\n
\n \n {viewTableColumn.madeBy && (\n <>\n \n {totals.online}\n \n {totals.callCenter}\n \n {totals.mindBody}\n \n {totals.appointmentsBooked}\n \n {totals.dicomOk}\n \n {totals.completed}\n \n {totals.noShow}\n \n {totals.pending}\n \n {totals.cbff}\n \n {totals.cbffGranted}\n \n {totals.appointments}\n \n ${formatAmount(totals.expectedSales)}\n \n ${formatAmount(totals.sales)}\n
\n {selectRows && (\n
\n handleViewSelectedRows(e)}\n > Select\n \n
)}\n

\n
\n )\n};\nOperationalDashboardTable.propTypes = {\n operationalData: PropTypes.array,\n state: PropTypes.object,\n realodDashboard: PropTypes.object,\n};\nexport default OperationalDashboardTable;\n","import React, { useEffect, useState } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { formatDate2string } from \"../util/index.js\";\nimport \"../styles/global.css\";\nimport \"../styles/operational.css\";\nimport OperationalDashboardGraph from \"../components/operationalDashboardGraph.js\";\nimport OperationalDashboardTable from \"../components/operationalDashBoardTable.js\";\nimport moment from \"moment\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faChartLine,\n faFileAlt,\n faRedoAlt\n} from \"@fortawesome/free-solid-svg-icons\";\n\nfunction OperationalDashboard({ appState }) {\n const today = new Date();\n const time = moment(today).format(\"HH:mm\");\n const [operationalData, setOperationalData] = useState([]);\n const [realodDashboard, setRealodDashboard] = useState({action: false});\n const [state, setState] = useState({\n status: \"idle\",\n message: \"\",\n table: true,\n });\n const [failed, setFailed] = useState([]);\n\n const getOperationalData = async (location) => {\n const { siteId, locationId, siteName, token } = location;\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: siteId,\n authorization: token,\n locationid: locationId,\n },\n };\n\n const url = `/api/site/${siteId}/locations/${locationId}/summary?appointmentDate=${formatDate2string(\n today\n )}`;\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}${url}`,\n getMethod\n );\n if (response.ok) {\n const data = {\n data: await response.json(),\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n };\n return Promise.resolve(data);\n } else {\n return Promise.resolve({\n error:\n \"Failed to retrieve data from site : \" +\n siteName +\n \" \" +\n siteId +\n \" at location: \" +\n locationId,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n });\n }\n };\n\n const getData = async () => {\n setState({\n status: \"loading\",\n table: true,\n });\n try {\n const dataRequests = appState.directorsAuth.locationsAuth.map((loc) =>\n getOperationalData(loc)\n );\n const data = await Promise.all(dataRequests);\n const goodData = data.filter((item) => {\n return \"data\" in item;\n });\n const badData = data.filter((item) => {\n return \"error\" in item;\n });\n setOperationalData(goodData);\n setFailed(badData);\n setState({\n status: \"ready\",\n table: true,\n });\n setRealodDashboard((realodDashboard) => ({\n ...realodDashboard,\n action:false\n }));\n } catch (e) {\n console.log(e);\n setState({\n status: \"error\",\n message: e.message,\n });\n setOperationalData([]);\n }\n };\n\n\n useEffect(() => {\n getData();\n }, []);\n\n useEffect(() => {\n if(realodDashboard.action) getData();\n }, [realodDashboard.action]);\n\n const handleSwitchButton = (e) => {\n const { name } = e.target;\n\n const graphIconPath = \"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z\";\n const tableIconPath = \"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z\";\n\n const pathArrayProperties = Object.values(e.target);\n\n if (pathArrayProperties !== undefined) {\n if (\"d\" in pathArrayProperties[1]) {\n if (pathArrayProperties[1].d === tableIconPath) {\n setState((state) => ({\n ...state,\n table: true,\n }));\n } else if (pathArrayProperties[1].d === graphIconPath) {\n setState((state) => ({\n ...state,\n table: false,\n }));\n }\n } else {\n if (pathArrayProperties[1].children.props.d === tableIconPath) {\n setState((state) => ({\n ...state,\n table: true,\n }));\n } else if (pathArrayProperties[1].children.props.d === graphIconPath) {\n setState((state) => ({\n ...state,\n table: false,\n }));\n }\n }\n }\n if (name === \"button-table\") {\n setState((state) => ({\n ...state,\n table: true,\n }));\n }\n if (name === \"button-graph\") {\n setState((state) => ({\n ...state,\n table: false,\n }));\n }\n }\n\n return (\n
\n
\n
\n

Operational Dashboard

\n
\n
\n
\n {formatDate2string(today)} {time}\n
\n
\n \n
\n
\n
\n
\n handleSwitchButton(e)}\n >\n \n \n
\n\n \n
\n \n
\n \n
\n
\n
\n\n \n
\n
\n\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n\n {state.status === \"error\" && (\n
\n {state.message}\n
\n )}\n\n {state.table\n ?\n state.status === \"ready\" && (\n \n )\n :\n \n }\n\n
\n
\n\n
\n );\n}\n\nOperationalDashboard.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default OperationalDashboard;\n","import React from \"react\";\nimport { PolarArea } from \"react-chartjs-2\";\nimport { PropTypes } from \"prop-types\";\n\nconst PolarAreaChart = ({\n labels,\n values,\n colors,\n borderColors,\n chartName,\n}) => {\n const data = {\n labels: labels,\n datasets: [\n {\n label: labels,\n data: values,\n backgroundColor: colors,\n borderColor: borderColors,\n borderWidth: 1,\n },\n ],\n };\n\n const options = {\n plugins: {\n title: {\n display: true,\n text: chartName,\n },\n legend: {\n position: \"bottom\",\n },\n },\n };\n\n return ;\n};\n\nPolarAreaChart.propTypes = {\n labels: PropTypes.array,\n values: PropTypes.array,\n colors: PropTypes.array,\n borderColors: PropTypes.array,\n chartName: PropTypes.string,\n};\nexport default PolarAreaChart;\n","import React, { useState } from \"react\";\nimport BarChart from \"../components/barChart\";\nimport HorizontalBarChart from \"../components/horizontalBarChart\";\nimport { useLocation } from \"react-router-dom\";\nimport { formatDate2string } from \"../util/index.js\";\nimport distinctColors from \"distinct-colors\";\nimport moment from \"moment\";\nimport Popover from \"@material-ui/core/Popover\";\nimport Typography from \"@material-ui/core/Typography\";\nimport \"../styles/operational.css\";\nimport PolarAreaChart from \"../components/polarAreaChart\";\n\nfunction OperationalDetails() {\n const today = new Date();\n const time = moment(today).format(\"HH:mm\");\n const locationParams = useLocation();\n const location = locationParams.location;\n\n const detailsData = {\n origin: location.data.origin,\n appointmentsAttended: location.data.services,\n };\n\n const status = {\n labels: [\"Pending\", \"CBFF\", \"No Show\", \"Attended\"],\n values: {\n Pending: location.data.confirmed + location.data.booked,\n CBFF: location.data.cbff,\n \"No Show\": location.data.noShow,\n Attended: location.data.completed,\n },\n };\n\n const returningTotal = location.data.returning - location.data.cbff;\n\n const retvsnew = {\n labels: [\"New Client\", \"Returning Costumer\"],\n values: [location.data.new.toString(), returningTotal.toString()],\n colors: [\"rgb(153, 102, 255, 0.2)\", \"rgb(201, 203, 207, 0.2)\"],\n borders: [\"rgba(153, 102, 255)\", \"rgba(201, 203, 207)\"],\n chartName: \"Returning Costumer vs New Client\",\n };\n\n const [anchor, setAnchor] = useState(null);\n const openPopover = (event) => {\n setAnchor(event.currentTarget);\n };\n\n const [anchorClient, setAnchorClient] = useState(null);\n const openPopoverClient = (event) => {\n setAnchorClient(event.currentTarget);\n };\n\n const cbffGrantedTotal =\n location.data.cbffGranted === 0 || location.data.totalAppointments === 0\n ? 0\n : (location.data.cbffGranted / location.data.totalAppointments) * 100;\n\n function roundWithEpsilon(numbeToRound) {\n return Math.round((numbeToRound + Number.EPSILON) * 100) / 100;\n }\n\n return (\n
\n
\n
\n

Operational Dashboard Details

\n
\n
\n
\n {formatDate2string(today)} {time}\n
\n
\n
\n
{location.siteName}
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
Total Sales
\n
\n
\n
${location.data.totalSales}
\n
\n
\n
Total Completed
\n
\n
\n
{location.data.completed}
\n
\n
\n
\n
\n
\n
\n
\n
\n
No show Total
\n
\n
\n
${location.data.totalNoShow}
\n
\n
\n
No show
\n
\n
\n
{location.data.noShow}
\n
\n
\n
\n
\n
\n
\n
\n
\n
Total Expected Net Sales
\n
\n
\n
${location.data.totalExpectedSales}
\n
\n
\n
Total Appointments
\n
\n
\n
{location.data.totalAppointments}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Patient Results Sent
\n
\n
\n
\n {location.data.dicomOk} sent /\n {location.data.completedUltrasound}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
CBFF's Granted
\n
\n
\n
{roundWithEpsilon(cbffGrantedTotal)} %
\n
\n
\n
\n {location.data.cbffGranted}/{location.data.completed}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Total Tips
\n
\n
\n
${location.data.totalTip}
\n
\n
\n
\n
\n
\n
\n
\n
\n
Appointments Made by
\n
\n
\n \n \n \n \n \n \n \n \n setAnchor(null)}\n >\n \n Number of appointments that have been scheduled by call\n center vs online, CBFF are excluded\n \n \n
\n
\n
\n
\n
Call Center: {detailsData.origin.callCenter}
\n
\n
\n
Online: {detailsData.origin.online}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Returning Costumer vs New Client
\n
\n
\n \n \n \n \n \n \n \n \n setAnchorClient(null)}\n >\n \n Number of new customers and returning customers,\n excluding cbff\n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
Appointments
\n
\n
\n
Services
\n
\n
\n {detailsData.appointmentsAttended.map((service) => {\n const labels = [\n \"Total \" + service.name + \" Scheduled\",\n \"Attended \",\n \"No Show\",\n \"Cbff Granted\",\n ];\n const values = [\n service.count,\n service.completed,\n service.noShow,\n service.cbffGranted,\n ];\n\n const basicColors = distinctColors({\n count: values.length,\n hueMin: 270,\n hueMax: 330,\n chromaMin: 0,\n chromaMax: 100,\n lightMin: 40,\n lightMax: 100,\n });\n const colors = basicColors.map((color) => {\n return color.hex() + \"7F\";\n });\n\n const borders = basicColors.map((color) => {\n return color.brighten(0.2).hex();\n });\n\n const totalSales = service.price * service.completed;\n const totalExpected = service.price * service.count;\n\n return (\n
\n
\n
\n
{service.name}
\n
\n \n
\n
\n
\n
Total Sales: ${totalSales}
\n
\n
\n
Total Expected Sales: ${totalExpected}
\n
\n
\n
\n
\n
\n );\n })}\n
\n
\n
\n
\n );\n}\n\nexport default OperationalDetails;\n","import React from \"react\";\nimport logo from \"../logo.png\";\nimport { Link } from \"react-router-dom\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\n\nfunction MenuDashboard() {\n return (\n
\n
\n
\n
\n \n \"Little\n \n
\n
\n
\n
\n

\n Where do you want to enter?\n

\n
\n
\n\n
\n
\n \n Empathy Center Dashboard\n \n \n Empathy Solutions\n \n \n Technicians Dashboard\n \n \n Directive Dashboard\n \n
\n
\n
\n
\n );\n}\n\nexport default MenuDashboard;\n","import React, { useEffect, useState } from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport logo from \"../logo.png\";\nimport \"../styles/global.css\";\nimport { PropTypes } from \"prop-types\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport * as crypto from \"crypto-js\";\nimport { useLocation } from \"react-router-dom/cjs/react-router-dom.min\";\n\nconst createRequest = (method, headers, body) => {\n return {\n method: method,\n headers: headers,\n body: body,\n };\n};\n\nfunction DirectorsLogin({ appState, setAppState }) {\n const location = useLocation();\n\n useEffect(() => {\n setAppState({\n ...appState,\n managementMode: location?.pathname === \"/managementlogin\",\n });\n }, [location.pathname]);\n\n const [state, setState] = useState({\n status: \"idle\",\n });\n const [Username, setUserName] = useState(\"\");\n const [Password, setPassword] = useState(\"\");\n\n const getSites = async () => {\n let sites;\n\n const getSitesQuery = createRequest(\"GET\", {\n \"Content-type\": \"application/json; charset=UTF-8\",\n });\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/sites/`,\n getSitesQuery\n );\n if (response.ok) {\n sites = await response.json();\n return sites;\n } else {\n return Promise.reject(\n new Error(\"Failed to retrieve the sitelist from /api/sites/sites\")\n );\n }\n };\n\n const multiLogin = async ({ Username, Password, sites }) => {\n const singleLogin = async ({ Username, Password, siteId, siteName }) => {\n const payload = {\n Username: Username,\n Password: Password,\n };\n const key = process.env.REACT_APP_ENCRYPTION_KEY;\n const encrypted = crypto.AES.encrypt(JSON.stringify(payload), key).toString();\n const body = {data: encrypted};\n const putMethod = createRequest(\n \"PUT\",\n {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: siteId,\n },\n JSON.stringify(body)\n );\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/userToken/`,\n putMethod\n );\n if (response.ok) {\n const responseData = await response.json();\n console.log(responseData.userRol.trim());\n const userRole = responseData.userRol.toLowerCase().trim();\n if(appState.managementMode){\n if (userRole !== \"management\" && userRole !== \"directiva\") {\n return Promise.resolve({\n error: \"Failed to authenticate against \" + siteName + \" \" + siteId + \" NOT AUTHORIZED\",\n siteId: siteId,\n siteName: siteName,\n });\n } else {\n const data = {\n auth: responseData,\n siteId: siteId,\n siteName: siteName,\n };\n return Promise.resolve(data);\n }\n }\n else{\n if (userRole !== \"directiva\") {\n return Promise.resolve({\n error: \"Failed to authenticate against \" + siteName + \" \" + siteId + \" NOT AUTHORIZED\",\n siteId: siteId,\n siteName: siteName,\n });\n } else {\n const data = {\n auth: responseData,\n siteId: siteId,\n siteName: siteName,\n };\n return Promise.resolve(data);\n }\n }\n \n } else {\n return Promise.resolve({\n error: \"Failed to authenticate against \" + siteName + \" \" + siteId,\n siteId: siteId,\n siteName: siteName,\n });\n }\n };\n\n const authAttemps = sites.map((site) =>\n singleLogin({\n Username: Username,\n Password: Password,\n siteId: site.id,\n siteName: site.name,\n })\n );\n const authResults = await Promise.all(authAttemps);\n const successfulAuths = authResults.filter((item) => {\n return \"auth\" in item;\n });\n return Promise.resolve(successfulAuths);\n };\n\n const handleLogin = async (event) => {\n event.preventDefault();\n\n if (state.status === \"loading\") {\n return;\n }\n\n setState((state) => ({\n ...state,\n status: \"loading\",\n message: \"Loggin in\",\n }));\n try {\n const sites = await getSites();\n\n const auths = await multiLogin({\n Username: Username,\n Password: Password,\n sites: sites,\n }).catch((error) => {\n console.log(error);\n });\n\n const getAllLocations = async () => {\n const getMethod = createRequest(\"GET\", {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: auths[0].siteId,\n authorization: auths[0].auth.accesssToken,\n });\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/all/locations/`,\n getMethod\n );\n if (response.ok) {\n return response.json();\n } else {\n return Promise.reject(\n new Error(\n \"Failed to get location lists from: /api/sites/all/locations/\"\n )\n );\n }\n };\n const locations = await getAllLocations();\n const sitesAuth = locations.siteslist\n .filter((site) => site.id !== \"0-0\")\n .map((site) => {\n const siteId = site.id.split(\"-\")[0];\n const locationId = site.id.split(\"-\")[1];\n const siteName = site.name;\n const authObject = auths.find(\n (el) => el.siteId.toString() === siteId\n );\n if (authObject !== undefined) {\n return {\n token: authObject.auth.accesssToken,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n siteLocation: site.id,\n userId: authObject.auth.userId,\n userName: authObject.auth.userName,\n userRol: authObject.auth.userRol,\n };\n } else {\n return {\n token: null,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n siteLocation: site.id,\n };\n }\n });\n\n setState((state) => ({\n ...state,\n status: \"success\",\n message: \"Success. You will be redirected soon.\",\n }));\n\n setAppState((appState) => ({\n ...appState,\n authType: \"director\",\n directorsAuth: {\n ...appState.directorsAuth,\n status: \"redirect\",\n authorizationTokens: auths,\n locationsAuth: sitesAuth.filter((el) => el.token !== null),\n },\n }));\n } catch (e) {\n console.error(e);\n setAppState((appState) => ({\n ...appState,\n directorsAuth: {\n ...appState.directorsAuth,\n authorizationTokens: [],\n },\n }));\n setState((state) => ({\n ...state,\n status: \"failed\",\n message: \"You failed to authenticate in all sites\",\n }));\n }\n };\n\n return (\n <>\n {appState.directorsAuth.status === \"redirect\" && !appState.managementMode &&(\n <>\n \n \n )}\n {appState.directorsAuth.status === \"redirect\" && appState.managementMode &&(\n <>\n \n \n )}\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Login

\n
\n
\n
\n
\n
\n
\n setUserName(e.target.value)}\n />\n setPassword(e.target.value)}\n />\n {state.status === \"failed\" && (\n \n {state.message}\n
\n )}\n {state.status === \"success\" && (\n
\n {state.message}\n
\n )}\n {state.status !== \"loading\" ? (\n \n \n LOGIN\n \n \n ) : (\n \n \n \n )}\n
\n
\n
\n
\n
\n \n );\n}\nDirectorsLogin.propTypes = {\n appState: PropTypes.object,\n setAppState: PropTypes.func,\n};\nexport default DirectorsLogin;\n","import React, { useState, useEffect } from \"react\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\nimport { PropTypes } from \"prop-types\";\nimport { timeZones } from \"../config/constants.js\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\n\nfunction ConfigSetup({ appState }) {\n const [siteList, setSiteList] = useState([]);\n const [siteToken, setSiteToken] = useState(null);\n const initDatosSite = {\n site: \"\",\n location: \"\",\n name: \"\",\n folder: \"\",\n email: [],\n phone: \"\",\n zipwhipSession: \"\",\n bitlyForm: \"\",\n inboxId: \"\",\n creatorId: \"\",\n timeZone: \"\",\n address: \"\",\n storeName: \"\",\n gMapLink: \"\",\n HTAEnglish: \"\",\n HTASpanish: \"\",\n isdst: \"\",\n reviewLinkOriginal: \"\",\n reviewLinkSent: \"\",\n chatbotId: \"\",\n };\n const [datosSite, setDatosSite] = useState(initDatosSite);\n const [allTimeZones, setAllTimeZones] = useState(null);\n const [showSelect, setShowSelect] = useState(true);\n const initState = {\n status: \"loading\",\n message: \"\",\n validateEmail: true,\n validatePhone: true,\n validateFolder: true,\n updateStatus: \"default\",\n updateServiceStatus: \"default\",\n updateServiceMessage: \"\",\n updateMessage: \"\",\n requestAction: \"update\",\n selectValueDefault: \"#\",\n selectLabelDefault: \"Select a Site\",\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n address: \"\",\n storeName: \"\",\n gMapLink: \"\",\n HTAEnglish: \"\",\n HTASpanish: \"\",\n reviewLinkOriginal: \"\",\n selectedSite: {},\n };\n const [state, setState] = useState(initState);\n\n useEffect(() => {\n getTimeZone();\n getConfig();\n }, []);\n\n const handleSave = (event) => {\n event.preventDefault();\n if (\n datosSite.site.trim() !== \"\" &&\n datosSite.location.trim() !== \"\" &&\n datosSite.name.trim() !== \"\" &&\n datosSite.folder.trim() !== \"\" &&\n datosSite.email !== \"\" &&\n datosSite.zipwhipSession.trim() !== \"\" &&\n datosSite.bitlyForm.trim() !== \"\" &&\n datosSite.inboxId.trim() !== \"\" &&\n datosSite.creatorId.trim() !== \"\" &&\n datosSite.phone.trim() !== \"\" &&\n state.selectedValueTimeZone !== \"\" &&\n state.selectedValueTimeZone !== \"#\" &&\n datosSite.address.trim() !== \"\" &&\n datosSite.storeName.trim() !== \"\" &&\n datosSite.gMapLink.trim() !== \"\" &&\n datosSite.HTAEnglish.trim() !== \"\" &&\n datosSite.HTASpanish.trim() !== \"\" &&\n datosSite.chatbotId.trim() !== \"\" &&\n datosSite.reviewLinkOriginal.trim() !== \"\"\n ) {\n if (\n state.validateEmail === true &&\n state.validateFolder === true &&\n state.validatePhone === true\n ) {\n setState({\n ...state,\n // pendiente\n // updateMessage: \"\",\n // updateStatus: \"default\",\n });\n updateConfig();\n } else {\n setState((state) => ({\n ...state,\n updateStatus: \"validateError\",\n updateMessage:\n \"Debe corregir los errores en los campos Folder y/o Email y/o Phone\",\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n updateStatus: \"emptyError\",\n updateMessage: \"Debe llenar los campos obligatorios\",\n }));\n }\n };\n\n const handleInputChange = (event) => {\n const name = event.target.name;\n const value = event.target.value;\n\n setDatosSite((datosSite) => ({\n ...datosSite,\n [name]: value,\n }));\n };\n\n const handleValidateFolder = (event) => {\n if (event.target.value !== \"\") {\n const value = event.target.value;\n\n if (value.substring(0, 1) !== \"/\" || value.slice(-1) !== \"/\") {\n setState({\n ...state,\n validateFolder: false,\n });\n } else {\n setState({\n ...state,\n validateFolder: true,\n });\n }\n }\n };\n\n const handleOnBlur = (event) => {\n if (event.target.value !== \"\") {\n const emailSinEspacios = event.target.value.replace(/ /g, \"\");\n\n const emails = emailSinEspacios.split(\",\");\n\n const badEmail = emails.filter((value) => {\n if (value === \"\") return false;\n const emailRegex = /^\\S+@\\S+\\.\\S+$/;\n return !emailRegex.test(value);\n });\n if (badEmail.length === 0) {\n setState({\n ...state,\n validateEmail: true,\n });\n } else {\n setState({\n ...state,\n validateEmail: false,\n });\n }\n }\n };\n\n const handlePhoneOnBlur = (event) => {\n const value = event.target.value;\n // let cleanValue = \"\";\n const phoneRegex = /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;\n if (phoneRegex.test(value)) {\n setState({\n ...state,\n validatePhone: true,\n });\n } else {\n if (value === \"\") {\n setState({\n ...state,\n validatePhone: true,\n });\n } else {\n setState({\n ...state,\n validatePhone: false,\n });\n }\n }\n };\n\n const handleTimeZoneChange = (event) => {\n const value = event.target.value;\n\n const foundTimeZone = allTimeZones.find(\n (element) => element.value === value\n );\n\n if (foundTimeZone && foundTimeZone.value) {\n setState((state) => ({\n ...state,\n selectedValueTimeZone: foundTimeZone.value,\n selectedLabelTimeZone: foundTimeZone.label,\n selectedUtcTimeZone: foundTimeZone.utc,\n selectedIdtstTimeZone: foundTimeZone.isdst,\n }));\n } else {\n setState((state) => ({\n ...state,\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n }));\n }\n getTimeZone();\n };\n\n const clearForm = () => {\n setDatosSite({\n site: \"\",\n location: \"\",\n name: \"\",\n folder: \"\",\n email: [],\n phone: \"\",\n zipwhipSession: \"\",\n bitlyForm: \"\",\n inboxId: \"\",\n creatorId: \"\",\n timeZone: \"\",\n address: \"\",\n storeName: \"\",\n gMapLink: \"\",\n HTAEnglish: \"\",\n HTASpanish: \"\",\n reviewLinkOriginal: \"\",\n chatbotId: \"\",\n });\n setState({\n ...state,\n requestAction: !showSelect ? \"update\" : \"create\",\n updateMessage: \"\",\n updateStatus: \"default\",\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n selectValueDefault: \"#\",\n selectLabelDefault: \"Select a Site\",\n });\n setShowSelect((value) => !value);\n getTimeZone();\n };\n\n const updateConfig = async () => {\n if (state.updateStatus === \"loading\") {\n return;\n }\n\n setState((state) => ({\n ...state,\n updateStatus: \"loading\",\n }));\n\n try {\n const payload = {\n site: datosSite.site + \"-\" + datosSite.location,\n name: datosSite.name,\n folder: datosSite.folder,\n phone: datosSite.phone,\n email: datosSite.email,\n zipwhipSession: datosSite.zipwhipSession,\n bitlyForm: datosSite.bitlyForm,\n inboxId: datosSite.inboxId,\n creatorId: datosSite.creatorId,\n timeZoneValue: state.selectedValueTimeZone,\n timeZone: state.selectedUtcTimeZone,\n isdst: state.selectedIdtstTimeZone,\n address: datosSite.address,\n storeName: datosSite.storeName,\n gMapLink: datosSite.gMapLink,\n HTAEnglish: datosSite.HTAEnglish,\n HTASpanish: datosSite.HTASpanish,\n reviewLinkOriginal: datosSite.reviewLinkOriginal,\n chatbotId: datosSite.chatbotId,\n reviewLinkSent:\n state.requestAction === \"update\"\n ? datosSite.reviewLinkSent\n : datosSite.reviewLinkOriginal,\n };\n\n const updateSitesQuery = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(payload),\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n updateSitesQuery\n );\n\n const updateSiteResponse = await response.json();\n\n if (response.ok) {\n setDatosSite({ ...initDatosSite });\n\n setState((state) => ({\n ...state,\n updateStatus: \"success\",\n updateMessage:\n state.requestAction === \"update\"\n ? \"Site updated successfully!\"\n : \"Site created successfully!\",\n selectValueDefault: \"#\",\n selectLabelDefault: \"Select a Site\",\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedIdtstTimeZone: \"\",\n selectedUtcTimeZone: \"\",\n validateEmail: true,\n validatePhone: true,\n validateFolder: true,\n }));\n } else {\n setState((state) => ({\n ...state,\n updateStatus: \"requestError\",\n updateMessage: JSON.stringify(updateSiteResponse),\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n updateStatus: \"error\",\n updateMessage: \"Error: \" + JSON.stringify(error.message),\n }));\n }\n\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n };\n\n const getTimeZone = () => {\n const timeZone = timeZones.map((item) => {\n const times = {\n value: item.value,\n label: item.text,\n isdst: item.isdst,\n utc: item.utc[0],\n };\n return times;\n });\n setAllTimeZones(timeZone);\n };\n\n const getConfig = async (siteSelected) => {\n try {\n const getSitesQuery = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n getSitesQuery\n );\n\n const datosSiteResponse = await response.json();\n\n if (response.ok) {\n\n const filterSites = datosSiteResponse.sites.filter((i) => { return i.site !== \"0-0\" });\n setSiteList(filterSites);\n\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n } else {\n setState((state) => ({\n ...state,\n status: \"no-data-found\",\n message: JSON.stringify(datosSiteResponse),\n selectValueDefault: siteSelected,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: \"Onload page Error: \" + JSON.stringify(error.message),\n selectValueDefault: siteSelected,\n }));\n }\n return null;\n };\n\n const handleChange = (event) => {\n event.preventDefault();\n if (event.target.value === \"#\") {\n setDatosSite({\n site: \"\",\n location: \"\",\n name: \"\",\n folder: \"\",\n email: [],\n phone: \"\",\n zipwhipSession: \"\",\n bitlyForm: \"\",\n inboxId: \"\",\n creatorId: \"\",\n timeZone: \"\",\n reviewLinkSent: \"\",\n isdst: \"\",\n gMapLink: \"\",\n storeName: \"\",\n HTAEnglish: \"\",\n HTASpanish: \"\",\n address: \"\",\n reviewLinkOriginal: \"\",\n timeZoneValue: \"\",\n chatbotId: \"\",\n });\n\n setState({\n ...state,\n requestAction: !showSelect ? \"update\" : \"create\",\n updateMessage: \"\",\n updateStatus: \"default\",\n updateServiceMessage: \"\",\n updateServiceStatus: \"default\",\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n selectValueDefault: \"#\",\n selectLabelDefault: \"Select a Site\",\n HTAEnglish: \"\",\n HTASpanish: \"\",\n address: \"\",\n reviewLinkOriginal: \"\",\n });\n getTimeZone();\n return;\n }\n\n getTimeZone();\n const found = siteList.find(\n (element) => element.site === event.target.value\n );\n setDatosSite({\n ...initDatosSite,\n ...found,\n site: found.site.split(\"-\")[0].trim(),\n location: found.site.split(\"-\")[1].trim(),\n timeZone: found.timeZoneValue,\n });\n setState((state) => ({\n ...state,\n selectValueDefault: event.target.value,\n requestAction: showSelect ? \"update\" : \"create\",\n }));\n if (found && found.timeZoneValue) {\n const foundTimeZone = allTimeZones.find(\n (element) => element.value === found.timeZoneValue\n );\n if (foundTimeZone && foundTimeZone.value) {\n setState((state) => ({\n ...state,\n selectedValueTimeZone: foundTimeZone.value,\n selectedLabelTimeZone: foundTimeZone.label,\n selectedUtcTimeZone: foundTimeZone.utc,\n selectedIdtstTimeZone: foundTimeZone.isdst,\n }));\n } else {\n setState((state) => ({\n ...state,\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n selectedValueTimeZone: \"#\",\n selectedLabelTimeZone: \"Select a Time Zone\",\n selectedUtcTimeZone: \"\",\n selectedIdtstTimeZone: \"\",\n }));\n }\n };\n\n\n useEffect(() => {\n\n const getToken = appState.directorsAuth.authorizationTokens.find(\n (i) => i.siteId.toString() === datosSite.site\n );\n\n if (getToken !== undefined) {\n setSiteToken(getToken.auth.accesssToken);\n } else {\n setSiteToken(null);\n }\n\n\n }, [datosSite]);\n\n\n const handleUpdateService = async () => {\n try {\n\n setState((state) => ({\n ...state,\n updateServiceStatus: \"processing\",\n }));\n\n const postServices = {\n method: \"POST\",\n headers: {\n siteId: `${datosSite.site}`,\n authorization: siteToken,\n },\n };\n\n const responsePost = await fetch(\n `${process.env.REACT_APP_API_URL}/api/program/sessionTypes`,\n postServices\n );\n\n if (responsePost.ok) {\n setState((state) => ({\n ...state,\n updateServiceStatus: \"success\",\n updateServiceMessage: \"Services updated successfully!\",\n }));\n\n setTimeout(() => {\n setState((state) => ({\n ...state,\n updateServiceStatus: \"default\",\n updateServiceMessage: \"\",\n }));\n }, 2000);\n\n }\n\n } catch (error) {\n\n setState((state) => ({\n ...state,\n updateServiceStatus: \"error\",\n updateServiceMessage: \"Error: \" + JSON.stringify(error.message),\n }));\n\n\n }\n }\n\n return (\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n\n {state.status === \"ready\" && (\n
\n
\n

\n Setup\n

\n
\n\n
\n
\n
\n
\n
\n {showSelect === true && siteList && (\n \n \n {siteList.map((site, i) => {\n return (\n \n );\n })}\n \n )}\n
\n
\n \n \n {showSelect === true ? \"Create\" : \"Cancel\"}\n \n \n {state.updateServiceStatus === \"processing\" ?\n \n : state.updateServiceStatus === \"success\" ?\n : \"Update Service\"}\n\n \n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n \n * \n \n
\n
\n \n * \n \n
\n
\n\n
\n
\n \n \n
\n
\n \n \n {!state.validateFolder && (\n \n Invalid folder, remember to contain slash at the\n beginning and end. Please enter a valid folder\n \n )}\n
\n
\n\n
\n
\n \n * \n \n\n {!state.validateEmail && (\n \n Invalid email, please enter a valid email\n \n )}\n
\n
\n\n
\n
\n \n \n\n {!state.validatePhone && (\n \n Invalid phone, please enter a valid phone\n \n )}\n
\n
\n \n \n
\n
\n\n
\n
\n \n \n
\n
\n \n\n \n
\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n {allTimeZones.map((time, i) => {\n return (\n \n );\n })}\n \n
\n
\n\n
\n
\n \n \n
\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n\n
\n
\n \n \n
\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n {state.updateStatus === \"success\" && (\n \n {state.updateMessage}\n
\n )}\n {state.updateServiceStatus === \"success\" && (\n \n {state.updateServiceMessage}\n
\n )}\n {state.updateServiceStatus === \"error\" && (\n \n {state.updateServiceMessage}\n
\n )}\n {(state.updateStatus === \"requestError\" ||\n state.updateStatus === \"emptyError\" ||\n state.updateStatus === \"validateError\" ||\n state.updateStatus === \"error\") && (\n \n {state.updateMessage}\n
\n )}\n \n \n {state.requestAction === \"update\"\n ? \"Update Site\"\n : \"Create Site\"}\n \n \n \n \n \n )}\n\n {state.status === \"error\" && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n {state.message}\n
\n
\n
\n
\n )}\n {state.status === \"no-data-found\" && (\n
\n
\n
\n

Nothing found

\n

Seems like nothing was found

\n
\n {state.message}\n
\n
\n
\n
\n )}\n \n );\n}\n\nConfigSetup.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default ConfigSetup;\n","import React, { useEffect, useState } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport DatePicker from \"react-datepicker\";\nimport { formatAmount } from \"../util/formatNumbers.js\";\nimport { formatDate2string, formatDate2object } from \"../util/index.js\";\nimport \"../styles/global.css\";\nimport \"../styles/dailyCloseout.css\";\n\nfunction DailyCloseout({ appState, setAppState }) {\n const today = new Date();\n const [state, setState] = useState({\n status: \"idle\",\n message: \"\",\n date: new Date().toISOString().substr(0, 10),\n });\n const [locations, setLocations] = useState([]);\n const [startDate, setStartDate] = useState(new Date());\n const [endDate, setEndDate] = useState(new Date());\n const [data, setData] = useState({});\n const [location, setLocation] = useState({});\n\n const updateSiteName = () => {\n let siteName;\n const sites = appState.directorsAuth.authorizationTokens;\n for (let index = 0; index < sites.length; index++) {\n if (sites[index].siteId.toString() === appState.nav.siteId) {\n siteName = sites[index].siteName;\n break;\n }\n }\n setAppState((appState) => ({\n ...appState,\n nav: {\n ...appState.nav,\n siteName: siteName,\n },\n }));\n };\n useEffect(() => {\n getLocations();\n updateSiteName();\n }, [appState.nav.siteId]);\n\n const handleLocationChange = (event) => {\n const name = event.target.options[event.target.selectedIndex].text;\n setLocation({\n id: event.target.value,\n name: name,\n });\n };\n\n const formatQuantity = (amount) => {\n return parseFloat(amount).toLocaleString(\"en-US\", {\n maximumFractionDigits: 0,\n });\n };\n\n const getLocations = async () => {\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n const getResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/locations`,\n getMethod\n );\n\n if (getResponse.ok && getResponse.status === 200) {\n const siteLocations = await getResponse.json();\n\n if (siteLocations.length > 1) {\n siteLocations.push({\n name: \"All Locations\",\n id: 0,\n });\n }\n setLocations(siteLocations);\n setLocation(siteLocations[0]);\n } else {\n setLocations([]);\n }\n } catch (error) {\n setLocations([]);\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const getData = async () => {\n const addTotals = (dailyData) => {\n let receipt = 0;\n let tax = 0;\n let returns = 0;\n let tip = 0;\n let total = 0;\n\n dailyData.byPayment.cashEquivalent.forEach((item) => {\n receipt += parseFloat(item.receipt);\n tax += parseFloat(item.tax);\n returns += parseFloat(item.returns);\n tip += parseFloat(item.tip);\n total += parseFloat(item.total);\n item.receipt = formatAmount(parseFloat(item.receipt));\n item.tax = formatAmount(parseFloat(item.tax));\n item.returns = formatAmount(parseFloat(item.returns));\n item.tip = formatAmount(parseFloat(item.tip));\n item.total = formatAmount(parseFloat(item.total));\n });\n\n dailyData.cashEquivalentSum = {\n receipt: receipt,\n tax: tax,\n returns: returns,\n tip: tip,\n total: total,\n };\n\n receipt = 0;\n tax = 0;\n returns = 0;\n tip = 0;\n total = 0;\n\n dailyData.byPayment.nonCashEquivalent.forEach((item) => {\n receipt += parseFloat(item.receipt);\n tax += parseFloat(item.tax);\n returns += parseFloat(item.returns);\n tip += parseFloat(item.tip);\n total += parseFloat(item.total);\n item.receipt = formatAmount(parseFloat(item.receipt));\n item.tax = formatAmount(parseFloat(item.tax));\n item.returns = formatAmount(parseFloat(item.returns));\n item.tip = formatAmount(parseFloat(item.tip));\n item.total = formatAmount(parseFloat(item.total));\n });\n\n dailyData.nonCashEquivalentSum = {\n receipt: receipt,\n tax: tax,\n returns: returns,\n tip: tip,\n total: total,\n };\n dailyData.totalReceipts = {\n receipt: formatAmount(\n dailyData.cashEquivalentSum.receipt +\n dailyData.nonCashEquivalentSum.receipt\n ),\n tax: formatAmount(\n dailyData.cashEquivalentSum.tax + dailyData.nonCashEquivalentSum.tax\n ),\n returns: formatAmount(\n dailyData.cashEquivalentSum.returns +\n dailyData.nonCashEquivalentSum.returns\n ),\n tip: formatAmount(\n dailyData.cashEquivalentSum.tip + dailyData.nonCashEquivalentSum.tip\n ),\n total: formatAmount(\n dailyData.cashEquivalentSum.total +\n dailyData.nonCashEquivalentSum.total\n ),\n };\n\n let sales = 0;\n tax = 0;\n let quantity = 0;\n returns = 0;\n let returnsqty = 0;\n total = 0;\n\n dailyData.byCategory.serviceCategory.forEach((service) => {\n sales += parseFloat(service.sales);\n tax += parseFloat(service.tax);\n quantity += parseInt(service.quantity);\n returns += parseFloat(service.returns);\n returnsqty += parseInt(service.returnsqty);\n total += parseFloat(service.total);\n service.sales = formatAmount(parseFloat(service.sales));\n service.tax = formatAmount(parseFloat(service.tax));\n service.quantity = formatQuantity(parseInt(service.quantity));\n service.returns = formatAmount(parseFloat(service.returns));\n service.returnsqty = formatQuantity(parseInt(service.returnsqty));\n service.total = formatAmount(parseFloat(service.total));\n });\n\n dailyData.serviceCategorySum = {\n sales: sales,\n tax: tax,\n quantity: quantity,\n returns: returns,\n returnsqty: returnsqty,\n total: total,\n };\n\n sales = 0;\n tax = 0;\n quantity = 0;\n returns = 0;\n returnsqty = 0;\n total = 0;\n\n dailyData.byCategory.productCategory.forEach((service) => {\n sales += parseFloat(service.sales);\n tax += parseFloat(service.tax);\n quantity += parseInt(service.quantity);\n returns += parseFloat(service.returns);\n returnsqty += parseInt(service.returnsqty);\n total += parseFloat(service.total);\n service.sales = formatAmount(parseFloat(service.sales));\n service.tax = formatAmount(parseFloat(service.tax));\n service.quantity = formatQuantity(parseInt(service.quantity));\n service.returns = formatAmount(parseFloat(service.returns));\n service.returnsqty = formatQuantity(parseInt(service.returnsqty));\n service.total = formatAmount(parseFloat(service.total));\n });\n\n dailyData.serviceCategoryProductSum = {\n sales: sales,\n tax: tax,\n quantity: quantity,\n returns: returns,\n returnsqty: returnsqty,\n total: total,\n };\n\n dailyData.totalAccruedSales = {\n sales:\n dailyData.serviceCategorySum.sales +\n dailyData.serviceCategoryProductSum.sales,\n tax:\n dailyData.serviceCategorySum.tax +\n dailyData.serviceCategoryProductSum.tax,\n quantity:\n dailyData.serviceCategorySum.quantity +\n dailyData.serviceCategoryProductSum.quantity,\n returns:\n dailyData.serviceCategorySum.returns +\n dailyData.serviceCategoryProductSum.returns,\n returnsqty:\n dailyData.serviceCategorySum.returnsqty +\n dailyData.serviceCategoryProductSum.returnsqty,\n total:\n dailyData.serviceCategorySum.total +\n dailyData.serviceCategoryProductSum.total,\n };\n\n sales = 0;\n tax = 0;\n quantity = 0;\n returns = 0;\n returnsqty = 0;\n total = 0;\n\n dailyData.byCategory.giftCard.forEach((service) => {\n sales += parseFloat(service.sales);\n tax += parseFloat(service.tax);\n quantity += parseInt(service.quantity);\n returns += parseFloat(service.returns);\n returnsqty += parseInt(service.returnsqty);\n total += parseFloat(service.total);\n service.sales = formatAmount(parseFloat(service.sales));\n service.tax = formatAmount(parseFloat(service.tax));\n service.quantity = formatQuantity(parseInt(service.quantity));\n service.returns = formatAmount(parseFloat(service.returns));\n service.returnsqty = formatQuantity(parseInt(service.returnsqty));\n service.total = formatAmount(parseFloat(service.total));\n });\n\n dailyData.serviceCategorygiftCardSum = {\n sales: sales,\n tax: tax,\n quantity: quantity,\n returns: returns,\n returnsqty: returnsqty,\n total: total,\n };\n\n dailyData.totalPaymentsSum = {\n sales: formatAmount(\n dailyData.totalAccruedSales.sales +\n dailyData.serviceCategorygiftCardSum.sales\n ),\n tax: formatAmount(\n dailyData.totalAccruedSales.tax +\n dailyData.serviceCategorygiftCardSum.tax\n ),\n quantity: formatAmount(\n dailyData.totalAccruedSales.quantity +\n dailyData.serviceCategorygiftCardSum.quantity\n ),\n returns: formatAmount(\n dailyData.totalAccruedSales.returns +\n dailyData.serviceCategorygiftCardSum.returns\n ),\n returnsqty: formatQuantity(\n dailyData.totalAccruedSales.returnsqty +\n dailyData.serviceCategorygiftCardSum.returnsqty\n ),\n total: formatAmount(\n dailyData.totalAccruedSales.total +\n dailyData.serviceCategorygiftCardSum.total\n ),\n };\n\n dailyData.totalAccruedSales = {\n sales: formatAmount(\n dailyData.serviceCategorySum.sales +\n dailyData.serviceCategoryProductSum.sales\n ),\n tax: formatAmount(\n dailyData.serviceCategorySum.tax +\n dailyData.serviceCategoryProductSum.tax\n ),\n quantity: formatQuantity(\n dailyData.serviceCategorySum.quantity +\n dailyData.serviceCategoryProductSum.quantity\n ),\n returns: formatAmount(\n dailyData.serviceCategorySum.returns +\n dailyData.serviceCategoryProductSum.returns\n ),\n returnsqty: formatQuantity(\n dailyData.serviceCategorySum.returnsqty +\n dailyData.serviceCategoryProductSum.returnsqty\n ),\n total: formatAmount(\n dailyData.serviceCategorySum.total +\n dailyData.serviceCategoryProductSum.total\n ),\n };\n\n dailyData.cashEquivalentSum = {\n receipt: formatAmount(dailyData.cashEquivalentSum.receipt),\n tax: formatAmount(dailyData.cashEquivalentSum.tax),\n returns: formatAmount(dailyData.cashEquivalentSum.returns),\n tip: formatAmount(dailyData.cashEquivalentSum.tip),\n total: formatAmount(dailyData.cashEquivalentSum.total),\n };\n\n dailyData.nonCashEquivalentSum = {\n receipt: formatAmount(dailyData.nonCashEquivalentSum.receipt),\n tax: formatAmount(dailyData.nonCashEquivalentSum.tax),\n returns: formatAmount(dailyData.nonCashEquivalentSum.returns),\n tip: formatAmount(dailyData.nonCashEquivalentSum.tip),\n total: formatAmount(dailyData.nonCashEquivalentSum.total),\n };\n\n dailyData.serviceCategorySum = {\n sales: formatAmount(dailyData.serviceCategorySum.sales),\n tax: formatAmount(dailyData.serviceCategorySum.tax),\n quantity: formatQuantity(dailyData.serviceCategorySum.quantity),\n returns: formatAmount(dailyData.serviceCategorySum.returns),\n returnsqty: formatQuantity(dailyData.serviceCategorySum.returnsqty),\n total: formatAmount(dailyData.serviceCategorySum.total),\n };\n dailyData.serviceCategoryProductSum = {\n sales: formatAmount(dailyData.serviceCategoryProductSum.sales),\n tax: formatAmount(dailyData.serviceCategoryProductSum.tax),\n quantity: formatQuantity(dailyData.serviceCategoryProductSum.quantity),\n returns: formatAmount(dailyData.serviceCategoryProductSum.returns),\n returnsqty: formatQuantity(\n dailyData.serviceCategoryProductSum.returnsqty\n ),\n total: formatAmount(dailyData.serviceCategoryProductSum.total),\n };\n\n dailyData.serviceCategorygiftCardSum = {\n sales: formatAmount(dailyData.serviceCategorygiftCardSum.sales),\n tax: formatAmount(dailyData.serviceCategorygiftCardSum.tax),\n quantity: formatQuantity(dailyData.serviceCategorygiftCardSum.quantity),\n returns: formatAmount(dailyData.serviceCategorygiftCardSum.returns),\n returnsqty: formatQuantity(\n dailyData.serviceCategorygiftCardSum.returnsqty\n ),\n total: formatAmount(dailyData.serviceCategorygiftCardSum.total),\n };\n };\n setState({\n status: \"loading\",\n });\n try {\n const getData = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n const request = `api/site/${\n appState.nav.siteId\n }/sales/dailyCloseOut?startDate=${formatDate2string(\n startDate\n )}&endDate=${formatDate2string(endDate)}&locationId=${location.id}`;\n\n const getResponseData = await fetch(\n `${process.env.REACT_APP_API_URL}/${request}`,\n getData\n );\n\n if (getResponseData.ok && getResponseData.status === 200) {\n const dailyData = await getResponseData.json();\n addTotals(dailyData);\n setData(dailyData);\n setState((state) => ({\n ...state,\n status: \"ready\",\n }));\n } else {\n setData({});\n }\n } catch (error) {\n setData({});\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const downloadFile = (url) => {\n const link = document.createElement(\"a\");\n link.href = url;\n const qDate = formatDate2object(new Date());\n const name =\n \"DailyCloseout-\" +\n appState.nav.siteId +\n \"-\" +\n appState.nav.locationId +\n \"-\" +\n qDate.mm +\n \"\" +\n qDate.dd +\n \"\" +\n qDate.yyyy +\n \".pdf\";\n link.setAttribute(\"download\", name);\n document.body.appendChild(link);\n link.click();\n link.parentNode.removeChild(link);\n };\n\n const postPDF = async () => {\n try {\n const infoPDF = { ...data };\n infoPDF.locations = [appState.nav.siteName + \" - \" + location.name];\n infoPDF.startDate = formatDate2string(startDate);\n infoPDF.endDate = formatDate2string(endDate);\n\n const postMethod = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(infoPDF),\n };\n const responseInfo = await fetch(\n `${process.env.REACT_APP_API_URL}/api/pdf/sales/dailyCloseOutPdf`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n if (\"url\" in info) {\n downloadFile(info.url);\n }\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n return (\n
\n
\n
\n

Daily Closeout

\n
\n
\n
{formatDate2string(today)}
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n {locations.map((option) => (\n \n ))}\n \n
\n
\n setStartDate(date)}\n selectsStart\n startDate={startDate}\n endDate={endDate}\n value={startDate}\n />\n
\n
\n setEndDate(date)}\n selectsEnd\n startDate={startDate}\n endDate={startDate}\n minDate={startDate}\n value={startDate}\n />\n
\n
\n
\n \n Consult Report.\n \n
\n
\n {state.status === \"loading\" && (\n
\n
\n
\n )}\n {(state.status === \"error\" ||\n appState.nav.status === \"logOutError\") && (\n
\n
\n
\n

Error

\n

\n Seems like there has been an error\n

\n
\n \n {appState.nav.status === \"logOutError\"\n ? appState.nav.message\n : state.message}\n \n
\n
\n
\n
\n )}\n
\n \n {(state.status === \"ready\" || state.status === \"success\") && (\n <>\n
Sales by Payment Type
\n
\n \n \n \n \n Name\n \n \n Receipt\n \n \n Tax\n \n \n Returns\n \n \n Tip\n \n \n Total\n \n \n \n \n \n Payment Type\n \n {data.byPayment.cashEquivalent.map((paymentType) => {\n return (\n \n {paymentType.name}\n ${paymentType.receipt}\n ${paymentType.tax}\n \n ${paymentType.returns}\n \n ${paymentType.tip}\n ${paymentType.total}\n \n );\n })}\n \n Cash Equivalent Receipts\n \n ${data.cashEquivalentSum.receipt}\n \n \n ${data.cashEquivalentSum.tax}\n \n \n ${data.cashEquivalentSum.returns}\n \n \n ${data.cashEquivalentSum.tip}\n \n \n ${data.cashEquivalentSum.total}\n \n \n {data.byPayment.nonCashEquivalent.map((paymentTypeNon) => {\n return (\n \n {paymentTypeNon.name}\n \n ${paymentTypeNon.receipt}\n \n ${paymentTypeNon.tax}\n \n ${paymentTypeNon.returns}\n \n ${paymentTypeNon.tip}\n ${paymentTypeNon.total}\n \n );\n })}\n \n Non-Cash Equivalent Receipts\n \n ${data.nonCashEquivalentSum.receipt}\n \n \n ${data.nonCashEquivalentSum.tax}\n \n \n ${data.nonCashEquivalentSum.returns}\n \n \n ${data.nonCashEquivalentSum.tip}\n \n \n ${data.nonCashEquivalentSum.total}\n \n \n \n \n \n Total Receipts\n \n ${data.totalReceipts.receipt}\n \n \n ${data.totalReceipts.tax}\n \n \n ${data.totalReceipts.returns}\n \n \n ${data.totalReceipts.tip}\n \n \n ${data.totalReceipts.total}\n \n \n \n \n
\n
Sales by Category
\n
\n \n \n \n \n Name\n \n \n Sales\n \n \n Tax\n \n \n Qty\n \n \n Returns\n \n \n Qty\n \n \n Total\n \n \n \n \n \n Service Categories\n \n {data.byCategory.serviceCategory.map((category) => {\n return (\n \n {category.name}\n ${category.sales}\n ${category.tax}\n {category.quantity}\n \n ${category.returns}\n \n {category.returnsqty}\n ${category.total}\n \n );\n })}\n\n \n Service Subtotals\n \n ${data.serviceCategorySum.sales}\n \n \n ${data.serviceCategorySum.tax}\n \n \n {data.serviceCategorySum.quantity}\n \n \n ${data.serviceCategorySum.returns}\n \n \n {data.serviceCategorySum.returnsqty}\n \n \n ${data.serviceCategorySum.total}\n \n \n \n \n \n \n Product Categories\n \n {data.byCategory.productCategory.map((categoryProduct) => {\n return (\n \n {categoryProduct.name}\n ${categoryProduct.sales}\n ${categoryProduct.tax}\n \n {categoryProduct.quantity}\n \n \n ${categoryProduct.returns}\n \n \n {categoryProduct.returnsqty}\n \n ${categoryProduct.total}\n \n );\n })}\n \n Products Subtotals\n \n ${data.serviceCategoryProductSum.sales}\n \n \n ${data.serviceCategoryProductSum.tax}\n \n \n {data.serviceCategoryProductSum.quantity}\n \n \n ${data.serviceCategoryProductSum.returns}\n \n \n {data.serviceCategoryProductSum.returnsqty}\n \n \n ${data.serviceCategoryProductSum.total}\n \n \n \n \n \n \n Total Accrued Sales\n \n ${data.totalAccruedSales.sales}\n \n \n ${data.totalAccruedSales.tax}\n \n \n {data.totalAccruedSales.quantity}\n \n \n ${data.totalAccruedSales.returns}\n \n \n {data.totalAccruedSales.returnsqty}\n \n \n ${data.totalAccruedSales.total}\n \n \n \n \n \n \n Prepaid giftcard\n \n {data.byCategory.giftCard.map((categoryGiftcard) => {\n return (\n \n {categoryGiftcard.name}\n \n ${categoryGiftcard.sales}\n \n ${categoryGiftcard.tax}\n \n {categoryGiftcard.quantity}\n \n \n ${categoryGiftcard.returns}\n \n \n {categoryGiftcard.returnsqty}\n \n \n ${categoryGiftcard.total}\n \n \n );\n })}\n \n Total Payments on Account\n \n ${data.serviceCategorygiftCardSum.sales}\n \n \n ${data.serviceCategorygiftCardSum.tax}\n \n \n {data.serviceCategorygiftCardSum.quantity}\n \n \n ${data.serviceCategorygiftCardSum.returns}\n \n \n {data.serviceCategorygiftCardSum.returnsqty}\n \n \n ${data.serviceCategorygiftCardSum.total}\n \n \n \n \n \n Total Payments\n \n ${data.totalPaymentsSum.sales}\n \n \n ${data.totalPaymentsSum.tax}\n \n \n {data.totalPaymentsSum.quantity}\n \n \n ${data.totalPaymentsSum.returns}\n \n \n {data.totalPaymentsSum.returnsqty}\n \n \n ${data.totalPaymentsSum.total}\n \n \n \n \n
\n\n
\n \n Download PDF\n \n
\n \n )}\n
\n
\n
\n );\n}\n\nDailyCloseout.propTypes = {\n appState: PropTypes.object.isRequired,\n setAppState: PropTypes.func.isRequired,\n};\n\nexport default DailyCloseout;\n","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { formatDate2string } from \"../util/index.js\";\nimport DatePicker from \"react-datepicker\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport moment from \"moment\";\nimport axios from \"axios\";\n\nfunction IncompleteAppointments({ appState, setAppState }) {\n const today = new Date();\n const [hoverIndex, setHoverIndex] = useState(false);\n const [startDate, setStartDate] = useState(new Date());\n const [locations, setLocations] = useState([]);\n const [selection, setSelection] = useState({});\n const [includeAppointments, setIncludeAppointments] = useState(false);\n const [state, setState] = useState({\n message: \"\",\n status: \"ready\",\n success: false,\n show: false,\n });\n\n const getLocations = async () => {\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n siteid: appState.nav.siteId,\n authorization: appState.singleAuth.token,\n },\n };\n const getResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/sites/all/locations/`,\n getMethod\n );\n const locationData = await getResponse.json();\n\n if (getResponse.ok && getResponse.status === 200) {\n setLocations(locationData.siteslist);\n const firstSite = locationData.siteslist[0].id;\n const value = firstSite.split(\"-\");\n const siteId = value[0];\n const locationId = value[1];\n setSelection((selection) => ({\n ...selection,\n siteId: siteId,\n locationId: locationId,\n locationName: locationData.siteslist[0].name,\n }));\n } else {\n setLocations([]);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: locationData.message ?? JSON.stringify(locationData),\n success: false,\n }));\n }\n } catch (error) {\n console.error(error);\n setLocations([]);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: JSON.stringify(error),\n success: false,\n }));\n }\n };\n\n const handleLocationChange = (event) => {\n let { value } = event.target;\n const locationItem = locations.find((item) => item.id === value);\n value = value.split(\"-\");\n const siteId = value[0];\n const locationId = value[1];\n\n setSelection((selection) => ({\n ...selection,\n siteId: event.target.value === \"0-0\" ? \"0\" : siteId,\n locationId: locationId,\n locationName: locationItem.name,\n }));\n };\n\n const handleButtonDownloadReport = async () => {\n try {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n const date = moment(startDate).format(\"YYYYMMDD\").toString();\n const dateName = moment(startDate).format(\"YYYY-MM-DD\").toString();\n const siteId = selection.siteId;\n const booked = includeAppointments;\n const requestSCV = `api/incomplete/booking?date=${date}&siteId=${siteId}&booked=${booked}&format=excel`;\n\n // Inicio: Axios\n axios({\n method: \"get\",\n url: `${process.env.REACT_APP_API_URL}/${requestSCV}`,\n responseType: \"blob\",\n })\n .then(function (response) {\n try {\n if (response.status === 200) {\n const url = window.URL.createObjectURL(response.data);\n const link = document.createElement(\"a\");\n link.href = url;\n link.setAttribute(\"download\", `incompletebooking-${selection.locationName}-${dateName}.xlsx`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: \"The report has been successfully downloaded\",\n success: true,\n }));\n }\n } catch (errorE) {\n console.error(errorE);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message:\n \"The file couldn't be fetched: \" + JSON.stringify(errorE),\n success: false,\n }));\n }\n })\n .catch(async (error) => {\n try {\n const { response } = error;\n const text = await response.data.text();\n const jsonResponse = await JSON.parse(text);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: jsonResponse.message ?? \"No data available for download\",\n success: false,\n }));\n } catch (errorE) {\n console.error(errorE);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: \"The file couldn't be fetched: \" + JSON.stringify(error),\n success: false,\n }));\n }\n });\n // Fin: Axios\n } catch (error) {\n console.error(error);\n setState((state) => ({\n ...state,\n show: true,\n status: \"ready\",\n message: \"The file couldn't be fetched: \" + JSON.stringify(error),\n success: false,\n }));\n }\n };\n\n useEffect(() => {\n getLocations();\n }, []);\n\n useEffect(() => {\n setTimeout(() => {\n setState((state) => ({\n ...state,\n show: false,\n message: \"\",\n }));\n }, 9000);\n }, [state.show]);\n\n return (\n
\n
\n
\n

Incomplete Booking Report

\n
\n\n
\n
{formatDate2string(today)}
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n setHoverIndex(true)}\n onMouseLeave={() => setHoverIndex(false)}\n style={{ cursor: \"pointer\" }}\n >\n Include Booked\n \n
\n
\n\n
\n
\n \n {locations.map((option) => (\n \n ))}\n \n
\n \n setStartDate(date)}\n selectsStart\n startDate={startDate}\n value={startDate}\n />\n
\n
\n
\n setIncludeAppointments(e.target.checked)}\n className=\"form-check-input ml-3\"\n type=\"checkbox\"\n role=\"switch\"\n id=\"flexSwitchCheckDefault\"\n />\n
\n
\n\n
\n
\n \n {state.status === \"loading\" && (\n \n \n \n )}\n\n {state.status === \"ready\" && Download Report.}\n \n
\n
\n\n \n Check all incomplete appointments even if the client booked later\n
\n\n {state.show && (\n \n {state.message}\n
\n )}\n \n \n \n );\n}\n\nIncompleteAppointments.propTypes = {\n appState: PropTypes.object,\n setAppState: PropTypes.func,\n};\n\nexport default IncompleteAppointments;\n","import React, { useState, useEffect } from \"react\";\nimport \"../styles/global.css\";\nimport { PropTypes } from \"prop-types\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\n\nfunction EditReviewLinksPage({ appState }) {\n const initState = {\n loading: true,\n requestStatus: \"IDLE\",\n status: \"loading\",\n message: \"\",\n };\n const [state, setState] = useState(initState);\n const [sitesData, setSitesData] = useState([]);\n\n const getSitesData = async () => {\n try {\n const getSitesData = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n getSitesData\n );\n\n const data = await response.json();\n\n if (response.ok) {\n const allSitesItem = data.sites.find(site => site.site === \"0-0\");\n let sitesArray = []\n if(allSitesItem !== undefined){\n sitesArray = data.sites.filter(site => site.site !== \"0-0\");\n }\n else{\n sitesArray = data.sites;\n }\n setSitesData(sitesArray);\n setState({\n ...state,\n loading: false,\n requestStatus: \"OK\",\n status: \"ready\",\n message: \"\",\n });\n } else {\n setState({\n ...state,\n loading: false,\n requestStatus: \"FAIL\",\n status: \"ready\",\n message: JSON.stringify(data),\n });\n }\n } catch (error) {\n setState({\n ...state,\n loading: false,\n requestStatus: \"ERROR\",\n status: \"ready\",\n message: JSON.stringify(error.message),\n });\n }\n console.log(sitesData);\n };\n\n useEffect(() => {\n getSitesData();\n }, []);\n\n const handleSelectChange = (e) => {\n const siteId = e.target.name;\n const value = e.target.value;\n\n const mutableSitesData = sitesData;\n\n const findedIndex = mutableSitesData.findIndex(\n (site) => site.site === siteId\n );\n\n if (findedIndex !== -1) {\n mutableSitesData[findedIndex].reviewLinkSent = value;\n setSitesData([...mutableSitesData]);\n }\n };\n\n const updateAllSites = async () => {\n const singleUpdate = async (siteObject) => {\n const payload = { ...siteObject };\n const updateSiteRequestConfig = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n body: JSON.stringify(payload),\n };\n\n const response = await fetch(\n `${process.env.REACT_APP_API_URL}/api/config/sites`,\n updateSiteRequestConfig\n );\n\n if (response.ok) {\n return Promise.resolve({\n siteName: siteObject.storeName,\n success: response.ok,\n });\n } else {\n return Promise.resolve({\n siteName: siteObject.storeName,\n success: response.ok,\n });\n }\n };\n\n const updateAttemps = sitesData.map((site) => singleUpdate({ ...site }));\n\n const updateResults = await Promise.all(updateAttemps);\n\n return Promise.resolve(updateResults);\n };\n\n const handleUpdateClick = async (e) => {\n try {\n setState({\n ...state,\n requestStatus: \"REQUESTING\",\n });\n\n const results = await updateAllSites();\n const failedAttempts = results.filter((elem) => elem.success === false);\n\n if (failedAttempts.length > 0) {\n let sitesList = \"\";\n failedAttempts.forEach((el) => {\n sitesList += el.siteName + \", \";\n });\n setState({\n ...state,\n requestStatus: \"UPDATE-FAIL\",\n message: \"Failed to update: \" + sitesList,\n });\n } else {\n setState({\n ...state,\n requestStatus: \"UPDATE-OK\",\n message: \"\",\n });\n }\n } catch (error) {\n setState({\n ...state,\n requestStatus: \"UPDATE-ERROR\",\n message: \"ERROR: \" + JSON.stringify(error),\n });\n }\n };\n\n return (\n
\n {state.loading === true && (\n
\n
\n
\n )}\n\n {state.loading === false && (\n
\n
\n {state.requestStatus === \"FAIL\" && (\n
\n {state.message} \n
\n )}\n {state.requestStatus === \"ERROR\" && (\n
\n {state.message} \n
\n )}\n {state.status === \"ready\" && (\n <>\n
\n \n \n \n \n \n \n \n \n \n {sitesData.map((site) => {\n return (\n \n \n \n \n \n );\n })}\n \n
Site NameSite LinkTarget Link
{site.name}\n \n {site.reviewLinkOriginal}\n \n \n
\n handleSelectChange(e)}\n className=\"lb-w-100 form-select form-select-sm\"\n data-cy={`select-${site.site}`}\n >\n {sitesData.map((siteSelect, index) => {\n return (\n \n {siteSelect.storeName}\n \n );\n })}\n \n \n
\n
\n {state.requestStatus === \"UPDATE-OK\" && (\n
\n
\n All sites were successfully updated \n
\n
\n )}\n {(state.requestStatus === \"UPDATE-FAIL\" ||\n state.requestStatus === \"UPDATE-ERROR\") && (\n
\n
\n {state.message} \n
\n
\n )}\n \n \n {state.requestStatus === \"REQUESTING\" ? (\n <>\n Loading...\n \n ) : (\n \"Update Sites\"\n )}\n \n \n \n )}\n
\n
\n )}\n
\n );\n}\n\nEditReviewLinksPage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default EditReviewLinksPage;\n","import React, { useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faSearch,\n faSpinner,\n faEraser,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport \"../styles/bootstrap-grid.min.css\";\nimport \"../styles/global.css\";\nimport \"../App.css\";\nimport { PropTypes } from \"prop-types\";\nimport moment from \"moment\";\nimport VisitsTable from \"../components/visitsTable\";\n\nfunction VisitsPage({ appState }) {\n const [clientVisits, setClientVisits] = useState({\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n inputValue: \"\",\n visits: [],\n client: {},\n startDate: new Date(),\n });\n\n const handleSearchClientInput = (event) => {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n inputValue: event.target.value,\n }));\n };\n\n const searchClientVisits = async () => {\n if (clientVisits.requesting === \"REQUESTING\") {\n return;\n }\n try {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n requesting: \"REQUESTING\",\n status: \"IDLE\",\n message: \"\",\n visits: [],\n client: {},\n }));\n\n const selectedOption = appState.bookingAuth.selectedSite;\n\n const siteId = selectedOption.value.split(\"|\")[0];\n const locationId = selectedOption.value.split(\"|\")[1];\n\n const authObject = appState.bookingAuth.authorizationTokens.find(\n (item) =>\n item.siteId.toString() === siteId && item.locationId === locationId\n );\n\n const authorization = authObject.token;\n\n const searchClientsRequest = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n authorization: authorization,\n siteid: siteId,\n },\n };\n const queryStartDate = moment(clientVisits.startDate)\n .subtract(6, \"months\")\n .format(\"MM/DD/YYYY\")\n .toString();\n const queryEndDate = moment(clientVisits.startDate)\n .add(6, \"months\")\n .format(\"MM/DD/YYYY\")\n .toString();\n const searchClientsVisitsResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/clients/${clientVisits.inputValue}/visits?startDate=${queryStartDate}&endDate=${queryEndDate}`,\n searchClientsRequest\n );\n\n // only added a comment\n const searchClientsData = await searchClientsVisitsResponse.json();\n console.log(searchClientsData);\n if (searchClientsVisitsResponse.ok) {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"SHOW\",\n requesting: \"IDLE\",\n visits: searchClientsData.visits,\n client: searchClientsData.clients[0],\n }));\n } else {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"VISITS-NO-FOUND\",\n requesting: \"IDLE\",\n message:\n \"No visits found for this client: \" +\n JSON.stringify(searchClientsData),\n visits: [],\n }));\n }\n } catch (error) {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"VISITS-ERROR\",\n requesting: \"IDLE\",\n message: \"Visits search error: \" + JSON.stringify(error),\n }));\n }\n };\n\n const clearClientVisits = () => {\n setClientVisits((clientVisits) => ({\n ...clientVisits,\n status: \"IDLE\",\n requesting: \"IDLE\",\n message: \"\",\n visits: [],\n client: {},\n }));\n };\n\n return (\n
\n
\n
\n

Clients appointment search

\n
\n
\n
\n
\n \n
\n
\n
\n \n {clientVisits.requesting === \"REQUESTING\" && (\n <>\n \n Loading\n \n )}\n {clientVisits.requesting !== \"REQUESTING\" && (\n <>\n \n Search\n \n )}\n \n {(clientVisits.status === \"SHOW\" ||\n clientVisits.status === \"VISITS-NO-FOUND\" ||\n clientVisits.status === \"VISITS-ERROR\") && (\n \n \n Clear\n \n )}\n
\n
\n
\n\n
\n {clientVisits.status === \"VISITS-NO-FOUND\" && (\n
\n {clientVisits.message}\n
\n )}\n {clientVisits.status === \"VISITS-ERROR\" && (\n
\n {clientVisits.message}\n
\n )}\n
\n\n {clientVisits.status === \"SHOW\" && (\n
\n
\n \n
\n
\n )}\n
\n );\n}\nVisitsPage.propTypes = {\n appState: PropTypes.object.isRequired,\n};\nexport default VisitsPage;\n","import React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport logo from \"../logo.png\";\n\nconst ManagementDashboard = () => {\n return (\n
\n
\n \"Little\n

Welcome back!!!

\n

Where would you like to go?

\n \n Appointments\n \n \n Daily Report\n \n
\n
\n );\n};\n\nexport default ManagementDashboard;\n","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport {\n faEye,\n faEyeSlash,\n faPen,\n faTrashAlt,\n faPaperclip,\n faUpload,\n faExclamationTriangle,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport \"../styles/dailyReport.css\";\n\nfunction ContentManagerReviews({ appState }) {\n const [show, setShow] = useState(false);\n const [showDelete, setShowDelete] = useState(false);\n const [reviewsData, setReviews] = useState([]);\n const [fetchData, setFetchData] = useState(false);\n const [deleteId, setDeleteId] = useState();\n\n const [formData, setFormData] = useState({\n name: \"\",\n abstract: \"\",\n service: \"Ultrasounds\",\n photo: null,\n });\n const [state, setState] = useState({\n status: \"idle\",\n message: \"\",\n });\n console.log(state);\n const handleModalClose = (e) => {\n if (e.target.id === \"reviewModal\") {\n setShow(false);\n }\n };\n\n const handleModalOpen = () => {\n setShow(true);\n };\n\n const closeModal = () => {\n setShow(false);\n };\n\n const handleModalCloseDelete = (e) => {\n if (e.target.id === \"deleteModal\") {\n setShowDelete(false);\n }\n };\n\n const handleModalOpenDelete = () => {\n setShowDelete(true);\n };\n\n const closeModalDelete = () => {\n setShowDelete(false);\n };\n\n const modalOpenForReview =\n ({ uniqueId }) =>\n () => {\n const review = reviewsData.find((review) => review.uniqueId === uniqueId);\n\n setFormData({\n uniqueId,\n name: review.name,\n abstract: review.abstract,\n service: review.service,\n photo: null,\n image1: review.image1,\n });\n handleModalOpen();\n };\n\n const modalOpenForDelete =\n ({ uniqueId }) =>\n () => {\n setDeleteId(uniqueId);\n handleModalOpenDelete();\n };\n\n const handleDelete = async (event) => {\n event.preventDefault();\n\n deleteReview({ uniqueId: deleteId });\n closeModalDelete();\n };\n\n const handleChange = ({ name, value }) => {\n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n };\n\n const getReviews = async () => {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const getResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/content/review`,\n getMethod\n );\n\n if (getResponse.ok && getResponse.status === 200) {\n const reviewData = await getResponse.json();\n const reviews = reviewData.reviews.map((review) => {\n return { ...review, visible: review.visible === \"true\" };\n });\n setReviews(\n reviews.filter((review) => review.siteId === appState.nav.siteId)\n );\n } else {\n setReviews([]);\n }\n } catch (error) {\n setReviews([]);\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const deleteReview = async ({ uniqueId }) => {\n try {\n const postMethod = {\n method: \"DELETE\",\n };\n const responseInfo = await fetch(\n `${\n process.env.REACT_APP_API_URL\n }/api/content/review/${uniqueId.trim()}`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData(!fetchData);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const postVisible = async ({ uniqueId, visible }) => {\n try {\n const data = new FormData();\n data.append(\"visible\", visible);\n\n const postMethod = {\n method: \"PUT\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${\n process.env.REACT_APP_API_URL\n }/api/content/review/${uniqueId.trim()}`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const postForm = async () => {\n try {\n const data = new FormData();\n data.append(\"name\", formData.name);\n data.append(\"abstract\", formData.abstract);\n if (formData.photo)\n data.append(\"photo\", formData.photo, formData?.photo?.name);\n data.append(\"siteId\", appState.nav.siteId);\n data.append(\"service\", formData.service);\n data.append(\"visible\", \"true\");\n\n const postMethod = {\n method: \"POST\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${process.env.REACT_APP_API_URL}/api/content/review`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const putForm = async ({ uniqueId }) => {\n try {\n const data = new FormData();\n data.append(\"name\", formData.name);\n data.append(\"abstract\", formData.abstract);\n if (formData.photo)\n data.append(\"photo\", formData.photo, formData?.photo?.name);\n data.append(\"siteId\", appState.nav.siteId);\n data.append(\"service\", formData.service);\n\n const putMethod = {\n method: \"PUT\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${\n process.env.REACT_APP_API_URL\n }/api/content/review/${uniqueId.trim()}`,\n putMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n useEffect(() => {\n getReviews();\n }, [appState.nav.siteId, fetchData]);\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (formData.uniqueId) {\n putForm({ uniqueId: formData.uniqueId });\n } else {\n postForm();\n }\n\n closeModal();\n };\n\n const handleNewReview = () => {\n setFormData({\n name: \"\",\n abstract: \"\",\n service: \"Ultrasounds\",\n photo: null,\n });\n handleModalOpen();\n };\n\n return (\n
\n
\n

Reviews Content Manager

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {reviewsData.map((item) => (\n \n \n \n \n \n \n \n ))}\n \n
\n
List of reviews
\n
{item.name}{item.abstract}\n \n postVisible({\n uniqueId: item.uniqueId,\n visible: !item.visible,\n })\n }\n >\n \n \n \n \n \n \n \n \n \n \n
\n\n
\n \n Create\n \n
\n\n \n
\n\n \n
\n \n );\n}\n\nContentManagerReviews.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default ContentManagerReviews;\n","import React, { useState, useEffect } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport {\n faEye,\n faPen,\n faPaperclip,\n faUpload,\n faEyeSlash,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport \"../styles/dailyReport.css\";\n\nfunction ContentManagerServices({ appState }) {\n const [show, setShow] = useState(false);\n const [servicesData, setServices] = useState([]);\n const [fetchData, setFetchData] = useState(false);\n const [selectedService, setSelectedService] = useState(\"All\");\n const [data, setData] = useState([]);\n\n const [formData, setFormData] = useState({\n service: \"Ultrasounds\",\n name: \"\",\n weeks: \"\",\n price: \"\",\n price1: \"\",\n price2: \"\",\n price3: \"\",\n time1: \"\",\n time2: \"\",\n icon: null,\n image1: null,\n image1Title: \"\",\n image2: null,\n image2Title: \"\",\n abstract: \"\",\n image3: null,\n image4: null,\n type: \"type1\",\n });\n\n const [state, setState] = useState({\n status: \"idle\",\n message: \"\",\n });\n\n const handleModalClose = (e) => {\n if (e.target.id === \"serviceModal\") {\n setShow(false);\n }\n };\n\n const handleModalOpen = () => {\n setShow(true);\n };\n\n const closeModal = () => {\n setShow(false);\n };\n\n const modalOpenForService =\n ({ uniqueId }) =>\n () => {\n const service = servicesData.find(\n (service) => service.uniqueId === uniqueId\n );\n setFormData({\n uniqueId,\n service: service.service,\n name: service.name,\n weeks: service.weeks,\n price: service.price,\n price1: service.price1,\n price2: service.price2,\n price3: service.price3,\n time1: service.time1,\n time2: service.time2,\n icon: null,\n image1: null,\n image1Title: service.image1Title || \"\",\n image2: null,\n image2Title: service.image2Title || \"\",\n abstract: service.abstract,\n iconUrl: service.iconUrl,\n image1Url: service.image1,\n image2Url: service.image2,\n image3: null,\n image3Url: service.image3,\n image4: null,\n image4Url: service.image4,\n type: service.type,\n });\n handleModalOpen();\n };\n\n const handleChange = ({ name, value }) => {\n setFormData((formData) => ({\n ...formData,\n [name]: value,\n }));\n };\n\n const handleSelectChange = (e) => {\n const selectedValue = e.target.value;\n setSelectedService(selectedValue);\n };\n\n useEffect(() => {\n const filteredServiceData = servicesData.filter(\n (item) => item.service === selectedService\n );\n\n if (selectedService === \" \" || filteredServiceData.length === 0) {\n setData(servicesData);\n } else {\n setData(filteredServiceData);\n }\n }, [selectedService, servicesData]);\n\n const getServices = async () => {\n setState((state) => ({\n ...state,\n status: \"loading\",\n }));\n try {\n const getMethod = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json; charset=UTF-8\",\n },\n };\n const getResponse = await fetch(\n `${process.env.REACT_APP_API_URL}/api/content/service`,\n getMethod\n );\n\n if (getResponse.ok && getResponse.status === 200) {\n const servicesData = await getResponse.json();\n const services = servicesData.services.map((service) => {\n const item = {\n ...service,\n visible: service.visible === \"true\",\n };\n if (item.image1Title === \"null\") {\n delete item.image1Title;\n }\n if (item.image2Title === \"null\") {\n delete item.image2Title;\n }\n return item;\n });\n setServices(\n services.filter((service) => service.siteId === appState.nav.siteId)\n );\n } else {\n setServices([]);\n }\n } catch (error) {\n setServices([]);\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const postVisible = async ({ uniqueId, visible }) => {\n try {\n const data = new FormData();\n data.append(\"visible\", visible);\n\n const postMethod = {\n method: \"PUT\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${\n process.env.REACT_APP_API_URL\n }/api/content/service/${uniqueId.trim()}`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const postForm = async () => {\n try {\n const data = new FormData();\n data.append(\"service\", formData.service);\n data.append(\"name\", formData.name);\n data.append(\"weeks\", formData.weeks);\n data.append(\"price\", formData.price);\n data.append(\"price1\", formData.price1);\n data.append(\"price2\", formData.price2);\n data.append(\"price3\", formData.price3);\n data.append(\"time1\", formData.time1);\n data.append(\"time2\", formData.time2);\n if (formData.icon)\n data.append(\"icon\", formData.icon, formData?.icon?.name);\n if (formData.image1)\n data.append(\"image1\", formData.image1, formData?.image1?.name);\n if (formData.image2)\n data.append(\"image2\", formData.image2, formData?.image2?.name);\n data.append(\"abstract\", formData.abstract);\n if (formData.uniqueId) data.append(\"uniqueId\", formData.uniqueId);\n data.append(\"siteId\", appState.nav.siteId);\n data.append(\"image1Title\", formData.image1Title);\n data.append(\"image2Title\", formData.image2Title);\n if (formData.image3)\n data.append(\"image3\", formData.image3, formData?.image3?.name);\n if (formData.image4)\n data.append(\"image4\", formData.image4, formData?.image4?.name);\n data.append(\"type\", formData.type);\n\n data.append(\"visible\", \"true\");\n\n const postMethod = {\n method: \"POST\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${process.env.REACT_APP_API_URL}/api/content/service`,\n postMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n const putForm = async ({ uniqueId }) => {\n try {\n const data = new FormData();\n data.append(\"service\", formData.service);\n data.append(\"name\", formData.name);\n data.append(\"weeks\", formData.weeks);\n data.append(\"price\", formData.price);\n data.append(\"price1\", formData.price1);\n data.append(\"price2\", formData.price2);\n data.append(\"price3\", formData.price3);\n data.append(\"time1\", formData.time1);\n data.append(\"time2\", formData.time2);\n if (formData.icon)\n data.append(\"icon\", formData.icon, formData?.icon?.name);\n if (formData.image1)\n data.append(\"image1\", formData.image1, formData?.image1?.name);\n if (formData.image2)\n data.append(\"image2\", formData.image2, formData?.image2?.name);\n data.append(\"abstract\", formData.abstract);\n data.append(\"siteId\", appState.nav.siteId);\n data.append(\n \"image1Title\",\n formData.image1Title === \"\" ? null : formData.image1Title\n );\n data.append(\n \"image2Title\",\n formData.image2Title === \"\" ? null : formData.image2Title\n );\n if (formData.image3)\n data.append(\"image3\", formData.image3, formData?.image3?.name);\n if (formData.image4)\n data.append(\"image4\", formData.image4, formData?.image4?.name);\n data.append(\"type\", formData.type);\n\n const putMethod = {\n method: \"PUT\",\n body: data,\n };\n\n const responseInfo = await fetch(\n `${\n process.env.REACT_APP_API_URL\n }/api/content/service/${uniqueId.trim()}`,\n putMethod\n );\n if (responseInfo.ok) {\n const info = await responseInfo.json();\n setFetchData((val) => !val);\n setState((state) => ({\n ...state,\n status: \"success\",\n message: info.message,\n }));\n }\n } catch (error) {\n setState((state) => ({\n ...state,\n status: \"error\",\n message: error.message,\n }));\n }\n };\n\n useEffect(() => {\n getServices();\n }, [appState.nav.siteId, fetchData]);\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (formData.uniqueId) {\n putForm({ uniqueId: formData.uniqueId });\n } else {\n postForm();\n }\n closeModal();\n };\n\n const handleNewService = () => {\n setFormData({\n service: \"Ultrasounds\",\n name: \"\",\n weeks: \"\",\n price: \"\",\n price1: \"\",\n price2: \"\",\n price3: \"\",\n time1: \"\",\n time2: \"\",\n icon: null,\n image1: null,\n image1Title: \"\",\n image2: null,\n image2Title: \"\",\n abstract: \"\",\n image3: null,\n image4: null,\n type: \"type1\",\n });\n handleModalOpen();\n };\n\n console.log(state);\n\n return (\n
\n
\n

Service Content Manager

\n
\n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n {data.map((item) => (\n \n \n \n \n \n ))}\n \n
\n
Available Services
\n
{item.name}\n \n postVisible({\n uniqueId: item.uniqueId,\n visible: !item.visible,\n })\n }\n >\n \n \n \n \n \n \n
\n
\n \n Create\n \n
\n\n \n
\n \n );\n}\n\nContentManagerServices.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default ContentManagerServices;\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport {\n Document,\n Page,\n Text,\n View,\n StyleSheet,\n Image\n} from \"@react-pdf/renderer\";\nimport logo from \"../../logo.png\";\nimport { formatAmount } from \"../../util/formatNumbers.js\";\n\nconst DynamicReportPdf = ({ headers, bodyTable, reportDate, footTable,tfoot, titlePdf, subTitlePdf}) => {\n const borderColor = '#bfbfbf';\n const borderStyle = 'solid';\n const widthStyle = \"28%\";\n\n const styles = StyleSheet.create({\n body: {\n padding: 10,\n },\n table: {\n display: \"table\",\n width: \"100%\",\n },\n tableRow: {\n margin: \"auto\",\n flexDirection: \"row\"\n },\n tableCol1Header: {\n width: widthStyle,\n borderStyle: borderStyle,\n borderColor: borderColor,\n borderBottomColor: '#000',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderTopWidth: 0,\n backgroundColor: '#c2608ea9',\n color: \"white\",\n textAlign: \"center\",\n },\n tableCol1: {\n width: widthStyle,\n borderStyle: borderStyle,\n borderColor: borderColor,\n borderWidth: 1,\n borderLeftWidth: 0,\n borderTopWidth: 0,\n textAlign: \"center\",\n },\n total: {\n width: widthStyle,\n borderWidth: 1,\n borderTopWidth: 0,\n textAlign: \"center\",\n },\n totalCol: {\n width: widthStyle,\n },\n tableCellHeader: {\n margin: 5,\n fontSize: 12,\n fontWeight: 500\n },\n tableCell: {\n margin: 5,\n fontSize: 10\n },\n logo: {\n width: 70,\n marginTop: 10,\n marginBottom: 20,\n heigth: 50,\n marginLeft: 10,\n },\n dateText: {\n marginTop: \"30%\",\n fontSize: 12,\n fontWeight: 500,\n marginLeft: \"13%\"\n },\n titleText: {\n fontSize: 15,\n fontWeight: 500,\n marginBottom: subTitlePdf ? \"2%\" : \"27%\"\n },\n subTitleText: {\n fontSize: 12,\n fontWeight: 497,\n marginBottom: \"10%\"\n },\n dateTextDiv: {\n width: \"15%\",\n },\n divOneTittle: {\n width: \"37%\",\n },\n divTwoTittle: {\n width: \"30%\",\n },\n divThreeTittle: {\n width: \"30%\",\n },\n divOneSubTittle: {\n width: \"25%\",\n },\n divTwoSubTittle: {\n width: \"25%\",\n },\n divThreeSubTittle: {\n width: \"25%\",\n },\n logoDiv: {\n width: \"78%\",\n }\n });\n return (\n \n \n\n \n \n\n \n \"Little\n \n \n Date: {reportDate}\n \n\n \n \n\n\n {titlePdf && (\n \n \n\n \n \n \n \n {titlePdf}\n \n \n \n \n \n \n )}\n\n {subTitlePdf && (\n \n \n\n \n \n \n \n {subTitlePdf}\n \n \n \n \n \n \n )}\n\n\n \n \n {headers.map((header, i) => {\n return (\n \n {header}\n \n )\n })}\n \n {bodyTable.map((data, index) => {\n const value = Object.values(data);\n return (\n \n {value.map((e, i) => {\n return (\n typeof e !== 'boolean' && (\n \n {e}\n \n )\n )\n })}\n \n )\n })}\n {tfoot && (\n \n {footTable.map((e,i) => {\n return(\n e.show === false ?\n \n \n \n :\n \n \n {e.amount === false ? \n <>{e.value}\n :\n <>${formatAmount(e.value)}\n }\n \n \n )\n })}\n \n )}\n \n \n )\n};\n\nDynamicReportPdf.propTypes = {\n headers: PropTypes.array,\n bodyTable: PropTypes.array,\n reportDate: PropTypes.string,\n footTable: PropTypes.array,\n tfoot: PropTypes.bool,\n titlePdf: PropTypes.string,\n subTitlePdf: PropTypes.string\n};\nexport default DynamicReportPdf;\n","import { PropTypes } from \"prop-types\";\nimport React, { useEffect, useState, Suspense } from \"react\";\nimport { faEye, faCheck, faDownload, faSpinner, faRedoAlt} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { PDFDownloadLink } from '@react-pdf/renderer';\nimport DynamicReportPdf from \"./pdfs/dynamicReportPDF\";\nimport moment from \"moment\";\nimport { formatAmount, parseFloatLocale } from \"../util/formatNumbers\";\n\n\nfunction DynamicTable({ headers, rows, tfoot, fileNamePdf,setReloadData, reloadData,titlePdf,subTitlePdf}) {\n const [dir, setDir] = React.useState(false);\n const [index, setIndex] = React.useState(0);\n const [selectRows, setSelectRows] = useState(false);\n const [bodyTable, setBodyTable] = useState(rows);\n const [footTable, setFootTable] = useState(tfoot);\n const [buttonSelectRows, setButtonSelectRows] = useState({ disabled: true, action: false });\n const [btnPdf, setBtnPdf] = useState(false);\n const reportDate = moment(new Date).format(\"MM/DD/YY hh:mm:ss A\");\n\n const handleSort = (column, direction) => {\n setIndex(column);\n setDir(direction);\n\n bodyTable.sort((a, b) => {\n const valA = Object.values(a);\n const valB = Object.values(b);\n if(dir){ \n if (valA[column] < valB[column]) return 1;\n if (valA[index] > valB[index]) return -1;\n return 0;\n }else{\n if (valA[column] > valB[column]) return 1;\n if (valA[column] < valB[column]) return -1;\n return 0;\n }\n });\n };\n\n const handleSubTotals = (listData) => {\n\n const listTotals = [];\n const tfootShowTotals = [];\n\n listData.forEach((e, i) => {\n Object.values(e).forEach((value, d) => {\n if (typeof value !== \"boolean\") listTotals.push({ id: d, value: parseFloatLocale(value) });\n });\n });\n\n listTotals.forEach((a) => {\n if (tfoot)\n tfoot?.forEach((e, i) => {\n if (a.id === i) {\n tfootShowTotals.push({ id: i, show: e.show, amount: e.amount, value: a.value});\n }\n });\n });\n\n const subTotals = tfootShowTotals.reduce((accumulator, i) => {\n const findById = accumulator.find(e => e.id === i.id);\n if (findById) {\n return accumulator.map((e) => {\n if (e.id === i.id) {\n return {\n ...e,\n value: e.value + i.value\n }\n }\n return e;\n });\n }\n return [...accumulator, i];\n }, []);\n\n setFootTable(subTotals);\n }\n\n useEffect(() => {\n const newRows = [];\n rows.forEach((e, i) => {\n newRows.push(e);\n newRows[i].checked = false;\n });\n handleSubTotals(newRows);\n setBodyTable(newRows);\n }, [rows,reloadData.action]);\n\n const handleSelectRow = (index) => {\n const newBody = [...bodyTable];\n newBody[index].checked = !newBody[index].checked;\n setBodyTable(newBody)\n const filterBody = newBody.filter((i) => { return i.checked === true })\n if (filterBody.length !== 0)\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n disabled: false\n }));\n else\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n disabled: true\n }));\n }\n\n const handleSelectRows = () => {\n const selectedSitesRows = bodyTable.filter((i) => { return i.checked === true });\n if (selectedSitesRows.length !== 0) {\n setBodyTable(selectedSitesRows)\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n action: true,\n }));\n handleSubTotals(selectedSitesRows);\n }\n }\n\n const handleViewAllRows = () => {\n const newRows = [];\n rows.forEach((e, i) => {\n newRows.push(e);\n newRows[i].checked = false;\n });\n\n handleSubTotals(newRows);\n setBodyTable(newRows);\n setButtonSelectRows((buttonSelectRows) => ({\n ...buttonSelectRows,\n action: false,\n disabled: true\n }));\n }\n\n useEffect(() => {\n if (buttonSelectRows.action) {\n const filterBody = bodyTable.filter((i) => { return i.checked === true })\n handleSubTotals(filterBody);\n setBodyTable(filterBody)\n }\n }, [buttonSelectRows.action])\n\n useEffect(() => {\n const clickedButtonTrigger = document.getElementById('btn-create-pdf');\n if (clickedButtonTrigger) {\n setTimeout(() => {\n clickedButtonTrigger.click();\n clickedButtonTrigger.addEventListener('mousedown', () => { });\n }, 500);\n }\n }, [btnPdf]);\n\n const handleReloadData = () => {\n setReloadData((reloadData) => ({\n ...reloadData,\n action: true\n }\n ));\n}\n\n return (\n
\n <>\n
\n
\n <>\n {!btnPdf ?\n \n :\n \n \n } fileName={fileNamePdf}>\n {({ loading }) => (loading\n ?\n \n \n \n :\n setBtnPdf(false)}\n className=\"btn border pt-2 pb-2 text rounded-pill m-2 btn-sm\"\n style={{ color: \"white\", width: 65, backgroundColor: \"#c2608e\", borderColor: \"#c2608e #c2608e #fff\" }}>\n \n \n )}\n \n \n }\n \n
\n
\n \n
\n
\n \n\n {buttonSelectRows.action && (\n \n )}\n
\n
\n\n \n \n \n \n {headers?.map((header, i) => {\n return (\n \n );\n })}\n \n \n {!reloadData.action && (rows.length !== 0 && (\n \n {\n bodyTable?.map((data, index) => {\n const value = Object.values(data);\n return (\n { selectRows && (handleSelectRow(index)) }}>\n \n {value.map((e, i) => {\n return (\n typeof e !== 'boolean' && (\n \n )\n )\n })}\n \n )\n })\n }\n \n ))}\n\n {!reloadData.action && (rows.length !== 0 && (tfoot && (\n \n \n \n )\n })}\n \n \n )))\n }\n
{ setSelectRows(!selectRows) }}\n >\n {!selectRows ? \n : \n }\n \n handleSort(i, !dir)} style={{ cursor: \"pointer\", fontSize: \"12px\" }}>\n {header}\n   {index === i && dir ? \"▲\" : \"▼\"}\n \n
\n {!selectRows ?\n \n :\n \n }\n \n {e}\n
\n {footTable.map((e, i) => {\n return (\n e.show === false ?\n \n :\n \n {e.amount === false ?\n <>{e.value}\n :\n <>${formatAmount(e.value)}\n }\n
\n {rows.length === 0 && (\n
\n
\n
\n )}\n {reloadData.action && (\n
\n
\n
\n )}\n\n
\n
\n {selectRows && (\n
\n \n
\n )}\n
\n );\n}\n\nDynamicTable.propTypes = {\n headers: PropTypes.array,\n rows: PropTypes.array,\n tfoot: PropTypes.array,\n fileNamePdf: PropTypes.string,\n setReloadData: PropTypes.func,\n reloadData: PropTypes.object,\n titlePdf: PropTypes.string,\n subTitlePdf: PropTypes.string\n};\n\nexport default DynamicTable;\n","import React, { useEffect, useState } from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport DynamicTable from \"../components/dynamicTable\";\nimport { formatAmount } from \"../util/formatNumbers\";\nimport moment from \"moment\";\nimport DatePicker from \"react-datepicker\";\nimport \"react-datepicker/dist/react-datepicker.css\";\nimport { faSearch } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nfunction ProjectionReport({ appState }) {\n\n const todayMinus1 = moment().subtract(1, 'days').format('MM/DD/YYYY');\n const startDate = moment(`${todayMinus1}`, 'MM/DD/YYYY').startOf('month').toString();\n const endDate = moment().subtract(1, 'days').toString();\n\n const [body, setBody] = useState([]);\n const [startD, setStartD] = useState(startDate);\n const [endD, setEndD] = useState(endDate);\n \n const [state, setState] = useState({\n loading: false,\n response: \"default\",\n });\n const [reloadData, setReloadData] = useState({\n action: false\n });\n\n useEffect(() => {\n getData();\n }, []);\n\n useEffect(() => {\n setState((state) => ({\n ...state,\n loading: body.length === 0,\n }));\n }, [body, state.loading, state.response]);\n\n useEffect(() => {\n\n if (reloadData.action) {\n getData();\n }\n }, [reloadData.action, body])\n\n\n const getDailyClosing = async (location) => {\n const { siteId, locationId, siteName, token } = location;\n\n const getData = {\n method: \"GET\",\n headers: {\n \"Content-type\": \"applicationjson; charset=UTF-8\",\n siteid: siteId,\n authorization: token,\n locationid: locationId,\n }\n };\n const searchStartDate = moment(startD).format('MM/DD/YYYY');\n const searchEndDate = moment(endD).format('MM/DD/YYYY');\n\n const request = `${process.env.REACT_APP_API_URL}/api/sites/${siteId}/locations/${locationId}/sales/receipt?startDate=${searchStartDate}&endDate=${searchEndDate}`;\n const response = await fetch(request, getData);\n\n if (response.ok) {\n const data = {\n data: await response.json(),\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n };\n return Promise.resolve(data);\n } else {\n return Promise.resolve({\n error:\n \"Failed to retrieve data from site : \" +\n siteName +\n \" \" +\n siteId +\n \" at location: \" +\n locationId,\n siteId: siteId,\n locationId: locationId,\n siteName: siteName,\n });\n }\n\n }\n\n const getData = async () => {\n setState((state) => ({\n ...state,\n response: \"loading\",\n }));\n\n try {\n const dataRequests = appState.directorsAuth.locationsAuth.map((loc) =>\n getDailyClosing(loc)\n );\n const data = await Promise.all(dataRequests);\n\n const goodData = data.filter((item) => {\n return \"data\" in item;\n });\n\n const startDate = moment(startD).format('MM/DD/YYYY');\n const endDate = moment(endD).format('MM/DD/YYYY');\n const lastDayOfMonth = moment(`${startDate}`, 'MM/DD/YYYY').endOf('month').format('MM/DD/YYYY');\n const daysBetweenDates = moment(endDate).diff(startDate, 'days');\n const lastDayOfMonthParseDay = parseInt(moment(lastDayOfMonth).format(\"DD\"));\n\n const newListData = goodData.length !== 0 ? goodData.map((i) => {\n const result = (parseFloat(i.data.salesReceipt) / (daysBetweenDates + 1) * lastDayOfMonthParseDay);\n return { siteName: i.siteName?.split(\"-\")[1], salesReceipt: formatAmount(i.data.salesReceipt), projected: formatAmount(result) };\n }) : [];\n\n setBody(newListData);\n setReloadData((reloadData) => ({\n ...reloadData,\n action: false\n }));\n setState((state) => ({\n ...state,\n response: \"default\",\n }));\n\n } catch (error) {\n setState((state) => ({\n ...state,\n response: \"error\",\n }));\n setReloadData((reloadData) => ({\n ...reloadData,\n action: false\n }));\n setBody([]);\n }\n\n }\n\n const handleDateRangeSearch = () => {\n setReloadData((reloadData) => ({\n ...reloadData,\n action: true\n }));\n };\n\n\n return (\n
\n <>\n \n Projection Report\n \n\n
\n
\n\n
\n
Start
\n setStartD(date)}\n className=\"form-control mr-3\"\n />\n
\n \n
\n
End
\n setEndD(date)}\n className=\"form-control ml-3\"\n minDate={new Date(startD)}\n />\n
\n\n
\n \n
\n
\n
\n\n
\n \n
\n \n
\n );\n}\n\nProjectionReport.propTypes = {\n appState: PropTypes.object.isRequired,\n};\n\nexport default ProjectionReport;\n","import React, { useState } from \"react\";\nimport {\n BrowserRouter as Router,\n Switch,\n Route,\n Redirect,\n} from \"react-router-dom\";\n// import socketIOClient from \"socket.io-client\";\n\nimport NavBar from \"./components/navbar\";\nimport ErrorBoundary from \"./ErrorBoundary\";\nimport {\n Home,\n FormPage,\n AppointmentsListPage,\n VideoRemakePage,\n CheckoutPage,\n ImgUpload,\n NotePage,\n LoginPage,\n LogsDashboardPage,\n FaqPage,\n DailyReport,\n BookingPage,\n BookingLoginPage,\n ApproveDailyReport,\n ConsultTechnicians,\n OperationalDashboard,\n OperationalDetails,\n MenuDashboard,\n DirectorsLogin,\n ConfigSetup,\n DailyCloseout,\n IncompleteAppointments,\n EditReviewLinksPage,\n VisitsPage,\n ManagementDashboard,\n ContentManagerReviews,\n ContentManagerServices,\n} from \"./pages/index.js\";\n\nimport \"./App.css\";\nimport ProjectionReport from \"./pages/projectionReport\";\n\nfunction App() {\n const [appState, setAppState] = useState({\n authType: \"\",\n nav: {\n status: \"loading\",\n message: \"\",\n siteId: null,\n locationId: null,\n siteName: \"\",\n redirect: false,\n },\n singleAuth: {\n token: null,\n userId: null,\n userName: null,\n role: null,\n allowedPermissions: null,\n },\n bookingAuth: {\n status: \"\",\n message: \"\",\n authorizationTokens: [],\n sitesSelect: [],\n selectedSite: {},\n prevSelectedSite: {},\n },\n directorsAuth: {\n status: \"\",\n message: \"\",\n authorizationTokens: [],\n locationsAuth: [],\n siteId: \"\",\n locationId: \"\",\n siteName: \"\",\n token: \"\",\n },\n managementMode: false,\n });\n\n if (appState.authType === \"single\") {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n } else {\n if (appState.authType === \"director\") {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n } else {\n if (appState.authType === \"booking\") {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n } else {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n }\n }\n}\n\nexport default App;\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\nimport '../node_modules/bootstrap/dist/css/bootstrap.min.css';\n\n\n\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}