{"version":3,"sources":["assets/img/logo/method-draw-image.svg","utils/formatSizeUnits.js","redux/actions/employees.js","components/Custom/InfoModal.js","components/Custom/CustomModal.js","components/Custom/Forms/FileInput.js","utils/fileUtils.js","utils/imageMarkingUtils.js","components/Typography.js","redux/actions/notifications.js","utils/tooltip.js","components/Custom/ReactDatePicker.js","redux/actions/hotwork.js","components/ErrorMsg.js","components/Custom/CreateModal.js","components/Custom/Forms/ImageMarker.js","components/Custom/ImgViewerModal.js","components/ImageMarking/KonvaForms.js","components/ImageMarking/KonvaEditor.js","components/ImageMarking/MarkingView.js","components/ImageMarking/KonvaView.js","components/ImageMarking/AreaView.js","components/ImageMarking/index.js","components/ImageMarking/ReferenceGallery.js","components/Custom/Gallery.js","utils/passwordValidator.js","assets/icons/documenter-white.svg","assets/icons/documents/Note.svg","redux/actions/branding.js","components/Custom/UserAvatar.js","utils/bemnames.js","redux/actions/products.js","i18n.js","utils/common.js","redux/actions/language.js","components/Custom/LastEditor.js","components/ControlSchemas/ControlItemTypes/ControlItemText.js","components/ControlSchemas/ControlItemTypes/ControlItemTextUneditable.js","components/ControlSchemas/ControlItemTypes/ControlItemDropdownCustom.js","components/ControlSchemas/ControlItemTypes/ControlItemDropdownUsers.js","components/ControlSchemas/ControlItemTypes/ControlItemDropdownCheckboxes.js","components/ControlSchemas/ControlItemTypes/ControlItemDropdownProducts.js","components/Custom/MoveImagesModal/components/SchemaGroups.js","components/Custom/MoveImagesModal/components/SchemaItem.js","components/Custom/MoveImagesModal/components/SchemaList.js","components/Custom/MoveImagesModal/components/SchemaPage.js","components/Custom/MoveImagesModal/index.js","components/ControlSchemas/ControlItemTypes/ControlItemPhoto.js","components/ControlSchemas/ControlItemTypes/ControlItemDropdownCommentPhotos.js","components/Custom/ImagePickerModal.js","components/Custom/GalleryPicker.js","components/ControlSchemas/ControlItemTypes/ControlItemPhotoArea.js","components/ControlSchemas/ControlItemTypes/ControlItemSignature.js","components/ControlSchemas/ControlItemTypes/ControlItemDateSelector.js","components/ControlSchemas/ControlItemTypes/ControlItemTimeTableUsers.js","components/ControlSchemas/ControlItemTypes/ControlItemCheckmark.js","components/ControlSchemas/ControlItemTypes/ControlItemNumbers.js","components/ControlSchemas/ControlItemTypes/ControlItemTextPhotos.js","components/ControlSchemas/ControlItem.js","assets/icons_v2/IconBi.js","assets/icons_v2/IconDokumenter.js","assets/icons_v2/IconEksterneParter.js","assets/icons_v2/IconForsikringsselskaber.js","assets/icons_v2/IconInfo.js","assets/icons_v2/IconInterneBrugere.js","assets/icons_v2/IconKundegrupperVirksomheder.js","assets/icons_v2/IconKundeVirksomhed.js","assets/icons_v2/IconKvalitetssikring.js","assets/icons_v2/IconLogUd.js","assets/icons_v2/IconNotifikationer.js","assets/icons_v2/IconNotifikationsActive.js","assets/icons_v2/IconProdukter.js","assets/icons_v2/IconProfil.js","assets/icons_v2/IconSagsoverblik.js","assets/icons_v2/IconServiceaftale.js","assets/icons_v2/IconSignatur.js","assets/icons_v2/IconSystembeskeder.js","assets/icons_v2/IconSysteminfo.js","assets/icons_v2/IconTermsConditions.js","assets/icons_v2/IconVarmtArbejde.js","assets/icons_v2/Notifikationer2.js","assets/icons_v2/Pdf.js","assets/icons_v2/TagpasLogoBlaaOutlinet.js","assets/icons_v2/IconDownload2.js","assets/icons_v2/IconLink.js","assets/icons_v2/IconSkemabygger.js","assets/icons_v2/IconSprog.js","assets/icons_v2/DanishFlag.js","assets/icons_v2/UnitedKingdomFlag.js","assets/icons_v2/GermanFlag.js","assets/icons_v2/PolandFlag.js","assets/icons_v2/NorwayFlag.js","assets/icons_v2/SwedenFlag.js","assets/icons_v2/IconCheckmarkAlt.js","assets/icons_v2/IconLock.js","redux/actions/auth.js","components/Page.js","hocs/scrollHook.js","components/Custom/ReactTable.js","components/SearchInput.js","components/Custom/Forms/PhoneInput.js","components/InaccessibleFeature.js","hocs/withFeature.js","components/Custom/ButtonDropdown.js","components/Custom/CollapsableCard.js","redux/actions/customerGroups.js","redux/actions/team.js","utils/errorCodes.js","redux/actions/contacts.js","components/Custom/ErrorBoundary.js","redux/actions/error.js","utils/industryType.js","components/PageSpinner.js","components/Custom/Forms/FormGroupRow.js","assets/icons/billede-kamera.svg","assets/icons/billede-kamerarulle.svg","assets/icons/kvalitetssikring.svg","assets/icons/log-ud.svg","assets/icons/mappe.svg","assets/icons/sager.svg","assets/icons/User.svg","assets/icons/varmt_arbejde.svg","assets/icons/info.svg","assets/icons/produkter-icon.svg","assets/icons/service-aftale_hvid.svg","assets/icons/Roed_mand_77202D.svg","assets/icons/groen_mand_39B021.svg","assets/icons/sagsansvarlig.svg","assets/icons/firma_logo.svg","assets/icons/firma_logo_notifikation.svg","assets/icons/tagpas_logo.svg","assets/icons/notification-bell-new.svg","utils/propTypes.js","assets/icons/documents/Global-mappe.svg","assets/icons/documents/Lokal-mappe.svg","assets/icons/folder.svg","assets/icons/image-icon.svg","assets/icons/documents/PDF.svg","assets/icons/documents/Excel.svg","redux/constants.js","assets/icons/documents/Word.svg","assets/icons/documents/pptx_icon.svg","assets/icons/documents/Video.svg","assets/icons/documents/Numbers.svg","assets/icons/documents/Pages.svg","assets/icons/documents/keynote.svg","assets/icons/cursor-move.png","assets/icons/dock-window.png","assets/icons/square-edit-outline.png","assets/icons/delete-outline.png","assets/icons/star-outline.png","assets/icons/upload-icon.svg","assets/icons/sorting-icon-both.svg","assets/icons/sorting-icon-arrow.svg","assets/icons/sorting-icon.svg","redux/actions/documents.js","components/Custom/Forms/TextInput.js","utils/translation/langauges.js","components/Custom/ReactSelect.js","CacheBuster.js","utils/schemaBuilderUtils.js","utils/userUtil.js","components/ControlSchemas/ControlItemMetaAdminModal.js","components/Custom/InfoTip.js","utils/toast.js","components/AuthForm.js","components/Custom/LanguagePicker.js","pages/Login.js","utils/routeHandling.js","pages/Verification.js","components/ForgotPasswordForm.js","pages/ForgotPassword.js","components/ResetPasswordForm.js","pages/ResetPassword.js","pages/Logout.js","pages/HotworkPage/View/Approvals/BuildingownerApproval.js","utils/translation/schemaQuestions/index.js","components/Custom/Signature.js","pages/HotworkPage/View/Approval.js","pages/PdfPage.js","pages/PdfSchemaPage.js","pages/VaInfoPage.js","components/Custom/DocumentCreateModal.js","components/Custom/DocumentMoveCopyModal.js","components/Custom/DocumentConfirmModal.js","components/Custom/DocumentsOverview.js","components/Custom/Forms/FileOrFolderInput.js","components/Custom/DocumentsUploadModal.js","pages/DocumentsPage.js","components/Custom/TermsOfAgreementModal.js","pages/CreateProfilePage.js","components/ControlSchemas/ControlSchemaSigning.js","pages/SchemaSigning/index.js","redux/reducers/auth.js","redux/reducers/common.js","redux/reducers/customers.js","redux/reducers/customerGroups.js","redux/reducers/employees.js","redux/reducers/insurances.js","redux/reducers/cases.js","redux/reducers/branding.js","redux/reducers/systemInfo.js","redux/reducers/features.js","redux/reducers/documents.js","redux/reducers/roadmap.js","redux/reducers/invitation.js","redux/reducers/notifications.js","redux/reducers/schemabuilder.js","redux/reducers/products.js","redux/reducers/schemas.js","redux/reducers/controlPlan.js","redux/reducers/language.js","redux/reducers/caseDescriptions.js","redux/reducers/markings.js","redux/reducers/index.js","redux/store.js","components/Layout/Content.js","components/Layout/EmptyLayout.js","components/HeaderMenus/NotificationsMenu.js","components/Layout/Header.js","components/Layout/LayoutRoute.js","components/Layout/MainLayout.js","components/Layout/Sidebar.js","components/Custom/LoadingBoundary.js","App.js","index.js","components/Custom/ConfirmModal.js","utils/contentByAccessLevel.js","redux/actions/schemas.js","redux/actions/cases.js","redux/actions/common.js","components/Custom/Forms/Checkbox.js","redux/actions/markings.js","utils/setAuthorizationToken.js","utils/componentUtils.js","redux/actions/customers.js","redux/actions/files.js","redux/actions/systemInfo.js","redux/actions/features.js"],"names":["module","exports","formatSizeUnits","bytes","toFixed","calculateBytes","size","type","getEmployees","compId","url","API_URL","dispatch","axios","get","then","res","SET_EMPLOYEES","employees","data","filterEmployees","filter","post","filterEmployeesRaw","getEmployee","customerId","id","CreateEmployee","UpdateEmployee","updateBinding","DeleteEmployee","deleteUser","removeEmployee","removeUserBinding","getUserAvatar","getSpecificUserAvatar","userId","uploadUserAvatar","file","window","FormData","append","fileName","updateLocalUserData","localUserData","JSON","parse","localStorage","getItem","updateObj","user","setItem","stringify","setCurrentUser","InfoModal","props","showActionSpinner","toggleAction","toggle","isOpen","show","fade","centered","header","color","extraClass","children","footer","CustomModal","confirmClose","fullscreen","useState","showConfirm","setShowConfirm","showBurgerActions","setShowBurgerActions","toggleConfirm","xlSize","isMobile","backdrop","className","burgerOptions","headerAction","length","Fragment","title","outline","map","item","index","key","onClick","action","renderBurgerOptions","renderModalHeader","renderActionSpinner","i18next","t","confirmFunc","cancelFunc","cancelColor","defaultProps","FileInput","isUploading","disabled","gallery","isMovingImages","movingImages","inputRef","React","createRef","onDrop","e","preventDefault","droppedFiles","dataTransfer","files","target","acceptedFiles","rejectedFiles","async","each","cb","useAccept","isAcceptableFile","push","onDropAccepted","onDropRejected","accept","labelText","contentClass","acceptProps","current","click","onDragOver","dropEffect","error","ref","name","value","onChange","multiple","console","getAllFileEntries","dataTransferItemList","a","fileEntries","queue","i","webkitGetAsEntry","entry","shift","isFile","isDirectory","readAllDirectoryEntries","createReader","Promise","all","x","getFile","directoryReader","entries","readEntriesPromise","readEntries","resolve","reject","log","fileEntry","readFile","dataUri","dataURItoBlob","dataURI","byteString","atob","split","mimeString","ab","ArrayBuffer","ia","Uint8Array","charCodeAt","File","fullPath","slice","reader","FileReader","onload","result","readAsDataURL","uriToFile","uri","filename","AREA_TOTAL","getMarkingSizeByLadder","image","total","width","height","tagMap","h1","h2","h3","h4","h5","h6","p","lead","blockquote","Typography","TypoComp","Tag","tag","restProps","classes","classNames","getNotifications","page","chunk","GET_NOTIFICATIONS","payload","markNotification","MARK_NOTIFICATION","getNotificationSettings","GET_NOTIFICATION_SETTINGS","updateNotificationSettings","UPDATE_NOTIFICATION_SETTINGS","getNoticeOnCase","caseId","markNoticeAsRead","put","notifyUsersOnCaseOfNewNotes","getTooltip","content","place","effect","registerLocale","dk","en","de","globalLang","ReactDatePicker","label","wrapperClass","unclearable","format","locale","placeholderText","placeholder","toLowerCase","labelContent","picker","selected","dateFormat","showWeekNumbers","searchHotworks","category","SET_CASES_ALL","cases","GetHotworkById","token","config","headers","Authorization","obj","customer","customerData","case","assigneeType","SET_CASE","selectedCase","getHotworkWithToken","CreateHotwork","UpdateHotwork","CopyHotwork","DeleteHotwork","resendUserNotificationHotwork","msg","trim","splitted","style","CreateModal","showCreate","btnText","text","getCreateButton","ImageMarker","currentFile","downloadImageAction","deleteImageAction","isSaving","toggleModal","naturalWidth","naturalHeight","r","imgDimensions","setImgDimensions","markings","setMarkings","groups","setGroups","currentMarking","setCurrentMarking","currentGroupId","setCurrentGroupId","removeNewGroup","setRemoveNewGroup","showConfirmDelete","setShowConfirmDelete","Date","now","imageHash","setImageHash","imgRef","useRef","useEffect","addEventListener","handleImageResize","removeEventListener","toggleConfirmDeleteModal","getMarkingObj","shape","MARKING_TYPE","Circle","radius","Math","random","groupId","y","dimensions","filled","hidden","saveMarkings","tmpGroups","group","m","tmpMarkings","addMarking","pos","newMarking","scaling","tmpCurrentMarking","removeMarking","newGroup","slicedGroup","slicedList","marking","nullIded","groupIds","forEach","includes","img","tmpImgDimensions","loaded","Button","updatedGroups","updatedMarkings","Spinner","FormText","fileTitle","hash","src","fileUrl","alt","onLoad","renderImage","evt","layerX","layerY","isCurrent","isCurrentMarking","calcCoord","b","calcDimen","imgLength","percent","calcDimen2","newLength","originalLength","selectMarking","updateXY","findIndex","onTransform","Square","viewHeight","calRadius","strokeWidth","stroke","fill","keyIndex","draggable","onDragEnd","isSelected","outerFill","innerFill","coordinates","points","closed","ConfirmModal","Rectangle","shapeRef","trRef","nodes","getLayer","batchDraw","onTap","onTransformEnd","node","scaleX","scaleY","max","rotateEnabled","boundBoxFunc","oldBox","newBox","shapeRefOuter","shapeRefInner","scale","floor","enabledAnchors","Polygon","connect","galleryImages","caseImages","bulkFileInfoUpdate","startIndex","isLoading","setLoading","setSaving","imageIndex","setImageIndex","currentImage","setImage","setHash","rotations","setRotations","fileInfos","setFileInfos","galleryNavigate","dir","onDelete","fileId","onUpdateFileInfos","callback","errorCallback","items","tmpFile","rotation","dataObj","cached","handleInfoBulk","catch","err","onRotate","updatedRotations","degrees","tmpImage","find","getImageRotated","updatedInfos","info","fetch","response","blob","imageUrl","URL","createObjectURL","document","createElement","download","href","body","appendChild","removeChild","onChangeFileInfo","toggleConfirmDelete","renderImageActions","float","marginLeft","toast","success","onSaveFileInfos","contentClasses","ReactDOM","createPortal","stopPropagation","getElementById","getModalTitle","PageSpinner","tmpFileDescription","fileDescription","documentType","TextInput","for","flex","renderContent","extraProps","clickable","onMouseEnter","getStage","container","cursor","onMouseLeave","fontSize","getText","displayId","vertices","len","x_coords","y_coords","reduce","sum","findPolygonCenter","splitArrayIntoChunks","updateReferenceInfo","setSaveAllowedState","control","schema","prefixId","currentRefs","recentUploads","initialGuid","uuidv4","imageLoaded","setImageLoaded","saveCallback","setSaveCallback","imgGuids","setImgGuids","guids","setGuids","currentGuid","setCurrentGuid","refIds","bindings","setBindings","rid","parsed","addBulkImageRef","addRemoveImageRef","createMarkingObjectsFromReferences","selectFirstUnUsedImage","tmpBindings","createUploadMarkingReferenceRequestObj","schemaId","controlId","refreshSaveState","onSaveMarkings","val","guid","binds","updatedBindings","updatedGuids","updatedRefs","handleOnSave","valid","keys","Object","connectGroup","warning","onClickImage","updateGuid","isGroup","updatedMarking","prevGuid","updatedImgGuids","activeGroupIndex","pop","ids","renderMarking","renderGroup","icon","found","displayIdClass","active","mlen","renderActions","rawFileUrl","areaImage","saveReferences","allowedTypes","SB_CONTROL_TYPE","PhotoDocumentation","TextPhotos","DropdownCommentPhotos","rawControlItems","controlType","renderKonvaEditor","_overrideIndex","binding","onMarkingSelect","allImageRefs","filteredControls","setControls","options","setOptions","images","setImages","references","setReferences","controls","tmpGuids","createGalleryObjectsFromReferences","initialOptions","alternativeTitle","tmp","initialImages","cids","refs","idx","renderMiniGallery","renderKonvaView","FormGroup","Label","ReactSelect","isMulti","closeMenuOnSelect","renderLeft","schemas","caseInfo","setCurrentReferences","refreshImageHash","deleteAreaImageAndReferences","deleteImageAndReferences","getAllMarkingReferences","refreshSchemaGroup","editor","setAreaImage","showConfirmAreaDelete","setShowConfirmAreaDelete","refresh","setRefresh","areaControl","controlItems","PhotoAreaMarking","foundExistingRefs","refreshAllReferences","saId","ksId","getCurrentSchemaSorting","currentGroup","schemaGroups","schemaGroupId","handleInfo","thumbUrl","indexedSort","toggleConfirmAreaDelete","areaName","truncateString","renderHeader","sharedProps","fileProps","finally","ReferenceGallery","imageBindingInfo","setImageBindingInfo","prefix","Gallery","setCurrentFile","showModal","setShowModal","setStartIndex","close","renderGallery","hasAreaMarking","saveFile","hasNumber","RegExp","hasLetter","hasMin8Chars","hasSpecialChars","hasUpperCase","passValidator","password","HN","test","HL","HM8C","HSC","HUC","getCustomerBranding","Axios","GET_CUSTOMER_BRANDING","getPlatformBrandingCustomer","getPlatformBrandingUser","auth","updating","showInitials","setInitials","path","imageObj","smallClass","small","handleClick","generateInitials","namespace","bemNames","create","blockName","block","more","getSingleProduct","getSingleProductCategory","getProductCategories","datasheets","excludeGlobal","GET_PRODUCTS","getSuppliersProductCategories","updateProductCategories","updateSuppliersProductCategories","deleteProductCategories","getProducts","updateProduct","orderCustomProduct","orderStandardProduct","toggleStandardProducts","product","uploadDatasheets","productId","deleteDatasheet","datasheetId","downloadDatasheet","responseType","headerContentDisposition","fileNameGroups","exec","FileSaver","saveAs","getProductCategoriesOnCase","GET_CASE_MATERIALS","updateProductCategoriesOnCase","updateProductsInProductCategoriesOnCase","getProductUnits","updateProductUnit","i18n","use","initReactI18next","init","lng","ns","fallbackLng","returnEmptyString","interpolation","escapeValue","parseDate","date","showTime","moment","parseDateNET","parseDateRFC2822","includeTime","getLastEditDate","lastEdit","updatedDate","createdDate","splitIntoBreakpoints","getEmployeeDataById","StringIsEmpty","str","undefined","getAssigneeTitleFrom","schemaType","ASSIGNMENT_SCHEMA","QBE_2022","TRUST_2023","WarmWorkStandardDBI_2021","WarmWorkStandard_2021","getRelevantDocument","caseData","docType","caseDocuments","doc","strComparator","propName","descending","getCustomerStatusLabel","status","CUSTOMER_STATUS","Active","Paused","Closed","Trial","validateEmail","email","String","first","charAt","last","substring","toUpperCase","match","join","escapeRegex","replace","addToObject","temp","prop","hasOwnProperty","usePrevious","isValidFolderName","parseInt","getRng","compareObjects","orig","curr","ignore","initial","temp2","equivalence","getControlItemTypeName","SB_CONTROL_ITEM_TYPE","Standard","Custom","getControlTypeName","Signature","DateSelector","DropdownProducts","DropdownUsers","DropdownCustom","Checkboxes","Text","TextUneditable","Numbers","TimeTableUsers","Checkmark","isJSON","parsePhoneNumber","phoneNumber","phoneNumberDigits","countryCodeLength","countryCode","maxLength","array","chunkSize","getLanguages","GET_LANGUAGES","setLanguage","language","SET_USER_LANGUAGE","downloadSqlQuery","addLanguageItem","updateLanguageItem","answeredByUserId","manualAnswerDate","dateVal","areControlsValid","hideAdmin","refreshGroups","textValue","infoTitle","infoText","showInfoIcon","maxCharacters","required","errorMessage","setValid","localText","setText","textTimeout","validateControl","row","renderTitle","labelError","subtitle","LastEditor","labelSize","inputSize","clearTimeout","setTimeout","html","extra","display","alignItems","flexDirection","justifyContent","count","renderMaxChars","ControlItemMetaAdminModal","tmpTitle","displayCurrentLangObj","currentLanguage","hasHtml","sm","targetId","InfoTip","renderInfo","Col","dropdownOptions","dropdownValue","multipleChoice","onChangeSelection","prev","cur","isDisabled","sort","v","renderDropdown","userOptions","dropdownSelectedUsers","selectedIds","onChangeArray","employeeType","checkboxOptions","checkboxValues","onChangeCheckbox","state","box","checked","sbId","products","allCategories","categoryOptions","productOptions","categoryValues","productValues","categoryDropDownOptions","setCategoryDropDownOptions","selectedCategoryValue","setSelectedCategoryValue","productDropDownOptions","setProductDropDownOptions","selectedValue","setSelectedValue","hasCategoryValues","cOptions","customerOptions","selectedCategories","productCategoryId","order","sortOrder","prodIds","catIds","renderProductDowndown","titleValid","building","categories","setGroup","currentGroups","caseBuildingId","sbSchemaId","renderCategoryItem","Card","CardHeader","doneSchemas","isDone","renderItemInformation","renders","schemasInCategory","render","renderGroups","groupIndex","isServiceAgreement","selectControl","_targetControlId","imageObjects","currentSchemaGroup","setOpen","titleWhenDone","onChangeName","renderControlItem","itemIndex","schemaIndex","disableAllFunctions","renderControlItemGroup","gIndex","groupTitle","expandedProps","itemGroupIndex","isGroupControl","CollapsableCard","uniqueId","headerLeft","parsedDate","actualServiceDate","expectedServiceDate","renderSchemaId","headerRight","statusContent","renderSchemaMenuContent","schemaGroupIndex","schemaGroup","customTitle","renderLabel","getSchemaOptions","currentCase","buildings","setBuilding","schemaOptions","setSchemaOptions","CardBody","Container","buildingMenu","FormGroupRow","input","renderBuildingsMenu","moveImagesToNewControlItem","getImages","setMovingImages","targetControlId","setTargetId","setImageObjects","setPage","showUnknownError","setUnknownError","modalTitle","setModalTitle","Modal","ModalHeader","ModalBody","imageObject","updatedImages","updatedImageObjects","imageAction","UncontrolledTooltip","sharedSchemasProps","Page2","cancelButton","allIds","moveReq","originControlId","refreshImageReferences","ModalFooter","renderFooter","uploadFiles","deleteFile","updateFileInfo","setGalleryImages","setUpdating","minFiles","maxFiles","errors","setErrors","setUploading","showMovingImagesModal","setShowMoveImagesModal","description","oldFile","controlItemId","serviceAgreementId","qualityCaseId","errData","fileInvalid","toggleShowMoveImagesModal","tmpFiles","renderSelectControlButton","marginTop","marginBottom","DropdownItem","CopyIcon","renderMinMaxFiles","newFiles","f","newFile","textTitle","rendertextInput","renderFileInput","ImagePickerModal","onImageClick","selectedImage","setSelectedImage","onSetImageAction","origName","GalleryPicker","casefiles","common","addImageToControlItem","galleryComp","CASE_FILE_TYPE","KSFixingPlan","BuildingImage","filteredFiles","imageId","konva","getContacts","signingOnly","disallowOverwrite","onChangeControlContacts","signatureValue","showSignModal","setShowSignModal","signerIdMatchCurrentUser","setSignerIdMatchCurrentUser","allowSigning","setAllowSigning","contactsRaw","setContactsRaw","contactOptions","setContactOptions","selectedContact","setSelectedContact","sigPad","internals","EMPLOYEE_TYPE","ExecutivePerson","CompanyOwner","InternalSubcontractor","tmpUser","getUserData","onChangeContact","isInternal","isPrivate","renderContact","renderSigningArea","cvsProps","innerHeight","handleSign","toDataURL","handleClear","clear","canvasProps","clearOnResize","renderModal","dateValue","dateFixed","onChangeDate","setHours","toDate","dis","showYearDropdown","showMonthDropdown","renderDateSelector","timeTableUsers","existing","hours","onChangeHours","updated","isNaN","parseFloat","totalHours","itemHours","Input","step","data-decimal","round","renderUsers","onChangeCheckmark","marked","hideMarkedQuestion","numberValue","setCurrentSchemaGroups","updateControlItem","updateControlItemViaToken","clearSignatureValues","refreshSignatureStatus","signatureToken","showSigningSuccessfulToast","checkForAreaMarkingControl","timerRef","onEditSchema","onChangeBoolean","updatedSchemas","updatedGroup","isPassingCriteria","ControlItemTextUneditable","renderControlByType","SvgIconBi","data-name","xmlns","viewBox","d","clipPath","transform","SvgIconDokumenter","SvgIconEksterneParter","SvgIconForsikringsselskaber","SvgIconInfo","SvgIconInterneBrugere","SvgIconKundegrupperVirksomheder","SvgIconKundeVirksomhed","SvgIconKvalitetssikring","SvgIconLogUd","SvgIconNotifikationer","SvgIconNotifikationsactive","SvgIconProdukter","SvgIconProfil","SvgIconSagsoverblik","SvgIconServiceaftale","SvgIconSignatur","SvgIconSystembeskeder","SvgIconSysteminfo","SvgIconTermsConditions","SvgIconVarmtArbejde","SvgNotifikationer2","SvgPdf","xmlnsXlink","fillRule","maskContentUnits","maskUnits","xlinkHref","x1","x2","y1","y2","gradientUnits","offset","stopColor","fillOpacity","mask","whiteSpace","fontFamily","fontWeight","textTransform","SvgTagpaslogoBlaaOutlinet","enableBackground","xmlSpace","overflow","SvgIconDownload2","strokeLinecap","strokeLinejoin","SvgComponent","SvgSkemabygger","SvgIconSprog","cx","cy","preserveAspectRatio","SvgNorwayFlag","SvgIconCheckmarkAlt","SvgIconLock","SET_CURRENT_USER","logout","removeItem","setAuthorizationToken","setDeviceToken","SET_LOGIN_AS","forgotpassword","resetpassword","login","setLocalAuthenticationData","loginReset","loginAs","loginData","_data","DeviceToken","SET_CUSTOMER_STATUS","customerStatus","loginOutAs","LOGOUT_AS","getCustomerStatus","SET_PAUSED_MODAL","togglePausedModal","handledPausedModal","HANDLED_PAUSED_MODAL","setUserPermissionSet","SET_PERMISSION_SET","getCompanyBindings","customers","GET_BINDINGS","userData","belongsToCustomerId","hasAP","details","hasPdf","schemaPackagesStringArray","permission","permissions","switchCompany","logoutOfCustomer","verifySms","resendSms","bem","bn","Page","breadcrumbs","link","scrollHook","wrapper","getBoundingClientRect","windowHeight","windowWidth","scrollY","scrollTop","scrollX","scrollLeft","progressHeight","abs","progressWidth","ReactTable","hover","striped","borderless","renderStart","renderInterval","showSort","setShowShort","sortBy","setSortBy","sortType","setSortType","reverse","setReverse","renderCount","renderDone","renderLoading","setRenderLoading","renderList","setRenderList","getDataProp","handleScrollRender","cleanTable","renderHeaders","class","sortable","selector","ButtonDropdown","DropdownToggle","DropdownMenu","getSortMenu","renderBody","bodyData","nonSortable","textA","textB","numberA","numberB","parts","bparts","aDate","bDate","isBefore","isAfter","bytesA","bytesB","sizeA","sizeB","getSortedData","_onClick","l","tdClass","Table","colgroup","getColGroups","empty","renderEmpty","SearchInput","placeholderExtra","ph","inline","onSubmit","autoComplete","PhoneInput","valueCode","onChangeCode","onBlur","errorText","onHandleTelephoneChange","telephone","codeProps","inputProps","countrySelector","CountryList","countries","country","phone","emoji","inputComp","bsSize","renderInput","InaccessibleFeature","withFeature","WrappedComponent","featureTypes","hideNoAccess","FeatureHOC","hasFeature","features","featureType","FEATURE","QualityInsurance","ServiceAgreement","setState","renderInaccessible","this","prevProps","Component","mapStateToProps","Elem","data-toggle","left","defaultOpen","getIsOpen","arrowStatus","leftTmp","rightTmp","getCustomerGroups","SET_CUSTOMERGROUPS","customerGroups","CreateCustomerGroup","UpdateCustomerGroup","DeleteCustomerGroup","getTeams","getAllTeams","createTeam","TEAM_UPDATE","CreateTeam","updateTeam","TeamUpdate","deleteTeam","TeamDelete","addTeamMember","AddMember","removeTeamMember","RemoveMember","GetErrorCodeDescription","code","errorCodes","1","2","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","81","1111","1112","addContact","updateContact","deleteContact","contactId","detect","require","ErrorBoundary","handleAutoReportError","errorInfo","catchError","metadata","appVersion","process","location","errorUrl","message","loggedInAsUser","loginAsUser","browser","version","os","error2","stack","toString","componentStack","errorObj","stackTrace","ERROR_TYPE","WebError","sendErrorLog","renderLogo","TaghaandbogenLogo","renderErrorBlock","simple","showDetails","colClasses","Collapse","textAlign","hasError","industryTypes","PropTypes","ID","oneOfType","string","number","isRequired","component","func","instanceOf","POSTAL_API","SET_LANGUAGES","SET_USER_PERMISSIONS","SET_CASES_WARM_WORK","SET_CASES_QUALITY_WORK","SET_CASE_IMAGE_GALLERY","SET_SERVICE_AGREEMENTS","SET_SERVICE_AGREEMENT","SET_SYSTEM_INFO","SET_SYSTEM_MESSAGE","SET_CUSTOMERS","SET_CUSTOMER","SET_SALES_MANAGERS","SET_INSURANCE_COMPANIES","GET_FEATURES","SB_SET_CURRENT_SCHEMA_CATEGORY","SB_GET_SCHEMA_CATEGORIES","SB_SET_CURRENT_SCHEMA_PACKAGE","SB_GET_SCHEMAS","SB_GET_SCHEMA","SB_SET_CURRENT_SCHEMA","SB_GET_RELATION_CONTROLS","SB_SET_RELATION_CONTROL","SB_GET_RELATION_GROUPS","SB_SET_RELATION_GROUP","SB_GET_CRITERIA","SB_GET_CONTROL_ITEMS","SB_GET_CONTROL_ITEM","SB_SET_CONTROL_ITEM","GET_SCHEMA_GROUP","SET_SCHEMA_GROUP","SET_CURRENT_SCHEMA","GET_SCHEMA_OPTIONS","SET_MARKED_SCHEMAS","REFRESH_SCHEMA_GROUP","GET_CONTROLPLANS","SET_CONTROLPLANS","GET_CONTROLPLAN","SET_CONTROLPLAN","GET_CONTROLPLAN_ON_CASE","SET_CONTROLPLAN_ON_CASE","SET_HEADERINFO","SET_BRANDING","ADD_TRACE_LOG","TOA_HANDLED","SET_SA_FILTER","GET_SA_FILTER","SET_RM_FILTER","GET_RM_FILTER","SET_RM_MATS_FILTER","GET_RM_MATS_FILTER","GET_USER_FILTERS","UPDATE_USER_FILTERS","GET_AGREEMENT_SCHEMA_SETTINGS","GET_HIDE_MODAL_SETTINGS","UPDATE_HIDE_MODAL_SETTINGS","IMAGE_HASH_REFRESH","GET_FOLDERS","GET_CURRENT_FOLDER","SET_CURRENT_FOLDER","GET_FILES","GET_FAVORITES","GET_ROADMAP_DATA","GET_ROADMAP_MATERIALS_DATA","SET_ROADMAP_DATE_INTERVAL","RENDERED_ROADMAP_TIMELINE","RENDERED_ROADMAP_MATERIALS","RENDERED_ROADMAP_TIMEINDICATOR","RERENDER_ROADMAP_LOCK_STATE","GET_ROADMAP_INFO_SCREEN_DATA","TOGGLE_ROADMAP_INFO_SCREEN","SET_SIDEMENU_ERRORS","ROADMAP_SET_INFOBAR_DATA","GET_CASE_DESCRIPTIONS","GET_CUSTOMER_DESCRIPTIONS","SET_CASE_DESCRIPTIONS","SET_CUSTOMER_DESCRIPTIONS","GET_ALL_IMAGE_REFERENCES","SET_CURRENT_IMAGE_REFERENCES","UPDATE_REFERENCE_INFO","IS_REF_SAVE_ALLOWED","RECENT_UPLOADS","None","SuperAdmin","LocalAdmin","ResponsiblePerson","BuildingOwner","Firewatch","Subcontractor","RoofingContractor","Advisor","Architect","Supplier","USER_POSITION_TYPE","EnterpriseLeader","Director","DepartmentLead","Planner","Calculator","Specialist","Customer","Student","Other","ACCESS_LEVEL","CustomerAdmin","Employee","ASSIGNEE_TYPE","ExecutiveResponsible","ContactForInternalOrganisation","BI_SEARCH_TYPES","Unknown","CurrentCasesVA","CurrentCasesKS","Companies","CompanyUsers","CompanyUsersInternal","CompanyUsersExternal","UsersWithoutBindings","CurrentCases","CurrentCasesSA","ControlSchemas","EXPIRE_TYPES","Hour","Day","Week","Month","Year","Permanent","HIDE_MODAL_TYPES","PdfGenerationModalWeb","PdfGenerationModalApp","SYSTEM_MESSAGE_TYPE","STANDARD","INFORMATIVE","WARNING","URGENT","STANDARD_PRIMARY","ApiError","TeamCreate","PUSH_TYPE","Users","Teams","Groups","Global","DEVICE_TYPE","iOS","iPhoneOS","Android","CASE_STATUS","NotAccepted","Accepted","InProgress","Done","Created","Invoiced","MissingControls","IncompleteControl","CompletedControl","Subscribed","Unsubscribed","Draft","NullState","Case","QualtiyCase","CoverImage","Contract","CompressedImage","ControlImage","KSGenericDocument","SEARCH_CATEGORY","All","New","Archive","Hotwork","Documents","DocumentsBasic","Roadmap","Materials","SBSchemas","PdfSchemaPrinting","FEATURE_SUB","Basis","Plus","FEATURE_STATUS","Unset","Purchased","Disabled","INSURANCE_TYPE","DBI_Forsikring","Koebstaedernes_forsikring","WarmWorkStandard","QualityWorkStandard","WarmWorkStandardDBI","ASSIGNMENT_TYPE","Private","ProfessionUnder50000","ProfessionAbove50000","DOCUMENT_TYPE","Generic","Image","Pdf","Excel","Word","Powerpoint","Video","Pages","Keynote","Email","DOCUMENT_FOLDER_TYPE","Cases","PRODUCT_TYPES","PRODUCT_STATUS","CaseMissingMaterials","CaseAwaitingMaterials","CaseHasAllMaterials","ProductHasNoSupplier","ProductNotOrdered","ProductOrdered","PRODUCT_SORT_BY","ProductCategory","SupplierName","ProductStatus","DATE_TYPE","WEEKS","MONTHS","QUATERS","ROADMAP_STATUS","Complete","ROADMAP_PROJECT_STATE","Start_Delayed","End_Delayed","Start_Moved","End_Moved","ROADMAP_INFO_TYPE","ROADMAP_TYPE","INVITATION_TYPE","CustomerToUser","UserToCustomer","FromSystemToUser","CustomerToNonExistingUser","NOTIFICATION_ACTION_TYPE","Simple","Redirect","NOTIFICATION_SUBJECT_AREA","VA","KS","SA","Invitation","System","ExternalLink","PDF","InvitationRequestAccess","InvitationRequestAccepted","SchemaSignature","NOTIFICATION_SETTINGS_ACTIONS","UNKNOWN","OPENED","MARK_ALL_AS_READ","SB_CRITERIA_BEHAVIOR","AND","OR","SB_CATEGORY_TYPE","Common","RiskEvaluation","ExtraSchema","CONTROL_PLAN_CONTEXT","Local","OnCase","SCHEMA_OPTION_FILTER","LANG_TEXT_CATEGORY","General","Mail","Sms","Push","RISK_ASSESSMENT","NotSelected","No","Yes","External","INDUSTRY_TYPE","Roofing","Production_Roofing","CUSTOMER_EDIT_EVENTS","Activated","PDF_FILTER","CoverPage","TableOfContents","CaseInformation","DEP_CompanyDescription","DEP_QualityDescription","Building","DEP_OperationsAndMaintenance","Datasheets","SchemaStarted","SchemaDone","DEP_CaseDocuments","DEP_CaseSchemas","SchemaAll","HidePrivateAssignees","Contracts","DateInterval","BuildingAll","SchemaGroupGuid","CaseDescription","CaseDescriptionAll","CaseDocument","CaseDocumentAll","ControlPlan","ControlPlanAll","MaterialsOverview","getFolders","parentId","searchFolders","getFolder","setFolderRedux","getFiles","searchFiles","createFolder","updateFolder","updateGlobalFolderVisibilty","updateFile","updateGlobalFileVisibilty","deleteFolder","folderId","uploadDocumentFiles","downloadFile","moveFile","moveFolder","copyFile","copyFolder","getCapacity","getCapacities","customerIds","CustomerIds","lineRows","prependUnitType","comp","unitType","addonType","rows","pattern","steps","min","infoTip","inputOnly","errorRender","infoRender","labelless","languages","lang","initialLanguageObject","changeCurrentLangObj","isValidJson","out","parseControlItemsLang","controlItem","dropdownOption","checkboxOption","categoryOption","customStyles","provided","backgroundColor","borderColor","singleValue","menu","zIndex","noOptionsMessage","MoreSelectedBadge","styles","menuShouldScrollIntoView","menuPlacement","maxMenuHeight","isOptionSelected","hideSelectedOptions","components","MultiValue","getValue","global","CacheBuster","refreshCacheAndReload","versionId","caches","names","delete","reload","json","meta","latestVersion","currentVersion","latestVersionId","version_id","currentVersionId","versionA","versionB","cleanStr","latest","Number","semVerCompare","isValidSchema","requiredControls","filesNum","preprocessControlItemsAndGroups","filtered","isDeleted","controlItemGroups","foundItemIds","c","controlItemGroupId","sortRawsByIndex","raws","foundIds","rawItem","remainder","criteria","minMaxValueCheck","minValue","maxValue","criteriaPassCheck","crit","targetControlItemId","hasValue","hasValues","tmpTarget","pass","vals","prodVals","dpVals","cbVals","linkBehavior","checkCriteria","getUserCustomerId","companyId","loggedUser","customerName","belongsToCustomerName","mobile","mail","initials","notifyByEmail","notifyByPush","notifyBySMS","role","accessLevel","getPermissions","getUserTypeName","defaultPermissions","projectCreate","projectCopy","projectDelete","showAddSchemaCategory","getUserPositionTypeStrings","getEmployeeTypeNameByType","updateControlItemMetaData","updateSchemasControlItemsMetaData","removeControlItemMetaData","showControlItemModal","setShowControlItemModal","showSchemaModal","setShowSchemaModal","showDeleteModal","setShowDeleteModal","visible","setVisible","setUserId","setDate","renderMetaInfoField","onChangeManualDate","handleUpdateMetaData","handleRemoveMetaData","renderUserDropdown","renderDateTimePicker","showTimeSelect","timeIntervals","timeCaption","renderControlItemContent","getCurrentUser","dt","getCurrentDate","shared","renderMenuButton","placement","open","TOAST_LENGTH","settings","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","progress","successShort","infoShort","warningShort","errorShort","successLong","infoLong","warningLong","errorLong","AuthForm","showLogo","loginFailed","remember","username","setUsername","setPassword","missingUsername","setMissingUsername","missingPassword","setMissingPassword","Form","event","emptyUsername","emptyPassword","isDev","showFlags","setShowFlags","onAction","setLang","renderFlags","getCurrentLangIcon","GetBranding","getSystemMessage","getFeatures","getCustomer","history","failedLogin","setFailedLogin","setErrorText","showClosedAccountMessage","setShowClosedAccount","salesManager","setSalesMaanger","setRemember","rememberPass","isAuthenticated","handleLogoClick","handleLogin","devicetype","osName","verification","dictionaryKey","navigateToForgotPassword","Row","md","lg","onLogoClick","marginRight","defaultChecked","LanguagePicker","corporation","verifyFailed","setVerifyFailed","smsVerify","setSmsVerify","googleVerify","setGoogleVerify","windowsVerify","setWindowsVerify","smsInput","setSmsInput","renderGoogleVerification","renderWindowsVerification","ForgotPasswordForm","resetFailed","resetSent","setResetSent","ResetPasswordForm","confirmPassword","setConfirmPassword","passwordsNotMatching","setPasswordsNotMatching","emptyConfirmPassword","failedReset","setFailedReset","setToken","tmpToken","URLSearchParams","search","Array","isArray","txt","descriptor","handleError","resetcode","res1","BuildingownerApproval","onChangeComment","questions","hasSigned","allMarked","handleMarkAll","isInfo","aggreementComment","handleSetDeclaration","handleApproveAll","showBuildingOwnerContent","setShowBuildingOwnerContent","showExecutivePersonContent","setShowExecutivePersonContent","showFireWatchContent","setShowFireWatchContent","is2021Version","isKoeb2021","onClickFunc","beforeContentBO","duringContentBO","afterContentBO","beforeContentEX","duringContentEX","afterContentEX","beforeContentFW","duringContentFW","afterContentFW","beforeWorkBO","duringWorkBO","afterWorkBO","beforeWorkEX","duringWorkEX","afterWorkEX","beforeWorkFW","duringWorkFW","afterWorkFW","q","question","arr","GetQuestion","listContent","excludeIndex","getQuestionContentByType","ListGroupItem","ListGroup","ListGroupItemHeading","rooferTitle","execTitle","fireTitle","generateCheckboxes","Checkbox","getDeclarationText","bold","renderDeclaration","signData","userSignedInApproval","setHasError","fromDataURL","off","goBackToCase","backButtonClass","renderButtons","isEmpty","handleSignApprovals","PostApproval","SignApprovals","PostTokenlessApproval","tokenView","allApproved","setAllApproved","showApprovals","setShowApprovals","showSigningReason","setShowSigningReason","approvals","setApprovals","setCaseId","setHasSigned","signedData","setSignedData","setSignatureToken","setAllMarked","assignee","setAssignee","setAssigneeType","declaration","setDeclaration","setAgreementComment","setSchemaType","headerTypes","queryString","params","assignees","handleApprovalInitialization","asigneeType","_case","signToken","sigData","sigState","getAssigneeInfoSignature","signatureApprovals","signed","signatureData","signDate","comment","agreementComments","caseAssigneeType","getAssigneeQuestionsByType","preApproved","questionsAreAlreadyApproved","sigs","onChangeChecked","nameSplit","approvalObj","Status","CaseId","Type","IsArray","SignatureToken","Id","handleSendApproval","handleApproveButton","commentObj","IsComment","Comment","approvalObjs","approv","Approvals","handleApproveSingle","appro","sigObj","UserId","AssigneeType","userType","agreementApprovals","ag","getQuestions","questionsBuildingOwner","questionsFireWatch","questionsExecutivePerson","handleShowApprovals","handleShowSigningReasons","getApprovalsTitle","simpleTable","values","scope","buttonText","getTitle","renderHeaderTitle","execResp","fluid","workplaceName","workplaceAddress","workplacePostalCode","workplaceCity","startDate","endDate","getCaseInformation","goBack","getHeaderContent","approvalPageSwitch","is2021","headerText","renderInfoModal","validateFileToken","downloadFileWithToken","setPath","expired","setExpired","invalid","setInvalid","renderBadResultContent","validatePdfSchemaToken","downloadPdfSchemaWithToken","tmpPath","isIOS","isSafari","currentFolder","documents","getCustomers","isUpdate","modalData","currentFolderParentId","stateInfo","canEdit","hasMinAccessLevel","previousFolderParentId","isSubmitting","currentParentFolder","isSuper","isCompanyOwner","hasErrors","setHasErrors","documentInfo","isActive","isFolder","companyOwnerFolder","industry","setDocument","permissionInfo","employeeOptions","employeeTeamOptions","customerGroupsOptions","permissions_customer_types","customerTypeList","permissions_customer_groups","customerGroupAccessList","permissions_customer_list","customerAccessList","permissions_list_all","allLocalUsers","permissions_list","userAccessList","permissions_teams","teamAccessList","setPermission","tempCustomerId","setCrumbs","last_edited","perms","crumbs","element","crumb","concat","handleSubmit","pathNormal","ParentId","CustomerId","Path","CustomerAccessList","checkForBadData","Toast","handleRefresh","missingName","invalidInput","nameExists","pathToolong","onChangeCheckedAll","customerTypeOptions","selectedCustomerTypes","renderCustomerTypesAccess","selectedCustomerGroups","context","renderCustomerGroupAccess","selectedCustomers","renderCustomerAccess","industryOptions","industrySplit","selectedIndusties","emps","tmpExtras","simplified","hasDoc","selectedUsers","selectedTeams","onChangePermissions","updatedDoc","isClearable","renderPermissions","ErrorMsg","renderForm","padding","isMove","isCopy","startingParentId","breadcrumbPath","setBreadcrumbs","targetParentId","showReturn","navigate","isReturn","s","resp","setCurrentParentFolder","parentFolder","oldCrumbs","indexOf","folderIcons","StandardDocumentIcon","GlobalDocumentIcon","CasesDocumentIcon","copyItem","moveItem","renderItems","allowGlobal","isModal","hasChildFolders","renderItem","renderBreadcrums","DocumentConfirmModal","confirmText","cancelText","btnConfirmText","btnCancelText","authTypeCheck","loading","showDocumentsCreateModal","setShowDocumentsCreateModal","showDocumentMoveCopyModal","setShowDocumentMoveCopyModal","showDelete","setShowDelete","setIsMove","setIsCopy","setDocuments","setModalData","toggleDocumentsCreateModal","fileIcons","GenericDocumentIcon","ImageDocumentIcon","TextDocumentIcon","PdfDocumentIcon","ExcelDocumentIcon","WordDocumentIcon","PowerPointDocumentIcon","VideoDocumentIcon","NumbersDocumentIcon","PagesDocumentIcon","KeynoteDocumentIcon","toolsDropdown","showDropdown","UncontrolledButtonDropdown","MoveIcon","renameItem","RenameIcon","toggleDeleteModal","DeleteIcon","toggleDocumentMoveCopyModal","onChangeActiveChecked","updateVisibiltyAtCustomerLevel","el","getBodyData","_document","lastEdited","edit","downloadItem","fileType","translate","getFileType","isNotCompanyOwner","getFolderType","_id","splice","scrollRender","getTableProps","responsive","DocumentMoveCopyModal","newDocuments","FileOrFolderInput","setError","onDragDrop","webkitdirectory","mozdirectory","directory","filledCapacity","fullCapacity","currentParentId","folderUploaded","fileUploaded","lastIndexOf","webkitRelativePath","errorMsgs","badNames","fileSizeError","missingFiles","allowed_file_types","errorTypeFiles","extension","errorPathFiles","errorPathNames","importSize","folders","submitting","setSubmitting","showDocumentsUploadModal","setShowDocumentsUploadModal","showGoBack","setShowGoBack","timer","setTimer","setCurrentFolderParentId","setPreviousFolderParentId","setCurrentParentFolderState","sortRule","setSortRule","setFilter","setFilledCapacity","setFullCapacity","getDocuments","currentId","tempFolders","tempFiles","tempGlobals","tempOther","localeCompare","numeric","searchObject","Term","UploadIcon","perc","Progress","renderStorageCapacity","setParentIds","previousId","toggleReturn","getUserTermsOfAgreement","acceptTermsOfAgreement","handledTermsOfAgreement","setShow","terms","setTerms","atBottom","setAtBottom","showCloseModal","setShowCloseModal","termsOfAgreementHandled","allAccepted","handleApproveTerms","pathname","renderTerm","term","onScroll","scrollHeight","clientHeight","captcha","setCaptcha","setName","setMail","setCountryCode","setPhone","setCountry","userPositionType","setUserPositiontype","repeatPassword","setRepeatPassword","getCountryOptions","native","handleCreateProfile","repeatError","nameError","tmpErrors","userName","onChangeMail","replaceAll","onChangePhone","onChangeCountry","onChangePositionType","onChangePassword","onChangeRepeatPassword","handledCaptcha","timeoutCaptcha","onChangeCountryCode","sitekey","onExpired","missingSignatures","setMissingSignatures","hasSignatureValues","setHasSignatureValues","signatures","missing","ControlItem","getSigningSchemas","errorOccured","setErrorOccured","renderSchemaGroups","invoiced","flattendSchemas","g","_schemaIndex","_group","option","renderSchema","renderError","initialState","showPausedModal","headerInfo","companyName","user_lang","user_branding","filterStorage","agreementSchemaModalSettings","userFilters","hideModalSetting","insuranceCompanies","warmCases","qualityCases","serviceAgreements","customerBranding","systemInfo","systemMessage","favorites","favoritess","roadmapData","roadmapMaterialsData","dateInterval","timelineRendered","timeIndicatorRendered","reRenderLocked","infoScreenData","showInfoScreen","sideMenuErrors","infoBar","materialsRendered","packages","currentSchema","currentControlItem","currentPackage","currentCategory","relations","criterias","relation","materials","refreshSchemaGroupsWithNewGroup","allGroups","controlPlans","controlPlansOnCase","currentControlPlan","languageIndex","case_descriptions","customer_descriptions","isSaveAllowed","rootReducer","combineReducers","router","connectRouter","insurances","branding","roadmap","invitation","notifications","schemabuilder","controlPlan","caseDescriptions","middleware","thunk","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createBrowserHistory","Content","EmptyLayout","fetching","setFetching","noNotifications","setNoNotifications","maxChunk","setChunk","hasMore","setHasMore","mouseInContainer","setMouseInContainer","showSwitchCompany","setShowSwitchCompany","selectedNotis","setSelectedNotis","switchingCompany","setSwitchingCompany","unreadOnly","setUnreadOnly","setNotifications","getNotificationsLoop","hasUnread","sec","notis","markNotificationAsRead","read","notif","notifcationId","redirectToPage","notificationIsFromOtherCompany","subjectArea","redirector","webPage","getIcon","getMainIcon","subjectIcon","getSubIcon","associatedUser","UserAvatar","avatarUrl","getActions","actions","actionType","actionableObject","Icon","IconDownload2","IconLink","getPdfActions","data-tip","data-for","getIndicator","indicator","renderDummyNotification","handleSwitchCompany","deviceType","getFilteredNotifications","dataLength","next","newChunk","loader","scrollableTarget","onClickAction","clickableClass","extraInfo","fromNow","getContent","system","showProfileMenu","setShowProfileMenu","activeHeaderMenuItem","setActiveHeaderMenuItem","platformBranding","setPlatformBranding","setActiveMenuItem","renderMenuItem","Comp","renderProfileDropdown","Dropdown","NavLink","to","route","setRoute","defaultLogo","platformLogo","textContent","displayMessage","stylingProps","fontColorClass","dangerouslySetInnerHTML","__html","substr","margin","renderSystemMessage","menuItems","IconNotifikationsActive","IconNotifikationer","NotificationsMenu","renderHeaderMenu","openClass","renderUserProfile","LayoutRoute","Layout","layout","rest","Route","originalPermissionSet","setOriginalPermissionSet","sideBarOpen","setSideBarOpen","currentRoute","setCurrentRoute","checkBreakpoint","breakpoint","checkCustomerStatus","modalToggle","renderPausedModal","renderNavItem","svg","isLogoutAs","defaultActive","navItems","user_data","isLoginAsName","isLoginAs","routes","sidebarRoutes","exact","CompanyApprovalIcon","CompanyIcon","isBottom","origColor","getMenuOptions","regNavItems","ni","specialNavItems","collapsed","renderSidebar","langObj","addResourceBundle","changeLanguage","store","preloadedState","createStore","createRootReducer","applyMiddleware","routerMiddleware","usertoken","userdata","loggedInUser","j","deviceToken","scustomer","interceptors","getState","configureStore","DashboardPage","lazy","CustomerGroupsPage","InsuranceCompaniesPage","SystemInfo","SystemMessage","SystemInfoView","ExternalPartnersPage","HotworksOverview","HotworkPage","CreateHotworkPage","DraftHotworkPage","QualityInsurances","CreateQualityInsurancePage","ViewQualityInsuranceCase","SettingsPage","BusinessIntelligence","ProductsPage","UserTeams","PushMessage","ServiceAgreements","CreateServiceAgreementPage","PoliciesPage","ProfilePage","FeaturePage","CustomerTabs","RoadmapPage","CompanyBindings","LanguageManager","SchemaBuilder","SchemaCategoryPage","CreateSchemaCategoryPage","SchemaPackagePage","CreateSchemaPackagePage","CreateSchema","ControlSchema","CreateControlItem","App","renderUnsupportedBrowser","BrowserRouter","Switch","Login","Suspense","fallback","componentQueries","createRoot","minLevel","_user","isLogoutName","accessibleFeatures","isSuperAdmin","isLocalAdmin","excludedFeatures","IconSagsoverblik","feature","IconVarmtArbejde","IconKvalitetssikring","IconServiceaftale","IconDokumenter","feat","IconProdukter","IconKundegrupperVirksomheder","IconForsikringsselskaber","IconSysteminfo","IconSystembeskeder","IconBi","IconTermsConditions","IconSkemabygger","IconSprog","IconKundeVirksomhed","MdWidgets","IconInterneBrugere","IconEksterneParter","Notifikationer2","IconInfo","logoutText","LogoutIcon","MdSettings","excludedRoutes","loggedInAs","featureCheckingEnabled","ROUTE","PATHS","Group","Schemas","Controls","getSchemaGroups","addSchemaGroup","updateSchemaGroup","removeSchemaGroup","removeSchemaGroups","setCurrentSchemaGroup","addControlSchema","addControlSchemasToServiceAgreement","updateControlSchema","removeControlSchema","removeControlSchemas","moveControlSchema","setCurrentSchema","updateControlSchemaToNewest","sendControlsSignatureNotifications","imageReferences","checkForExistingSchemaTokens","resendControlsSignatureNotification","setControlItemManualAnswerDate","setMarked","ClearSelectedCase","getCommentsOnCase","postCommentOnCase","GetCaseAssignments","PostAssignments","DeleteAssignment","DownloadPdf","DownloadQIPdf","caseObj","documentName","DownloadSchemas","getCaseQualityPdfFilter","getCaseQualityTokenPdfFilter","getCustomerQualityPdfFilter","updateCustomerQualityPdfFilter","downloadDocument","urlDirection","qualitySchemaId","qualitySchemaControlId","coverImage","isContract","isPlatform","deleteDocument","resetGalleryImages","updateCaseDescription","resetCaseDescription","addBuildingToCase","updateBuildingOnCase","removeBuildingOnCase","copyBuildingOnCase","updateResponsibleOnCase","brand","getCity","postalCode","getTermsOfAgreement","getAcceptedUserTermsOfAgreement","addUpdateTermsOfAgreement","recallAcceptedTermsOfAgreement","getPersonalDataPolicy","addUpdatePersonalDataPolicy","setRoadmapFilterInLocalstorage","getRoadmapFilterFromLocalStorage","filterStartDate","filterEndDate","setRoadmapMaterialsFilterInLocalstorage","getRoadmapMaterialsFilterFromLocalStorage","getAgreementSchemaModalSetting","updateAgreementSchemaModalSetting","getUserFilters","updateUserFilters","getHideModalSettings","updateHideModalSetting","CustomCheckbox","paddingTop","check","allRefs","curIndex","defaults","badgeByCaseStatus","ColorlessBadge","noBorders","getTimeIntervalOptions","getProductStatusOptions","getPlaceholderIfEmpty","getCountryCodeOptions","grouped","ungrouped","polygons","_refs","makeWritable","indexedMarks","regex","k","tmpIds","caseFileId","Set","imgIds","fixedPath","pathCoords","coords","pCords","translateXY","canvas","ctx","getContext","clearRect","rotate","PI","drawImage","dataURL","endsWith","setAttribute","CreateCustomer","UpdateCustomer","custId","DeleteCustomer","updateDefaultInsurance","updateBaseInformation","getCompanyInformationWithCvr","updateCustomerDescription","getCaseDocumentNames","updateCaseDocumentNames","deleteCaseDocumentNames","getCustomerBindingInfo","getCurrentCompanyOwner","getCustomerSchemaPackages","updateCustomerSchemaPackages","getCustomerEditLogs","getFileToken","createFileTokenQi","createFileTokenSa","createFileTokenSchemas","recreateFileToken","recreateFileTokenSchemas","expireFileTokenSchemas","deleteFileToken","deleteFileTokenSchemas","updateExpirationDate","updateFileTokenQi","updateFileTokenSa","checkForFileTokenForSchemaCombination","uploadGenericFiles","getSystemInfo","createSystemInfo","createSystemMessage","createPushMessage","getPushMessage","featureId","subscription","addFeature","updateFeature","toggleFeature","grantFeature"],"mappings":"iGAAAA,EAAOC,QAAU,IAA0B,+C,iCCA3C,oEAAO,IAAMC,EAAkB,SAAAC,GAc7B,OAbIA,GAAS,WACXA,GAASA,EAAQ,YAAYC,QAAQ,GAAK,MACjCD,GAAS,QAClBA,GAASA,EAAQ,SAASC,QAAQ,GAAK,MAC9BD,GAAS,KAClBA,GAASA,EAAQ,MAAMC,QAAQ,GAAK,MAC3BD,EAAQ,EACjBA,GAAgB,SACG,IAAVA,EACTA,GAAgB,QAEhBA,EAAQ,UAEHA,GAGIE,EAAiB,SAACC,EAAMC,GACnC,IAAIJ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C,IACNhxC,YAGK3M,MAUN,SAAS47F,EAAaz7F,GAC3B,IAAIT,EAAMC,IAAU,kBAEpB,OAAO,SAAAC,GACL,OAAOC,IAAMS,KAAKZ,EAAKS,O","file":"static/js/main.e60858cd.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/method-draw-image.7cb4d4d4.svg\";","export const formatSizeUnits = bytes => {\r\n if (bytes >= 1073741824) {\r\n bytes = (bytes / 1073741824).toFixed(2) + ' GB';\r\n } else if (bytes >= 1048576) {\r\n bytes = (bytes / 1048576).toFixed(2) + ' MB';\r\n } else if (bytes >= 1024) {\r\n bytes = (bytes / 1024).toFixed(2) + ' KB';\r\n } else if (bytes > 1) {\r\n bytes = bytes + ' bytes';\r\n } else if (bytes === 1) {\r\n bytes = bytes + ' byte';\r\n } else {\r\n bytes = '0 bytes';\r\n }\r\n return bytes;\r\n};\r\n\r\nexport const calculateBytes = (size, type) => {\r\n var bytes = 0;\r\n\r\n if (type === 'KB') {\r\n bytes = size * 1024;\r\n } else if (type === 'MB') {\r\n bytes = size * 1048576;\r\n } else if (type === 'GB') {\r\n bytes = size * 1073741824;\r\n } else if (type === 'TB') {\r\n bytes = size * 1073741824;\r\n }\r\n\r\n return bytes;\r\n};\r\n","/**\r\n * @module actions/emploees\r\n */\r\nimport axios from 'axios';\r\nimport { API_URL, SET_EMPLOYEES } from '../constants';\r\nimport { setCurrentUser } from './auth';\r\n\r\n/**\r\n * @description Getting employees from API and dispatching event\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getEmployees(compId) {\r\n let url = API_URL + `/user/${compId}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: SET_EMPLOYEES,\r\n employees: res.data,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Getting employees from API and dispatching event\r\n * @param {Object} filter Filter the users by internal (1) or external (2) users. Default = { type: 0 }\r\n * @return {Promise} Axios promise\r\n */\r\nexport function filterEmployees(compId, filter = { type: 0 }) {\r\n let url = API_URL + `/user/${compId}/filter`;\r\n return dispatch => {\r\n return axios.post(url, filter).then(res => {\r\n //console.log('filterEmployees', res);\r\n dispatch({\r\n type: SET_EMPLOYEES,\r\n employees: res.data,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Getting employees from API wihtout updating redux\r\n * @param {Object} filter Filter the users by internal (1) or external (2) users. Default = { type: 0 }\r\n * @return {Promise} Axios promise\r\n */\r\nexport function filterEmployeesRaw(compId, filter = { type: 0 }) {\r\n let url = API_URL + `/user/${compId}/filter`;\r\n return dispatch => {\r\n return axios.post(url, filter).then(res => {\r\n dispatch({\r\n type: SET_EMPLOYEES,\r\n employees: res.data,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Getting a single employee from API and dispatching event\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getEmployee(customerId, id) {\r\n let url = API_URL + `/user/${customerId}/${id}`;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Creating an employee\r\n * @return {Promise} Axios promise\r\n */\r\nexport function CreateEmployee(compId, data) {\r\n let url = API_URL + `/user/${compId}`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Updating an employee\r\n * @return {Promise} Axios promise\r\n */\r\nexport function UpdateEmployee(compId, id, data) {\r\n let url = API_URL + `/user/${compId}/${id}/update`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Updating an user-customer binding\r\n * @return {Promise} Axios promise\r\n */\r\nexport function updateBinding(data) {\r\n let url = API_URL + `/user/updateBinding`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description \"Deleting\" an employee\r\n * @return {Promise} Axios promise\r\n */\r\nexport function DeleteEmployee(compId, id) {\r\n let url = API_URL + `/user/${compId}/${id}/delete`;\r\n return dispatch => {\r\n return axios.post(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description \"Deleting\" an employee\r\n * @return {Promise} Axios promise\r\n */\r\nexport function deleteUser(data) {\r\n let url = API_URL + '/user/sa-delete';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Remove a users binding to the company\r\n * @return {Promise} Axios promise\r\n */\r\nexport function removeEmployee(data) {\r\n let url = API_URL + `/user/remove-binder`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Remove a users binding to the company\r\n * @return {Promise} Axios promise\r\n */\r\nexport function removeUserBinding(data) {\r\n let url = API_URL + `/user/remove-user-binder`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Get a current users avatar image\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getUserAvatar() {\r\n let url = API_URL + `/file/avatar`;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Get a users avatar image\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getSpecificUserAvatar(userId) {\r\n let url = API_URL + `/file/avatar/` + userId;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Upload current users avatar\r\n * @return {Promise} Axios promise\r\n */\r\nexport function uploadUserAvatar(file) {\r\n let url = API_URL + `/file/upload/avatar/`;\r\n //console.log(file);\r\n\r\n let data = new window.FormData();\r\n data.append(file.fileName, file);\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Update user data\r\n */\r\nexport function updateLocalUserData(data) {\r\n return dispatch => {\r\n const localUserData = JSON.parse(window.localStorage.getItem('user_data'));\r\n\r\n const updateObj = {\r\n ...localUserData,\r\n user: {\r\n ...localUserData.user,\r\n ...data,\r\n },\r\n };\r\n\r\n window.localStorage.setItem('user_data', JSON.stringify(updateObj));\r\n dispatch(setCurrentUser(updateObj));\r\n };\r\n}\r\n","import React from 'react';\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\r\n\r\n// Components\r\nimport PageSpinner from '../PageSpinner';\r\n\r\nconst InfoModal = props => {\r\n const { showActionSpinner } = props;\r\n\r\n let toggleAction = !showActionSpinner ? props.toggle : null;\r\n\r\n return (\r\n \r\n {props.header && (\r\n {props.header}\r\n )}\r\n \r\n {showActionSpinner && (\r\n \r\n )}\r\n {props.children}\r\n \r\n {props.footer && {props.footer}}\r\n \r\n );\r\n};\r\n\r\nexport default InfoModal;\r\n","import React, { useState } from 'react';\r\nimport i18next from '../../i18n';\r\nimport {\r\n Button,\r\n ButtonDropdown,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Modal,\r\n ModalBody,\r\n ModalHeader,\r\n ModalFooter,\r\n} from 'reactstrap';\r\nimport { MdClose, MdMenu } from 'react-icons/md';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport ConfirmModal from './ConfirmModal';\r\nimport Typography from '../Typography';\r\nimport PageSpinner from '../PageSpinner';\r\n\r\nconst CustomModal = props => {\r\n const {\r\n extraClass,\r\n showActionSpinner,\r\n confirmClose,\r\n size,\r\n fullscreen,\r\n } = props;\r\n\r\n const [showConfirm, setShowConfirm] = useState(false);\r\n const [showBurgerActions, setShowBurgerActions] = useState(false);\r\n\r\n const toggleConfirm = () => {\r\n setShowConfirm(!showConfirm);\r\n };\r\n\r\n const renderActionSpinner = () => {\r\n if (showActionSpinner) {\r\n return ;\r\n }\r\n };\r\n\r\n const renderConfirmModal = () => {\r\n const confirmAction = () => {\r\n setShowConfirm(false);\r\n props.toggle();\r\n };\r\n return (\r\n \r\n {i18next.t(200)}\r\n \r\n );\r\n };\r\n\r\n const renderBurgerOptions = () => {\r\n const { confirmClose, burgerOptions } = props;\r\n\r\n const headerAction = confirmClose ? toggleConfirm : props.toggle;\r\n const toggleNavbar = () => setShowBurgerActions(!showBurgerActions);\r\n\r\n const renderItems = (item, index) => {\r\n return (\r\n \r\n {item.title}\r\n \r\n );\r\n };\r\n\r\n return (\r\n \r\n {this.props.title}\r\n\r\n \r\n \r\n \r\n \r\n {burgerOptions.map(renderItems)}\r\n\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const renderModalHeader = () => {\r\n const { confirmClose, burgerOptions } = props;\r\n const headerAction = confirmClose ? toggleConfirm : props.toggle;\r\n const showBurgerOptions = burgerOptions?.length > 0;\r\n\r\n if (showBurgerOptions) {\r\n return (\r\n \r\n {renderBurgerOptions()}\r\n \r\n );\r\n } else {\r\n return {props.title};\r\n }\r\n };\r\n\r\n const xlSize = !isMobile & !fullscreen && size === 'xl' ? ' xl-size' : '';\r\n return (\r\n
\r\n \r\n {renderModalHeader()}\r\n \r\n {renderActionSpinner()}\r\n {props.children}\r\n \r\n {props.footer && {props.footer}}\r\n \r\n {confirmClose && renderConfirmModal()}\r\n
\r\n );\r\n};\r\n\r\nCustomModal.defaultProps = {\r\n confirmClose: false,\r\n};\r\n\r\nexport default CustomModal;\r\n","import React from 'react';\r\nimport i18next from '../../../i18n';\r\nimport { Spinner } from 'reactstrap';\r\nimport accept from 'attr-accept';\r\nimport async from 'async';\r\n\r\nconst FileInput = props => {\r\n const {\r\n isUploading,\r\n disabled,\r\n gallery,\r\n isMovingImages,\r\n movingImages,\r\n } = props;\r\n\r\n const inputRef = React.createRef();\r\n\r\n const onDragOver = e => {\r\n e.preventDefault();\r\n if (props.isMovingImages) return;\r\n try {\r\n e.dataTransfer.dropEffect = 'copy';\r\n } catch (error) {}\r\n\r\n return false;\r\n };\r\n\r\n const onDrop = e => {\r\n e.preventDefault();\r\n if (props.isMovingImages) return;\r\n\r\n const droppedFiles = e.dataTransfer ? e.dataTransfer.files : e.target.files;\r\n let acceptedFiles = [];\r\n let rejectedFiles = [];\r\n\r\n async.each(\r\n droppedFiles,\r\n (file, cb) => {\r\n if (props.useAccept) {\r\n // console.log('acceptable', this.isAcceptableFile(file));\r\n if (!isAcceptableFile(file)) {\r\n rejectedFiles.push(file);\r\n cb();\r\n } else {\r\n acceptedFiles.push(file);\r\n cb();\r\n }\r\n } else {\r\n acceptedFiles.push(file);\r\n cb();\r\n }\r\n },\r\n () => {\r\n if (acceptedFiles.length > 0) {\r\n props.onDropAccepted(acceptedFiles);\r\n }\r\n\r\n if (rejectedFiles.length > 0) {\r\n if (props.onDropRejected) {\r\n props.onDropRejected(rejectedFiles);\r\n }\r\n }\r\n },\r\n );\r\n };\r\n\r\n const isAcceptableFile = file => {\r\n return accept(file, props.accept);\r\n };\r\n\r\n if (isUploading) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n let labelText = i18next.t(1184);\r\n if (props.labelText) {\r\n labelText = props.labelText;\r\n }\r\n\r\n let contentClass = '';\r\n if (gallery) {\r\n contentClass = 'fileDropContent';\r\n }\r\n if (isMovingImages) {\r\n if (!gallery) {\r\n contentClass = 'fileDropContent';\r\n }\r\n contentClass += ' moving-images';\r\n }\r\n let acceptProps = {};\r\n if (props.useAccept) {\r\n acceptProps = {\r\n accept: props.accept,\r\n };\r\n }\r\n\r\n return (\r\n
\r\n inputRef.current.click()}\r\n onDragOver={onDragOver}\r\n onDrop={onDrop}\r\n >\r\n \r\n\r\n
{labelText}
\r\n
\r\n {gallery}\r\n {movingImages}\r\n \r\n );\r\n};\r\n\r\nFileInput.defaultProps = {\r\n accept: 'image/jpeg,image/jpg,image/png,image/dng,image/heic,application/pdf',\r\n onDropAccepted: () => console.error('FileInput requires onDropAccepted prop'),\r\n};\r\n\r\nexport default FileInput;\r\n","// Drop handler function to get all files\r\nexport async function getAllFileEntries(dataTransferItemList) {\r\n let fileEntries = [];\r\n // Use BFS to traverse entire directory/file structure\r\n let queue = [];\r\n // Unfortunately dataTransferItemList is not iterable i.e. no forEach\r\n for (let i = 0; i < dataTransferItemList.length; i++) {\r\n queue.push(dataTransferItemList[i].webkitGetAsEntry());\r\n }\r\n while (queue.length > 0) {\r\n let entry = queue.shift();\r\n if (entry.isFile) {\r\n fileEntries.push(entry);\r\n } else if (entry.isDirectory) {\r\n queue.push(...(await readAllDirectoryEntries(entry.createReader())));\r\n }\r\n }\r\n\r\n return Promise.all(fileEntries.map(async x => await getFile(x)));\r\n}\r\n\r\n// Get all the entries (files or sub-directories) in a directory\r\n// by calling readEntries until it returns empty array\r\nasync function readAllDirectoryEntries(directoryReader) {\r\n let entries = [];\r\n let readEntries = await readEntriesPromise(directoryReader);\r\n while (readEntries.length > 0) {\r\n entries.push(...readEntries);\r\n readEntries = await readEntriesPromise(directoryReader);\r\n }\r\n return entries;\r\n}\r\n\r\n// Wrap readEntries in a promise to make working with readEntries easier\r\n// readEntries will return only some of the entries in a directory\r\n// e.g. Chrome returns at most 100 entries at a time\r\nasync function readEntriesPromise(directoryReader) {\r\n try {\r\n return await new Promise((resolve, reject) => {\r\n directoryReader.readEntries(resolve, reject);\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n}\r\n\r\nasync function getFile(fileEntry) {\r\n try {\r\n const dataUri = await readFile(fileEntry);\r\n // console.log('datauri', dataUri);\r\n return dataURItoBlob(dataUri, fileEntry);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n}\r\n\r\nfunction dataURItoBlob(dataURI, fileEntry) {\r\n // convert base64 to raw binary data held in a string\r\n var byteString = atob(dataURI.split(',')[1]);\r\n // separate out the mime component\r\n var mimeString = dataURI\r\n .split(',')[0]\r\n .split(':')[1]\r\n .split(';')[0];\r\n // write the bytes of the string to an ArrayBuffer\r\n var ab = new ArrayBuffer(byteString.length);\r\n var ia = new Uint8Array(ab);\r\n for (var i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n let file = new File([ab], fileEntry.fullPath.slice(1), {\r\n type: mimeString,\r\n });\r\n //file.webkitdirectory = fileEntry.fullPath;\r\n return file;\r\n}\r\n\r\nasync function readFile(entry) {\r\n return await new Promise((resolve, reject) => {\r\n entry.file(function(file) {\r\n let reader = new FileReader();\r\n reader.onload = function() {\r\n resolve(reader.result);\r\n };\r\n reader.readAsDataURL(file);\r\n });\r\n });\r\n}\r\n\r\nexport function uriToFile(uri, filename) {\r\n var byteString = atob(uri.split(',')[1]);\r\n // separate out the mime component\r\n var mimeString = uri\r\n .split(',')[0]\r\n .split(':')[1]\r\n .split(';')[0];\r\n // write the bytes of the string to an ArrayBuffer\r\n var ab = new ArrayBuffer(byteString.length);\r\n var ia = new Uint8Array(ab);\r\n for (var i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n let file = new File([ab], filename, {\r\n type: mimeString,\r\n });\r\n return file;\r\n}\r\n","const AREA_TOTAL = {\r\n HUGE: 48000000,\r\n VERY_LARGE: 35000000,\r\n LARGE: 25000000,\r\n MEDIUM: 12000000,\r\n MEDIUM_SMALL: 2000000,\r\n SMALL: 1000000,\r\n VERY_SMALL: 500000,\r\n NANO: 250000,\r\n};\r\n\r\nexport function getMarkingSizeByLadder(image) {\r\n if (!image) return 120;\r\n const total = image.width * image.height;\r\n\r\n let result = 30;\r\n\r\n if (total >= AREA_TOTAL.HUGE) {\r\n result = 105;\r\n } else if (total >= AREA_TOTAL.VERY_LARGE) {\r\n result = 85;\r\n } else if (total >= AREA_TOTAL.LARGE) {\r\n result = 65;\r\n } else if (total >= AREA_TOTAL.MEDIUM) {\r\n result = 45;\r\n } else if (total >= AREA_TOTAL.MEDIUM_SMALL) {\r\n result = 30;\r\n } else if (total >= AREA_TOTAL.SMALL) {\r\n result = 15;\r\n } else if (total >= AREA_TOTAL.VERY_SMALL) {\r\n result = 15;\r\n } else if (total >= AREA_TOTAL.NANO) {\r\n result = 15;\r\n }\r\n\r\n // console.log(result, total, image.width, image.height);\r\n\r\n return result;\r\n}\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport PropTypes from '../utils/propTypes';\r\n\r\nconst tagMap = {\r\n h1: 'h1',\r\n h2: 'h2',\r\n h3: 'h3',\r\n h4: 'h4',\r\n h5: 'h5',\r\n h6: 'h6',\r\n 'display-1': 'h1',\r\n 'display-2': 'h1',\r\n 'display-3': 'h1',\r\n 'display-4': 'h1',\r\n p: 'p',\r\n lead: 'p',\r\n blockquote: 'blockquote',\r\n};\r\n\r\nconst types = Object.keys(tagMap);\r\n\r\nconst Typography = ({ tag: Tag, className, type, ...restProps }) => {\r\n const classes = classNames({ [type]: !!type }, className);\r\n let TypoComp;\r\n\r\n if (Tag) {\r\n TypoComp = Tag;\r\n } else if (!Tag && tagMap[type]) {\r\n TypoComp = tagMap[type];\r\n } else {\r\n TypoComp = 'p';\r\n }\r\n\r\n return ;\r\n};\r\n\r\nTypography.propTypes = {\r\n tag: PropTypes.component,\r\n className: PropTypes.string,\r\n type: PropTypes.oneOf(types),\r\n};\r\n\r\nTypography.defaultProps = {\r\n type: 'p',\r\n};\r\n\r\nexport default Typography;\r\n","/**\r\n * @module actions/notifications\r\n */\r\nimport axios from 'axios';\r\nimport {\r\n API_URL,\r\n GET_NOTIFICATIONS,\r\n MARK_NOTIFICATION,\r\n GET_NOTIFICATION_SETTINGS,\r\n UPDATE_NOTIFICATION_SETTINGS,\r\n} from '../constants';\r\n\r\n/**\r\n * @description Get a chunk of notifications\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getNotifications(page = 0, chunk = 15) {\r\n let url = API_URL + '/notification?page=' + page + '&amount=' + chunk + '';\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: GET_NOTIFICATIONS,\r\n payload: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Mark notification as read\r\n * @return {Promise} Axios promise\r\n */\r\nexport function markNotification(data) {\r\n let url = API_URL + '/notification/mark';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n dispatch({\r\n type: MARK_NOTIFICATION,\r\n payload: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Get notification settings\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getNotificationSettings() {\r\n let url = API_URL + '/UserSettings/notification';\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: GET_NOTIFICATION_SETTINGS,\r\n payload: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Update notification settings\r\n * @return {Promise} Axios promise\r\n */\r\nexport function updateNotificationSettings(data) {\r\n let url = API_URL + '/UserSettings/update-notis';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n dispatch({\r\n type: UPDATE_NOTIFICATION_SETTINGS,\r\n payload: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Get notice on case\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getNoticeOnCase(caseId) {\r\n let url = API_URL + '/notification/case-notice?ksId=' + caseId;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Mark notice as read\r\n * @return {Promise} Axios promise\r\n */\r\nexport function markNoticeAsRead(caseId) {\r\n let url = API_URL + '/notification/case-notice?ksId=' + caseId;\r\n return dispatch => {\r\n return axios.put(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Notify users of new notes\r\n * @return {Promise} Axios promise\r\n */\r\nexport function notifyUsersOnCaseOfNewNotes(data) {\r\n let url = API_URL + '/notification/case-notice';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n","import React from 'react';\r\nimport ReactTooltip from 'react-tooltip';\r\n\r\nexport const getTooltip = (\r\n target,\r\n content,\r\n place = 'top',\r\n effect = 'solid',\r\n) => {\r\n return (\r\n \r\n {content}\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport i18next from '../../i18n';\r\nimport DatePicker, { registerLocale } from 'react-datepicker';\r\nimport { Label } from 'reactstrap';\r\nimport 'react-datepicker/dist/react-datepicker.css';\r\nimport dk from 'date-fns/locale/da';\r\nimport en from 'date-fns/locale/en-GB';\r\nimport de from 'date-fns/locale/de';\r\n\r\n// Utils\r\nimport { MdClear } from 'react-icons/md';\r\n\r\n// Misc\r\nregisterLocale('dk', dk);\r\nregisterLocale('en', en);\r\nregisterLocale('de', de);\r\n\r\nconst globalLang = window.localStorage.getItem('user_lang');\r\nconst ReactDatePicker = props => {\r\n const { label, wrapperClass, value, unclearable } = props;\r\n const format = props.format ? props.format : 'yyyy.MM.dd';\r\n let locale = props.locale ? props.locale : 'dk';\r\n\r\n if (globalLang) {\r\n locale = globalLang;\r\n }\r\n\r\n const placeholderText = props.placeholder\r\n ? props.placeholder\r\n : `${i18next.t(1030)} ${i18next.t(1061)?.toLowerCase()}`;\r\n\r\n const className = props.className ? props.className : ' form-control';\r\n\r\n let labelContent = null;\r\n\r\n const picker = (\r\n \r\n );\r\n\r\n if (label) {\r\n labelContent = ;\r\n }\r\n\r\n return (\r\n \r\n {labelContent}\r\n {picker}\r\n {props.onChange && value && !props.disabled && !unclearable && (\r\n props.onChange(null)}>\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default ReactDatePicker;\r\n","/**\r\n * @module actions/cases\r\n */\r\nimport axios from 'axios';\r\nimport { API_URL, SET_CASES_ALL, SET_CASE } from '../constants';\r\n\r\n/**\r\n * @description Search hotworks\r\n * @param category All = 0, New = 1, Archived = 2\r\n * @return {Promise} Axios promise\r\n */\r\nexport function searchHotworks(category = 0) {\r\n let url = API_URL + '/hotwork/search/';\r\n return dispatch => {\r\n return axios.post(url, { category }).then(res => {\r\n dispatch({\r\n type: SET_CASES_ALL,\r\n cases: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Get hotwork by Id\r\n * @return {Promise} Axios promise\r\n */\r\nexport function GetHotworkById(id, token = null) {\r\n let url = API_URL + '/hotwork/' + id;\r\n let config = {};\r\n\r\n if (token) {\r\n url += '/token';\r\n config.headers = { Authorization: `Bearer ${token}` };\r\n }\r\n\r\n return dispatch => {\r\n return axios.get(url, config).then(res => {\r\n let obj = {\r\n customer: res.data.customerData,\r\n case: res.data,\r\n };\r\n\r\n if (token) {\r\n obj.case = res.data.case;\r\n obj.assigneeType = res.data.assigneeType;\r\n obj.userId = res.data.userId;\r\n }\r\n\r\n dispatch({\r\n type: SET_CASE,\r\n selectedCase: obj,\r\n });\r\n\r\n return obj;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Get hotwork information with a token\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getHotworkWithToken(token) {\r\n let url = API_URL + '/hotwork/va?token=' + token;\r\n let config = { headers: { Authorization: `Bearer ${token}` } };\r\n\r\n return dispatch => {\r\n return axios.get(url, config).then(res => {\r\n dispatch({\r\n type: SET_CASE,\r\n selectedCase: res.data,\r\n });\r\n\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Create hotwork\r\n * @return {Promise} Axios promise\r\n */\r\nexport function CreateHotwork(data) {\r\n let url = API_URL + '/hotwork';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Update hotwork\r\n * @return {Promise} Axios promise\r\n */\r\nexport function UpdateHotwork(id, data) {\r\n let url = API_URL + `/hotwork/${id}/update`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Copy case\r\n * @return {Promise} Axios promise\r\n */\r\nexport function CopyHotwork(id) {\r\n let url = API_URL + `/hotwork/${id}/copy`;\r\n return dispatch => {\r\n return axios.post(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Delete case\r\n * @return {Promise} Axios promise\r\n */\r\nexport function DeleteHotwork(id) {\r\n let url = API_URL + `/hotwork/${id}/delete`;\r\n return dispatch => {\r\n return axios.post(url, null);\r\n };\r\n}\r\n\r\n/**\r\n * @description Resend user notifications for hotwork\r\n * @return {Promise} Promise\r\n */\r\nexport function resendUserNotificationHotwork(id, data) {\r\n // console.log(id, data);\r\n let url = API_URL + `/hotwork/resendUserNotificationVa/${id}`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n","import React from 'react';\r\n\r\nexport default function({ msg }) {\r\n try {\r\n if (msg?.trim().length > 0) {\r\n const splitted = msg.split('\\n');\r\n\r\n if (splitted.length > 0) {\r\n return (\r\n
\r\n {splitted.map(x => {\r\n if (x.trim().length === 0) return null;\r\n\r\n return

{x}

;\r\n })}\r\n
\r\n );\r\n }\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n\r\n return

{msg}

;\r\n}\r\n","import React, { useState } from 'react';\r\nimport i18next from '../../i18n';\r\nimport {\r\n Button,\r\n ButtonDropdown,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Modal,\r\n ModalBody,\r\n ModalHeader,\r\n} from 'reactstrap';\r\nimport ConfirmModal from './ConfirmModal';\r\nimport Typography from '../Typography';\r\nimport PageSpinner from '../PageSpinner';\r\nimport { MdClose, MdMenu } from 'react-icons/md';\r\n\r\nconst CreateModal = props => {\r\n const {\r\n className,\r\n extraClass,\r\n confirmClose,\r\n burgerOptions,\r\n showActionSpinner,\r\n } = props;\r\n const [showConfirm, setShowConfirm] = useState(false);\r\n const [showBurgerActions, setShowBurgerActions] = useState(false);\r\n\r\n const toggleConfirm = () => {\r\n setShowConfirm(!showConfirm);\r\n };\r\n\r\n const getCreateButton = () => {\r\n const color = props.color ? props.color : 'btnPrimary';\r\n\r\n if (props.showCreate) {\r\n let btnText = props.text ? props.text : i18next.t(18);\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n const renderActionSpinner = () => {\r\n if (showActionSpinner) {\r\n return ;\r\n }\r\n };\r\n\r\n const renderConfirmModal = () => {\r\n const confirmAction = () => {\r\n setShowConfirm(false);\r\n props.toggle();\r\n //this.setState({ showConfirm: false }, props.toggle);\r\n };\r\n return (\r\n \r\n {i18next.t(200)}\r\n \r\n );\r\n };\r\n\r\n const renderBurgerOptions = () => {\r\n const headerAction = confirmClose ? toggleConfirm : props.toggle;\r\n const toggleNavbar = () => setShowBurgerActions(!showBurgerActions);\r\n\r\n const renderItems = (item, index) => {\r\n return (\r\n \r\n {item.title}\r\n \r\n );\r\n };\r\n\r\n return (\r\n \r\n {props.title}\r\n\r\n \r\n \r\n \r\n \r\n {burgerOptions.map(renderItems)}\r\n\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const renderModalHeader = () => {\r\n const headerAction = confirmClose ? toggleConfirm : props.toggle;\r\n const showBurgerOptions = burgerOptions?.length > 0;\r\n\r\n if (showBurgerOptions) {\r\n return (\r\n \r\n {renderBurgerOptions()}\r\n \r\n );\r\n } else {\r\n return {props.title};\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {getCreateButton()}\r\n \r\n {renderModalHeader()}\r\n \r\n {renderActionSpinner()}\r\n {props.children}\r\n \r\n \r\n {confirmClose && renderConfirmModal()}\r\n
\r\n );\r\n};\r\n\r\nCreateModal.defaultProps = {\r\n confirmClose: false,\r\n};\r\n\r\nexport default CreateModal;\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport i18next from '../../../i18n';\r\nimport { Button, FormText, Spinner } from 'reactstrap';\r\nimport {\r\n Rect,\r\n Circle as Circ,\r\n Layer,\r\n Stage,\r\n Transformer,\r\n Group,\r\n Line,\r\n} from 'react-konva';\r\n\r\n// Util\r\nimport { getMarkingSizeByLadder } from '../../../utils/imageMarkingUtils';\r\nimport { MARKING_TYPE } from '../../../redux/constants';\r\n\r\n// Components\r\nimport ConfirmModal from '../ConfirmModal';\r\nimport ModalHeader from 'reactstrap/lib/ModalHeader';\r\n\r\nconst ImageMarker = props => {\r\n const {\r\n currentFile,\r\n downloadImageAction,\r\n deleteImageAction,\r\n isSaving,\r\n toggleModal,\r\n } = props;\r\n const [imgDimensions, setImgDimensions] = useState({\r\n width: 0,\r\n height: 0,\r\n naturalWidth: 0,\r\n naturalHeight: 0,\r\n r: 0,\r\n });\r\n const [markings, setMarkings] = useState([]);\r\n const [groups, setGroups] = useState([]);\r\n const [currentMarking, setCurrentMarking] = useState(null);\r\n const [currentGroupId, setCurrentGroupId] = useState(null);\r\n const [removeNewGroup, setRemoveNewGroup] = useState(false);\r\n const [showConfirmDelete, setShowConfirmDelete] = useState(false);\r\n const [imageHash, setImageHash] = useState(Date.now());\r\n const imgRef = useRef(null);\r\n\r\n // markings: [\r\n // {\r\n // id: 1,\r\n // groupId: 1,\r\n // x: 40,\r\n // y: 40,\r\n // width: 10,\r\n // height: 10,\r\n // shape: MARKING_TYPE.Square,\r\n // r: 1 // Radius for circle\r\n // filled: false,\r\n // }\r\n // ],\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', handleImageResize);\r\n\r\n return () => window.removeEventListener('resize', handleImageResize);\r\n }, []);\r\n\r\n const toggleConfirmDeleteModal = () => {\r\n setShowConfirmDelete(!showConfirmDelete);\r\n };\r\n\r\n //////////////// Marking methods ////////////////\r\n\r\n const isCurrentMarking = marking => {\r\n if (currentMarking === null) return false;\r\n return currentMarking === marking.id;\r\n };\r\n\r\n const getMarkingObj = (shape = MARKING_TYPE.Circle, currentGroupId) => {\r\n const radius = getMarkingSizeByLadder(props.currentFile);\r\n return {\r\n id: '_' + Math.random() * 1000, // Random id for handling\r\n groupId: currentGroupId ? currentGroupId : '_' + Math.random() * 1000,\r\n x: 20,\r\n y: 20,\r\n width: 20,\r\n height: 20,\r\n shape,\r\n r: radius,\r\n dimensions: imgDimensions,\r\n filled: false,\r\n hidden: false,\r\n };\r\n };\r\n\r\n const saveMarkings = () => {\r\n const tmpGroups = groups.map(group => {\r\n return group.map(m => {\r\n // Reset ids\r\n if (typeof m.id === 'string') {\r\n m.id = 0;\r\n }\r\n\r\n return m;\r\n });\r\n });\r\n\r\n const filteredMarkings = markings.slice().filter(x => !x.hidden);\r\n const tmpMarkings = filteredMarkings.map(m => {\r\n // Reset ids\r\n if (typeof m.id === 'string') {\r\n m.id = 0;\r\n }\r\n\r\n return m;\r\n });\r\n\r\n if (props.saveMarkings) {\r\n props.saveMarkings(tmpMarkings, tmpGroups);\r\n setImageHash(Date.now());\r\n setMarkings([]);\r\n setGroups([]);\r\n setCurrentMarking(null);\r\n setCurrentGroupId(null);\r\n }\r\n };\r\n\r\n const onClickImage = e => {\r\n var x = e.evt.layerX; //x position within the element.\r\n var y = e.evt.layerY; //y position within the element.\r\n // console.log({ x, y });\r\n\r\n addMarking(MARKING_TYPE.Circle, { x, y });\r\n };\r\n\r\n const connectGroup = () => {\r\n if (!currentGroupId) return;\r\n\r\n let updatedGroups = groups.slice();\r\n const group = markings.filter(x => x.groupId === currentGroupId);\r\n\r\n const updatedMarkings = markings.map(x => {\r\n return {\r\n ...x,\r\n hidden: x.groupId === currentGroupId || x.hidden,\r\n };\r\n });\r\n\r\n if (group?.length > 0) {\r\n updatedGroups.push(group);\r\n }\r\n\r\n setCurrentMarking(null);\r\n setCurrentGroupId(null);\r\n setGroups(updatedGroups);\r\n setMarkings(updatedMarkings);\r\n };\r\n\r\n const addMarking = (shape = MARKING_TYPE.Circle, pos) => {\r\n let newMarking = getMarkingObj(shape, currentGroupId);\r\n\r\n newMarking.x = imgDimensions.width / 2;\r\n newMarking.y = imgDimensions.height / 2;\r\n\r\n if (pos) {\r\n newMarking.x = pos.x;\r\n newMarking.y = pos.y;\r\n }\r\n\r\n if (shape === MARKING_TYPE.Circle) {\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n\r\n newMarking.x /= scaling;\r\n newMarking.y /= scaling;\r\n }\r\n\r\n const tmpMarkings = [...markings, newMarking];\r\n const tmpCurrentMarking = newMarking.id;\r\n\r\n setMarkings(tmpMarkings);\r\n setCurrentMarking(tmpCurrentMarking);\r\n\r\n if (!currentGroupId) {\r\n setCurrentGroupId(newMarking.groupId);\r\n }\r\n };\r\n\r\n const removeMarking = () => {\r\n if (markings.length === 0) return;\r\n\r\n let newGroup = false;\r\n let slicedGroup = groups.slice();\r\n let slicedList = removeNewGroup\r\n ? markings.slice()\r\n : markings.slice(0, markings.length - 1);\r\n let marking =\r\n slicedList.length > 0 ? slicedList[slicedList.length - 1] : null;\r\n const nullIded = !currentGroupId && slicedGroup.length > 0;\r\n\r\n // console.log({\r\n // slicedGroup,\r\n // slicedList,\r\n // marking: !!marking ? { id: marking.id, groupId: marking.groupId } : null,\r\n // currentMarking,\r\n // currentGroupId,\r\n // newGroup: currentGroupId !== marking?.groupId,\r\n // nullIded,\r\n // });\r\n\r\n if (marking) {\r\n newGroup = currentGroupId !== marking.groupId && !nullIded;\r\n\r\n if (removeNewGroup || nullIded) {\r\n const groupIds = [];\r\n slicedGroup = groups.slice(0, groups.length - 1);\r\n\r\n slicedGroup.forEach(x => {\r\n x.forEach(y => {\r\n if (groupIds.includes(y.groupId)) return;\r\n groupIds.push(y.groupId);\r\n });\r\n });\r\n\r\n let list = nullIded ? markings : slicedList;\r\n slicedList = list.map(x => {\r\n return {\r\n ...x,\r\n // hidden: x.groupId === lastGroup.groupId,\r\n hidden: groupIds.includes(x.groupId),\r\n };\r\n });\r\n }\r\n }\r\n\r\n setMarkings(slicedList);\r\n setCurrentMarking(marking ? marking.id : null);\r\n setCurrentGroupId(marking ? marking.groupId : null);\r\n setGroups(slicedGroup);\r\n setShowConfirmDelete(false);\r\n setRemoveNewGroup(newGroup);\r\n };\r\n\r\n // const setToCircle = () => {\r\n // const tmpMarkings = markings.filter(m => m.id !== currentMarking);\r\n // const newMarking = getMarkingObj();\r\n\r\n // setMarkings([...tmpMarkings, newMarking]);\r\n // setCurrentMarking(newMarking.id);\r\n // setShowConfirmDelete(false);\r\n // };\r\n\r\n // const setToRect = () => {\r\n // const tmpMarkings = markings.filter(m => m.id !== currentMarking);\r\n // const newMarking = getMarkingObj(MARKING_TYPE.Square);\r\n\r\n // setMarkings([...tmpMarkings, newMarking]);\r\n // setCurrentMarking(newMarking.id);\r\n // setShowConfirmDelete(false);\r\n // };\r\n\r\n //////////////// Image Processing ////////////////\r\n\r\n const handleImageResize = () => {\r\n const img = imgRef.current;\r\n\r\n const tmpImgDimensions = {\r\n width: img.width,\r\n height: img.height,\r\n naturalWidth: img.naturalWidth,\r\n naturalHeight: img.naturalHeight,\r\n loaded: true,\r\n };\r\n\r\n setImgDimensions(tmpImgDimensions);\r\n };\r\n\r\n const renderImage = () => {\r\n let hash = imageHash;\r\n if (isSaving) {\r\n hash += new Date();\r\n }\r\n\r\n let classNames = 'imgMarker__img';\r\n if (imgDimensions.loaded) {\r\n classNames += ' absolute';\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n //////////////// Markings Processing ////////////////\r\n\r\n const renderMarking = (marking, key) => {\r\n if (marking.hidden) return null;\r\n const isCurrent = isCurrentMarking(marking);\r\n\r\n const calcCoord = (a, b, pos) => {\r\n return (a / b) * pos;\r\n };\r\n const calcDimen = (imgLength, percent) => {\r\n return imgLength * (percent / 100);\r\n };\r\n const calcDimen2 = (newLength, originalLength) => {\r\n return (100 * newLength) / originalLength;\r\n };\r\n const calRadius = (r, viewHeight) => {\r\n const scaling = viewHeight / imgDimensions.naturalHeight;\r\n // console.log(\r\n // `r: ${r} - Scaling: ${r *\r\n // scaling} - Height: ${viewHeight} - ActualHeight: ${\r\n // imgDimensions.naturalHeight\r\n // }`,\r\n // );\r\n return r * scaling;\r\n };\r\n\r\n const selectMarking = () => {\r\n setCurrentMarking(marking.id);\r\n };\r\n\r\n const updateXY = e => {\r\n let updatedMarkings = markings.slice();\r\n\r\n const index = updatedMarkings.findIndex(x => x.id === marking.id);\r\n updatedMarkings[index].x = calcCoord(\r\n imgDimensions.naturalWidth,\r\n imgDimensions.width,\r\n e.target.x(),\r\n );\r\n updatedMarkings[index].y = calcCoord(\r\n imgDimensions.naturalHeight,\r\n imgDimensions.height,\r\n e.target.y(),\r\n );\r\n\r\n setMarkings(updatedMarkings);\r\n };\r\n\r\n const onTransform = e => {\r\n let updatedMarkings = markings.slice();\r\n const index = updatedMarkings.findIndex(x => x.id === marking.id);\r\n\r\n updatedMarkings[index].x = calcCoord(\r\n imgDimensions.naturalWidth,\r\n imgDimensions.width,\r\n e.x,\r\n );\r\n updatedMarkings[index].y = calcCoord(\r\n imgDimensions.naturalHeight,\r\n imgDimensions.height,\r\n e.y,\r\n );\r\n\r\n if (e.type === MARKING_TYPE.Square) {\r\n updatedMarkings[index].width = calcDimen2(e.width, imgDimensions.width);\r\n updatedMarkings[index].height = calcDimen2(\r\n e.height,\r\n imgDimensions.height,\r\n );\r\n } else if (e.type === MARKING_TYPE.Circle) {\r\n // console.log(e, updatedMarkings[index].r);\r\n\r\n updatedMarkings[index].r = e.r;\r\n }\r\n\r\n setMarkings(updatedMarkings);\r\n };\r\n\r\n let width = calcDimen(imgDimensions.width, marking.width);\r\n let height = calcDimen(imgDimensions.height, marking.height);\r\n let r = calRadius(marking.r, imgDimensions.height);\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n if (marking.shape === MARKING_TYPE.Square) {\r\n return (\r\n \r\n );\r\n } else if (marking.shape === MARKING_TYPE.Circle) {\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n const renderGroup = (group, index) => {\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n const coordinates = [];\r\n\r\n group.forEach(marking => {\r\n coordinates.push(marking.x * scaling);\r\n coordinates.push(marking.y * scaling);\r\n });\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n //////////////// RENDER ////////////////\r\n\r\n // const renderMarkingOptions = () => {\r\n // let marking;\r\n // if (currentMarking) {\r\n // marking = markings.find(x => x.id === currentMarking);\r\n // }\r\n\r\n // const setFilled = () => {\r\n // let updatedMarkings = markings.slice();\r\n\r\n // const index = updatedMarkings.findIndex(x => x.id === currentMarking);\r\n // updatedMarkings[index].filled = !updatedMarkings[index].filled;\r\n\r\n // setMarkings(updatedMarkings);\r\n // };\r\n\r\n // return (\r\n // \r\n // setFilled()}\r\n // color='faded'\r\n // outline\r\n // className='imgMarker__btn--option padding-left-10px'\r\n // disabled={!marking}\r\n // >\r\n // {}}\r\n // id='marking_filled'\r\n // disabled={!marking}\r\n // />\r\n // \r\n // \r\n // \r\n // );\r\n // };\r\n\r\n const renderSaveMenu = () => {\r\n return (\r\n
\r\n \r\n {isSaving ? : i18next.t(148)}\r\n \r\n \r\n {i18next.t(147)}\r\n \r\n \r\n {i18next.t(3242)}\r\n \r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n addMarking()}\r\n disabled={isSaving}\r\n >\r\n {i18next.t(6417)}\r\n \r\n !x.hidden).length < 3 || isSaving\r\n }\r\n >\r\n {i18next.t(7069)}\r\n \r\n \r\n {i18next.t(1243)}\r\n \r\n
\r\n {renderSaveMenu()}\r\n {/* {renderMarkingOptions()} */}\r\n
\r\n {i18next.t(217)}\r\n {currentFile?.fileTitle}\r\n
\r\n\r\n
\r\n {renderImage()}\r\n \r\n \r\n {markings.map(renderMarking)}\r\n {groups.map(renderGroup)}\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ImageMarker;\r\n\r\n//////////////////////////////////////////////////////////////////////////////////\r\n///////////////////////////////// MARKING SHAPES /////////////////////////////////\r\n//////////////////////////////////////////////////////////////////////////////////\r\n\r\nconst Rectangle = props => {\r\n const shapeRef = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRef.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n return (\r\n \r\n {\r\n // transformer is changing scale of the node\r\n // and NOT its width or height\r\n // but in the store we have only width and height\r\n // to match the data better we will reset scale on transform end\r\n const node = shapeRef.current;\r\n const scaleX = node.scaleX();\r\n const scaleY = node.scaleY();\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Square,\r\n x: node.x(),\r\n y: node.y(),\r\n // set minimal value\r\n width: Math.max(node.width() * scaleX),\r\n height: Math.max(node.height() * scaleY),\r\n });\r\n }}\r\n />\r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nconst Circle = props => {\r\n const shapeRefOuter = React.useRef();\r\n const shapeRefInner = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRefOuter.current, shapeRefInner.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n return (\r\n \r\n \r\n {\r\n const node = shapeRefOuter.current;\r\n const scale = node.scale().x;\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Circle,\r\n r: Math.floor(node.radius() * scale),\r\n });\r\n }}\r\n />\r\n {\r\n const node = shapeRefInner.current;\r\n const scale = node.scale().x;\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Circle,\r\n r: Math.floor(node.radius() * scale),\r\n });\r\n }}\r\n />\r\n \r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nconst Polygon = props => {\r\n const shapeRef = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRef.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n return (\r\n \r\n \r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport i18next from '../../i18n';\r\nimport ReactDOM from 'react-dom';\r\nimport { connect } from 'react-redux';\r\nimport { Button, FormText } from 'reactstrap';\r\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\r\nimport { isMobile } from 'react-device-detect';\r\nimport { MdKeyboardArrowLeft, MdKeyboardArrowRight } from 'react-icons/md';\r\nimport toast from '../../utils/toast';\r\n\r\n// Actions\r\nimport { bulkFileInfoUpdate } from '../../redux/actions/files';\r\n\r\n// Utils\r\nimport { getImageRotated } from '../../utils/componentUtils';\r\n\r\n// Componenets\r\nimport ImageMarker from './Forms/ImageMarker';\r\nimport ConfirmModal from './ConfirmModal';\r\nimport TextInput from './Forms/TextInput';\r\nimport CreateModal from './CreateModal';\r\nimport PageSpinner from '../PageSpinner';\r\n\r\nconst ImgViewerModal = props => {\r\n const {\r\n //control,\r\n files,\r\n //currentFile,\r\n disabled,\r\n // updateFileInfo,\r\n // handleInfo,\r\n // saveFile,\r\n marking,\r\n toggle,\r\n show,\r\n saveMarkings,\r\n //isSaving,\r\n startIndex,\r\n } = props;\r\n\r\n const [isLoading, setLoading] = useState(true);\r\n const [isSaving, setSaving] = useState(false);\r\n const [imageIndex, setImageIndex] = useState(!!startIndex ? startIndex : 0);\r\n const [currentImage, setImage] = useState(null);\r\n\r\n const [imageHash, setHash] = useState(Date.now());\r\n const [rotations, setRotations] = useState({});\r\n const [fileInfos, setFileInfos] = useState({});\r\n\r\n const [showConfirm, setShowConfirm] = useState(false);\r\n const maxLength = 50;\r\n\r\n useEffect(() => {\r\n if (files?.length > 0) {\r\n let img = files[startIndex];\r\n setImage(img);\r\n setLoading(false);\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (files?.length > 0) {\r\n let img = files[imageIndex];\r\n if (!!img && !!rotations[img.id]?.img) {\r\n img.fileUrl = rotations[img.id].img;\r\n }\r\n setImage(img);\r\n setHash(Date.now());\r\n } else {\r\n setImage(null);\r\n }\r\n // eslint-disable-next-line\r\n }, [imageIndex]);\r\n\r\n const galleryNavigate = dir => {\r\n let index = imageIndex;\r\n const length = files.length;\r\n\r\n if (index === length - 1 && dir === 1) {\r\n // Go to beginning\r\n index = 0;\r\n } else if (index === 0 && dir === -1) {\r\n // Go to last\r\n index = length - 1;\r\n } else {\r\n index += dir;\r\n }\r\n\r\n setImageIndex(index);\r\n };\r\n\r\n const onDelete = fileId => {\r\n setShowConfirm(false);\r\n if (props.onDelete) {\r\n props.onDelete(fileId);\r\n }\r\n };\r\n\r\n const onSaveFileInfos = () => {\r\n setSaving(true);\r\n\r\n const onSaveCallback = () => {\r\n setSaving(false);\r\n toast.success(i18next.t(21279));\r\n };\r\n\r\n const errorCallback = () => {\r\n toast.error(i18next.t(212));\r\n };\r\n\r\n onUpdateFileInfos(onSaveCallback, errorCallback);\r\n };\r\n\r\n const onUpdateFileInfos = (callback, errorCallback) => {\r\n const items = files.map(file => {\r\n const id = file.id;\r\n\r\n let tmpFile = {\r\n ...file,\r\n };\r\n\r\n if (fileInfos[id]) {\r\n tmpFile = {\r\n ...tmpFile,\r\n ...fileInfos[id],\r\n };\r\n }\r\n\r\n return {\r\n file: tmpFile,\r\n rotation: rotations[id]?.r ?? 0,\r\n };\r\n });\r\n\r\n let dataObj = items.map(x => {\r\n return { ...x.file, cached: true };\r\n });\r\n\r\n props.handleInfoBulk(dataObj);\r\n\r\n props\r\n .bulkFileInfoUpdate({ items })\r\n .then(() => {\r\n if (callback) {\r\n callback();\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n\r\n if (errorCallback) {\r\n errorCallback();\r\n }\r\n });\r\n };\r\n\r\n const onRotate = () => {\r\n let updatedRotations = {\r\n ...rotations,\r\n };\r\n if (!updatedRotations[currentImage.id]?.r) {\r\n updatedRotations[currentImage.id] = {\r\n r: 90,\r\n };\r\n } else {\r\n let degrees = updatedRotations[currentImage.id].r;\r\n degrees += 90;\r\n if (degrees > 270) {\r\n degrees = 0;\r\n }\r\n\r\n updatedRotations[currentImage.id].r = degrees;\r\n }\r\n\r\n const tmpImage = files.find(x => x.id === currentImage.id);\r\n getImageRotated(\r\n tmpImage,\r\n updatedRotations[currentImage.id].r,\r\n (img, height, width) => {\r\n updatedRotations[currentImage.id].img = img;\r\n setRotations(updatedRotations);\r\n\r\n let updatedInfos = { ...fileInfos };\r\n let info = updatedInfos[currentImage.id];\r\n if (!info) {\r\n updatedInfos[currentImage.id] = {\r\n ...updatedInfos[currentImage.id],\r\n fileUrl: img,\r\n height,\r\n width,\r\n };\r\n } else {\r\n updatedInfos[currentImage.id] = {\r\n ...currentImage,\r\n fileUrl: img,\r\n height,\r\n width,\r\n };\r\n }\r\n\r\n setFileInfos(updatedInfos);\r\n setImage({ ...currentImage, fileUrl: img, height, width });\r\n },\r\n );\r\n };\r\n\r\n const downloadImageAction = () => {\r\n fetch(currentImage.fileUrl)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n const imageUrl = URL.createObjectURL(blob);\r\n const tag = document.createElement('a');\r\n\r\n tag.download = currentImage.fileName;\r\n tag.href = imageUrl;\r\n\r\n document.body.appendChild(tag);\r\n tag.click();\r\n document.body.removeChild(tag);\r\n });\r\n };\r\n\r\n const onChangeFileInfo = e => {\r\n let updatedInfos = { ...fileInfos };\r\n\r\n let info = updatedInfos[currentImage.id];\r\n if (!info) {\r\n updatedInfos[currentImage.id] = {\r\n [e.target.name]: e.target.value,\r\n };\r\n } else {\r\n updatedInfos[currentImage.id][e.target.name] = e.target.value;\r\n }\r\n\r\n setFileInfos(updatedInfos);\r\n };\r\n\r\n const toggleConfirmDelete = () => {\r\n setShowConfirm(!showConfirm);\r\n };\r\n\r\n const renderImageActions = () => {\r\n return (\r\n
\r\n {!disabled && (\r\n //\r\n \r\n //
\r\n )}\r\n {/*
*/}\r\n {props.onDelete && !disabled && (\r\n \r\n {i18next.t(147)}\r\n \r\n )}\r\n \r\n {i18next.t(3242)}\r\n \r\n {!disabled && (\r\n {\r\n onSaveFileInfos();\r\n }}\r\n >\r\n {i18next.t(1180)}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n const onContentClick = e => {\r\n e.stopPropagation();\r\n };\r\n\r\n const renderContent = () => {\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n let tmpFileDescription = currentImage?.fileDescription;\r\n if (!!currentImage) {\r\n if (fileInfos[currentImage.id]) {\r\n tmpFileDescription = fileInfos[currentImage.id].fileDescription;\r\n }\r\n }\r\n\r\n return (\r\n \r\n {/* Description input */}\r\n {currentImage.documentType !== 3 && (\r\n
\r\n {/* */}\r\n \r\n {!disabled && (\r\n \r\n {i18next.t(4002)}:{' '}\r\n {tmpFileDescription ? tmpFileDescription.length : 0}/{maxLength}\r\n \r\n )}\r\n
\r\n )}\r\n
\r\n
\r\n {!isMobile && (\r\n \r\n \r\n
galleryNavigate(-1)}>\r\n \r\n
\r\n
galleryNavigate(1)}>\r\n \r\n
\r\n
\r\n )}\r\n {isMobile && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n );\r\n };\r\n\r\n const getModalTitle = () => {\r\n let title = null;\r\n\r\n if (disabled || !marking) {\r\n title = renderImageActions();\r\n }\r\n\r\n return title;\r\n };\r\n\r\n let contentClasses = 'imgViewer__content';\r\n if (marking) {\r\n contentClasses += ' marking';\r\n }\r\n\r\n if (!show) {\r\n return null;\r\n }\r\n\r\n if (!disabled && marking) {\r\n return ReactDOM.createPortal(\r\n
\r\n
\r\n \r\n\r\n onDelete(currentImage.id)}\r\n cancelFunc={toggleConfirmDelete}\r\n />\r\n
\r\n
,\r\n document.getElementById('modals'),\r\n );\r\n }\r\n\r\n return (\r\n \r\n {(disabled || !marking) && (\r\n \r\n {renderContent()}\r\n \r\n )}\r\n onDelete(currentImage.id)}\r\n cancelFunc={toggleConfirmDelete}\r\n />\r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ cases }) {\r\n return {\r\n galleryImages: cases.caseImages,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, { bulkFileInfoUpdate })(ImgViewerModal);\r\n","import React from 'react';\r\nimport {\r\n Circle as Circ,\r\n Rect,\r\n Transformer,\r\n Group,\r\n Line,\r\n Text,\r\n} from 'react-konva';\r\nimport { MARKING_TYPE } from '../../redux/constants';\r\nimport { splitArrayIntoChunks } from '../../utils/common';\r\n\r\nexport const Circle = props => {\r\n const shapeRefOuter = React.useRef();\r\n const shapeRefInner = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRefOuter.current, shapeRefInner.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n const getText = () => {\r\n if (props.text?.trim().length > 0) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n const onMouseEnter = e => {\r\n // style stage container:\r\n const container = e.target.getStage().container();\r\n container.style.cursor = 'pointer';\r\n };\r\n\r\n const onMouseLeave = e => {\r\n const container = e.target.getStage().container();\r\n container.style.cursor = 'default';\r\n };\r\n\r\n let extraProps = {};\r\n if (props.clickable) {\r\n extraProps = {\r\n onMouseEnter,\r\n onMouseLeave,\r\n };\r\n }\r\n\r\n return (\r\n \r\n \r\n {\r\n const node = shapeRefOuter.current;\r\n const scale = node.scale().x;\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Circle,\r\n r: Math.floor(node.radius() * scale),\r\n });\r\n }}\r\n />\r\n {\r\n const node = shapeRefInner.current;\r\n const scale = node.scale().x;\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Circle,\r\n r: Math.floor(node.radius() * scale),\r\n });\r\n }}\r\n />\r\n {getText()}\r\n \r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const Polygon = props => {\r\n const shapeRef = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n const getText = pos => {\r\n if (props.text?.trim().length > 0) {\r\n return ;\r\n }\r\n return null;\r\n };\r\n\r\n const findPolygonCenter = vertices => {\r\n const len = vertices.length;\r\n const x_coords = vertices.map(x => x[0]);\r\n const y_coords = vertices.map(y => y[1]);\r\n\r\n const xCenter = x_coords.reduce((sum, x) => sum + x, 0) / len;\r\n const yCenter = y_coords.reduce((sum, y) => sum + y, 0) / len;\r\n\r\n return { x: xCenter, y: yCenter };\r\n };\r\n\r\n let displayId;\r\n if (props.points?.length > 1) {\r\n const vertices = splitArrayIntoChunks(props.points, 2);\r\n const pos = findPolygonCenter(vertices);\r\n\r\n displayId = getText(pos);\r\n }\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRef.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n const onMouseEnter = e => {\r\n // style stage container:\r\n const container = e.target.getStage().container();\r\n container.style.cursor = 'pointer';\r\n };\r\n\r\n const onMouseLeave = e => {\r\n const container = e.target.getStage().container();\r\n container.style.cursor = 'default';\r\n };\r\n\r\n let extraProps = {};\r\n if (props.clickable) {\r\n extraProps = {\r\n onMouseEnter,\r\n onMouseLeave,\r\n };\r\n }\r\n\r\n return (\r\n \r\n \r\n {displayId}\r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const Rectangle = props => {\r\n const shapeRef = React.useRef();\r\n const trRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n if (props.isSelected) {\r\n // we need to attach transformer manually\r\n trRef.current.nodes([shapeRef.current]);\r\n trRef.current.getLayer().batchDraw();\r\n }\r\n }, [props.isSelected]);\r\n\r\n return (\r\n \r\n {\r\n // transformer is changing scale of the node\r\n // and NOT its width or height\r\n // but in the store we have only width and height\r\n // to match the data better we will reset scale on transform end\r\n const node = shapeRef.current;\r\n const scaleX = node.scaleX();\r\n const scaleY = node.scaleY();\r\n\r\n // we will reset it back\r\n node.scaleX(1);\r\n node.scaleY(1);\r\n props.onChange({\r\n type: MARKING_TYPE.Square,\r\n x: node.x(),\r\n y: node.y(),\r\n // set minimal value\r\n width: Math.max(node.width() * scaleX),\r\n height: Math.max(node.height() * scaleY),\r\n });\r\n }}\r\n />\r\n {props.isSelected && (\r\n {\r\n // limit resize\r\n if (newBox.width < 5 || newBox.height < 5) {\r\n return oldBox;\r\n }\r\n return newBox;\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport i18next from '../../i18n';\r\nimport { Button, Spinner } from 'reactstrap';\r\nimport { Layer, Stage } from 'react-konva';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { connect } from 'react-redux';\r\nimport { Circle, Polygon } from './KonvaForms';\r\nimport { IconLock, IconCheckmarkAlt } from '../../assets/icons_v2';\r\n\r\n// Actions\r\nimport {\r\n updateReferenceInfo,\r\n setSaveAllowedState,\r\n} from '../../redux/actions/markings';\r\n\r\n// Util\r\nimport { getMarkingSizeByLadder } from '../../utils/imageMarkingUtils';\r\nimport { MARKING_TYPE } from '../../redux/constants';\r\nimport {\r\n createMarkingObjectsFromReferences,\r\n createUploadMarkingReferenceRequestObj,\r\n} from '../../utils/componentUtils';\r\nimport toast from '../../utils/toast';\r\n\r\n// Components\r\nimport ConfirmModal from '../Custom/ConfirmModal';\r\nimport Typography from '../Typography';\r\n\r\nconst KonvaEditor = props => {\r\n const { currentFile, isSaving, control, disabled, schema, prefixId } = props;\r\n const { currentRefs, recentUploads } = props.markings;\r\n const initialGuid = uuidv4();\r\n\r\n const [imageLoaded, setImageLoaded] = useState(false);\r\n const [imgDimensions, setImgDimensions] = useState({\r\n width: 0,\r\n height: 0,\r\n naturalWidth: 0,\r\n naturalHeight: 0,\r\n r: 0,\r\n });\r\n const [markings, setMarkings] = useState([]);\r\n const [groups, setGroups] = useState([]);\r\n const [currentMarking, setCurrentMarking] = useState(null);\r\n const [currentGroupId, setCurrentGroupId] = useState(null);\r\n const [showConfirmDelete, setShowConfirmDelete] = useState(false);\r\n const [imageHash] = useState(Date.now());\r\n const [saveCallback, setSaveCallback] = useState(false);\r\n\r\n const [imgGuids, setImgGuids] = useState({});\r\n const [guids, setGuids] = useState([]);\r\n const [currentGuid, setCurrentGuid] = useState(initialGuid);\r\n const [bindings, setBindings] = useState({\r\n [initialGuid]: {\r\n refIds: [],\r\n index: 1,\r\n displayId: `${prefixId + 1}.1`,\r\n },\r\n });\r\n\r\n const imgRef = useRef(null);\r\n\r\n // markings: [\r\n // {\r\n // id: 1,\r\n // groupId: 1,\r\n // x: 40,\r\n // y: 40,\r\n // width: 10,\r\n // height: 10,\r\n // shape: MARKING_TYPE.Square,\r\n // r: 1 // Radius for circle\r\n // filled: false,\r\n // }\r\n // ],\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', handleImageResize);\r\n\r\n return () => window.removeEventListener('resize', handleImageResize);\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!currentRefs && control.files.length > 0) {\r\n if (recentUploads.length > 0) {\r\n const rid = recentUploads.map(x => x.id);\r\n const parsed = control.files.filter(x => rid.includes(x.id));\r\n\r\n if (parsed.length > 0) {\r\n addBulkImageRef(parsed.map(x => x.id));\r\n } else {\r\n addRemoveImageRef(control.files[0].id);\r\n }\r\n } else {\r\n addRemoveImageRef(control.files[0].id);\r\n }\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!currentRefs && imageLoaded && !isSaving) {\r\n const result = createMarkingObjectsFromReferences(\r\n props.currentFile,\r\n imgDimensions,\r\n currentRefs,\r\n initialGuid,\r\n `${prefixId + 1}.`,\r\n );\r\n\r\n setMarkings(result.markings);\r\n setGroups(result.groups);\r\n setImgGuids(result.imgGuids);\r\n setGuids(result.guids);\r\n setBindings(result.bindings);\r\n setCurrentMarking(result.currentMarking);\r\n setCurrentGroupId(result.currentGroupId);\r\n setCurrentGuid(result.currentGuid);\r\n setShowConfirmDelete(false);\r\n\r\n selectFirstUnUsedImage(\r\n result.currentGuid,\r\n result.imgGuids,\r\n result.bindings,\r\n );\r\n }\r\n // eslint-disable-next-line\r\n }, [currentRefs, imageLoaded, isSaving]);\r\n\r\n useEffect(() => {\r\n const tmpBindings = createUploadMarkingReferenceRequestObj(\r\n currentFile.id,\r\n control.id,\r\n markings,\r\n bindings,\r\n );\r\n\r\n const tmpMarkings = {\r\n fileId: currentFile.id,\r\n schemaId: schema.id,\r\n controlId: control.id,\r\n markings,\r\n groups,\r\n };\r\n\r\n props.updateReferenceInfo({\r\n bindings: tmpBindings,\r\n markings: tmpMarkings,\r\n });\r\n\r\n refreshSaveState();\r\n\r\n if (saveCallback) {\r\n setSaveCallback(false);\r\n props.onSaveMarkings({\r\n bindings: tmpBindings,\r\n markings: tmpMarkings,\r\n });\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, [bindings, markings]);\r\n\r\n const refreshSaveState = () => {\r\n let val = false;\r\n\r\n for (let i = 0; i < control.files.length; i++) {\r\n const img = control.files[i];\r\n val = !!imgGuids[img.id];\r\n if (!val) {\r\n break;\r\n }\r\n }\r\n\r\n props.setSaveAllowedState(val);\r\n };\r\n\r\n const selectFirstUnUsedImage = (guid, guids, binds) => {\r\n let updatedBindings = { ...binds };\r\n let updatedGuids = { ...guids };\r\n let updatedRefs = updatedBindings[guid].refIds;\r\n\r\n for (let i = 0; i < control.files.length; i++) {\r\n const img = control.files[i];\r\n const id = img.id;\r\n\r\n if (!guids[id]) {\r\n updatedRefs.push(id);\r\n if (!updatedGuids[id]) {\r\n updatedGuids[id] = guid;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n updatedBindings[guid].refIds = updatedRefs;\r\n setBindings(updatedBindings);\r\n setImgGuids(updatedGuids);\r\n };\r\n\r\n const toggleConfirmDeleteModal = () => {\r\n setShowConfirmDelete(!showConfirmDelete);\r\n };\r\n\r\n const handleOnSave = () => {\r\n let valid = true;\r\n // check for missing bindings between markings and image ids\r\n const keys = Object.keys(bindings);\r\n for (let i = 0; i < keys.length; i++) {\r\n const binding = bindings[keys[i]];\r\n\r\n valid = binding.refIds.length > 0;\r\n if (!valid) break;\r\n }\r\n\r\n //\r\n if (valid) {\r\n setSaveCallback(true);\r\n connectGroup();\r\n } else {\r\n toast.warning(i18next.t(21274));\r\n }\r\n };\r\n\r\n //////////////// Marking methods ////////////////\r\n\r\n const isCurrentMarking = marking => {\r\n if (currentMarking === null) return false;\r\n return currentMarking === marking.id;\r\n };\r\n\r\n const getMarkingObj = (shape = MARKING_TYPE.Circle, currentGroupId) => {\r\n const radius = getMarkingSizeByLadder(props.currentFile);\r\n return {\r\n id: '_' + Math.random() * 1000, // Random id for handling\r\n groupId: currentGroupId ? currentGroupId : '_' + Math.random() * 1000,\r\n x: 20,\r\n y: 20,\r\n width: 20,\r\n height: 20,\r\n shape,\r\n r: radius,\r\n dimensions: imgDimensions,\r\n filled: false,\r\n hidden: false,\r\n guid: currentGuid,\r\n index: guids.length + 1,\r\n };\r\n };\r\n\r\n const onClickImage = e => {\r\n if (disabled) return;\r\n var x = e.evt.layerX; //x position within the element.\r\n var y = e.evt.layerY; //y position within the element.\r\n // console.log({ x, y });\r\n\r\n addMarking(MARKING_TYPE.Circle, { x, y });\r\n };\r\n\r\n const connectGroup = () => {\r\n if (!currentGroupId) return;\r\n\r\n let updatedGroups = groups.slice();\r\n const group = markings.filter(x => x.groupId === currentGroupId);\r\n\r\n const updatedMarkings = markings.map(x => {\r\n return {\r\n ...x,\r\n hidden: x.groupId === currentGroupId || x.hidden,\r\n };\r\n });\r\n\r\n if (group?.length > 0) {\r\n updatedGroups.push(group);\r\n }\r\n\r\n let updateGuid = uuidv4();\r\n let updatedBindings = {\r\n ...bindings,\r\n [updateGuid]: {\r\n refIds: [],\r\n index: guids.length + 2,\r\n isGroup: false,\r\n displayId: `${prefixId + 1}.${guids.length + 2}`,\r\n },\r\n };\r\n\r\n updatedBindings[currentGuid].isGroup = true;\r\n\r\n setCurrentMarking(null);\r\n setCurrentGroupId(null);\r\n setGroups(updatedGroups);\r\n setMarkings(updatedMarkings);\r\n setGuids([...guids, currentGuid]);\r\n setCurrentGuid(updateGuid);\r\n setBindings(updatedBindings);\r\n };\r\n\r\n const addMarking = (shape = MARKING_TYPE.Circle, pos) => {\r\n let newMarking = getMarkingObj(shape, currentGroupId);\r\n\r\n newMarking.x = imgDimensions.width / 2;\r\n newMarking.y = imgDimensions.height / 2;\r\n\r\n if (pos) {\r\n newMarking.x = pos.x;\r\n newMarking.y = pos.y;\r\n }\r\n\r\n if (shape === MARKING_TYPE.Circle) {\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n\r\n newMarking.x /= scaling;\r\n newMarking.y /= scaling;\r\n }\r\n\r\n const tmpMarkings = [...markings, newMarking];\r\n const tmpCurrentMarking = newMarking.id;\r\n\r\n setMarkings(tmpMarkings);\r\n setCurrentMarking(tmpCurrentMarking);\r\n\r\n if (!currentGroupId) {\r\n setCurrentGroupId(newMarking.groupId);\r\n }\r\n };\r\n\r\n const removeMarking = () => {\r\n if (markings.length === 0) return;\r\n\r\n // Create update variables\r\n let updatedMarkings = markings.slice();\r\n let updatedGroups = groups.slice();\r\n let updatedMarking = currentMarking;\r\n let updatedGuids = [...guids];\r\n let prevGuid = currentGuid;\r\n let updatedBindings = { ...bindings };\r\n let updatedImgGuids = { ...imgGuids };\r\n\r\n // States we can have:\r\n // 1. Only markings, no polygons (groups)\r\n // 2. No markings, only polygons (groups)\r\n // 3. Markings and polygons (groups)\r\n\r\n // console.log('remove-state - ', {\r\n // '1': !!updatedMarking && updatedGroups.length === 0,\r\n // '2': !updatedMarking && updatedGroups.length > 0,\r\n // '3': !!updatedMarking && updatedGroups.length > 0,\r\n // });\r\n\r\n // 1. Only markings, no polygons (groups)\r\n if (!!updatedMarking && updatedGroups.length === 0) {\r\n if (updatedMarkings.length > 0) {\r\n updatedMarkings = updatedMarkings.slice(0, updatedMarkings.length - 1);\r\n updatedMarking = updatedMarkings[updatedMarkings.length - 1];\r\n } else {\r\n updatedMarking = null;\r\n }\r\n }\r\n // 2. No markings, only polygons (groups)\r\n else if (!updatedMarking && updatedGroups.length > 0) {\r\n // Find marking to determine and find inner state\r\n updatedMarking = updatedMarkings[updatedMarkings.length - 1];\r\n\r\n // update markings\r\n updatedMarkings = updatedMarkings.map(x => {\r\n if (x.hidden && x.groupId === updatedMarking.groupId) {\r\n x.hidden = false;\r\n }\r\n return x;\r\n });\r\n\r\n const activeGroupIndex = updatedGroups.findIndex(\r\n x => !!x.find(y => y.groupId === updatedMarking.groupId),\r\n );\r\n updatedGroups = updatedGroups.filter((x, i) => i !== activeGroupIndex);\r\n\r\n // Update binding information\r\n prevGuid = guids[guids.length - 1];\r\n updatedGuids.pop();\r\n delete updatedBindings[currentGuid];\r\n updatedBindings[prevGuid].isGroup = false;\r\n\r\n Object.keys(updatedImgGuids).forEach(x => {\r\n if (updatedImgGuids[x] === currentGuid) {\r\n delete updatedImgGuids[x];\r\n }\r\n });\r\n }\r\n // 3. Markings and polygons (groups)\r\n else if (!!updatedMarking && updatedGroups.length > 0) {\r\n updatedMarkings = updatedMarkings.slice(0, updatedMarkings.length - 1);\r\n updatedMarking = updatedMarkings[updatedMarkings.length - 1];\r\n\r\n if (updatedMarking.hidden) {\r\n updatedMarking = null;\r\n }\r\n }\r\n\r\n // Update variable states\r\n setMarkings(updatedMarkings);\r\n setGroups(updatedGroups);\r\n setCurrentMarking(updatedMarking ? updatedMarking.id : null);\r\n setCurrentGroupId(updatedMarking ? updatedMarking.groupId : null);\r\n setShowConfirmDelete(false);\r\n setCurrentGuid(prevGuid);\r\n setGuids(updatedGuids);\r\n setBindings(updatedBindings);\r\n setImgGuids(updatedImgGuids);\r\n };\r\n\r\n //////////////// Image Processing ////////////////\r\n\r\n const handleImageResize = () => {\r\n const img = imgRef.current;\r\n\r\n const tmpImgDimensions = {\r\n width: img.width,\r\n height: img.height,\r\n naturalWidth: img.naturalWidth,\r\n naturalHeight: img.naturalHeight,\r\n loaded: true,\r\n };\r\n\r\n setImgDimensions(tmpImgDimensions);\r\n setImageLoaded(true);\r\n };\r\n\r\n const renderImage = () => {\r\n let hash = imageHash;\r\n if (isSaving) {\r\n hash += new Date();\r\n }\r\n\r\n let classNames = 'imgMarker__img';\r\n if (imgDimensions.loaded) {\r\n classNames += ' absolute';\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const addRemoveImageRef = id => {\r\n // Update bindings\r\n let updatedBindings = { ...bindings };\r\n let updatedGuids = { ...imgGuids };\r\n\r\n let updatedRefs = updatedBindings[currentGuid].refIds;\r\n\r\n // console.log(id, currentGuid, updatedBindings, updatedGuids);\r\n\r\n if (updatedRefs.find(x => x === id)) {\r\n updatedRefs = updatedRefs.filter(x => x !== id);\r\n\r\n if (updatedGuids[id] === currentGuid) {\r\n delete updatedGuids[id];\r\n }\r\n } else {\r\n updatedRefs.push(id);\r\n\r\n if (!updatedGuids[id]) {\r\n updatedGuids[id] = currentGuid;\r\n }\r\n }\r\n\r\n updatedBindings[currentGuid].refIds = updatedRefs;\r\n\r\n // State methods\r\n setBindings(updatedBindings);\r\n setImgGuids(updatedGuids);\r\n };\r\n\r\n const addBulkImageRef = ids => {\r\n // Update bindings\r\n let updatedBindings = { ...bindings };\r\n let updatedGuids = { ...imgGuids };\r\n\r\n let updatedRefs = updatedBindings[currentGuid].refIds;\r\n updatedRefs.push(...ids);\r\n\r\n ids.forEach(id => {\r\n if (!updatedGuids[id]) {\r\n updatedGuids[id] = currentGuid;\r\n }\r\n });\r\n\r\n updatedBindings[currentGuid].refIds = updatedRefs;\r\n\r\n // State methods\r\n setBindings(updatedBindings);\r\n setImgGuids(updatedGuids);\r\n };\r\n\r\n //////////////// Markings Processing ////////////////\r\n\r\n const renderMarking = (marking, key) => {\r\n if (marking.hidden) return null;\r\n const isCurrent = isCurrentMarking(marking);\r\n const displayId = bindings[marking.guid]?.displayId ?? null;\r\n\r\n const calcCoord = (a, b, pos) => {\r\n return (a / b) * pos;\r\n };\r\n // const calcDimen = (imgLength, percent) => {\r\n // return imgLength * (percent / 100);\r\n // };\r\n const calcDimen2 = (newLength, originalLength) => {\r\n return (100 * newLength) / originalLength;\r\n };\r\n const calRadius = (r, viewHeight) => {\r\n const scaling = viewHeight / imgDimensions.naturalHeight;\r\n // console.log(\r\n // `r: ${r} - Scaling: ${r *\r\n // scaling} - Height: ${viewHeight} - ActualHeight: ${\r\n // imgDimensions.naturalHeight\r\n // }`,\r\n // );\r\n return r * scaling;\r\n };\r\n\r\n const selectMarking = () => {\r\n setCurrentMarking(marking.id);\r\n };\r\n\r\n const updateXY = e => {\r\n let updatedMarkings = markings.slice();\r\n\r\n const index = updatedMarkings.findIndex(x => x.id === marking.id);\r\n updatedMarkings[index].x = calcCoord(\r\n imgDimensions.naturalWidth,\r\n imgDimensions.width,\r\n e.target.x(),\r\n );\r\n updatedMarkings[index].y = calcCoord(\r\n imgDimensions.naturalHeight,\r\n imgDimensions.height,\r\n e.target.y(),\r\n );\r\n\r\n setMarkings(updatedMarkings);\r\n };\r\n\r\n const onTransform = e => {\r\n let updatedMarkings = markings.slice();\r\n const index = updatedMarkings.findIndex(x => x.id === marking.id);\r\n\r\n updatedMarkings[index].x = calcCoord(\r\n imgDimensions.naturalWidth,\r\n imgDimensions.width,\r\n e.x,\r\n );\r\n updatedMarkings[index].y = calcCoord(\r\n imgDimensions.naturalHeight,\r\n imgDimensions.height,\r\n e.y,\r\n );\r\n\r\n if (e.type === MARKING_TYPE.Square) {\r\n updatedMarkings[index].width = calcDimen2(e.width, imgDimensions.width);\r\n updatedMarkings[index].height = calcDimen2(\r\n e.height,\r\n imgDimensions.height,\r\n );\r\n } else if (e.type === MARKING_TYPE.Circle) {\r\n // console.log(e, updatedMarkings[index].r);\r\n\r\n updatedMarkings[index].r = e.r;\r\n }\r\n\r\n setMarkings(updatedMarkings);\r\n };\r\n\r\n // let width = calcDimen(imgDimensions.width, marking.width);\r\n // let height = calcDimen(imgDimensions.height, marking.height);\r\n let r = calRadius(marking.r, imgDimensions.height);\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const renderGroup = (group, index) => {\r\n if (group.length === 1) {\r\n return renderMarking(group[0], index);\r\n }\r\n if (group.length === 2) {\r\n return (\r\n <>\r\n {renderMarking(group[0], 'a-' + index)}\r\n {renderMarking(group[1], 'b-' + index)}\r\n \r\n );\r\n }\r\n\r\n let displayId;\r\n if (group.length > 0) {\r\n displayId = bindings[group[0].guid]?.displayId ?? null;\r\n }\r\n\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n const coordinates = [];\r\n\r\n group.forEach(marking => {\r\n coordinates.push(marking.x * scaling);\r\n coordinates.push(marking.y * scaling);\r\n });\r\n\r\n const selectMarking = () => {\r\n console.log(group);\r\n // setCurrentMarking(group[0].id);\r\n };\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n //////////////// RENDER ////////////////\r\n\r\n const renderContainer = () => {\r\n return (\r\n
\r\n {renderImage()}\r\n \r\n \r\n {markings.map(renderMarking)}\r\n {groups.map(renderGroup)}\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n const renderMiniGallery = () => {\r\n const renderThumb = (img, index) => {\r\n const found = imgGuids[img.id];\r\n\r\n let displayId;\r\n let displayIdClass = '';\r\n let active = true;\r\n let icon;\r\n if (!!found) {\r\n displayId = bindings[found]?.displayId ?? null;\r\n active = found === currentGuid && !disabled;\r\n\r\n if (displayId?.trim().length > 0) {\r\n displayIdClass = ' did';\r\n }\r\n\r\n if (active) {\r\n icon = ;\r\n displayId = null;\r\n } else if (!active && displayId) {\r\n icon = ;\r\n }\r\n }\r\n\r\n const action = active ? () => addRemoveImageRef(img.id) : null;\r\n\r\n return (\r\n \r\n reference\r\n {!active && displayId && (\r\n
{displayId}
\r\n )}\r\n {icon &&
{icon}
}\r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n {i18next.t(21261)}\r\n
{control.files.map(renderThumb)}
\r\n
\r\n );\r\n };\r\n\r\n const renderActions = () => {\r\n const mlen = markings?.filter(x => !x.hidden);\r\n return (\r\n
\r\n \r\n {i18next.t(21262)}\r\n \r\n
\r\n addMarking()}\r\n disabled={isSaving || disabled}\r\n >\r\n {i18next.t(6417)}\r\n \r\n \r\n {i18next.t(7069)}\r\n \r\n \r\n {i18next.t(1243)}\r\n \r\n \r\n {i18next.t(148)}\r\n \r\n {props.isSaving && }\r\n
\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {renderMiniGallery()}\r\n {renderActions()}\r\n {renderContainer()}\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ markings }) {\r\n return {\r\n markings,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n updateReferenceInfo,\r\n setSaveAllowedState,\r\n})(KonvaEditor);\r\n","import React from 'react';\r\nimport i18next from '../../i18n';\r\nimport { connect } from 'react-redux';\r\nimport { FormText } from 'reactstrap';\r\nimport { MdKeyboardArrowLeft, MdKeyboardArrowRight } from 'react-icons/md';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\n\r\n// Componenets\r\nimport TextInput from '../Custom/Forms/TextInput';\r\nimport KonvaEditor from './KonvaEditor';\r\n\r\nconst MarkingView = props => {\r\n const {\r\n areaImage,\r\n disabled,\r\n control,\r\n schema,\r\n saveMarkings,\r\n saveReferences,\r\n currentImage,\r\n galleryNavigate,\r\n onChangeFileInfo,\r\n } = props;\r\n const allowedTypes = [\r\n SB_CONTROL_TYPE.PhotoDocumentation,\r\n SB_CONTROL_TYPE.TextPhotos,\r\n SB_CONTROL_TYPE.DropdownCommentPhotos,\r\n ];\r\n const prefixId = schema.rawControlItems\r\n .filter(x => allowedTypes.includes(x.controlType))\r\n .findIndex(x => x.id === control.id);\r\n\r\n const renderLeft = () => {\r\n if (!currentImage) {\r\n return (\r\n
\r\n {i18next.t(1233)}\r\n
\r\n );\r\n }\r\n\r\n return renderImage();\r\n };\r\n\r\n const renderImage = () => {\r\n return (\r\n
\r\n \r\n\r\n
\r\n reference\r\n
galleryNavigate(-1)}>\r\n \r\n
\r\n
galleryNavigate(1)}>\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderRight = () => {\r\n if (!areaImage) {\r\n return
{i18next.t(99999)}
;\r\n }\r\n\r\n return renderKonvaEditor();\r\n };\r\n\r\n const renderKonvaEditor = () => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {!isMobile && (\r\n <>\r\n
{renderLeft()}
\r\n
\r\n \r\n )}\r\n
{renderRight()}
\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ cases }) {\r\n return {\r\n gallery: cases.caseImages,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(MarkingView);\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport { Layer, Stage } from 'react-konva';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { connect } from 'react-redux';\r\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Actions\r\nimport { updateReferenceInfo } from '../../redux/actions/markings';\r\n\r\n// Util\r\nimport { createMarkingObjectsFromReferences } from '../../utils/componentUtils';\r\n\r\n// Components\r\nimport { Circle, Polygon } from './KonvaForms';\r\n\r\nconst KonvaView = props => {\r\n const { currentFile, isSaving, currentRefs } = props;\r\n const [imageLoaded, setImageLoaded] = useState(false);\r\n const [imgDimensions, setImgDimensions] = useState({\r\n width: 0,\r\n height: 0,\r\n naturalWidth: 0,\r\n naturalHeight: 0,\r\n r: 0,\r\n });\r\n const [markings, setMarkings] = useState([]);\r\n const [groups, setGroups] = useState([]);\r\n const [imageHash] = useState(Date.now());\r\n\r\n const [bindings, setBindings] = useState({});\r\n\r\n const imgRef = useRef(null);\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', handleImageResize);\r\n\r\n return () => window.removeEventListener('resize', handleImageResize);\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n let tmpMarkings = [];\r\n let tmpGroups = [];\r\n let tmpBindings = {};\r\n if (!!currentRefs && imageLoaded) {\r\n currentRefs.forEach(ref => {\r\n const result = createMarkingObjectsFromReferences(\r\n currentFile,\r\n imgDimensions,\r\n ref,\r\n uuidv4(),\r\n `${ref._overrideIndex}.`,\r\n );\r\n\r\n tmpMarkings = [...tmpMarkings, ...result.markings];\r\n tmpGroups = [...tmpGroups, ...result.groups];\r\n tmpBindings = { ...tmpBindings, ...result.bindings };\r\n });\r\n\r\n // console.log(result);\r\n }\r\n setMarkings(tmpMarkings);\r\n setGroups(tmpGroups);\r\n setBindings(tmpBindings);\r\n\r\n // eslint-disable-next-line\r\n }, [currentRefs, imageLoaded]);\r\n\r\n //////////////// Image Processing ////////////////\r\n\r\n const handleImageResize = () => {\r\n const img = imgRef.current;\r\n\r\n const tmpImgDimensions = {\r\n width: img.width,\r\n height: img.height,\r\n naturalWidth: img.naturalWidth,\r\n naturalHeight: img.naturalHeight,\r\n loaded: true,\r\n };\r\n\r\n setImgDimensions(tmpImgDimensions);\r\n setImageLoaded(true);\r\n };\r\n\r\n const renderImage = () => {\r\n let hash = imageHash;\r\n if (isSaving) {\r\n hash += new Date();\r\n }\r\n\r\n let classNames = 'imgMarker__img';\r\n if (imgDimensions.loaded) {\r\n classNames += ' absolute';\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n //////////////// Markings Processing ////////////////\r\n\r\n const renderMarking = (marking, key) => {\r\n if (marking.hidden) return null;\r\n const displayId = bindings[marking.guid]?.displayId ?? null;\r\n\r\n // const calcDimen = (imgLength, percent) => {\r\n // return imgLength * (percent / 100);\r\n // };\r\n\r\n const calRadius = (r, viewHeight) => {\r\n const scaling = viewHeight / imgDimensions.naturalHeight;\r\n // console.log(\r\n // `r: ${r} - Scaling: ${r *\r\n // scaling} - Height: ${viewHeight} - ActualHeight: ${\r\n // imgDimensions.naturalHeight\r\n // }`,\r\n // );\r\n return r * scaling;\r\n };\r\n\r\n const selectMarking = () => {\r\n const binding = bindings[marking.guid];\r\n if (binding) {\r\n if (binding.refIds?.length > 0) {\r\n props.onMarkingSelect(binding.refIds[0]);\r\n }\r\n }\r\n };\r\n\r\n // let width = calcDimen(imgDimensions.width, marking.width);\r\n // let height = calcDimen(imgDimensions.height, marking.height);\r\n let r = calRadius(marking.r, imgDimensions.height);\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const renderGroup = (group, index) => {\r\n if (group.length === 1) {\r\n return renderMarking(group[0], index);\r\n }\r\n if (group.length === 2) {\r\n return (\r\n <>\r\n {renderMarking(group[0], 'a-' + index)}\r\n {renderMarking(group[1], 'b-' + index)}\r\n \r\n );\r\n }\r\n\r\n let displayId;\r\n if (group.length > 0) {\r\n displayId = bindings[group[0].guid]?.displayId ?? null;\r\n }\r\n\r\n const scaling = imgDimensions.height / imgDimensions.naturalHeight;\r\n let strokeWidth = 6 * scaling;\r\n if (strokeWidth < 1) strokeWidth = 1;\r\n\r\n const coordinates = [];\r\n\r\n group.forEach(marking => {\r\n coordinates.push(marking.x * scaling);\r\n coordinates.push(marking.y * scaling);\r\n });\r\n\r\n const selectMarking = () => {\r\n // console.log(group[0], bindings[group[0].guid]);\r\n // setCurrentMarking(group[0].id);\r\n const binding = bindings[group[0].guid];\r\n if (binding) {\r\n if (binding.refIds?.length > 0) {\r\n props.onMarkingSelect(binding.refIds[0]);\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n //////////////// RENDER ////////////////\r\n\r\n const renderContainer = () => {\r\n if (isMobile) {\r\n return (\r\n
\r\n \r\n \r\n {renderImage()}\r\n \r\n \r\n {markings.map(renderMarking)}\r\n {groups.map(renderGroup)}\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n {renderImage()}\r\n \r\n \r\n {markings.map(renderMarking)}\r\n {groups.map(renderGroup)}\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n return
{renderContainer()}
;\r\n};\r\n\r\nfunction mapStateToProps({ markings }) {\r\n return {\r\n markings,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, { updateReferenceInfo })(KonvaView);\r\n","import React, { useState, useEffect } from 'react';\r\nimport i18next from '../../i18n';\r\nimport { connect } from 'react-redux';\r\nimport { FormGroup, Label } from 'reactstrap';\r\nimport { MdKeyboardArrowLeft, MdKeyboardArrowRight } from 'react-icons/md';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { isMobile } from 'react-device-detect';\r\n// import { IconLock } from '../../assets/icons_v2';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { createGalleryObjectsFromReferences } from '../../utils/componentUtils';\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\n\r\n// Componenets\r\nimport TextInput from '../Custom/Forms/TextInput';\r\nimport ReactSelect from '../Custom/ReactSelect';\r\nimport KonvaView from './KonvaView';\r\n\r\nconst AreaView = props => {\r\n const { areaImage, schema, markings } = props;\r\n const { allImageRefs } = markings;\r\n const [filteredControls, setControls] = useState([]);\r\n const [options, setOptions] = useState([]);\r\n const [images, setImages] = useState([]);\r\n const [imageIndex, setImageIndex] = useState(0);\r\n\r\n const [references, setReferences] = useState(null);\r\n const [imgGuids, setImgGuids] = useState({});\r\n const [bindings, setBindings] = useState({});\r\n const allowedTypes = [\r\n SB_CONTROL_TYPE.PhotoDocumentation,\r\n SB_CONTROL_TYPE.TextPhotos,\r\n SB_CONTROL_TYPE.DropdownCommentPhotos,\r\n ];\r\n const controls = schema.rawControlItems.filter(x =>\r\n allowedTypes.includes(x.controlType),\r\n );\r\n\r\n useEffect(() => {\r\n let tmpGuids = {};\r\n let tmpBindings = {};\r\n controls.forEach((item, index) => {\r\n const ref = allImageRefs.find(x => x.controlId === item.id);\r\n\r\n if (!!ref) {\r\n const result = createGalleryObjectsFromReferences(\r\n ref,\r\n uuidv4(),\r\n `${index + 1}.`,\r\n );\r\n\r\n // console.log(result);\r\n\r\n tmpGuids = { ...tmpGuids, ...result.imgGuids };\r\n tmpBindings = { ...tmpBindings, ...result.bindings };\r\n }\r\n });\r\n\r\n setImgGuids(tmpGuids);\r\n setBindings(tmpBindings);\r\n\r\n // eslint-disable-next-line\r\n }, [allImageRefs]);\r\n\r\n useEffect(() => {\r\n let initialOptions = [];\r\n\r\n if (!!schema) {\r\n const allowedTypes = [\r\n SB_CONTROL_TYPE.PhotoDocumentation,\r\n SB_CONTROL_TYPE.TextPhotos,\r\n SB_CONTROL_TYPE.DropdownCommentPhotos,\r\n ];\r\n initialOptions = schema.rawControlItems\r\n .filter(x => allowedTypes.includes(x.controlType))\r\n .map(item => {\r\n const { title, alternativeTitle } = item;\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n return {\r\n value: item.id,\r\n label: tmp,\r\n };\r\n });\r\n }\r\n setControls(initialOptions);\r\n setOptions(initialOptions);\r\n\r\n // eslint-disable-next-line\r\n }, [schema]);\r\n\r\n useEffect(() => {\r\n let initialImages = [];\r\n\r\n if (filteredControls.length > 0) {\r\n const cids = filteredControls.map(x => x.value);\r\n\r\n let refs = [];\r\n controls.forEach((item, idx) => {\r\n if (cids.includes(item.id)) {\r\n const ref = allImageRefs.find(x => x.controlId === item.id);\r\n\r\n if (!!ref) {\r\n refs.push({ ...ref, _overrideIndex: idx + 1 });\r\n }\r\n\r\n initialImages.push(...item.files);\r\n }\r\n });\r\n\r\n setReferences(refs);\r\n } else {\r\n setReferences(null);\r\n }\r\n setImages(initialImages);\r\n\r\n // eslint-disable-next-line\r\n }, [filteredControls]);\r\n\r\n const onMarkingSelect = fileId => {\r\n if (fileId > 0) {\r\n const index = images.findIndex(x => x.id === fileId);\r\n setImageIndex(index);\r\n }\r\n };\r\n\r\n const galleryNavigate = dir => {\r\n let index = imageIndex;\r\n const length = images.length;\r\n\r\n if (index === length - 1 && dir === 1) {\r\n // Go to beginning\r\n index = 0;\r\n } else if (index === 0 && dir === -1) {\r\n // Go to last\r\n index = length - 1;\r\n } else {\r\n index += dir;\r\n }\r\n\r\n setImageIndex(index);\r\n };\r\n\r\n const renderLeft = () => {\r\n let currentImage;\r\n if (images.length > 0 && imageIndex > -1) {\r\n currentImage = images[imageIndex];\r\n }\r\n\r\n if (!currentImage) {\r\n return (\r\n
\r\n
{i18next.t(1233)}
\r\n
\r\n );\r\n }\r\n\r\n return renderImage(currentImage);\r\n };\r\n\r\n const renderImage = currentImage => {\r\n let displayId;\r\n const guid = imgGuids[currentImage.id];\r\n if (!!guid) {\r\n displayId = bindings[guid].displayId;\r\n }\r\n\r\n return (\r\n
\r\n {}}\r\n value={currentImage.fileTitle}\r\n disabled={true}\r\n />\r\n\r\n
\r\n
{displayId}
\r\n reference\r\n
galleryNavigate(-1)}>\r\n \r\n
\r\n
galleryNavigate(1)}>\r\n \r\n
\r\n
\r\n\r\n
\r\n
{renderMiniGallery()}
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderMiniGallery = () => {\r\n const renderThumb = (img, index) => {\r\n const found = imgGuids[img.id];\r\n\r\n let displayId;\r\n let displayIdClass = '';\r\n let icon;\r\n if (!!found) {\r\n displayId = bindings[found]?.displayId ?? null;\r\n\r\n if (displayId?.trim().length > 0) {\r\n displayIdClass = ' did';\r\n // icon = ;\r\n }\r\n }\r\n\r\n const action = () => onMarkingSelect(img.id);\r\n\r\n return (\r\n \r\n reference\r\n {displayId &&
{displayId}
}\r\n {icon &&
{icon}
}\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n
{images.map(renderThumb)}
\r\n
\r\n );\r\n };\r\n\r\n const renderRight = () => {\r\n if (!areaImage) {\r\n return
{i18next.t(1233)}
;\r\n }\r\n\r\n return renderKonvaView();\r\n };\r\n\r\n const renderKonvaView = () => {\r\n const onChangeFilter = val => {\r\n let value = !!val ? val : [];\r\n setControls(value);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {!isMobile && (\r\n <>\r\n
{renderLeft()}
\r\n
\r\n \r\n )}\r\n
{renderRight()}
\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ markings }) {\r\n return {\r\n markings,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(AreaView);\r\n","import React, { useState, useEffect } from 'react';\r\nimport i18next from '../../i18n';\r\nimport { connect } from 'react-redux';\r\nimport { Button } from 'reactstrap';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Actions\r\nimport {\r\n setCurrentReferences,\r\n saveMarkings,\r\n saveReferences,\r\n deleteAreaImageAndReferences,\r\n deleteImageAndReferences,\r\n getAllMarkingReferences,\r\n} from '../../redux/actions/markings';\r\nimport { bulkFileInfoUpdate } from '../../redux/actions/files';\r\nimport { refreshImageHash } from '../../redux/actions/common';\r\nimport { refreshSchemaGroup } from '../../redux/actions/schemas';\r\n\r\n// Utils\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\nimport { truncateString } from '../../utils/common';\r\nimport { getImageRotated } from '../../utils/componentUtils';\r\nimport toast from '../../utils/toast';\r\n\r\n// Componenets\r\nimport CreateModal from '../Custom/CreateModal';\r\nimport MarkingView from './MarkingView';\r\nimport AreaView from './AreaView';\r\nimport PageSpinner from '../PageSpinner';\r\nimport Typography from '../Typography';\r\nimport ConfirmModal from '../Custom/ConfirmModal';\r\n\r\nconst ImageMarking = props => {\r\n const {\r\n schema,\r\n control,\r\n show,\r\n toggle,\r\n disabled,\r\n editor,\r\n setCurrentReferences,\r\n startIndex,\r\n } = props;\r\n const { allImageRefs } = props.markings;\r\n const [areaImage, setAreaImage] = useState(null);\r\n const [isLoading, setLoading] = useState(true);\r\n const [imageIndex, setImageIndex] = useState(!!startIndex ? startIndex : 0);\r\n const [currentImage, setImage] = useState(null);\r\n const [showConfirm, setShowConfirm] = useState(false);\r\n const [showConfirmAreaDelete, setShowConfirmAreaDelete] = useState(false);\r\n const [isSaving, setSaving] = useState(false);\r\n const [refresh, setRefresh] = useState(true);\r\n\r\n // File info and rotation\r\n const [rotations, setRotations] = useState({});\r\n const [fileInfos, setFileInfos] = useState({});\r\n\r\n useEffect(() => {\r\n if (refresh) {\r\n if (!!schema && show) {\r\n const areaControl = schema.controlItems.find(\r\n x => x.controlType === SB_CONTROL_TYPE.PhotoAreaMarking,\r\n );\r\n\r\n const foundExistingRefs = allImageRefs.find(\r\n x => x.controlId === control.id,\r\n );\r\n if (!!foundExistingRefs) {\r\n setCurrentReferences(foundExistingRefs);\r\n } else {\r\n setCurrentReferences(null);\r\n }\r\n\r\n if (!!areaControl && areaControl?.files.length > 0) {\r\n setAreaImage(areaControl.files[0]);\r\n setLoading(false);\r\n }\r\n } else {\r\n setCurrentReferences(null);\r\n setAreaImage(null);\r\n setLoading(true);\r\n }\r\n\r\n setRefresh(false);\r\n }\r\n // eslint-disable-next-line\r\n }, [show, refresh]);\r\n\r\n useEffect(() => {\r\n if (control.files.length > 0) {\r\n let img = control.files[imageIndex];\r\n if (!!img && !!rotations[img.id]?.img) {\r\n img.fileUrl = rotations[img.id].img;\r\n }\r\n setImage(img);\r\n } else {\r\n setImage(null);\r\n }\r\n // eslint-disable-next-line\r\n }, [imageIndex]);\r\n\r\n const refreshAllReferences = () => {\r\n const caseId = props.caseInfo?.id ?? 0;\r\n let dataObj = {};\r\n\r\n if (props.caseInfo?.type === 3) {\r\n dataObj = { saId: caseId };\r\n } else {\r\n dataObj = { ksId: caseId };\r\n }\r\n return props.getAllMarkingReferences(dataObj).catch(err => {\r\n console.log(err);\r\n });\r\n };\r\n\r\n const getCurrentSchemaSorting = () => {\r\n const { schemaGroups } = props.schemas;\r\n\r\n const currentGroup = schemaGroups.find(\r\n x => x.id === props.schema.schemaGroupId,\r\n );\r\n if (!currentGroup) return null;\r\n\r\n return currentGroup.schemas.map(x => x.id);\r\n };\r\n\r\n const galleryNavigate = dir => {\r\n let index = imageIndex;\r\n const length = control.files.length;\r\n\r\n if (index === length - 1 && dir === 1) {\r\n // Go to beginning\r\n index = 0;\r\n } else if (index === 0 && dir === -1) {\r\n // Go to last\r\n index = length - 1;\r\n } else {\r\n index += dir;\r\n }\r\n\r\n setImageIndex(index);\r\n };\r\n\r\n const onUpdateFileInfos = (callback, errorCallback) => {\r\n const items = control.files.map(file => {\r\n const id = file.id;\r\n\r\n let tmpFile = {\r\n ...file,\r\n };\r\n\r\n if (fileInfos[id]) {\r\n tmpFile = {\r\n ...tmpFile,\r\n ...fileInfos[id],\r\n };\r\n }\r\n\r\n return {\r\n file: tmpFile,\r\n rotation: rotations[id]?.r ?? 0,\r\n };\r\n });\r\n\r\n items.forEach(x => {\r\n props.handleInfo(x.file.id, {\r\n fileDescription: x.file.fileDescription,\r\n fileTitle: x.file.fileTitle,\r\n width: x.file.width,\r\n height: x.file.height,\r\n fileUrl: x.file.fileUrl,\r\n thumbUrl: x.file.fileUrl,\r\n cached: true,\r\n });\r\n });\r\n\r\n props\r\n .bulkFileInfoUpdate({ items })\r\n .then(() => {\r\n if (callback) {\r\n callback();\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n\r\n if (errorCallback) {\r\n errorCallback();\r\n }\r\n });\r\n };\r\n\r\n const onRotate = () => {\r\n let updatedRotations = {\r\n ...rotations,\r\n };\r\n if (!updatedRotations[currentImage.id]?.r) {\r\n updatedRotations[currentImage.id] = {\r\n r: 90,\r\n };\r\n } else {\r\n let degrees = updatedRotations[currentImage.id].r;\r\n degrees += 90;\r\n if (degrees > 270) {\r\n degrees = 0;\r\n }\r\n\r\n updatedRotations[currentImage.id].r = degrees;\r\n }\r\n\r\n const tmpImage = control.files.find(x => x.id === currentImage.id);\r\n getImageRotated(\r\n tmpImage,\r\n updatedRotations[currentImage.id].r,\r\n (img, height, width) => {\r\n updatedRotations[currentImage.id].img = img;\r\n setRotations(updatedRotations);\r\n\r\n let updatedInfos = { ...fileInfos };\r\n let info = updatedInfos[currentImage.id];\r\n if (!info) {\r\n updatedInfos[currentImage.id] = {\r\n ...updatedInfos[currentImage.id],\r\n fileUrl: img,\r\n height,\r\n width,\r\n };\r\n } else {\r\n updatedInfos[currentImage.id] = {\r\n ...currentImage,\r\n fileUrl: img,\r\n height,\r\n width,\r\n };\r\n }\r\n\r\n setFileInfos(updatedInfos);\r\n setImage({ ...currentImage, fileUrl: img, height, width });\r\n },\r\n );\r\n };\r\n\r\n const onChangeFileInfo = e => {\r\n let updatedInfos = { ...fileInfos };\r\n\r\n let info = updatedInfos[currentImage.id];\r\n if (!info) {\r\n updatedInfos[currentImage.id] = {\r\n [e.target.name]: e.target.value,\r\n };\r\n } else {\r\n updatedInfos[currentImage.id][e.target.name] = e.target.value;\r\n }\r\n\r\n setFileInfos(updatedInfos);\r\n };\r\n\r\n const onSaveFileInfos = () => {\r\n setSaving(true);\r\n\r\n const onSaveCallback = () => {\r\n setSaving(false);\r\n toast.success(i18next.t(21279));\r\n };\r\n\r\n const errorCallback = () => {\r\n toast.error(i18next.t(212));\r\n };\r\n\r\n onUpdateFileInfos(onSaveCallback, errorCallback);\r\n };\r\n\r\n const onSaveMarkings = ({ markings, bindings }) => {\r\n // const { markings, bindings } = props.markings;\r\n setSaving(true);\r\n onUpdateFileInfos();\r\n\r\n props\r\n .saveReferences(bindings, allImageRefs)\r\n .then(() => {\r\n props.saveMarkings(markings).then(() => {\r\n props.refreshImageHash();\r\n props\r\n .refreshSchemaGroup({\r\n groupId: props.schema.schemaGroupId,\r\n saId: props.caseInfo?.type === 3 ? props.caseInfo.id : null,\r\n indexedSort: getCurrentSchemaSorting(),\r\n })\r\n .catch(err => console.log(err));\r\n toast.success(i18next.t(21272));\r\n setSaving(false);\r\n });\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n toast.error(i18next.t(212));\r\n setSaving(false);\r\n });\r\n };\r\n\r\n const onDelete = fileId => {\r\n setShowConfirm(false);\r\n\r\n if (control.files.length > 1) {\r\n setImageIndex(0);\r\n } else {\r\n setImageIndex(0);\r\n setImage(null);\r\n }\r\n\r\n if (props.onDelete) {\r\n props.onDelete(fileId, false);\r\n props\r\n .deleteImageAndReferences(fileId)\r\n .then(() => {\r\n props.refreshImageHash();\r\n props\r\n .refreshSchemaGroup({\r\n groupId: props.schema.schemaGroupId,\r\n saId: props.caseInfo?.type === 3 ? props.caseInfo.id : null,\r\n indexedSort: getCurrentSchemaSorting(),\r\n })\r\n .catch(err => console.log(err));\r\n refreshAllReferences().then(() => setRefresh(true));\r\n\r\n if (control.files.length > 0) {\r\n let img = control.files[imageIndex];\r\n if (!!img && !!rotations[img.id]?.img) {\r\n img.fileUrl = rotations[img.id].img;\r\n }\r\n setImage(img);\r\n }\r\n if (control.files.length === 0) {\r\n toggle();\r\n }\r\n })\r\n .catch(err => console.log(err))\r\n .finally(() => {\r\n setShowConfirm(false);\r\n });\r\n }\r\n };\r\n\r\n const onDeleteArea = fileId => {\r\n if (!fileId) return;\r\n\r\n setShowConfirm(false);\r\n\r\n if (props.onDelete) {\r\n props.onDelete(fileId, false);\r\n props\r\n .deleteAreaImageAndReferences(schema.id)\r\n .then(refreshAllReferences)\r\n .catch(err => console.log(err))\r\n .finally(() => {\r\n setShowConfirmAreaDelete(false);\r\n toggle();\r\n });\r\n }\r\n };\r\n\r\n const downloadImageAction = () => {\r\n fetch(currentImage.fileUrl)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n const imageUrl = URL.createObjectURL(blob);\r\n const tag = document.createElement('a');\r\n\r\n tag.download = currentImage.fileName;\r\n tag.href = imageUrl;\r\n\r\n document.body.appendChild(tag);\r\n tag.click();\r\n document.body.removeChild(tag);\r\n });\r\n };\r\n\r\n const toggleConfirmDelete = () => {\r\n setShowConfirm(!showConfirm);\r\n };\r\n\r\n const toggleConfirmAreaDelete = () => {\r\n setShowConfirmAreaDelete(!showConfirmAreaDelete);\r\n };\r\n\r\n const renderHeader = () => {\r\n let content;\r\n let areaName = '';\r\n if (areaImage?.fileTitle?.trim().length > 0) {\r\n areaName = ' - ' + truncateString(areaImage.fileTitle, 26);\r\n }\r\n\r\n if (editor) {\r\n if (disabled) return null;\r\n\r\n content = (\r\n
\r\n \r\n \r\n {i18next.t(3242)}\r\n \r\n\r\n \r\n {i18next.t(147)}\r\n \r\n \r\n {i18next.t(7070)}\r\n \r\n
\r\n );\r\n } else {\r\n content = (\r\n
\r\n \r\n {i18next.t(1327)}\r\n {areaName}\r\n \r\n {!isMobile && !disabled && (\r\n \r\n {i18next.t(147)}\r\n \r\n )}\r\n
\r\n );\r\n }\r\n\r\n return content;\r\n };\r\n\r\n const renderContent = () => {\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n const sharedProps = {\r\n schema,\r\n control,\r\n areaImage,\r\n galleryNavigate,\r\n currentImage,\r\n isSaving,\r\n };\r\n\r\n if (editor) {\r\n let title = i18next.t(147);\r\n if (!!currentImage) {\r\n title =\r\n i18next.t(147) + ': ' + truncateString(currentImage.fileTitle, 30);\r\n }\r\n\r\n let tmpFileDescription = currentImage?.fileDescription;\r\n if (!!currentImage) {\r\n if (fileInfos[currentImage.id]) {\r\n tmpFileDescription = fileInfos[currentImage.id].fileDescription;\r\n }\r\n }\r\n const fileProps = {\r\n fileDescription: tmpFileDescription,\r\n };\r\n\r\n return (\r\n <>\r\n \r\n ;\r\n onDelete(currentImage.id)}\r\n cancelFunc={toggleConfirmDelete}\r\n />\r\n \r\n );\r\n } else {\r\n let title = i18next.t(147);\r\n if (!!areaImage) {\r\n title = i18next.t(147) + ': ' + areaImage.fileTitle;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n onDeleteArea(areaImage?.id)}\r\n cancelFunc={toggleConfirmAreaDelete}\r\n />\r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n
{renderContent()}
\r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ cases, schemas, markings }) {\r\n return {\r\n gallery: cases.caseImages,\r\n schemas,\r\n markings,\r\n caseInfo: cases.selectedCase,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n setCurrentReferences,\r\n saveMarkings,\r\n saveReferences,\r\n bulkFileInfoUpdate,\r\n refreshImageHash,\r\n deleteAreaImageAndReferences,\r\n deleteImageAndReferences,\r\n getAllMarkingReferences,\r\n refreshSchemaGroup,\r\n})(ImageMarking);\r\n","import React, { useEffect, useState } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { FormText } from 'reactstrap';\r\n\r\n// Utils\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\nimport { createGalleryObjectsFromReferences } from '../../utils/componentUtils';\r\n\r\nconst ReferenceGallery = props => {\r\n const { imageHash, onClick, control, schema } = props;\r\n const [imageBindingInfo, setImageBindingInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n const allowedTypes = [\r\n SB_CONTROL_TYPE.PhotoDocumentation,\r\n SB_CONTROL_TYPE.TextPhotos,\r\n SB_CONTROL_TYPE.DropdownCommentPhotos,\r\n ];\r\n\r\n const foundExistingRefs = props.markings?.allImageRefs.find(\r\n x => x.controlId === control?.id,\r\n );\r\n\r\n if (!!foundExistingRefs) {\r\n const initialGuid = uuidv4();\r\n\r\n const prefixId = schema.rawControlItems\r\n .filter(x => allowedTypes.includes(x.controlType))\r\n .findIndex(x => x.id === control?.id);\r\n\r\n //console.log('useEffectInput', foundExistingRefs, prefixId, control);\r\n\r\n const result = createGalleryObjectsFromReferences(\r\n foundExistingRefs,\r\n initialGuid,\r\n `${prefixId + 1}.`,\r\n );\r\n\r\n setImageBindingInfo(result);\r\n } else {\r\n setImageBindingInfo({ imgGuids: {}, bindings: {} });\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, [props.markings?.allImageRefs]);\r\n\r\n const renderImage = (file, key) => {\r\n let title =\r\n file.fileDescription?.trim().length > 0 ? file.fileDescription : '';\r\n let prefix;\r\n const ref = imageBindingInfo?.imgGuids[file.id];\r\n\r\n if (ref) {\r\n if (imageBindingInfo.bindings[ref]) {\r\n prefix = imageBindingInfo.bindings[ref].displayId;\r\n\r\n if (title?.length > 0) {\r\n prefix += ':';\r\n }\r\n }\r\n }\r\n\r\n if (!!prefix) {\r\n title = `${prefix} ${title}`;\r\n }\r\n\r\n const action = () => {\r\n onClick(file, key);\r\n };\r\n\r\n //console.log('gallery', file);\r\n\r\n let src = !file.cached\r\n ? `${file.thumbUrl}?${imageHash}`\r\n : `${file.thumbUrl}`;\r\n\r\n return (\r\n \r\n {title}\r\n {title}\r\n
\r\n );\r\n };\r\n\r\n return props.files.map(renderImage);\r\n};\r\n\r\nReferenceGallery.defaultProps = {\r\n files: [],\r\n onClick: () => {},\r\n imageHash: 0,\r\n};\r\n\r\nfunction mapStateToProps({ markings }) {\r\n return {\r\n markings,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, null)(ReferenceGallery);\r\n","import React, { useEffect, useState } from 'react';\r\n\r\n// Components\r\nimport ImgViewerModal from './ImgViewerModal';\r\nimport ImageMarking from '../ImageMarking';\r\nimport ReferenceGallery from '../ImageMarking/ReferenceGallery';\r\n\r\nconst Gallery = props => {\r\n const { imageHash } = props;\r\n const [currentFile, setCurrentFile] = useState('');\r\n const [showModal, setShowModal] = useState(false);\r\n const [startIndex, setStartIndex] = useState(0);\r\n\r\n const onDelete = (fileId, close = true) => {\r\n if (close) {\r\n setShowModal(false);\r\n }\r\n if (props.onDelete) {\r\n props.onDelete(fileId);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n let file = '';\r\n if (props.files?.length === 1) {\r\n file = props.files[0];\r\n }\r\n setCurrentFile(file);\r\n }, [props.files]);\r\n\r\n const handleInfo = (fileId = null, data) => {\r\n props.handleInfo(fileId, data);\r\n };\r\n\r\n const handleInfoBulk = items => {\r\n props.handleInfoBulk(items);\r\n };\r\n\r\n const toggleModal = () => {\r\n setShowModal(!showModal);\r\n };\r\n\r\n const renderImage = (file, key) => {\r\n const onClick = () => {\r\n setCurrentFile(file);\r\n setStartIndex(key);\r\n setShowModal(true);\r\n };\r\n\r\n //console.log('gallery', file);\r\n\r\n let src = !file.cached\r\n ? `${file.thumbUrl}?${imageHash}`\r\n : `${file.thumbUrl}`;\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const renderViewerComp = () => {\r\n if (showModal && !!props.hasAreaMarking && !props.isMovingImages) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (showModal) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n const renderGallery = () => {\r\n if (props.editor) {\r\n const onClick = (file, key) => {\r\n setCurrentFile(file);\r\n setStartIndex(key);\r\n setShowModal(true);\r\n };\r\n\r\n return (\r\n \r\n );\r\n } else {\r\n return props.files.map(renderImage);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {renderGallery()}\r\n\r\n {renderViewerComp()}\r\n
\r\n );\r\n};\r\n\r\nGallery.defaultProps = {\r\n files: [],\r\n};\r\n\r\nexport default Gallery;\r\n","import i18next from '../i18n';\r\n\r\nexport const hasNumber = new RegExp('[0-9]+');\r\nexport const hasLetter = new RegExp('[a-zæøå]+');\r\nexport const hasMin8Chars = new RegExp('.{8,}');\r\nexport const hasSpecialChars = new RegExp(\r\n '[!@#$%?^&*\"\\\\[\\\\]\\\\{\\\\}<>/\\\\(\\\\)=\\\\\\\\\\\\-_´+`~\\\\:;,\\\\.€\\\\|]',\r\n);\r\nexport const hasUpperCase = new RegExp('[A-ZÆØÅ]');\r\n\r\nconst passValidator = password => {\r\n if (!password) {\r\n return { valid: false, text: i18next.t(85) };\r\n }\r\n\r\n const HN = hasNumber.test(password);\r\n const HL = hasLetter.test(password);\r\n const HM8C = hasMin8Chars.test(password);\r\n const HSC = hasSpecialChars.test(password);\r\n const HUC = hasUpperCase.test(password);\r\n const valid = HN && HL && HM8C && HSC && HUC;\r\n let text = '';\r\n\r\n if (!valid) {\r\n if (!HN) {\r\n text += i18next.t(77) + '\\n';\r\n }\r\n if (!HL) {\r\n text += i18next.t(78) + '\\n';\r\n }\r\n if (!HUC) {\r\n text += i18next.t(7044) + '\\n';\r\n }\r\n if (!HSC) {\r\n text += i18next.t(7043) + '\\n';\r\n }\r\n if (!HM8C) {\r\n text += i18next.t(79) + '\\n';\r\n }\r\n return { valid: valid, text };\r\n } else {\r\n return { valid, text };\r\n }\r\n};\r\n\r\nexport default passValidator;\r\n","module.exports = __webpack_public_path__ + \"static/media/documenter-white.7e711858.svg\";","module.exports = __webpack_public_path__ + \"static/media/Note.28b6fb92.svg\";","/**\r\n * @module actions/branding\r\n */\r\nimport { GET_CUSTOMER_BRANDING, API_URL } from '../constants';\r\nimport Axios from 'axios';\r\n\r\nexport function getCustomerBranding(customerId) {\r\n return dispatch => {\r\n return Axios.get(API_URL + '/branding/' + customerId).then(res => {\r\n dispatch({\r\n type: GET_CUSTOMER_BRANDING,\r\n payload: res.data || null,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\nexport function getPlatformBrandingCustomer(customerId) {\r\n return dispatch => {\r\n return Axios.get(API_URL + '/branding/platform/' + customerId).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\nexport function getPlatformBrandingUser() {\r\n return dispatch => {\r\n return Axios.get(API_URL + '/branding/platform').then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\nimport {\r\n getUserAvatar,\r\n getSpecificUserAvatar,\r\n} from '../../redux/actions/employees';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport { Spinner } from 'reactstrap';\r\nimport { generateInitials } from '../../utils/common';\r\nimport { IconProfil } from '../../assets/icons_v2';\r\n\r\nconst UserAvatar = props => {\r\n const { updating, userId, name, uri } = props;\r\n const [isLoading, setLoading] = useState(true);\r\n const [showInitials, setInitials] = useState(!!name);\r\n const [image, setImage] = useState(null);\r\n\r\n useEffect(() => {\r\n if (uri?.trim().length > 0) {\r\n setLoading(false);\r\n setInitials(false);\r\n setImage({ fileName: 'avatar.png', path: uri });\r\n return;\r\n }\r\n\r\n const action = userId ? props.getSpecificUserAvatar : props.getUserAvatar;\r\n action(userId)\r\n .then(res => {\r\n if (res?.data) {\r\n let imageObj = {\r\n name: res.data.fileName,\r\n fileName: res.data.fileName,\r\n path: res.data.fileUrl,\r\n };\r\n setImage(imageObj);\r\n setInitials(false);\r\n }\r\n setLoading(false);\r\n })\r\n .catch(() => {\r\n setLoading(false);\r\n });\r\n // eslint-disable-next-line\r\n }, [updating]);\r\n\r\n const handleClick = () => {\r\n if (props.handleClick) {\r\n props.handleClick();\r\n }\r\n };\r\n\r\n const isClickable = () => {\r\n if (props.handleClick) {\r\n return ' clickable';\r\n }\r\n return '';\r\n };\r\n\r\n const smallClass = () => {\r\n if (props.small) return ' small';\r\n return '';\r\n };\r\n\r\n const extraClasses = () => {\r\n if (props.className) return ' ' + props.className;\r\n return '';\r\n };\r\n\r\n const isInitials = () => {\r\n if (props.name) return ' initials';\r\n return '';\r\n };\r\n\r\n const classNames =\r\n 'user_avatar' + isClickable() + smallClass() + extraClasses();\r\n\r\n if (isLoading || props.updating) {\r\n return ;\r\n }\r\n\r\n if (showInitials) {\r\n return (\r\n
{generateInitials(name)}
\r\n );\r\n }\r\n\r\n if (!image) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth }) {\r\n return {\r\n auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n getUserAvatar,\r\n getSpecificUserAvatar,\r\n})(UserAvatar);\r\n","import classNames from 'classnames';\r\n\r\nexport const createBEM = namespace => {\r\n return {\r\n create: blockName => {\r\n let block = blockName;\r\n\r\n if (typeof namespace === 'string') {\r\n block = `${namespace}-${blockName}`;\r\n }\r\n\r\n return {\r\n b: (...more) => {\r\n return classNames(block, more);\r\n },\r\n e: (className, ...more) => {\r\n return classNames(`${block}__${className}`, more);\r\n },\r\n m: (className, ...more) => {\r\n return classNames(`${block}--${className}`, more);\r\n },\r\n };\r\n },\r\n };\r\n};\r\n\r\nexport const bemNames = createBEM('cr');\r\n\r\nexport default bemNames;\r\n","import axios from 'axios';\r\nimport FileSaver from 'file-saver';\r\nimport { API_URL, GET_CASE_MATERIALS, GET_PRODUCTS } from '../constants';\r\n\r\n/**\r\n * Gets single product regardless of deleted\r\n * @param {Number} id product id\r\n * @return {Promise} Promise\r\n */\r\nexport function getSingleProduct(id) {\r\n if (id === null) return null;\r\n\r\n let url = API_URL + `/products/single/${id}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets single category regardless of deleted\r\n * @param {Number} id category id\r\n * @return {Promise} Promise\r\n */\r\nexport function getSingleProductCategory(id) {\r\n if (id === null) return null;\r\n\r\n let url = API_URL + `/products/singleCategory/${id}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets product categories\r\n * @param {Number} type Standard = 1 | Custom = 2\r\n * @param {Boolean} datasheets include datasheets or not\r\n * @param {Boolean} excludeGlobal control if we want global product categories\r\n * @return {Promise} Promise\r\n */\r\nexport function getProductCategories(\r\n type,\r\n datasheets = false,\r\n excludeGlobal = false,\r\n) {\r\n let url = API_URL + `/products/categories/${type}?`;\r\n\r\n if (datasheets) {\r\n url += '&includeData=true';\r\n }\r\n\r\n if (excludeGlobal) {\r\n url += '&excludeStandard=true';\r\n }\r\n\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: GET_PRODUCTS,\r\n payload: res.data,\r\n });\r\n\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets product categories for a supplier\r\n * @param {Number} id Suppliers user id\r\n * @return {Promise} Promise\r\n */\r\nexport function getSuppliersProductCategories(id) {\r\n let url = API_URL + `/products/categories/supplier/${id}`;\r\n\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Add/Update product category\r\n * @param {Object} data Product category object\r\n * @return {Promise} Promise\r\n */\r\nexport function updateProductCategories(data) {\r\n let url = API_URL + `/products/categories`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Add/Update a suppliers binded product categories\r\n * @param {Object} data Product category objects and user-id\r\n * @return {Promise} Promise\r\n */\r\nexport function updateSuppliersProductCategories(data) {\r\n let url = API_URL + `/products/categories/supplier`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Delete product category\r\n * @param {Object} data Product category object\r\n * @return {Promise} Promise\r\n */\r\nexport function deleteProductCategories(data) {\r\n let url = API_URL + `/products/categories/delete`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Gets the customer's custom products\r\n * @param {Number} type Standard = 1 | Custom = 2\r\n * @return {Promise} Promise\r\n */\r\nexport function getProducts(type) {\r\n let url = API_URL + `/products/${type}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Update the customer's custom products\r\n * @param {Number} type Standard = 1 | Custom = 2\r\n * @return {Promise} Promise\r\n */\r\nexport function updateProduct(data, type) {\r\n let url = API_URL + `/products/${type}`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Arrange the customer's custom products\r\n * @return {Promise} Promise\r\n */\r\nexport function orderCustomProduct(data) {\r\n let url = API_URL + '/products/customProducts/ordering';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Arrange the standard products\r\n * @return {Promise} Promise\r\n */\r\nexport function orderStandardProduct(data) {\r\n let url = API_URL + '/products/standardProducts/ordering';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Toggle standard products to use\r\n * @param {Number} product\r\n */\r\nexport function toggleStandardProducts(product) {\r\n let url = API_URL + `/products/standardProducts/toggle/`;\r\n return dispatch => {\r\n return axios.post(url, product).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Upload datasheet to a product\r\n * @param {Array} files - Multi-Form data files\r\n * @param {Object} productId - Product Id\r\n */\r\nexport function uploadDatasheets(files, { productId }) {\r\n return dispatch => {\r\n let url = API_URL + `/file/upload/datasheets/${productId}`;\r\n\r\n let data = new window.FormData();\r\n for (let i = 0; i < files.length; i++) {\r\n const file = files[i];\r\n data.append(file.name, file);\r\n }\r\n\r\n return axios.post(url, data).then(res => {\r\n // console.log('uploadFilesResult', res);\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Delete a specific datasheet\r\n * @param {Number} datasheetId - Datasheet id\r\n */\r\nexport function deleteDatasheet(datasheetId) {\r\n return dispatch => {\r\n let url = API_URL + `/file/delete/datasheets/${datasheetId}`;\r\n return axios.post(url);\r\n };\r\n}\r\n\r\n/**\r\n * Download a specific datasheet\r\n * @param {Number} productId - Product Id\r\n * @param {Number} datasheetId - Datasheet Id\r\n */\r\nexport function downloadDatasheet(productId, datasheetId) {\r\n return dispatch => {\r\n let url = API_URL + `/pdf/download/datasheet/${productId}/${datasheetId}`;\r\n\r\n return axios.get(url, { responseType: 'blob' }).then(res => {\r\n const regex = /filename=[\"]?(.*\\.pdf)[\"]?;/g;\r\n const headerContentDisposition = res.headers['content-disposition'];\r\n const fileNameGroups = regex.exec(headerContentDisposition);\r\n\r\n FileSaver.saveAs(res.data, fileNameGroups[1]);\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets product categories in case\r\n * @param {Number} id case id\r\n * @return {Promise} Promise\r\n */\r\nexport function getProductCategoriesOnCase(id) {\r\n let url = API_URL + `/products/materials/${id}`;\r\n\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: GET_CASE_MATERIALS,\r\n payload: res.data,\r\n });\r\n\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Add/Update product category on case\r\n * @param {Object} data Product category object\r\n * @return {Promise} Promise\r\n */\r\nexport function updateProductCategoriesOnCase(data) {\r\n let url = API_URL + `/products/materials`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Add/Update product in category on case\r\n * @param {Object} data Product category object\r\n * @return {Promise} Promise\r\n */\r\nexport function updateProductsInProductCategoriesOnCase(data) {\r\n let url = API_URL + `/products/materials/products`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Get product units\r\n * @return {Promise} Promise\r\n */\r\nexport function getProductUnits() {\r\n let url = API_URL + `/products/units`;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * Add/Update product product update\r\n * @param {Object} data Product unit object\r\n * @return {Promise} Promise\r\n */\r\nexport function updateProductUnit(data) {\r\n let url = API_URL + `/products/units`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n","import i18n from 'i18next';\r\nimport { initReactI18next } from 'react-i18next';\r\n\r\ni18n\r\n .use(initReactI18next) // passes i18n down to react-i18next\r\n .init({\r\n lng: 'dk', // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources\r\n // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage\r\n // if you're using a language detector, do not define the lng option\r\n\r\n ns: 'translation', // defined our default namespace\r\n fallbackLng: 'en', // https://www.i18next.com/principles/fallback\r\n returnEmptyString: false, // allow an empty value to count as invalid (by default is true)\r\n\r\n interpolation: {\r\n escapeValue: false, // react already safes from xss\r\n },\r\n });\r\n\r\nexport default i18n;\r\n","import moment from 'moment';\r\nimport React, { useEffect } from 'react';\r\nimport { parse } from 'date-fns';\r\nimport { hasLetter, hasNumber, hasMin8Chars } from './passwordValidator';\r\nimport i18next from '../i18n';\r\nimport {\r\n ASSIGNMENT_SCHEMA,\r\n CUSTOMER_STATUS,\r\n SB_CONTROL_ITEM_TYPE,\r\n SB_CONTROL_TYPE,\r\n} from '../redux/constants';\r\n\r\nfunction reverseDate(date) {\r\n let arr = date.split('-');\r\n return `${arr[2]}-${arr[1]}-${arr[0]}`;\r\n}\r\n\r\nexport const parseDate = (date, showTime = false) => {\r\n if (!showTime) {\r\n return moment(date).format('DD.MM.YYYY');\r\n } else {\r\n return `${moment(date).format('DD.MM.YYYY')}, kl. ${moment(date).format(\r\n 'H:mm',\r\n )}`;\r\n }\r\n};\r\n\r\nexport const parseDateNET = date => {\r\n return moment(date).format('MM.DD.YYYY');\r\n};\r\n\r\nexport const parseDateRFC2822 = (date, includeTime = false) => {\r\n if (!date) return null;\r\n if (includeTime) {\r\n const alt = moment(date).format('DD.MM.YYYY HH:mm');\r\n return parse(alt, 'dd.MM.yyyy H:mm', new Date());\r\n }\r\n return parse(parseDate(date), 'dd.MM.yyyy', new Date());\r\n};\r\n\r\nexport const dateIsBetween = (date, start, end) => {\r\n //console.log(date, start, end);\r\n if (start === 'Invalid date' || end === 'Invalid date') return true;\r\n return moment(reverseDate(date)).isBetween(\r\n reverseDate(start),\r\n reverseDate(end),\r\n null,\r\n '[]',\r\n );\r\n};\r\n\r\n/**\r\n * We retrieve the last edit date from either \"CreatedDate\" or \"UpdatedDate\"\r\n * @param {Object} item Item with \"CreatedDate\" and \"UpdatedDate\"\r\n * @returns\r\n */\r\nexport const getLastEditDate = item => {\r\n let lastEdit = !!item.updatedDate ? item.updatedDate : item.createdDate;\r\n lastEdit = parseDate(lastEdit);\r\n\r\n if (lastEdit === '01.01.0001') {\r\n lastEdit = parseDate(item.createdDate);\r\n }\r\n\r\n return lastEdit;\r\n};\r\n\r\nexport const splitText = (text, firstPart, secondPart) => {\r\n if (text.length >= 17) {\r\n return `${firstPart}-\\n${secondPart}`;\r\n }\r\n return text;\r\n};\r\n\r\nexport const splitIntoBreakpoints = text => {\r\n return text.split('\\n').map((item, index) => {\r\n return (\r\n
\r\n {item}\r\n
\r\n
\r\n );\r\n });\r\n};\r\n\r\nexport const getEmployeeDataById = (data, id) => {\r\n return data.filter(item => `${item.id}` === id);\r\n};\r\n\r\nexport const StringIsEmpty = str => {\r\n if (str === undefined || str === null) return true;\r\n if (typeof str === 'number') return false;\r\n return !str || 0 === str.length;\r\n};\r\n\r\nexport const ValidPhone = str => {\r\n let valid = false;\r\n\r\n if (!StringIsEmpty(str)) {\r\n if (!hasLetter.test(str)) {\r\n if (hasNumber.test(str)) {\r\n valid = hasMin8Chars.test(str);\r\n }\r\n }\r\n }\r\n\r\n return valid;\r\n};\r\n\r\nexport function getAssigneeTitleFrom(assigneeType, schemaType = null) {\r\n let title = '';\r\n\r\n switch (assigneeType) {\r\n case 1:\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n title = i18next.t('7135');\r\n break;\r\n default:\r\n title = i18next.t('1279');\r\n break;\r\n }\r\n break;\r\n case 2:\r\n title = i18next.t('55');\r\n break;\r\n case 5:\r\n title = i18next.t('1073');\r\n break;\r\n case 3:\r\n default:\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n title = i18next.t('7134');\r\n break;\r\n default:\r\n title = i18next.t('1081');\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n return title;\r\n}\r\n\r\nexport function getRelevantDocument(caseData, docType) {\r\n if (caseData?.caseDocuments) {\r\n return caseData.caseDocuments.find(doc => doc.documentType === docType);\r\n }\r\n return null;\r\n}\r\n\r\n// export const ValidEmail = str => {\r\n// if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(str)) {\r\n// return true;\r\n// }\r\n// return false;\r\n// };\r\n\r\nexport function tryParseInt(str, defaultValue) {\r\n var result = defaultValue;\r\n if (str !== null) {\r\n if (str.length > 0) {\r\n if (!isNaN(str)) {\r\n result = parseInt(str);\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Takes an object and compares two properties raw.\r\n * @param {Object} a - First object\r\n * @param {Object} b - Second object\r\n * @param {String} propName - Property to compare\r\n * @param {boolean} descending - Reverse ascending order?\r\n */\r\nexport function strComparator(a, b, propName, descending = false) {\r\n if (a[propName] > b[propName]) return descending ? -1 : 1;\r\n if (b[propName] > a[propName]) return descending ? 1 : -1;\r\n return 0;\r\n}\r\n\r\n/**\r\n * Retrieve the corresponding label to the customer status\r\n * @param {Number} status CUSTOMER_STATUS number\r\n * @returns String label\r\n */\r\nexport function getCustomerStatusLabel(status) {\r\n switch (status) {\r\n case CUSTOMER_STATUS.Active:\r\n return i18next.t(71);\r\n case CUSTOMER_STATUS.Paused:\r\n return i18next.t(1478);\r\n case CUSTOMER_STATUS.Closed:\r\n return i18next.t(1479);\r\n case CUSTOMER_STATUS.Trial:\r\n return i18next.t(34);\r\n default:\r\n return '';\r\n }\r\n}\r\n\r\n/**\r\n * Validate an E-mail based on the RFC 5322 Official Standard\r\n * @param {String} email E-mail address\r\n * @returns Boolean value\r\n */\r\nexport function validateEmail(email) {\r\n // eslint-disable-next-line no-control-regex\r\n const re = /(?:[a-zæøå0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zæøå0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zæøå0-9](?:[a-zæøå0-9-]*[a-zæøå0-9])?\\.)+[a-zæøå0-9](?:[a-zæøå0-9-]*[a-zæøå0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zæøå0-9-]*[a-zæøå0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/;\r\n var result = re.test(String(email).toLowerCase());\r\n\r\n // console.log(re, result);\r\n\r\n return !result;\r\n}\r\n\r\n/**\r\n * Generates initials based on first and lastname.\r\n * @param {String} name Name\r\n * @returns Two letter initials\r\n */\r\nexport function generateInitials(name) {\r\n if (!name) return '';\r\n if (typeof name !== 'string') return '';\r\n if (name.trim().length === 0) return '';\r\n\r\n try {\r\n let result = '';\r\n const splitText = name.split(' ');\r\n const splitted = splitText\r\n .filter(x => x.length > 0 || x.trim().length > 0)\r\n .map(x => x.trim());\r\n\r\n if (splitted.length > 1) {\r\n const first = splitted[0].charAt(0);\r\n let last = splitted[splitted.length - 1];\r\n if (last.length > 2) {\r\n last = last.substring(0, 2);\r\n }\r\n\r\n result = first + last;\r\n } else {\r\n if (name.length > 2) {\r\n result = name.substring(0, 3);\r\n } else {\r\n result = name;\r\n }\r\n }\r\n\r\n return result.toUpperCase();\r\n } catch (error) {\r\n console.log('Failed normal initials generation', error);\r\n\r\n return name\r\n .match(/(^\\S?|\\b\\S\\S)?/g)\r\n .join('')\r\n .match(/(^\\S|\\S\\S$)?/g)\r\n .join('')\r\n .toUpperCase();\r\n }\r\n}\r\n\r\n/**\r\n * Escapes special characters used in regular expresion.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions (search for \"escapeRegExp\")\r\n * @param {String} text string to escapce special characters.\r\n * @returns Escaped version of string\r\n */\r\nexport function escapeRegex(text) {\r\n try {\r\n if (!text) return '';\r\n if (typeof text !== 'string') return text;\r\n if (text.trim().length === 0) return '';\r\n return text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n } catch (error) {\r\n return text;\r\n }\r\n}\r\n\r\nexport function addToObject(obj, key, value, index) {\r\n // Create a temp object and index variable\r\n var temp = {};\r\n var i = 0;\r\n\r\n // Loop through the original object\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If the indexes match, add the new item\r\n if (i === index && key) {\r\n temp[key] = value;\r\n }\r\n\r\n // Add the current item in the loop to the temp obj\r\n temp[prop] = obj[prop];\r\n\r\n // Increase the count\r\n i++;\r\n }\r\n }\r\n // If no index, add to the end\r\n if (!index && key && value) {\r\n temp[key] = value;\r\n }\r\n return temp;\r\n}\r\n\r\nexport function usePrevious(value) {\r\n const ref = React.useRef();\r\n useEffect(() => {\r\n ref.current = value;\r\n }, [value]);\r\n return ref.current;\r\n}\r\n\r\nexport function isValidFolderName(name) {\r\n if (!name) return false;\r\n if (typeof name !== 'string') return false;\r\n // eslint-disable-next-line\r\n const regexExp = /^[^\\s^\\x00-\\x1f\\\\?*:\\#\"\";<>|\\/.][^\\x00-\\x1f\\\\?*:\\#\"\";<>|\\/]*[^\\s^\\x00-\\x1f\\\\?*:\\#\"\";<>|\\/.]+$/g;\r\n\r\n try {\r\n // for some reason, the regex cannot handle single number folders well.\r\n if (name.length === 1) {\r\n var num = parseInt(name);\r\n if (typeof num === 'number') {\r\n return true;\r\n }\r\n }\r\n } catch (error) {\r\n // nothing\r\n }\r\n\r\n const val = regexExp.test(name);\r\n // const match = regexExp.exec(name);\r\n // console.log({ name, match, val });\r\n\r\n return val;\r\n}\r\n\r\n/**\r\n * Returns a number tween 1 and 1000\r\n */\r\nexport function getRng() {\r\n return Math.floor(Math.random() * 1000) + 1;\r\n}\r\n\r\n/**\r\n * Compare two objects by converting them to a stringified version,\r\n * and then return a boolean value.\r\n * @param {Object} orig The initial starting state\r\n * @param {Object} curr The current state\r\n * @param {Array} ignore List of variables to ignore from both objects.\r\n * @returns If equal returns true, else false.\r\n */\r\nexport function compareObjects(orig, curr, ignore = []) {\r\n const temp = { ...orig };\r\n\r\n if (ignore) ignore.forEach(x => delete temp[x]);\r\n const initial = JSON.stringify(temp);\r\n\r\n const temp2 = { ...curr };\r\n if (ignore) ignore.forEach(x => delete temp2[x]);\r\n\r\n const current = JSON.stringify(temp2);\r\n const equivalence = initial === current;\r\n\r\n //console.log(equivalence, temp, temp2);\r\n\r\n return equivalence;\r\n}\r\n\r\nexport function sortControlSchemas(schemas) {\r\n const sortFunc = (a, b) => {\r\n // console.log(a, b);\r\n // console.log(\r\n // { id: a.id, date: a.lastEditDate, controls: a.controls?.length > 0 },\r\n // { id: b.id, date: b.lastEditDate, controls: b.controls?.length > 0 },\r\n // );\r\n\r\n var parsedA = parseDate(a.lastEditDate);\r\n var parsedB = parseDate(b.lastEditDate);\r\n\r\n var dateA =\r\n parsedA !== '01.01.0001' ? moment(a.lastEditDate) : moment(a.createdDate);\r\n var dateB =\r\n parsedB !== '01.01.0001' ? moment(b.lastEditDate) : moment(b.createdDate);\r\n\r\n if (a.controls?.length > 0) {\r\n parsedA = parseDate(a.controls[0].manualDate);\r\n\r\n if (parsedA !== '01.01.0001') dateA = moment(a.controls[0].manualDate);\r\n }\r\n\r\n if (b.controls?.length > 0) {\r\n parsedB = parseDate(b.controls[0].manualDate);\r\n\r\n if (parsedB !== '01.01.0001') dateB = moment(b.controls[0].manualDate);\r\n }\r\n\r\n const comp = dateA.valueOf() - dateB.valueOf();\r\n // console.log({\r\n // nameA: a.name,\r\n // nameB: b.name,\r\n // parsedA,\r\n // parsedB,\r\n // dateA,\r\n // dateB,\r\n // comp,\r\n // });\r\n // console.log();\r\n\r\n return comp;\r\n };\r\n\r\n schemas.sort(sortFunc);\r\n\r\n return schemas;\r\n}\r\n\r\nexport function sortServiceControlSchemas(schemas) {\r\n const sortFunc = (a, b) => {\r\n // console.log(\r\n // { id: a.id, date: a.actualServiceDate, date2: a.expectedServiceDate },\r\n // { id: b.id, date: b.actualServiceDate, date2: b.expectedServiceDate },\r\n // );\r\n let dateA = a.actualServiceDate\r\n ? a.actualServiceDate\r\n : a.expectedServiceDate;\r\n let dateB = b.actualServiceDate\r\n ? b.actualServiceDate\r\n : b.expectedServiceDate;\r\n\r\n let parsedA = moment(dateA);\r\n let parsedB = moment(dateB);\r\n\r\n dateA = new Date(parsedA.year(), parsedA.month(), parsedA.date());\r\n dateB = new Date(parsedB.year(), parsedB.month(), parsedB.date());\r\n\r\n parsedA = moment(dateA);\r\n parsedB = moment(dateB);\r\n\r\n const comp = parsedA.valueOf() - parsedB.valueOf();\r\n\r\n if (comp === 0) {\r\n let nameA = a.name;\r\n let nameB = b.name;\r\n\r\n if (nameA && nameB) {\r\n return nameA.toLowerCase().localeCompare(nameB.toLowerCase(), 'en', {\r\n sensitivity: 'base',\r\n numeric: true,\r\n });\r\n } else if (!nameA) {\r\n return 1;\r\n } else if (!nameB) {\r\n return -1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n return comp * -1;\r\n };\r\n\r\n schemas.sort(sortFunc);\r\n\r\n return schemas;\r\n}\r\n\r\n// Schema builder\r\nexport function getControlItemTypeName(type) {\r\n switch (type) {\r\n case SB_CONTROL_ITEM_TYPE.Standard:\r\n return i18next.t(20);\r\n case SB_CONTROL_ITEM_TYPE.Custom:\r\n return i18next.t(12022);\r\n default:\r\n return i18next.t(9063);\r\n }\r\n}\r\nexport function getControlTypeName(type) {\r\n switch (type) {\r\n case SB_CONTROL_TYPE.PhotoAreaMarking:\r\n return i18next.t(12023);\r\n case SB_CONTROL_TYPE.PhotoDocumentation:\r\n return i18next.t(1060);\r\n case SB_CONTROL_TYPE.Signature:\r\n return i18next.t(12025);\r\n case SB_CONTROL_TYPE.DateSelector:\r\n return i18next.t(12026);\r\n case SB_CONTROL_TYPE.DropdownProducts:\r\n return i18next.t(12027);\r\n case SB_CONTROL_TYPE.DropdownUsers:\r\n return i18next.t(12028);\r\n case SB_CONTROL_TYPE.DropdownCustom:\r\n return i18next.t(12029);\r\n case SB_CONTROL_TYPE.DropdownCommentPhotos:\r\n return i18next.t(12073);\r\n case SB_CONTROL_TYPE.Checkboxes:\r\n return i18next.t(12030);\r\n case SB_CONTROL_TYPE.Text:\r\n return i18next.t(12031);\r\n case SB_CONTROL_TYPE.TextUneditable:\r\n return i18next.t(12032);\r\n case SB_CONTROL_TYPE.Numbers:\r\n return i18next.t(7152);\r\n case SB_CONTROL_TYPE.TimeTableUsers:\r\n return i18next.t(12065);\r\n case SB_CONTROL_TYPE.Checkmark:\r\n return i18next.t(12069);\r\n case SB_CONTROL_TYPE.TextPhotos:\r\n return i18next.t(12078);\r\n default:\r\n return i18next.t(9063);\r\n }\r\n}\r\n\r\nexport function isJSON(str) {\r\n try {\r\n return JSON.parse(str) && !!str;\r\n } catch (e) {\r\n return false;\r\n }\r\n}\r\n\r\nexport function parsePhoneNumber(phoneNumber) {\r\n const countryCode = phoneNumber.slice(1, phoneNumber.length);\r\n const phoneNumberDigits = countryCode.replace(/\\D/g, '');\r\n\r\n let countryCodeLength = 2;\r\n if (phoneNumberDigits.length > 10) {\r\n countryCodeLength = phoneNumberDigits.length - 10;\r\n }\r\n\r\n return {\r\n countryCode: '+' + phoneNumberDigits.substring(0, countryCodeLength),\r\n phoneNumber: phoneNumberDigits.substring(countryCodeLength),\r\n };\r\n}\r\n\r\nexport function truncateString(text, maxLength) {\r\n if (!text) return '';\r\n if (typeof text !== 'string') return '';\r\n if (text.length <= maxLength) {\r\n return text;\r\n }\r\n\r\n const truncatedText = text.slice(0, maxLength) + '...';\r\n\r\n return truncatedText;\r\n}\r\n\r\nexport function splitArrayIntoChunks(array, chunkSize) {\r\n const result = [];\r\n\r\n for (let i = 0; i < array.length; i += chunkSize) {\r\n const chunk = array.slice(i, i + chunkSize);\r\n result.push(chunk);\r\n }\r\n\r\n return result;\r\n}\r\n","/**\r\n * @module actions/language\r\n */\r\nimport FileSaver from 'file-saver';\r\nimport {\r\n SET_USER_LANGUAGE,\r\n GET_LANGUAGES,\r\n SET_LANGUAGES,\r\n API_URL,\r\n} from '../constants';\r\nimport axios from 'axios';\r\n\r\n/**\r\n * @description Get the languageIndex\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getLanguages() {\r\n let url = API_URL + '/language/getStaticLanguages';\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n //console.log(res);\r\n if (res.data) {\r\n dispatch({\r\n type: GET_LANGUAGES,\r\n payload: res.data,\r\n });\r\n }\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Set the languages\r\n */\r\nexport function setLanguages(data) {\r\n return dispatch => {\r\n dispatch({\r\n type: SET_LANGUAGES,\r\n payload: data,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Change language for editing\r\n * @return {Promise} Promise\r\n */\r\nexport function setLanguage(language) {\r\n return dispatch => {\r\n dispatch({\r\n type: SET_USER_LANGUAGE,\r\n payload: language,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Download case pdf\r\n * @return {Promise} Axios promise\r\n */\r\nexport function downloadSqlQuery() {\r\n let url = API_URL + `/language/query`;\r\n return dispatch => {\r\n return axios.get(url, { responseType: 'blob' }).then(res => {\r\n const regex = /filename=[\"]?(.*\\.sql)[\"]?;/g;\r\n const headerContentDisposition = res.headers['content-disposition'];\r\n const fileNameGroups = regex.exec(headerContentDisposition);\r\n // console.log('download', fileNameGroups, headerContentDisposition);\r\n\r\n FileSaver.saveAs(res.data, fileNameGroups[1]);\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Add new language item\r\n * @return {Promise} Axios promise\r\n */\r\nexport function addLanguageItem(data) {\r\n let url = API_URL + '/language';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Update existing language item\r\n * @return {Promise} Axios promise\r\n */\r\nexport function updateLanguageItem(data) {\r\n let url = API_URL + '/language';\r\n return dispatch => {\r\n return axios.put(url, data);\r\n };\r\n}\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport moment from 'moment';\r\n\r\nconst renderLastEditor = ({\r\n employees,\r\n answeredByUserId,\r\n updatedDate,\r\n manualAnswerDate,\r\n}) => {\r\n if (!!answeredByUserId) {\r\n const user = employees?.find(x => x.id === answeredByUserId);\r\n\r\n if (user) {\r\n const dateVal = !!manualAnswerDate ? manualAnswerDate : updatedDate;\r\n const date = moment(dateVal).format('DD.MM.YYYY');\r\n\r\n return (\r\n
\r\n \r\n {date} - {user.name}\r\n \r\n
\r\n );\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nfunction mapStateToProps({ employees }) {\r\n return {\r\n employees: employees.employees,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(renderLastEditor);\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { FormText } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport TextInput from '../../Custom/Forms/TextInput';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemText = props => {\r\n const {\r\n control,\r\n disabled,\r\n areControlsValid,\r\n hideAdmin,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n textValue,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n maxCharacters,\r\n required,\r\n placeholder,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n const [localText, setText] = useState(textValue);\r\n const textTimeout = useRef(0);\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [textValue]);\r\n\r\n const onChange = e => {\r\n let text = e.target.value;\r\n setText(text);\r\n if (textTimeout.current) {\r\n clearTimeout(textTimeout.current);\r\n }\r\n textTimeout.current = setTimeout(() => {\r\n props.onChange({ target: { name: 'textValue', value: text } });\r\n }, 300);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n\r\n return {\r\n title: infoTitle,\r\n html: infoText,\r\n };\r\n };\r\n\r\n const renderMaxChars = () => {\r\n if (!maxCharacters || maxCharacters === 0) return
;\r\n const count = textValue?.length ?? 0;\r\n\r\n return (\r\n \r\n {count}/{maxCharacters}\r\n \r\n );\r\n };\r\n\r\n const renderExtra = () => {\r\n return (\r\n \r\n {renderMaxChars()}\r\n {!hideAdmin && !disabled && (\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n }\r\n name='textValue'\r\n type='textarea'\r\n labelSize={labelSize}\r\n inputSize={inputSize}\r\n value={localText}\r\n placeholder={placeholder}\r\n onChange={onChange}\r\n info={renderInfo()}\r\n extra={renderExtra()}\r\n disabled={disabled}\r\n />\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemText);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport parse from 'html-react-parser';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { displayCurrentLangObj } from '../../../utils/translation/langauges';\r\n\r\n// Components\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\n\r\nconst ControlItemUneditable = props => {\r\n const { control } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n textValue,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n } = control;\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n let tmpTitle = title;\r\n if (alternativeTitle?.trim().length > 0) tmpTitle = alternativeTitle;\r\n\r\n const html = displayCurrentLangObj(textValue, props.language.currentLanguage);\r\n const hasHtml = html?.trim().length > 0;\r\n // console.log('html', hasHtml, html);\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n // if (!textValue) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n
{hasHtml && parse(html)}
\r\n \r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, language }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n language,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemUneditable);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport ReactSelect from '../../Custom/ReactSelect';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemDropdownCustom = props => {\r\n const {\r\n control,\r\n disabled,\r\n areControlsValid,\r\n hideAdmin,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n dropdownOptions,\r\n dropdownValue,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n multipleChoice,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [dropdownValue]);\r\n\r\n const onChange = (name, value) => {\r\n props.onChange({\r\n target: {\r\n name,\r\n value,\r\n },\r\n });\r\n };\r\n\r\n const onChangeSelection = (name, value) => {\r\n let val = !!value ? value : [];\r\n if (!multipleChoice) val = [val];\r\n\r\n val = val.reduce((prev, cur) => prev + cur.value + ',', '');\r\n\r\n onChange(name, val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const sharedProps = {\r\n placeholder: placeholder,\r\n closeMenuOnSelect: !multipleChoice,\r\n isDisabled: disabled,\r\n isMulti: multipleChoice,\r\n };\r\n\r\n const renderDropdown = () => {\r\n let options = [];\r\n let value;\r\n\r\n if (dropdownOptions?.length > 0) {\r\n dropdownOptions.sort((a, b) => a.index - b.index);\r\n\r\n options = dropdownOptions.map(x => {\r\n return {\r\n label: x.label,\r\n value: x.value,\r\n };\r\n });\r\n }\r\n\r\n if (dropdownValue?.length > 0) {\r\n const splitted = dropdownValue\r\n .split(',')\r\n .filter(x => !!x || x?.length > 0);\r\n\r\n if (multipleChoice) {\r\n value = options.filter(x => splitted.includes(x.value + ''));\r\n } else {\r\n value = options.find(x => splitted.includes(x.value + ''));\r\n }\r\n }\r\n\r\n return (\r\n onChangeSelection('dropdownValue', v)}\r\n {...sharedProps}\r\n />\r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {renderDropdown()}\r\n {!hideAdmin && !disabled && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemDropdownCustom);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\nimport ReactSelect from '../../Custom/ReactSelect';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemDropdownUsers = props => {\r\n const {\r\n control,\r\n disabled,\r\n employees,\r\n areControlsValid,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n userOptions,\r\n dropdownSelectedUsers,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n multipleChoice,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const allowedTypes = userOptions?.map(x => x.type) ?? [];\r\n const selectedIds = dropdownSelectedUsers?.map(x => x.userId) ?? [];\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [dropdownSelectedUsers]);\r\n\r\n const onChange = (name, value) => {\r\n props.onChangeArray(name, value);\r\n };\r\n\r\n const onChangeSelection = (name, value) => {\r\n let val = !!value ? value : [];\r\n if (!multipleChoice) val = [val];\r\n\r\n val = val.map(x => {\r\n return {\r\n userId: x.value,\r\n };\r\n });\r\n\r\n onChange(name, val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const sharedProps = {\r\n placeholder: placeholder,\r\n closeMenuOnSelect: !multipleChoice,\r\n isDisabled: disabled,\r\n isMulti: multipleChoice,\r\n };\r\n\r\n const renderDropdown = () => {\r\n let options = [];\r\n let value;\r\n\r\n if (allowedTypes?.length > 0) {\r\n options = employees\r\n .filter(x => allowedTypes.includes(x.employeeType))\r\n .map(x => {\r\n return {\r\n label: x.name,\r\n value: x.id,\r\n };\r\n });\r\n }\r\n\r\n if (dropdownSelectedUsers?.length > 0) {\r\n if (multipleChoice) {\r\n value = options.filter(x => selectedIds.includes(x.value));\r\n } else {\r\n // We expect only ONE id in the list.\r\n value = options.find(x => selectedIds.includes(x.value));\r\n }\r\n }\r\n\r\n return (\r\n onChangeSelection('dropdownSelectedUsers', v)}\r\n {...sharedProps}\r\n />\r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {renderDropdown()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, employees }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n employees: employees.employees,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemDropdownUsers);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport CustomCheckbox from '../../Custom/Forms/Checkbox';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport Typography from '../../Typography';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemDropdownCheckboxes = props => {\r\n const { control, disabled, areControlsValid, refreshGroups } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n checkboxOptions,\r\n checkboxValues,\r\n multipleChoice,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [checkboxValues]);\r\n\r\n const onChange = (name, value) => {\r\n props.onChange({\r\n target: {\r\n name,\r\n value,\r\n },\r\n });\r\n };\r\n\r\n const onChangeCheckbox = (id, state) => {\r\n // state = false = add\r\n // state = true = remove\r\n\r\n let options = [];\r\n if (multipleChoice) {\r\n if (checkboxValues?.trim().length > 0) {\r\n options = checkboxValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n }\r\n }\r\n\r\n if (state) {\r\n options = options.filter(x => x !== id + '');\r\n }\r\n\r\n if (!state) {\r\n options.push(id + '');\r\n }\r\n\r\n const val = options.reduce((prev, cur) => prev + cur + ',', '');\r\n\r\n onChange('checkboxValues', val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const renderCheckboxes = () => {\r\n return checkboxOptions.map((box, index) => {\r\n let checked = box.value;\r\n\r\n if (checkboxValues?.length > 0) {\r\n const split = checkboxValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n\r\n checked = split.includes(box.sbId + '');\r\n }\r\n\r\n return (\r\n
\r\n onChangeCheckbox(box.sbId, checked)}\r\n checked={checked}\r\n />\r\n
\r\n );\r\n });\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {renderTitle()}\r\n {renderInfo()}\r\n
\r\n {titleValid()}\r\n \r\n
\r\n {renderCheckboxes()}\r\n {!disabled && (\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ schemas, cases }) {\r\n return {\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemDropdownCheckboxes);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\n\r\n// Actions\r\nimport {\r\n getSingleProduct,\r\n getSingleProductCategory,\r\n} from '../../../redux/actions/products';\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\nimport ReactSelect from '../../Custom/ReactSelect';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemDropdownProducts = props => {\r\n const { control, disabled, areControlsValid, refreshGroups } = props;\r\n const { products } = props.products;\r\n const {\r\n title,\r\n alternativeTitle,\r\n allCategories,\r\n categoryOptions,\r\n productOptions,\r\n categoryValues,\r\n productValues,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n multipleChoice,\r\n errorMessage,\r\n } = control;\r\n const [categoryDropDownOptions, setCategoryDropDownOptions] = useState([]);\r\n const [selectedCategoryValue, setSelectedCategoryValue] = useState(null);\r\n\r\n const [productDropDownOptions, setProductDropDownOptions] = useState([]);\r\n const [selectedValue, setSelectedValue] = useState(null);\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n\r\n let hasCategoryValues =\r\n (categoryOptions?.length > 0 || allCategories) &&\r\n (!!categoryValues || categoryValues?.trim().length > 0);\r\n let options = [];\r\n\r\n let cOptions = [];\r\n\r\n let customerOptions = [];\r\n let value;\r\n let selectedCategories = [];\r\n\r\n if (hasCategoryValues) {\r\n selectedCategories = categoryValues\r\n .split(',')\r\n .filter(x => !!x || x?.length > 0)\r\n .map(x => parseInt(x));\r\n } else if (categoryOptions?.length > 0 && productOptions?.length === 0) {\r\n selectedCategories = categoryOptions.map(x => x.productCategoryId);\r\n hasCategoryValues = true;\r\n }\r\n\r\n if (allCategories) {\r\n products.forEach(x => {\r\n if (selectedCategories.includes(x.id)) {\r\n console.log(x);\r\n x.products.forEach(y => {\r\n const data = {\r\n label: y.name,\r\n value: y.id,\r\n order: y.sortOrder,\r\n };\r\n\r\n if (!y.customerId) options.push(data);\r\n if (!!y.customerId) customerOptions.push(data);\r\n });\r\n }\r\n cOptions.push({ label: x.name, value: x.id });\r\n });\r\n } else if (productOptions?.length > 0) {\r\n const prodIds = productOptions.map(x => x.productId);\r\n\r\n products.forEach(x => {\r\n x.products\r\n .filter(y => prodIds.includes(y.id))\r\n .forEach(y => {\r\n const data = {\r\n label: y.name,\r\n value: y.id,\r\n order: y.sortOrder,\r\n };\r\n\r\n if (!y.customerId) options.push(data);\r\n if (!!y.customerId) customerOptions.push(data);\r\n });\r\n });\r\n } else if (categoryOptions?.length > 0) {\r\n const catIds = categoryOptions.map(x => x.productCategoryId);\r\n const categories = products.filter(x => catIds.includes(x.id));\r\n\r\n categories.forEach(x => {\r\n if (selectedCategories.includes(x.id)) {\r\n x.products.forEach(y => {\r\n const data = {\r\n label: y.name,\r\n value: y.id,\r\n order: y.sortOrder,\r\n };\r\n\r\n if (!y.customerId) options.push(data);\r\n if (!!y.customerId) customerOptions.push(data);\r\n });\r\n }\r\n cOptions.push({ label: x.name, value: x.id });\r\n });\r\n }\r\n\r\n options.sort((a, b) => a.sortOrder - b.sortOrder);\r\n customerOptions.sort((a, b) => a.sortOrder - b.sortOrder);\r\n options = [...options, ...customerOptions];\r\n setProductDropDownOptions(options);\r\n setCategoryDropDownOptions(cOptions);\r\n\r\n if (categoryValues?.trim().length > 0) {\r\n const splitted = categoryValues\r\n .split(',')\r\n .filter(x => !!x || x?.length > 0);\r\n //console.log('check', splitted, cOptions, allCategories);\r\n\r\n if (multipleChoice) {\r\n value = [];\r\n if (splitted.length > 0) {\r\n splitted.forEach(x => {\r\n var val = cOptions.find(y => y.value + '' === x);\r\n if (val) {\r\n value.push(val);\r\n } else {\r\n props.getSingleProductCategory(x).then(res => {\r\n if (res) {\r\n // Add to options only as long as it is on the schema\r\n value.push({ label: res.name, value: res.id });\r\n cOptions.push(value);\r\n setSelectedCategoryValue(value);\r\n setCategoryDropDownOptions(cOptions);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n setSelectedCategoryValue(value);\r\n } else {\r\n value = cOptions.find(x => splitted.includes(x.value + ''));\r\n setSelectedCategoryValue(value);\r\n if (splitted.length > 0) {\r\n if (!value && splitted[0] !== null) {\r\n // Get specific missing category\r\n props.getSingleProductCategory(splitted[0]).then(res => {\r\n if (res) {\r\n // Add to options only as long as it is on the schema\r\n value = { label: res.name, value: res.id };\r\n cOptions.push(value);\r\n setSelectedCategoryValue(value);\r\n setCategoryDropDownOptions(cOptions);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (productValues?.trim().length > 0) {\r\n const splitted = productValues\r\n .split(',')\r\n .filter(x => !!x || x?.length > 0);\r\n //console.log('check', splitted, options, products);\r\n if (multipleChoice) {\r\n value = [];\r\n if (splitted.length > 0) {\r\n splitted.forEach(x => {\r\n var val = options.find(y => y.value + '' === x);\r\n if (val) {\r\n value.push(val);\r\n } else {\r\n props.getSingleProduct(x).then(res => {\r\n if (res) {\r\n // Add to options only as long as it is on the schema\r\n value.push({ label: res.name, value: res.id });\r\n options.push({ label: res.name, value: res.id });\r\n setSelectedValue(value);\r\n setProductDropDownOptions(options);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n setSelectedValue(value);\r\n } else {\r\n value = options.find(x => splitted.includes(x.value + ''));\r\n setSelectedValue(value);\r\n if (splitted.length > 0) {\r\n if (!value && splitted[0] !== null) {\r\n // Get specific missing product\r\n props.getSingleProduct(splitted[0]).then(res => {\r\n if (res) {\r\n // Add to options only as long as it is on the schema\r\n value = { label: res.name, value: res.id };\r\n options.push(value);\r\n setSelectedValue(value);\r\n setProductDropDownOptions(options);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, [productValues, categoryValues]);\r\n\r\n const onChange = (name, value) => {\r\n props.onChange({\r\n target: {\r\n name,\r\n value,\r\n },\r\n });\r\n };\r\n\r\n const onChangeSelection = (name, value) => {\r\n let val = !!value ? value : [];\r\n if (!multipleChoice) val = [val];\r\n\r\n val = val.reduce((prev, cur) => prev + cur.value + ',', '');\r\n\r\n onChange(name, val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const sharedProps = {\r\n placeholder: placeholder,\r\n closeMenuOnSelect: !multipleChoice,\r\n isDisabled: disabled,\r\n isMulti: multipleChoice,\r\n };\r\n\r\n const renderCategoryDropdown = () => {\r\n return (\r\n onChangeSelection('categoryValues', v)}\r\n {...sharedProps}\r\n />\r\n );\r\n };\r\n\r\n const renderProductDowndown = () => {\r\n let hasCategoryValues =\r\n (categoryOptions?.length > 0 || allCategories) &&\r\n (!!categoryValues || categoryValues?.trim().length > 0);\r\n\r\n if (categoryOptions?.length > 0 && productOptions?.length === 0) {\r\n hasCategoryValues = true;\r\n }\r\n\r\n return (\r\n onChangeSelection('productValues', v)}\r\n {...sharedProps}\r\n isDisabled={disabled || (!hasCategoryValues && allCategories)}\r\n />\r\n );\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n if (allCategories) {\r\n return (\r\n
\r\n
\r\n {renderTitle()}\r\n {renderInfo()}\r\n
\r\n {titleValid()}\r\n \r\n
\r\n \r\n \r\n {renderCategoryDropdown()}\r\n \r\n \r\n \r\n \r\n {renderProductDowndown()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {renderProductDowndown()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, products }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n products,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n getSingleProduct,\r\n getSingleProductCategory,\r\n})(ControlItemDropdownProducts);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Card, CardHeader, FormText } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { displayCurrentLangObj } from '../../../../utils/translation/langauges';\r\n\r\n// Components\r\nimport Typography from '../../../Typography';\r\n\r\nconst SchemaGroups = props => {\r\n const { building, categories, schemas, setGroup } = props;\r\n const { schemaGroups } = schemas;\r\n const currentGroups = schemaGroups\r\n .filter(x => x.caseBuildingId === building.value)\r\n .map(x => x.sbSchemaId);\r\n\r\n const renderCategoryItem = (group, key) => {\r\n const category = schemaGroups.find(\r\n x => x.sbSchemaId === group.id && x.caseBuildingId === building.value,\r\n );\r\n\r\n const renderItemInformation = () => {\r\n const total = category.schemas.length;\r\n const doneSchemas = category.schemas.filter(x => x.isDone).length;\r\n\r\n return (\r\n <>\r\n
\r\n {doneSchemas}\r\n /{total}\r\n
\r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n setGroup(group)}\r\n >\r\n
\r\n \r\n {displayCurrentLangObj(\r\n group.name,\r\n props.language.currentLanguage,\r\n )}\r\n {group.displayId}\r\n \r\n
{renderItemInformation()}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderGroups = () => {\r\n const renders = [];\r\n\r\n if (categories) {\r\n categories.forEach((x, index) => {\r\n const schemasInCategory = x.schemas.filter(y =>\r\n currentGroups.includes(y.id),\r\n );\r\n\r\n if (schemasInCategory.length > 0) {\r\n const render = (\r\n
\r\n \r\n \r\n {displayCurrentLangObj(\r\n x.category.name,\r\n props.language.currentLanguage,\r\n )}\r\n \r\n \r\n {schemasInCategory.map(renderCategoryItem)}\r\n
\r\n
\r\n );\r\n\r\n renders.push(render);\r\n }\r\n });\r\n }\r\n\r\n return renders;\r\n };\r\n\r\n return
{renderGroups()}
;\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, language }) {\r\n return {\r\n auth,\r\n schemas,\r\n language,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(SchemaGroups);\r\n","import React, { useState } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../../i18n';\r\nimport { FormText } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { parseDate, StringIsEmpty } from '../../../../utils/common';\r\nimport { displayCurrentLangObj } from '../../../../utils/translation/langauges';\r\n\r\n// Components\r\nimport TextInput from '../../Forms/TextInput';\r\nimport Typography from '../../../Typography';\r\nimport ControlItem from '../../../ControlSchemas/ControlItem';\r\nimport CollapsableCard from '../../CollapsableCard';\r\n\r\nconst SchemaItem = props => {\r\n const {\r\n schema,\r\n groupIndex,\r\n isServiceAgreement,\r\n selectControl,\r\n _targetControlId,\r\n imageObjects,\r\n } = props;\r\n const { currentSchemaGroup } = props.schemas;\r\n const [isOpen, setOpen] = useState(false);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n let title;\r\n if (schema.isDone) {\r\n title = displayCurrentLangObj(\r\n schema.titleWhenDone,\r\n props.language.currentLanguage,\r\n );\r\n } else {\r\n title =\r\n displayCurrentLangObj(\r\n currentSchemaGroup.name,\r\n props.language.currentLanguage,\r\n ) + (!StringIsEmpty(schema.name) ? ' - ' + schema.name : '');\r\n }\r\n\r\n const onChangeName = e => {};\r\n\r\n const renderSchemaId = () => {\r\n let displayId = schema.displayId ? `${schema.displayId}` : '';\r\n let parsedDate = parseDate(schema.createdDate);\r\n if (schema.controlItems?.length > 0) {\r\n if (schema.controlItems[0].manualAnswerDate) {\r\n parsedDate = parseDate(schema.controlItems[0].manualAnswerDate);\r\n }\r\n }\r\n\r\n //console.log(schema);\r\n\r\n if (displayId.length > 0) displayId += `.${props.index}`;\r\n\r\n if (isServiceAgreement) {\r\n if (schema.actualServiceDate) {\r\n parsedDate = parseDate(schema.actualServiceDate);\r\n } else {\r\n parsedDate = parseDate(schema.expectedServiceDate);\r\n }\r\n }\r\n\r\n if (parsedDate !== '01-01-0001') {\r\n if (displayId.length > 0) {\r\n displayId += ` - ${parsedDate}`;\r\n } else {\r\n displayId = parsedDate;\r\n }\r\n }\r\n return displayId;\r\n };\r\n\r\n const renderSchemaMenuContent = () => {\r\n let statusContent;\r\n\r\n if (schema.isDone) {\r\n statusContent = (\r\n \r\n {i18next.t(1003)}{' '}\r\n {/* */}\r\n \r\n );\r\n } else {\r\n statusContent = (\r\n \r\n {/* {i18next.t(1003)}{' '}\r\n */}\r\n \r\n );\r\n }\r\n\r\n return
{statusContent}
;\r\n };\r\n\r\n const renderControlItem = (control, idx) => {\r\n let sharedProps = {\r\n schema,\r\n groupIndex,\r\n itemIndex: idx,\r\n schemaIndex: props.index,\r\n control,\r\n disableAllFunctions: true,\r\n selectControl,\r\n _targetControlId,\r\n imageObjects,\r\n isMovingImages: true,\r\n };\r\n\r\n if (control.isGroup) {\r\n return renderControlItemGroup(control, idx, sharedProps);\r\n } else {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n };\r\n\r\n const renderControlItemGroup = (group, gIndex, sharedProps) => {\r\n let groupTitle;\r\n if (!!group.title && group.title?.trim().length > 0) {\r\n groupTitle = displayCurrentLangObj(\r\n group.title,\r\n props.language.currentLanguage,\r\n );\r\n }\r\n\r\n return (\r\n
\r\n {!!groupTitle && (\r\n \r\n {groupTitle}\r\n \r\n )}\r\n {group.controlItems.map((x, i) => {\r\n let expandedProps = {\r\n ...sharedProps,\r\n itemIndex: i,\r\n control: { ...x, required: group.required || x.required },\r\n itemGroupIndex: gIndex,\r\n group,\r\n };\r\n\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n const renderBody = () => {\r\n return (\r\n <>\r\n \r\n\r\n {/* Controls */}\r\n {schema.controlItems.map(renderControlItem)}\r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {title}\r\n {renderSchemaId()}\r\n \r\n
\r\n }\r\n headerRight={renderSchemaMenuContent()}\r\n body={renderBody()}\r\n toggle={() => setOpen(!isOpen)}\r\n isOpen={isOpen}\r\n />\r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, language }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n language,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(SchemaItem);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../../i18n';\r\nimport { Button } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { displayCurrentLangObj } from '../../../../utils/translation/langauges';\r\n\r\n// Components\r\nimport Typography from '../../../Typography';\r\nimport SchemaItem from './SchemaItem';\r\n\r\nconst SchemaList = props => {\r\n const {\r\n building,\r\n schemas,\r\n setGroup,\r\n selectControl,\r\n currentGroup,\r\n _targetControlId,\r\n imageObjects,\r\n } = props;\r\n const { schemaGroups } = schemas;\r\n const schemaGroupIndex = schemaGroups.findIndex(\r\n x =>\r\n x.sbSchemaId === currentGroup.id && x.caseBuildingId === building?.value,\r\n );\r\n const schemaGroup =\r\n schemaGroupIndex > -1 ? schemaGroups[schemaGroupIndex] : null;\r\n\r\n const renderGoBackButton = () => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n const renderLabel = () => {\r\n if (!currentGroup) return '';\r\n const { name, customTitle, displayId } = currentGroup;\r\n let text = '';\r\n let title = name;\r\n if (customTitle?.trim().length > 0) {\r\n title = customTitle;\r\n }\r\n\r\n title = displayCurrentLangObj(title, props.language.currentLanguage);\r\n\r\n if (displayId && displayId.length > 0) {\r\n text = `${displayId} - ${title}`;\r\n } else {\r\n text = title;\r\n }\r\n\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n };\r\n\r\n const renderSchema = (schema, index) => {\r\n const sharedProps = {\r\n schema,\r\n building,\r\n index,\r\n groupIndex: schemaGroupIndex,\r\n selectControl,\r\n _targetControlId,\r\n imageObjects,\r\n };\r\n\r\n return ;\r\n };\r\n\r\n return (\r\n
\r\n {building?.label}\r\n
\r\n {renderLabel()}\r\n
{renderGoBackButton()}
\r\n
\r\n {schemaGroup?.schemas.map(renderSchema)}\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, language }) {\r\n return {\r\n auth,\r\n schemas,\r\n language,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(SchemaList);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../../i18n';\r\nimport { Card, CardBody, Container } from 'reactstrap';\r\n\r\n// Actions\r\nimport { getSchemaOptions } from '../../../../redux/actions/schemas';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport FormGroupRow from '../../Forms/FormGroupRow';\r\nimport ReactSelect from '../../ReactSelect';\r\nimport SchemaGroups from './SchemaGroups';\r\nimport SchemaList from './SchemaList';\r\n\r\nconst SchemaPage = props => {\r\n const {\r\n currentCase,\r\n getSchemaOptions,\r\n setGroup,\r\n schemaGroup,\r\n selectControl,\r\n _targetControlId,\r\n imageObjects,\r\n } = props;\r\n const { buildings } = currentCase;\r\n const [building, setBuilding] = useState(null);\r\n const [schemaOptions, setSchemaOptions] = useState([]);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n const options = [\r\n ...buildings.map(item => {\r\n return { label: item.name, value: item.id };\r\n }),\r\n ];\r\n\r\n useEffect(() => {\r\n if (options.length > 0) {\r\n setBuilding(options[0]);\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n const dataObj = currentCase ? { id: currentCase?.id } : null;\r\n\r\n getSchemaOptions(dataObj)\r\n .then(res => {\r\n setSchemaOptions(res.data);\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n // eslint-disable-next-line\r\n }, [currentCase]);\r\n\r\n const renderBuildingsMenu = () => {\r\n const onChangeBuilding = val => {\r\n setBuilding(val);\r\n };\r\n\r\n const buildingMenu = (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const renderContent = () => {\r\n let sharedProps = {\r\n currentCase,\r\n building,\r\n categories: schemaOptions,\r\n currentGroup: schemaGroup,\r\n setGroup,\r\n selectControl,\r\n _targetControlId,\r\n imageObjects,\r\n };\r\n\r\n if (schemaGroup) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n {renderBuildingsMenu()}\r\n {building && }\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n {renderContent()}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas }) {\r\n return {\r\n auth,\r\n schemas,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n getSchemaOptions,\r\n})(SchemaPage);\r\n","import React, { useState } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport {\r\n Button,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n UncontrolledTooltip,\r\n} from 'reactstrap';\r\n\r\n// Actions\r\nimport { moveImagesToNewControlItem } from '../../../redux/actions/schemas';\r\nimport { getAllMarkingReferences } from '../../../redux/actions/markings';\r\nimport { getImages } from '../../../redux/actions/cases';\r\nimport { refreshImageHash } from '../../../redux/actions/common';\r\n\r\n// Utils\r\nimport PageSpinner from '../../PageSpinner';\r\n\r\n// Components\r\nimport SchemaPage from './components/SchemaPage';\r\n\r\nconst MoveImagesModal = props => {\r\n const {\r\n cases,\r\n control,\r\n moveImagesToNewControlItem,\r\n show,\r\n toggle,\r\n callback,\r\n isServiceAgreement,\r\n getAllMarkingReferences,\r\n getImages,\r\n } = props;\r\n const { selectedCase } = cases;\r\n const [movingImages, setMovingImages] = useState(false);\r\n const [targetControlId, setTargetId] = useState(0);\r\n const [images, setImages] = useState([]);\r\n const [imageObjects, setImageObjects] = useState([]);\r\n const [page, setPage] = useState(1);\r\n const [showUnknownError, setUnknownError] = useState(false);\r\n const [schemaGroup, setGroup] = useState(0);\r\n const [modalTitle, setModalTitle] = useState(i18next.t(8319));\r\n const gallery = control.files;\r\n\r\n const toggleAction = () => {\r\n setGroup(null);\r\n setTargetId(0);\r\n setPage(1);\r\n setImages([]);\r\n setImageObjects([]);\r\n toggle();\r\n };\r\n\r\n const refreshImageReferences = () => {\r\n let dataObj = {};\r\n if (isServiceAgreement) {\r\n dataObj.saId = selectedCase.id;\r\n } else {\r\n dataObj.ksId = selectedCase.id;\r\n }\r\n\r\n getAllMarkingReferences(dataObj).catch(err => console.log(err));\r\n getImages({ id: selectedCase.id, type: selectedCase.type })\r\n .then(refreshImageHash)\r\n .catch(err => console.log(err));\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //////// CONTENT ////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n const renderContent = () => {\r\n const Page1 = () => {\r\n const imageAction = (id, imageObject) => {\r\n let updatedImages = [...images];\r\n if (updatedImages.includes(id)) {\r\n updatedImages = updatedImages.filter(x => x !== id);\r\n } else {\r\n updatedImages.push(id);\r\n }\r\n\r\n let updatedImageObjects = [...imageObjects];\r\n if (updatedImageObjects.includes(imageObject)) {\r\n updatedImageObjects = updatedImageObjects.filter(\r\n x => x !== imageObject,\r\n );\r\n } else {\r\n updatedImageObjects.push(imageObject);\r\n }\r\n\r\n setImages(updatedImages);\r\n setImageObjects(updatedImageObjects);\r\n };\r\n\r\n return (\r\n
\r\n {gallery.map((image, index) => {\r\n // console.log(image);\r\n\r\n let title = i18next.t(21276);\r\n if (image.fileDescription?.trim().length > 0) {\r\n title = image.fileDescription;\r\n }\r\n // const origName = image.originalFileName;\r\n const target = 'tp-' + image.id;\r\n\r\n return (\r\n imageAction(image.id, image)}\r\n >\r\n {title}\r\n
\r\n

\r\n {title}\r\n

\r\n
\r\n \r\n {title}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n const Page2 = () => {\r\n const selectControl = id => {\r\n setTargetId(id);\r\n };\r\n\r\n let sharedSchemasProps = {\r\n currentCase: selectedCase,\r\n selectControl,\r\n setPage,\r\n setGroup,\r\n schemaGroup,\r\n _targetControlId: targetControlId,\r\n imageObjects,\r\n };\r\n return ;\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////\r\n\r\n const renderErrors = () => {\r\n if (!showUnknownError) return null;\r\n\r\n return (\r\n
\r\n

{i18next.t(8318)}

\r\n
\r\n );\r\n };\r\n\r\n let content;\r\n if (page === 1) content = Page1();\r\n if (page === 2 || page === 3) content = Page2();\r\n\r\n return (\r\n
\r\n {content}\r\n {renderErrors()}\r\n
\r\n );\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n /////// FOOOTER /////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n const renderFooter = () => {\r\n const cancelButton = (\r\n \r\n {i18next.t(2)}\r\n \r\n );\r\n\r\n const moveImages = () => {\r\n setMovingImages(true);\r\n setUnknownError(false);\r\n\r\n const moveReq = {\r\n caseId: selectedCase.id,\r\n originControlId: control.id,\r\n targetControlId,\r\n images,\r\n };\r\n\r\n moveImagesToNewControlItem(moveReq)\r\n .then(() => {\r\n toggleAction();\r\n if (callback) callback();\r\n refreshImageReferences();\r\n\r\n setMovingImages(false);\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n\r\n setMovingImages(false);\r\n setUnknownError(true);\r\n });\r\n };\r\n\r\n const markAll = () => {\r\n const allIds = gallery.map(x => x.id);\r\n setImages(allIds);\r\n };\r\n\r\n let content;\r\n switch (page) {\r\n case 1:\r\n content = (\r\n <>\r\n \r\n
\r\n {cancelButton}\r\n {\r\n setModalTitle(i18next.t(9125));\r\n setPage(2);\r\n }}\r\n disabled={images.length === 0}\r\n color='btnSecondary'\r\n >\r\n {i18next.t(254)}\r\n \r\n
\r\n \r\n );\r\n break;\r\n case 2:\r\n case 3:\r\n const action =\r\n schemaGroup > 0\r\n ? () => {\r\n setTargetId(0);\r\n }\r\n : () => {\r\n setModalTitle(i18next.t(8319));\r\n setPage(1);\r\n };\r\n content = (\r\n <>\r\n \r\n {i18next.t(1039)}\r\n \r\n
\r\n {cancelButton}\r\n \r\n {i18next.t(1180)}\r\n \r\n
\r\n \r\n );\r\n break;\r\n default:\r\n content = cancelButton;\r\n break;\r\n }\r\n\r\n return (\r\n \r\n
{content}
\r\n
\r\n );\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //////////// Feedback modal /////////////////////////////////////////////////////////////////////////////\r\n\r\n const feedbackModal = () => {\r\n return (\r\n {}}\r\n fade={false}\r\n size={'sm'}\r\n centered\r\n backdrop={false}\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n return (\r\n \r\n {modalTitle}\r\n \r\n {renderContent()}\r\n {feedbackModal()}\r\n \r\n {renderFooter()}\r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, cases }) {\r\n return {\r\n auth,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n moveImagesToNewControlItem,\r\n getAllMarkingReferences,\r\n getImages,\r\n refreshImageHash,\r\n})(MoveImagesModal);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport {\r\n Button,\r\n Col,\r\n DropdownItem,\r\n FormGroup,\r\n FormText,\r\n Label,\r\n} from 'reactstrap';\r\n\r\n// Actions\r\nimport {\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n setGalleryImages,\r\n} from '../../../redux/actions/cases';\r\n\r\n// Utils\r\nimport { uriToFile } from '../../../utils/fileUtils';\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport Typography from '../../Typography';\r\nimport FileInput from '../../Custom/Forms/FileInput';\r\nimport Gallery from '../../Custom/Gallery';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport MoveImagesModal from '../../Custom/MoveImagesModal';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\nimport { CopyIcon } from '../../Custom/DocumentIcons';\r\n\r\nconst ControlItemPhoto = props => {\r\n const {\r\n schema,\r\n control,\r\n disabled,\r\n onChangeArray,\r\n setUpdating,\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n selectControl,\r\n refreshGroups,\r\n _targetControlId,\r\n imageObjects,\r\n areControlsValid,\r\n hasAreaMarking,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n minFiles,\r\n maxFiles,\r\n files,\r\n errorMessage,\r\n } = control;\r\n const { selectedCase } = props.cases;\r\n const [valid, setValid] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [isUploading, setUploading] = useState(false);\r\n const [showMovingImagesModal, setShowMoveImagesModal] = useState(false);\r\n const isServiceAgreement = selectedCase?.type === 3;\r\n const labelSize = 3;\r\n // const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [files]);\r\n\r\n const onChange = val => {\r\n onChangeArray('files', val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n ////// file handling methods\r\n\r\n const onDropAccepted = (\r\n images,\r\n description = null,\r\n title = null,\r\n oldFile = null,\r\n ) => {\r\n setUpdating(true);\r\n setUploading(true);\r\n\r\n let obj = {\r\n controlItemId: control.id,\r\n };\r\n\r\n if (isServiceAgreement) {\r\n obj.serviceAgreementId = selectedCase.id;\r\n } else {\r\n obj.qualityCaseId = selectedCase.id;\r\n }\r\n\r\n uploadFiles(images, obj)\r\n .then(res => {\r\n if (description) {\r\n updateFileInfo(res[0].id, { description, title });\r\n res[0].fileDescription = description;\r\n }\r\n\r\n let tmp = files;\r\n if (oldFile) {\r\n tmp = files.filter(x => x.id !== oldFile.id);\r\n }\r\n onChange([...tmp, ...res]);\r\n setUpdating(false);\r\n setUploading(false);\r\n })\r\n .catch(err => {\r\n let errData;\r\n if (err.response) {\r\n errData = err.response.data;\r\n } else {\r\n errData = err;\r\n }\r\n if (errData.files?.length > 0) {\r\n onChange([...files, ...errData.files]);\r\n }\r\n console.log('file error', errData);\r\n setErrors(errData.fileInvalid || [i18next.t(142)]);\r\n setUpdating(false);\r\n setUploading(false);\r\n });\r\n };\r\n\r\n const saveFile = (oldFile, newFile) => {\r\n setUpdating(true);\r\n // Delete the old file,\r\n deleteFile(oldFile.id).then(() => {\r\n const newFiles = files.filter(f => f.id !== oldFile.id);\r\n onChange(newFiles);\r\n });\r\n\r\n // Save the new file\r\n let file = uriToFile(newFile, oldFile.fileName);\r\n //console.log(file);\r\n onDropAccepted([file], oldFile.fileDescription, oldFile.fileTitle, oldFile);\r\n };\r\n\r\n const onDelete = fileId => {\r\n setUpdating(true);\r\n deleteFile(fileId).then(() => {\r\n const newFiles = files.filter(f => f.id !== fileId);\r\n\r\n onChange(newFiles);\r\n setUpdating(false);\r\n });\r\n };\r\n\r\n const handleInfo = (fileId, data) => {\r\n let file = files.find(x => x.id === fileId);\r\n\r\n file = { ...file, ...data };\r\n\r\n let newFiles = files.filter(x => x.id !== fileId);\r\n newFiles.push(file);\r\n newFiles.sort((a, b) => (a.id > b.id ? 1 : -1));\r\n onChange(newFiles);\r\n };\r\n\r\n const handleInfoBulk = items => {\r\n onChange(items);\r\n };\r\n\r\n const toggleShowMoveImagesModal = () => {\r\n setShowMoveImagesModal(!showMovingImagesModal);\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n const renderErrors = () => {\r\n return (\r\n <>\r\n {errors.map((error, key) => (\r\n \r\n {error}\r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n const renderSelectControlButton = () => {\r\n if (!selectControl) return null;\r\n\r\n const action = () => {\r\n selectControl(control.id);\r\n };\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const renderMoveImages = () => {\r\n if (schema.isDone || files.length === 0 || !!selectControl) return null;\r\n\r\n return (\r\n <>\r\n \r\n \r\n );\r\n };\r\n\r\n const renderExtraMoveImageOptions = () => {\r\n if (\r\n isServiceAgreement ||\r\n schema.isDone ||\r\n files.length === 0 ||\r\n !!selectControl\r\n )\r\n return null;\r\n\r\n return (\r\n \r\n {' '}\r\n {i18next.t(8321)}\r\n \r\n );\r\n };\r\n\r\n const renderMinMaxFiles = () => {\r\n if ((minFiles === 0 && maxFiles === 0) || (!minFiles && !maxFiles))\r\n return null;\r\n\r\n let text;\r\n if (minFiles > 0 && maxFiles === 0) {\r\n text =\r\n i18next.t(12054) +\r\n ': ' +\r\n minFiles +\r\n ' - (' +\r\n files.length +\r\n '/' +\r\n minFiles +\r\n ')';\r\n }\r\n\r\n if (minFiles === 0 && maxFiles > 0) {\r\n text =\r\n i18next.t(12055) +\r\n ': ' +\r\n maxFiles +\r\n ' - (' +\r\n files.length +\r\n '/' +\r\n maxFiles +\r\n ')';\r\n }\r\n\r\n if (minFiles > 0 && maxFiles > 0) {\r\n text =\r\n i18next.t(12071) +\r\n ': ' +\r\n files.length +\r\n ' - ' +\r\n i18next.t(12054) +\r\n ': ' +\r\n minFiles +\r\n ' - ' +\r\n i18next.t(12055) +\r\n ': ' +\r\n maxFiles;\r\n }\r\n\r\n return {text};\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n let tmpFiles = files;\r\n if (_targetControlId === control.id && imageObjects) {\r\n tmpFiles = [...files, ...imageObjects];\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {!schema.isDone && (\r\n <>\r\n \r\n \r\n {!disabled && (\r\n \r\n )}\r\n {i18next.t(9117)}\r\n \r\n {renderMinMaxFiles()}\r\n \r\n )}\r\n\r\n {renderErrors()}\r\n\r\n \r\n {!isServiceAgreement && renderMoveImages()}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n setGalleryImages,\r\n})(ControlItemPhoto);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\n\r\n// Actions\r\n\r\n// Utils\r\n\r\n// Components\r\nimport ControlItemDropdownCustom from './ControlItemDropdownCustom';\r\nimport ControlItemPhoto from './ControlItemPhoto';\r\nimport ControlItemText from './ControlItemText';\r\n\r\nconst ControlItemDropdownCommentPhotos = props => {\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //// DROPDOWN\r\n\r\n const renderDropdown = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //// TEXT\r\n\r\n const rendertextInput = () => {\r\n const textTitle = i18next.t(3205);\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //// Photo\r\n\r\n const renderFileInput = () => {\r\n const fileTitle = i18next.t(1060);\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n return (\r\n
\r\n {renderDropdown()}\r\n {rendertextInput()}\r\n {renderFileInput()}\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemDropdownCommentPhotos);\r\n","import React, { useState } from 'react';\r\nimport i18next from '../../i18n';\r\nimport {\r\n Button,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n UncontrolledTooltip,\r\n} from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\n\r\n// Components\r\n\r\nconst ImagePickerModal = ({ files, onImageClick, toggle, show, isSaving }) => {\r\n const [selectedImage, setSelectedImage] = useState(null);\r\n const gallery = files ?? [];\r\n\r\n const onSetImageAction = () => {\r\n if (selectedImage) {\r\n onImageClick(selectedImage);\r\n }\r\n };\r\n\r\n const renderContent = () => {\r\n return (\r\n
\r\n
\r\n {gallery.map((image, index) => {\r\n // console.log(image);\r\n const origName = image.fileTitle;\r\n const target = 'tp-' + image.id;\r\n\r\n return (\r\n setSelectedImage(image)}\r\n >\r\n {origName}\r\n
\r\n

\r\n {origName}\r\n

\r\n
\r\n \r\n {origName}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n \r\n );\r\n };\r\n\r\n const renderFooter = () => {\r\n return (\r\n \r\n
\r\n
\r\n \r\n {i18next.t(2)}\r\n \r\n \r\n {i18next.t(254)}\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n {i18next.t(1327)}\r\n {renderContent()}\r\n {renderFooter()}\r\n \r\n );\r\n};\r\n\r\nexport default ImagePickerModal;\r\n","import React, { useState } from 'react';\r\nimport i18next from '../../i18n';\r\nimport { Button } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\n\r\n// Components\r\nimport ImagePickerModal from './ImagePickerModal';\r\n\r\nconst GalleryPicker = ({ files, disabled, onImageClick, isSaving }) => {\r\n const [showModal, setShowModal] = useState(false);\r\n const casefiles = files ?? [];\r\n\r\n const toggleModal = () => {\r\n setShowModal(!showModal);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default GalleryPicker;\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\n\r\n// Actions\r\nimport {\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n setGalleryImages,\r\n} from '../../../redux/actions/cases';\r\nimport { addImageToControlItem } from '../../../redux/actions/schemas';\r\n\r\n// Utils\r\nimport { uriToFile } from '../../../utils/fileUtils';\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\nimport { CASE_FILE_TYPE } from '../../../redux/constants';\r\n\r\n// Components\r\nimport Typography from '../../Typography';\r\nimport FileInput from '../../Custom/Forms/FileInput';\r\nimport Gallery from '../../Custom/Gallery';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport GalleryPicker from '../../Custom/GalleryPicker';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemPhotoArea = props => {\r\n const {\r\n building,\r\n schema,\r\n control,\r\n disabled,\r\n onChangeArray,\r\n setUpdating,\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n addImageToControlItem,\r\n selectControl,\r\n areControlsValid,\r\n isMovingImages,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n files,\r\n errorMessage,\r\n } = control;\r\n const { selectedCase, caseImages } = props.cases;\r\n const [valid, setValid] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [isUploading, setUploading] = useState(false);\r\n const isServiceAgreement = selectedCase?.type === 3;\r\n const labelSize = 3;\r\n // const inputSize = 9;\r\n let tmpFiles = [];\r\n if (files?.length > 0) {\r\n tmpFiles = [files[0]];\r\n }\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [files]);\r\n\r\n const onChange = val => {\r\n onChangeArray('files', val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n ////// file handling methods\r\n\r\n const onDropAccepted = (images, description = null, title = null) => {\r\n setUpdating(true);\r\n setUploading(true);\r\n\r\n let obj = {\r\n controlItemId: control.id,\r\n };\r\n\r\n if (isServiceAgreement) {\r\n obj.serviceAgreementId = selectedCase.id;\r\n } else {\r\n obj.qualityCaseId = selectedCase.id;\r\n }\r\n\r\n uploadFiles(images, obj)\r\n .then(res => {\r\n if (description) {\r\n updateFileInfo(res[0].id, { description, title });\r\n res[0].fileDescription = description;\r\n }\r\n onChange(res);\r\n setUpdating(false);\r\n setUploading(false);\r\n })\r\n .catch(err => {\r\n let errData;\r\n if (err.response) {\r\n errData = err.response.data;\r\n } else {\r\n errData = err;\r\n }\r\n console.log('file error', errData);\r\n setErrors(errData.fileInvalid || [i18next.t(142)]);\r\n setUpdating(false);\r\n setUploading(false);\r\n });\r\n };\r\n\r\n const saveFile = (oldFile, newFile) => {\r\n setUpdating(true);\r\n // Delete the old file,\r\n deleteFile(oldFile.id).then(() => {\r\n const newFiles = files.filter(f => f.id !== oldFile.id);\r\n onChange(newFiles);\r\n });\r\n\r\n // Save the new file\r\n let file = uriToFile(newFile, oldFile.fileName);\r\n //console.log(file);\r\n onDropAccepted([file], oldFile.fileDescription, oldFile.fileTitle);\r\n };\r\n\r\n const onDelete = fileId => {\r\n setUpdating(true);\r\n deleteFile(fileId).then(() => {\r\n const newFiles = files.filter(f => f.id !== fileId);\r\n\r\n onChange(newFiles);\r\n setUpdating(false);\r\n });\r\n };\r\n\r\n const handleInfo = (fileId, description, title) => {\r\n //console.log(fileId, description);\r\n let file = files.find(x => x.id === fileId);\r\n file.fileDescription = description;\r\n file.fileTitle = title;\r\n let newFiles = files.filter(x => x.id !== fileId);\r\n newFiles.push(file);\r\n newFiles.sort((a, b) => (a.id > b.id ? 1 : -1));\r\n\r\n onChange(newFiles);\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n //////// Image marking\r\n\r\n const onAddImageToControl = image => {\r\n setUploading(true);\r\n\r\n const dataObj = {\r\n imageId: image.id,\r\n controlId: control.id,\r\n caseId: selectedCase.id,\r\n isServiceAgreement,\r\n };\r\n\r\n addImageToControlItem(dataObj)\r\n .then(res => {\r\n onChange([res.data]);\r\n setUploading(false);\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n setUploading(false);\r\n });\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n const renderErrors = () => {\r\n return (\r\n <>\r\n {errors.map((error, key) => (\r\n \r\n {error}\r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n let galleryComp;\r\n const allowedTypes = [\r\n CASE_FILE_TYPE.KSFixingPlan,\r\n CASE_FILE_TYPE.BuildingImage,\r\n ];\r\n let filteredFiles = caseImages.filter(x =>\r\n allowedTypes.includes(x.documentType),\r\n );\r\n\r\n if (building) {\r\n filteredFiles = filteredFiles.filter(\r\n x => x.caseBuildingId === building.value || !x.caseBuildingId,\r\n );\r\n }\r\n\r\n if (filteredFiles.length > 0 && files.length === 0) {\r\n galleryComp = (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {!schema.isDone && files.length === 0 && !selectControl && (\r\n <>\r\n \r\n \r\n {!disabled && (\r\n \r\n )}\r\n {i18next.t(9117)}\r\n \r\n \r\n )}\r\n\r\n {renderErrors()}\r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, common }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n imageHash: common.imageHash,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n uploadFiles,\r\n deleteFile,\r\n updateFileInfo,\r\n setGalleryImages,\r\n addImageToControlItem,\r\n})(ControlItemPhotoArea);\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport ReactSignatureCanvas from 'react-signature-canvas';\r\nimport { Button, Col, FormGroup, Label } from 'reactstrap';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Actions\r\nimport { getContacts } from '../../../redux/actions/contacts';\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\nimport { getUserData } from '../../../utils/userUtil';\r\nimport { EMPLOYEE_TYPE } from '../../../redux/constants';\r\n\r\n// Components\r\nimport CustomModal from '../../Custom/CustomModal';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ReactSelect from '../../Custom/ReactSelect';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemSignature = props => {\r\n const {\r\n control,\r\n disabled,\r\n employees,\r\n areControlsValid,\r\n signingOnly,\r\n disallowOverwrite, // TODO: Implement this, so only the assignee can sign\r\n onChangeControlContacts,\r\n getContacts,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n signatureValue,\r\n userOptions,\r\n dropdownSelectedUsers,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const [showSignModal, setShowSignModal] = useState(false);\r\n const [signerIdMatchCurrentUser, setSignerIdMatchCurrentUser] = useState(\r\n false,\r\n );\r\n const [allowSigning, setAllowSigning] = useState(\r\n !signatureValue || signatureValue?.trim().length === 0,\r\n );\r\n const [contactsRaw, setContactsRaw] = useState([]);\r\n const [contactOptions, setContactOptions] = useState([]);\r\n const [selectedContact, setSelectedContact] = useState(null);\r\n let sigPad = useRef(null);\r\n\r\n const internals = [\r\n EMPLOYEE_TYPE.ExecutivePerson,\r\n EMPLOYEE_TYPE.CompanyOwner,\r\n EMPLOYEE_TYPE.InternalSubcontractor,\r\n ];\r\n\r\n const allowedTypes = userOptions?.map(x => x.type) ?? [];\r\n const selectedIds = dropdownSelectedUsers?.map(x => x.userId) ?? [];\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n if (selectedIds.length === 0) {\r\n setSignerIdMatchCurrentUser(false);\r\n } else {\r\n const tmpUser = getUserData(props.auth);\r\n setSignerIdMatchCurrentUser(selectedIds.includes(tmpUser.id));\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, [selectedIds]);\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [signatureValue]);\r\n\r\n useEffect(() => {\r\n if (!signingOnly && selectedIds.length > 0) {\r\n getContacts({ id: selectedIds[0] }).then(res => {\r\n const options = res.data.map(x => {\r\n return {\r\n value: x.id,\r\n label: x.name,\r\n };\r\n });\r\n\r\n setContactsRaw(res.data);\r\n setContactOptions(options);\r\n });\r\n }\r\n // eslint-disable-next-line\r\n }, [dropdownSelectedUsers]);\r\n\r\n const toggleModal = () => {\r\n setShowSignModal(!showSignModal);\r\n setAllowSigning(!signatureValue || signatureValue?.trim().length === 0);\r\n };\r\n\r\n const onChangeContact = val => {\r\n setSelectedContact(val);\r\n\r\n let data;\r\n if (val) {\r\n data = contactsRaw.find(x => x.id === val.value);\r\n }\r\n\r\n onChangeControlContacts(control.id, data);\r\n };\r\n\r\n const onChange = value => {\r\n props.onChange({ target: { name: 'signatureValue', value } });\r\n };\r\n\r\n const onChangeSelection = (name, value) => {\r\n let val = !!value ? [value] : [];\r\n\r\n if (!!signatureValue?.trim().length > 0) {\r\n const tmp = val.map(x => x.value);\r\n if (selectedIds.sort().join(',') !== tmp.sort().join(',')) {\r\n onChange(null);\r\n }\r\n }\r\n\r\n val = val.map(x => {\r\n return {\r\n userId: x.value,\r\n };\r\n });\r\n\r\n props.onChangeArray(name, val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const sharedProps = {\r\n placeholder,\r\n closeMenuOnSelect: true,\r\n isDisabled: disabled || signingOnly,\r\n };\r\n\r\n const renderDropdown = () => {\r\n let options = [];\r\n let value;\r\n\r\n if (allowedTypes?.length > 0) {\r\n options = employees\r\n .filter(x => allowedTypes.includes(x.employeeType))\r\n .map(x => {\r\n return {\r\n label: x.name,\r\n value: x.id,\r\n };\r\n });\r\n }\r\n\r\n if (dropdownSelectedUsers?.length > 0) {\r\n value = options.find(x => selectedIds.includes(x.value));\r\n }\r\n\r\n return (\r\n onChangeSelection('dropdownSelectedUsers', v)}\r\n {...sharedProps}\r\n />\r\n );\r\n };\r\n\r\n const renderSigningArea = () => {\r\n let action =\r\n (!disabled || signingOnly || signerIdMatchCurrentUser) &&\r\n !disallowOverwrite\r\n ? toggleModal\r\n : null;\r\n\r\n if (!signerIdMatchCurrentUser) action = null;\r\n\r\n return (\r\n \r\n {!signatureValue && (\r\n
\r\n
\r\n {i18next.t(1088)}\r\n
\r\n
\r\n )}\r\n {signatureValue && (\r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n const renderModal = () => {\r\n let cvsProps = {\r\n height: window.innerHeight * 0.5,\r\n className: 'signature',\r\n };\r\n\r\n if (isMobile) {\r\n cvsProps = {\r\n height: Math.max(450, window.innerHeight * 0.5),\r\n className: 'signature',\r\n };\r\n }\r\n\r\n const handleSign = () => {\r\n const val = sigPad.toDataURL('image/png');\r\n onChange(val);\r\n setShowSignModal(!showSignModal);\r\n };\r\n\r\n const handleClear = () => {\r\n try {\r\n sigPad.clear();\r\n } catch (error) {}\r\n setAllowSigning(true);\r\n };\r\n\r\n const renderFooter = () => {\r\n return (\r\n
\r\n {allowSigning && (\r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n {!allowSigning && (\r\n
\r\n \r\n
\r\n )}\r\n {allowSigning && (\r\n (sigPad = ref)}\r\n clearOnResize={false}\r\n />\r\n )}\r\n \r\n );\r\n };\r\n\r\n const renderContact = () => {\r\n if (signingOnly) return null;\r\n const user = employees.find(x => x.id === selectedIds[0]);\r\n let isInternal;\r\n\r\n if (user) {\r\n isInternal = internals.includes(user.employeeType);\r\n }\r\n\r\n if (selectedIds.length === 0 || isInternal || user?.isPrivate) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n {renderDropdown()}\r\n \r\n {renderContact()}\r\n \r\n \r\n \r\n {renderSigningArea()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n {renderModal()}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, employees }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n employees: employees.employees,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, { getContacts })(ControlItemSignature);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Col, FormGroup, Label } from 'reactstrap';\r\nimport moment from 'moment';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport ReactDatePicker from '../../Custom/ReactDatePicker';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemDateSelector = props => {\r\n const { control, disabled, areControlsValid, refreshGroups } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n dateValue,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n errorMessage,\r\n dateFixed,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [dateValue]);\r\n\r\n const onChange = value => {\r\n props.onChangeDate('dateValue', value);\r\n };\r\n\r\n const onChangeDate = date => {\r\n let val = date ? new Date(date.setHours(12)) : null;\r\n\r\n onChange(val);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const renderDateSelector = () => {\r\n let value = dateValue ? moment(dateValue).toDate() : null;\r\n\r\n let dis = disabled;\r\n if (dateFixed && !dateValue) {\r\n dis = dateFixed;\r\n value = new Date(new Date().setHours(12));\r\n }\r\n\r\n const defaultProps = {\r\n className: 'form-control',\r\n locale: 'da',\r\n value,\r\n format: 'dd.MM.yyyy',\r\n showYearDropdown: true,\r\n showMonthDropdown: true,\r\n disabled: dis,\r\n };\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {renderDateSelector()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemDateSelector);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport { Col, FormGroup, Input, Label } from 'reactstrap';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport ReactSelect from '../../Custom/ReactSelect';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemTimeTableUsers = props => {\r\n const {\r\n control,\r\n disabled,\r\n employees,\r\n areControlsValid,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n userOptions,\r\n timeTableUsers,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const allowedTypes = userOptions?.map(x => x.type) ?? [];\r\n const selectedIds = timeTableUsers?.map(x => x.userId) ?? [];\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [timeTableUsers]);\r\n\r\n const onChange = (name, value) => {\r\n props.onChangeArray(name, value);\r\n };\r\n\r\n const onChangeSelection = (name, value) => {\r\n let val = !!value ? value : [];\r\n\r\n val = val.map(x => {\r\n const existing = timeTableUsers?.find(y => y.userId === x.value);\r\n return {\r\n ...(existing ? existing : { hours: 0 }),\r\n userId: x.value,\r\n };\r\n });\r\n\r\n // console.log(name, val, value);\r\n onChange(name, val);\r\n };\r\n\r\n const onChangeHours = (index, value) => {\r\n let updated = [...timeTableUsers];\r\n let val = updated[index].hours;\r\n\r\n if (\r\n (updated[index].hours === 0 && value > 0 && !isNaN(value)) ||\r\n (value > 0 && !isNaN(value))\r\n ) {\r\n val = parseFloat((value + '').replace(/^0+/, ''));\r\n } else if (value === 0) {\r\n val = 0;\r\n } else {\r\n val = 0;\r\n }\r\n\r\n updated[index].hours = val;\r\n\r\n // console.log({ value, val });\r\n onChange('timeTableUsers', updated);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const sharedProps = {\r\n placeholder: placeholder,\r\n closeMenuOnSelect: false,\r\n isDisabled: disabled,\r\n isMulti: true,\r\n };\r\n\r\n const renderDropdown = () => {\r\n let options = [];\r\n let value;\r\n\r\n if (allowedTypes?.length > 0) {\r\n options = employees\r\n .filter(x => allowedTypes.includes(x.employeeType))\r\n .map(x => {\r\n return {\r\n label: x.name,\r\n value: x.id,\r\n };\r\n });\r\n }\r\n\r\n if (timeTableUsers?.length > 0) {\r\n value = options.filter(x => selectedIds.includes(x.value));\r\n }\r\n\r\n return (\r\n onChangeSelection('timeTableUsers', v)}\r\n {...sharedProps}\r\n />\r\n );\r\n };\r\n\r\n const renderUsers = () => {\r\n if (!timeTableUsers || timeTableUsers?.length === 0) return null;\r\n\r\n let totalHours = 0;\r\n const renderUserItem = (item, index) => {\r\n const user = employees.find(x => x.id === item.userId);\r\n totalHours += item.hours ? item.hours : 0;\r\n const itemHours = parseFloat((item.hours + '').replace(/^0+/, ''));\r\n\r\n return (\r\n
\r\n
{user?.name}
\r\n \r\n onChangeHours(\r\n index,\r\n Math.round(parseFloat(e.target.value) * 1e2) / 1e2,\r\n )\r\n }\r\n />\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {timeTableUsers.map(renderUserItem)}\r\n
\r\n
{i18next.t(7193)}:
\r\n
{totalHours}
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {renderDropdown()}\r\n {renderUsers()}\r\n {!disabled && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases, employees }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n employees: employees.employees,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemTimeTableUsers);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport Typography from '../../Typography';\r\nimport CustomCheckbox from '../../Custom/Forms/Checkbox';\r\nimport InfoTip from '../../Custom/InfoTip';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemCheckmark = props => {\r\n const {\r\n control,\r\n disabled,\r\n onChangeCheckmark,\r\n areControlsValid,\r\n refreshGroups,\r\n } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n marked,\r\n hideMarkedQuestion,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n answeredByUserId,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [control]);\r\n\r\n const onChange = (name, value) => {\r\n onChangeCheckmark({\r\n target: {\r\n name,\r\n checked: value,\r\n },\r\n });\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n const targetId = 'tt_cid_' + control.id;\r\n\r\n return ;\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {renderTitle()}\r\n {renderInfo()}\r\n
\r\n {titleValid()}\r\n \r\n
\r\n onChange('marked', true)}\r\n checked={marked && answeredByUserId && !hideMarkedQuestion}\r\n />\r\n onChange('marked', false)}\r\n checked={!marked && answeredByUserId && !hideMarkedQuestion}\r\n />\r\n onChange('hideMarkedQuestion', !hideMarkedQuestion)}\r\n checked={hideMarkedQuestion || !answeredByUserId}\r\n />\r\n {!disabled && (\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemCheckmark);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\n\r\n// Utils\r\nimport { validateControl } from '../../../utils/schemaBuilderUtils';\r\n\r\n// Components\r\nimport TextInput from '../../Custom/Forms/TextInput';\r\nimport LastEditor from '../../Custom/LastEditor';\r\nimport ControlItemMetaAdminModal from '../ControlItemMetaAdminModal';\r\n\r\nconst ControlItemNumbers = props => {\r\n const { control, disabled, areControlsValid, refreshGroups } = props;\r\n const {\r\n title,\r\n alternativeTitle,\r\n numberValue,\r\n infoTitle,\r\n infoText,\r\n showInfoIcon,\r\n required,\r\n placeholder,\r\n errorMessage,\r\n } = control;\r\n const [valid, setValid] = useState(true);\r\n const labelSize = 3;\r\n const inputSize = 9;\r\n\r\n useEffect(() => {\r\n setValid(validateControl(control));\r\n // eslint-disable-next-line\r\n }, [numberValue]);\r\n\r\n const onChange = e => {\r\n props.onChange(e);\r\n };\r\n\r\n const renderInfo = () => {\r\n if (!showInfoIcon) return null;\r\n\r\n return {\r\n title: infoTitle,\r\n html: infoText,\r\n };\r\n };\r\n\r\n const renderTitle = () => {\r\n let tmp = title;\r\n if (alternativeTitle?.trim().length > 0) tmp = alternativeTitle;\r\n\r\n if (required) tmp += '*';\r\n\r\n return tmp;\r\n };\r\n\r\n const titleValid = () => {\r\n if (valid || areControlsValid || !required) return null;\r\n\r\n return (\r\n
\r\n

{errorMessage}

\r\n
\r\n );\r\n };\r\n\r\n return (\r\n }\r\n name='numberValue'\r\n type='number'\r\n labelSize={labelSize}\r\n inputSize={inputSize}\r\n value={numberValue}\r\n placeholder={placeholder}\r\n onChange={onChange}\r\n info={renderInfo()}\r\n disabled={disabled}\r\n extra={\r\n !disabled && (\r\n \r\n )\r\n }\r\n />\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemNumbers);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\n\r\n// Actions\r\n\r\n// Utils\r\n\r\n// Components\r\nimport ControlItemPhoto from './ControlItemPhoto';\r\nimport ControlItemText from './ControlItemText';\r\n\r\nconst ControlItemTextPhotos = props => {\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //// TEXT\r\n\r\n const renderTextInput = () => {\r\n return ;\r\n };\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //// Photo\r\n\r\n const renderFileInput = () => {\r\n const fileTitle = i18next.t(1060);\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n return (\r\n
\r\n {renderTextInput()}\r\n {renderFileInput()}\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ auth, schemas, cases }) {\r\n return {\r\n auth,\r\n schemas,\r\n cases,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(ControlItemTextPhotos);\r\n","import React, { useState, useRef } from 'react';\r\nimport i18next from '../../i18n';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\nimport {\r\n updateControlItem,\r\n updateControlItemViaToken,\r\n setCurrentSchemaGroups,\r\n} from '../../redux/actions/schemas';\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\n\r\n// Utils\r\nimport { isPassingCriteria } from '../../utils/schemaBuilderUtils';\r\n\r\n// Components;\r\nimport Typography from '../Typography';\r\nimport {\r\n ControlItemText,\r\n ControlItemTextUneditable,\r\n ControlItemDropdownCustom,\r\n ControlItemPhoto,\r\n ControlItemPhotoArea,\r\n ControlItemSignature,\r\n ControlItemDateSelector,\r\n ControlItemDropdownUsers,\r\n ControlItemDropdownCheckboxes,\r\n ControlItemDropdownProducts,\r\n ControlItemTimeTableUsers,\r\n ControlItemCheckmark,\r\n ControlItemNumbers,\r\n ControlItemDropdownCommentPhotos,\r\n ControlItemTextPhotos,\r\n} from './ControlItemTypes';\r\n\r\nconst ControlItem = props => {\r\n const {\r\n schema,\r\n groupIndex,\r\n itemIndex,\r\n schemaIndex,\r\n building,\r\n control,\r\n disableAllFunctions,\r\n setUpdating,\r\n setCurrentSchemaGroups,\r\n updateControlItem,\r\n selectControl,\r\n refreshGroups,\r\n isServiceAgreement,\r\n _targetControlId,\r\n imageObjects,\r\n areControlsValid,\r\n clearSignatureValues,\r\n refreshSignatureStatus,\r\n signingOnly,\r\n updateControlItemViaToken,\r\n signatureToken,\r\n showSigningSuccessfulToast,\r\n itemGroupIndex,\r\n group,\r\n isGroupControl,\r\n hasAreaMarking,\r\n checkForAreaMarkingControl,\r\n onChangeControlContacts,\r\n } = props;\r\n const { schemaGroups } = props.schemas;\r\n const timerRef = useRef(null);\r\n const [isMovingImages, setMovingImages] = useState(!!props.isMovingImages);\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n ////// onChange methods\r\n\r\n const onChange = e => {\r\n let val = e.target.value;\r\n if (!val || val?.trim().length === 0) val = '';\r\n\r\n onEditSchema(e.target.name, val);\r\n };\r\n\r\n const onChangeBoolean = e => {\r\n let val = e.target.checked;\r\n onEditSchema(e.target.name, val);\r\n };\r\n\r\n const onChangeArray = (name, value) => {\r\n onEditSchema(name, value);\r\n };\r\n\r\n const onChangeDate = (name, value) => {\r\n onEditSchema(name, value);\r\n };\r\n\r\n const onEditSchema = (name, value) => {\r\n let updatedSchemas = [...schemaGroups[groupIndex].schemas];\r\n\r\n if (isGroupControl) {\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ][name] = value;\r\n } else {\r\n updatedSchemas[schemaIndex].controlItems[itemIndex][name] = value;\r\n }\r\n\r\n // Clearing signatures if any\r\n if (clearSignatureValues) {\r\n updatedSchemas[schemaIndex].controlItems = updatedSchemas[\r\n schemaIndex\r\n ].controlItems.map(x => {\r\n if (x.controlType === SB_CONTROL_TYPE.Signature) {\r\n x.signatureValue = null;\r\n } else if (x.isGroup) {\r\n x.controlItems = x.controlItems.map(y => {\r\n if (y.controlType === SB_CONTROL_TYPE.Signature) {\r\n y.signatureValue = null;\r\n }\r\n return y;\r\n });\r\n }\r\n\r\n return x;\r\n });\r\n }\r\n\r\n let updatedGroup = { ...schemaGroups[groupIndex], schemas: updatedSchemas };\r\n\r\n let updatedGroups = [...schemaGroups];\r\n updatedGroups[groupIndex] = updatedGroup;\r\n\r\n if (timerRef.current) clearTimeout(timerRef.current);\r\n setCurrentSchemaGroups(updatedGroups);\r\n\r\n timerRef.current = setTimeout(() => {\r\n if (props?.onEditSchema) {\r\n if (isServiceAgreement) {\r\n props.onEditSchema('actualServiceDate', new Date());\r\n } else {\r\n props.onEditSchema('updatedDate', new Date());\r\n }\r\n }\r\n\r\n let item;\r\n if (isGroupControl) {\r\n item =\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ];\r\n } else {\r\n item = updatedSchemas[schemaIndex].controlItems[itemIndex];\r\n }\r\n\r\n const dataObj = {\r\n ...item,\r\n clearSignatureValues,\r\n };\r\n\r\n if (\r\n clearSignatureValues ||\r\n control.controlType === SB_CONTROL_TYPE.Signature\r\n ) {\r\n refreshSignatureStatus();\r\n\r\n if (!!showSigningSuccessfulToast && value?.trim().length > 0) {\r\n showSigningSuccessfulToast();\r\n }\r\n }\r\n\r\n const action = signingOnly\r\n ? updateControlItemViaToken\r\n : updateControlItem;\r\n\r\n action(dataObj, signatureToken)\r\n .then(() => {\r\n const photoTypes = [SB_CONTROL_TYPE.PhotoAreaMarking];\r\n if (photoTypes.includes(control.controlType)) {\r\n checkForAreaMarkingControl();\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n }, 1000);\r\n };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n const onChangeCheckmark = e => {\r\n let name = e.target.name;\r\n let value = e.target.checked;\r\n // console.log(name, value);\r\n\r\n /////////////////////////////\r\n let updatedSchemas = [...schemaGroups[groupIndex].schemas];\r\n\r\n if (name === 'hideMarkedQuestion') {\r\n if (isGroupControl) {\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ].marked = false;\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ].hideMarkedQuestion = true;\r\n } else {\r\n updatedSchemas[schemaIndex].controlItems[itemIndex].marked = false;\r\n updatedSchemas[schemaIndex].controlItems[\r\n itemIndex\r\n ].hideMarkedQuestion = true;\r\n }\r\n } else {\r\n if (isGroupControl) {\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ].marked = value;\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ].hideMarkedQuestion = false;\r\n } else {\r\n updatedSchemas[schemaIndex].controlItems[itemIndex].marked = value;\r\n updatedSchemas[schemaIndex].controlItems[\r\n itemIndex\r\n ].hideMarkedQuestion = false;\r\n }\r\n }\r\n\r\n if (isGroupControl) {\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ].answeredByUserId = -1;\r\n } else {\r\n updatedSchemas[schemaIndex].controlItems[itemIndex].answeredByUserId = -1;\r\n }\r\n /////////////////////////////\r\n\r\n let updatedGroup = { ...schemaGroups[groupIndex], schemas: updatedSchemas };\r\n\r\n let updatedGroups = [...schemaGroups];\r\n updatedGroups[groupIndex] = updatedGroup;\r\n\r\n if (timerRef.current) clearTimeout(timerRef.current);\r\n setCurrentSchemaGroups(updatedGroups);\r\n\r\n timerRef.current = setTimeout(() => {\r\n let item;\r\n if (isGroupControl) {\r\n item =\r\n updatedSchemas[schemaIndex].controlItems[itemGroupIndex].controlItems[\r\n itemIndex\r\n ];\r\n } else {\r\n item = updatedSchemas[schemaIndex].controlItems[itemIndex];\r\n }\r\n\r\n updateControlItem(item).catch(err => {\r\n console.log(err);\r\n });\r\n }, 500);\r\n };\r\n\r\n // const updateActualServiceDate = () => {\r\n // if (props?.onEditSchema) {\r\n // props.onEditSchema('actualServiceDate', new Date());\r\n // }\r\n // };\r\n\r\n /////////////////////////////////////////////////////////////////////////////////////////////////\r\n ////// render methods\r\n\r\n const renderControlByType = () => {\r\n if (!control) return null;\r\n\r\n let sharedProps = {\r\n building,\r\n schema,\r\n control,\r\n disabled: disableAllFunctions || signingOnly,\r\n isServiceAgreement,\r\n isMovingImages,\r\n onChange,\r\n onChangeBoolean,\r\n onChangeCheckmark,\r\n onChangeArray,\r\n onChangeDate,\r\n setUpdating,\r\n setMovingImages,\r\n selectControl,\r\n refreshGroups,\r\n _targetControlId,\r\n imageObjects,\r\n areControlsValid,\r\n signingOnly,\r\n isGroupControl,\r\n itemGroupIndex,\r\n group,\r\n hasAreaMarking,\r\n onChangeControlContacts,\r\n };\r\n\r\n switch (control.controlType) {\r\n case SB_CONTROL_TYPE.PhotoAreaMarking:\r\n return ;\r\n case SB_CONTROL_TYPE.PhotoDocumentation:\r\n return ;\r\n case SB_CONTROL_TYPE.Signature:\r\n return ;\r\n case SB_CONTROL_TYPE.DateSelector:\r\n return ;\r\n case SB_CONTROL_TYPE.DropdownProducts:\r\n return ;\r\n case SB_CONTROL_TYPE.DropdownUsers:\r\n return ;\r\n case SB_CONTROL_TYPE.DropdownCustom:\r\n return ;\r\n case SB_CONTROL_TYPE.DropdownCommentPhotos:\r\n return ;\r\n case SB_CONTROL_TYPE.Checkboxes:\r\n return ;\r\n case SB_CONTROL_TYPE.Text:\r\n return ;\r\n case SB_CONTROL_TYPE.TextUneditable:\r\n return ;\r\n case SB_CONTROL_TYPE.Numbers:\r\n return ;\r\n case SB_CONTROL_TYPE.TimeTableUsers:\r\n return ;\r\n case SB_CONTROL_TYPE.Checkmark:\r\n return ;\r\n case SB_CONTROL_TYPE.TextPhotos:\r\n return ;\r\n default:\r\n return (\r\n
\r\n {i18next.t(12049)}\r\n
\r\n );\r\n }\r\n };\r\n\r\n return (\r\n isPassingCriteria(schema, control) && (\r\n <>\r\n {renderControlByType()}\r\n {!isGroupControl &&
}\r\n \r\n )\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ schemas }) {\r\n return {\r\n schemas,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n setCurrentSchemaGroups,\r\n updateControlItem,\r\n updateControlItemViaToken,\r\n})(ControlItem);\r\n","import * as React from 'react';\r\n\r\nconst SvgIconBi = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconBi;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconDokumenter = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconDokumenter;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconEksterneParter = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconEksterneParter;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconForsikringsselskaber = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconForsikringsselskaber;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconInfo = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconInfo;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconInterneBrugere = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconInterneBrugere;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconKundegrupperVirksomheder = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconKundegrupperVirksomheder;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconKundeVirksomhed = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconKundeVirksomhed;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconKvalitetssikring = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconKvalitetssikring;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconLogUd = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconLogUd;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconNotifikationer = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconNotifikationer;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconNotifikationsactive = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconNotifikationsactive;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconProdukter = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconProdukter;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconProfil = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconProfil;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconSagsoverblik = props => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconSagsoverblik;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconServiceaftale = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconServiceaftale;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconSignatur = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconSignatur;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconSystembeskeder = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconSystembeskeder;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconSysteminfo = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconSysteminfo;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconTermsConditions = props => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconTermsConditions;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconVarmtArbejde = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconVarmtArbejde;\r\n","import * as React from 'react';\r\n\r\nconst SvgNotifikationer2 = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgNotifikationer2;\r\n","import * as React from 'react';\r\n\r\nconst SvgPdf = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {'PDF'}\r\n \r\n
\r\n \r\n);\r\n\r\nexport default SvgPdf;\r\n","import * as React from 'react';\r\n\r\nconst SvgTagpaslogoBlaaOutlinet = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgTagpaslogoBlaaOutlinet;\r\n","import * as React from 'react';\r\n\r\nfunction SvgIconDownload2(props) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SvgIconDownload2;\r\n","import * as React from 'react';\r\n\r\nfunction SvgComponent(props) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SvgComponent;\r\n","import * as React from 'react';\r\n\r\nconst SvgSkemabygger = props => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgSkemabygger;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconSprog = props => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconSprog;\r\n","import * as React from \"react\"\r\n\r\nconst SvgComponent = props => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent","import * as React from \"react\"\r\n\r\nconst SvgComponent = props => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent","import * as React from \"react\"\r\n\r\nconst SvgComponent = props => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent","import * as React from 'react';\r\n\r\nfunction SvgComponent(props) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SvgComponent;\r\n","import * as React from 'react';\r\n\r\nconst SvgNorwayFlag = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgNorwayFlag;\r\n","import * as React from 'react';\r\n\r\nfunction SvgComponent(props) {\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport default SvgComponent;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconCheckmarkAlt = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconCheckmarkAlt;\r\n","import * as React from 'react';\r\n\r\nconst SvgIconLock = props => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default SvgIconLock;\r\n","/**\r\n * @module actions/auth\r\n */\r\nimport axios from 'axios';\r\nimport {\r\n setAuthorizationToken,\r\n setDeviceToken,\r\n} from './../../utils/setAuthorizationToken';\r\nimport {\r\n API_URL,\r\n SET_CURRENT_USER,\r\n SET_USER_PERMISSIONS,\r\n SET_LOGIN_AS,\r\n LOGOUT_AS,\r\n CUSTOMER_STATUS,\r\n SET_CUSTOMER_STATUS,\r\n SET_PAUSED_MODAL,\r\n HANDLED_PAUSED_MODAL,\r\n SET_PERMISSION_SET,\r\n GET_BINDINGS,\r\n} from './../constants';\r\n\r\n/**\r\n * @description Returns payload for dispatching SET_CURRENT_USER\r\n * @param {Object} user Object containing user data\r\n */\r\nexport function setCurrentUser(user) {\r\n return {\r\n type: SET_CURRENT_USER,\r\n user,\r\n };\r\n}\r\n\r\n/**\r\n * @description Logs out user by removing localstorage data, removing Axios authorization and dispatching setCurrentUser with empty Object\r\n */\r\nexport function logout() {\r\n return dispatch => {\r\n window.localStorage.removeItem('user_token');\r\n window.localStorage.removeItem('user_data');\r\n window.localStorage.removeItem('user_branding');\r\n window.localStorage.removeItem('loggedInAs');\r\n setAuthorizationToken(false);\r\n setDeviceToken(false);\r\n dispatch(setCurrentUser({}));\r\n dispatch({\r\n type: SET_LOGIN_AS,\r\n user: null,\r\n groupId: null,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Sends a request to have the password reset.\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function forgotpassword(data) {\r\n return dispatch => {\r\n return axios.post(API_URL + '/auth/forgotpassword', data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Sends the password reset information\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function resetpassword(data) {\r\n return dispatch => {\r\n return axios.post(API_URL + '/auth/resetpassword', data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Logs in user by adding localstorage data, setting Axios authorization and dispatching setCurrentUser with user object\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function login(data) {\r\n return dispatch => {\r\n //window.localStorage.clear();\r\n return axios.post(API_URL + '/auth/login', data).then(res => {\r\n // if (res.data?.customerStatus !== CUSTOMER_STATUS.Closed) {\r\n setLocalAuthenticationData(dispatch, res);\r\n // }\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Logs in user after they've reset their password.\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function loginReset(res) {\r\n return dispatch => {\r\n return new Promise((resolve, reject) => {\r\n setLocalAuthenticationData(dispatch, res);\r\n resolve(res);\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Login as a group admin user\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function loginAs(data) {\r\n return dispatch => {\r\n return axios.post(API_URL + '/auth/loginas', data).then(res => {\r\n const token = res.data.loginData.token;\r\n const _data = JSON.stringify(res.data);\r\n setAuthorizationToken(token);\r\n setDeviceToken(res.data.DeviceToken);\r\n window.localStorage.setItem('loggedInAs', _data);\r\n dispatch({\r\n type: SET_LOGIN_AS,\r\n user: _data,\r\n });\r\n dispatch({\r\n type: SET_CUSTOMER_STATUS,\r\n payload: res.data.customerStatus,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Log out as a group admin user\r\n * @param {Object} data Object that will be posted to url\r\n */\r\nexport function loginOutAs() {\r\n return dispatch => {\r\n window.localStorage.removeItem('loggedInAs');\r\n const token = window.localStorage.getItem('user_token');\r\n const data = JSON.parse(window.localStorage.getItem('user_data'));\r\n\r\n setAuthorizationToken(token);\r\n setDeviceToken(data.DeviceToken);\r\n\r\n dispatch({\r\n type: LOGOUT_AS,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Returns payload for dispatching SET_USER_PERMISSIONS\r\n */\r\nexport function setUserPermissions(permissions) {\r\n return {\r\n type: SET_USER_PERMISSIONS,\r\n permissions,\r\n };\r\n}\r\n\r\n/**\r\n * @description Changes the password for user\r\n */\r\nexport function changePassword(data) {\r\n let url = API_URL + '/auth/ChangePassword';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * Retrieves the customers status\r\n * @returns customer status enum - default: PAUSED = 3\r\n */\r\nexport const getCustomerStatus = () => {\r\n return dispatch => {\r\n let url = API_URL + '/customers/status';\r\n\r\n return axios.get(url).then(res => {\r\n if (res.status === 404) {\r\n dispatch({\r\n type: SET_CUSTOMER_STATUS,\r\n payload: CUSTOMER_STATUS.Paused,\r\n });\r\n } else {\r\n dispatch({\r\n type: SET_CUSTOMER_STATUS,\r\n payload: res.data,\r\n });\r\n }\r\n\r\n dispatch({\r\n type: SET_PAUSED_MODAL,\r\n payload: res.data === CUSTOMER_STATUS.Paused,\r\n });\r\n\r\n return res.data;\r\n });\r\n };\r\n};\r\n\r\nexport function setCustomerStatus(status) {\r\n return dispatch => {\r\n dispatch({\r\n type: SET_CUSTOMER_STATUS,\r\n payload: status,\r\n });\r\n };\r\n}\r\n\r\nexport function togglePausedModal(value) {\r\n return dispatch => {\r\n dispatch({\r\n type: SET_PAUSED_MODAL,\r\n payload: value,\r\n });\r\n };\r\n}\r\n\r\nexport function handledPausedModal(value) {\r\n return dispatch => {\r\n dispatch({\r\n type: HANDLED_PAUSED_MODAL,\r\n payload: value,\r\n });\r\n };\r\n}\r\n\r\nexport function setUserPermissionSet(data) {\r\n return dispatch => {\r\n dispatch({\r\n type: SET_PERMISSION_SET,\r\n payload: data,\r\n });\r\n };\r\n}\r\n\r\nconst setLocalAuthenticationData = (dispatch, res) => {\r\n const token = res.data.token;\r\n const data = JSON.stringify(res.data);\r\n window.localStorage.setItem('user_token', token);\r\n window.localStorage.setItem('user_data', data);\r\n\r\n setAuthorizationToken(token);\r\n setDeviceToken(res.data.DeviceToken);\r\n dispatch(setCurrentUser(res.data));\r\n dispatch({\r\n type: SET_CUSTOMER_STATUS,\r\n payload: res.data.customerStatus,\r\n });\r\n dispatch({\r\n type: SET_PAUSED_MODAL,\r\n payload: res.data.customerStatus === CUSTOMER_STATUS.Paused,\r\n });\r\n};\r\n\r\n/**\r\n * Get the users bindings\r\n */\r\nexport function getCompanyBindings(options) {\r\n let url = API_URL + '/user/bindings';\r\n\r\n let customers = false;\r\n let user = false;\r\n\r\n if (options?.customer) {\r\n customers = true;\r\n }\r\n if (options?.user) {\r\n user = true;\r\n }\r\n\r\n url += `?includeCustomer=${customers}&includeUser=${user}`;\r\n\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: GET_BINDINGS,\r\n payload: res.data,\r\n });\r\n // Update localstorage token and redux if binding has new permissions\r\n if (options?.userData) {\r\n //console.log(options?.userData, res.data);\r\n\r\n let binding = res.data.find(\r\n x => x.customer.id === options.userData.user.belongsToCustomerId,\r\n );\r\n\r\n if (binding) {\r\n let obj = { ...options.userData };\r\n\r\n obj.user.hasAP = binding.details.hasAP;\r\n obj.user.hasPdf = binding.details.hasPdf;\r\n obj.user.schemaPackagesStringArray =\r\n binding.details.schemaPackagesStringArray;\r\n obj.user.permission = binding.details.permissions;\r\n dispatch(setCurrentUser(obj));\r\n }\r\n }\r\n\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Switch company\r\n */\r\nexport function switchCompany(data) {\r\n let url = API_URL + '/auth/switch';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n setLocalAuthenticationData(dispatch, res);\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Logout of company - Does not POST! Is more of a utility method\r\n */\r\nexport function logoutOfCustomer(data) {\r\n return dispatch => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n setLocalAuthenticationData(dispatch, data);\r\n resolve();\r\n } catch (error) {\r\n reject(error);\r\n }\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Verify the sms code of the user needing sms verification\r\n */\r\nexport function verifySms(data) {\r\n let url = API_URL + '/auth/verifySms';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n setLocalAuthenticationData(dispatch, res);\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Resend sms to the user in need of sms verification\r\n */\r\nexport function resendSms(data) {\r\n let url = API_URL + '/auth/resendSms';\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n //setLocalAuthenticationData(dispatch, res);\r\n return res;\r\n });\r\n };\r\n}\r\n","import React from 'react';\r\nimport i18next from '../i18n';\r\nimport PropTypes from '../utils/propTypes';\r\nimport bn from '../utils/bemnames';\r\nimport { Breadcrumb, BreadcrumbItem } from 'reactstrap';\r\nimport Typography from '../components/Typography';\r\n\r\nconst bem = bn.create('page');\r\n\r\nconst Page = ({\r\n title,\r\n breadcrumbs,\r\n tag: Tag,\r\n className,\r\n children,\r\n ...restProps\r\n}) => {\r\n const classes = bem.b('px-3', className);\r\n\r\n return (\r\n \r\n
\r\n {title && typeof title === 'string' ? (\r\n \r\n {title}\r\n \r\n ) : (\r\n title\r\n )}\r\n {breadcrumbs && (\r\n \r\n {i18next.t(3)}\r\n {breadcrumbs.length &&\r\n breadcrumbs.map(({ name, active, link }, index) => (\r\n \r\n {link ? {name} : name}\r\n \r\n ))}\r\n \r\n )}\r\n
\r\n {children}\r\n
\r\n );\r\n};\r\n\r\nPage.propTypes = {\r\n tag: PropTypes.component,\r\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\r\n className: PropTypes.string,\r\n children: PropTypes.node,\r\n breadcrumbs: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n name: PropTypes.string,\r\n active: PropTypes.bool,\r\n }),\r\n ),\r\n};\r\n\r\nPage.defaultProps = {\r\n tag: 'div',\r\n title: '',\r\n};\r\n\r\nexport default Page;\r\n","/**\r\n * scrollHook React hoc\r\n *\r\n */\r\n\r\nfunction scrollHook(window, body) {\r\n const wrapper = window.getBoundingClientRect();\r\n const content = body.getBoundingClientRect();\r\n\r\n const windowHeight = wrapper.height;\r\n const windowWidth = wrapper.width;\r\n\r\n const height = content.height;\r\n const width = content.width;\r\n const scrollY = window.scrollTop;\r\n const scrollX = window.scrollLeft;\r\n\r\n const progressHeight = parseInt(\r\n (Math.abs(parseInt(scrollY)) / (height - windowHeight)) * 100,\r\n );\r\n const progressWidth = parseInt(\r\n (Math.abs(parseInt(scrollX)) / (width - windowWidth)) * 100,\r\n );\r\n\r\n //console.log(progressHeight, height - windowHeight, scrollY);\r\n\r\n return {\r\n height,\r\n width,\r\n progressHeight,\r\n progressWidth,\r\n scrollY,\r\n scrollX,\r\n };\r\n}\r\n\r\nexport default scrollHook;\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport i18next from '../../i18n';\r\nimport {\r\n Table,\r\n Card,\r\n ButtonDropdown,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Spinner,\r\n} from 'reactstrap';\r\nimport moment from 'moment';\r\nimport { IoIosArrowDown } from 'react-icons/io';\r\n\r\n// Utils\r\nimport scrollHook from '../../hocs/scrollHook';\r\nimport { calculateBytes } from '../../utils/formatSizeUnits';\r\n\r\n// const example = {\r\n// colgroup: ['10%','20%','auto'],\r\n// scrollRender: {\r\n// window: document.getElementById('window-id'),\r\n// body: document.getElementById('body-id'),\r\n// },\r\n// header: {\r\n// class: '',\r\n// data: [\r\n// {\r\n// title: 'header 1',\r\n// className: '',\r\n// tdClass: 'td-class-example',\r\n// sortable: true / false,\r\n// selector: 'header',\r\n// sortType: 'string' / 'number' / 'date'\r\n// }\r\n// ]\r\n// },\r\n// body: {\r\n// class: '',\r\n// empty: 'Listen er tom',\r\n// data: [\r\n// { // row 1\r\n// <-- content -->\r\n// }\r\n// ]\r\n// }\r\n// }\r\n\r\n/**\r\n * Custom react table. Uses \"Table\" from bootstrap as a base.\r\n * @param {String} className - classname\r\n * @param {Array} colgroup - Array describing how much space each column has ie. ['10%', 'auto', '30%']\r\n * @param {Object} header - Content of the header: { class: '', data: [{ title: '', className: '', tdClass: '', sortTable: true, selector: 'header', sortType: 'string'}]}\r\n * @param {Object} body - Content of the body: { class: '', empty: 'Listen er tom', data: []}\r\n * @param {Boolean} striped - Content striped\r\n * @param {String} size - Table size\r\n */\r\nconst ReactTable = props => {\r\n const {\r\n data,\r\n hover,\r\n className,\r\n size,\r\n striped,\r\n borderless,\r\n renderStart = 30,\r\n renderInterval = 30,\r\n } = props;\r\n const [showSort, setShowShort] = useState(null);\r\n const [sortBy, setSortBy] = useState(null);\r\n const [sortType, setSortType] = useState(null);\r\n const [reverse, setReverse] = useState(false);\r\n const renderCount = useRef(renderStart); //const [renderCount, setRenderCount] = useState(renderStart);\r\n const renderDone = useRef(false); // const [renderDone, setRenderDone] = useState(false);\r\n\r\n const [renderLoading, setRenderLoading] = useState(false);\r\n const [renderList, setRenderList] = useState([]);\r\n\r\n useEffect(() => {\r\n if (getDataProp('scrollRender')) {\r\n if (getDataProp('scrollRender').window) {\r\n getDataProp('scrollRender').window.addEventListener(\r\n 'scroll',\r\n handleScrollRender,\r\n );\r\n }\r\n }\r\n if (getDataProp('body')) {\r\n setRenderList(getDataProp('body').data);\r\n }\r\n\r\n return cleanTable;\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const cleanTable = () => {\r\n if (getDataProp('scrollRender')) {\r\n if (getDataProp('scrollRender').window) {\r\n getDataProp('scrollRender').window.removeEventListener(\r\n 'scroll',\r\n handleScrollRender,\r\n );\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (data?.body?.data) {\r\n if (data.body !== renderList) {\r\n //console.log(data.body, renderList);\r\n setRenderList(data.body.data);\r\n }\r\n }\r\n // eslint-disable-next-line\r\n }, [data]);\r\n\r\n const handleScrollRender = () => {\r\n //Any changes here should be made in the other handleScrollRender methods\r\n let scroll = scrollHook(\r\n getDataProp('scrollRender').window,\r\n getDataProp('scrollRender').body,\r\n );\r\n if (scroll.progressHeight >= 75) {\r\n // console.log(renderLoading, renderDone);\r\n if (!renderLoading && !renderDone.current) {\r\n renderCount.current = renderCount.current + renderInterval;\r\n setRenderLoading(true);\r\n // setRenderUsed(true);\r\n //console.log('Next render batch', renderCount + renderInterval);\r\n // TODO fetch call split for much larger batches\r\n // Need state list handling instead of prop redux\r\n }\r\n }\r\n // Reverse scroll (Not fully tested)\r\n // if (scroll.progressHeight <= 5) {\r\n // if (!renderLoading && renderCount !== 10) {\r\n // this.setState({\r\n // renderCount: renderCount - renderInterval,\r\n // renderLoading: true,\r\n // });\r\n // }\r\n // }\r\n };\r\n\r\n const getDataProp = name => {\r\n if (!props.data) return null;\r\n return props.data[name];\r\n };\r\n\r\n const getColGroups = () => {\r\n const colgroup = getDataProp('colgroup');\r\n if (!colgroup) return null;\r\n\r\n return (\r\n \r\n {colgroup.map((size, index) => {\r\n if (size === 'auto') return ;\r\n return ;\r\n })}\r\n \r\n );\r\n };\r\n\r\n const getSortMenu = item => {\r\n const action = type => {\r\n setShowShort(null);\r\n setSortBy(item.selector);\r\n setSortType(item.sortType);\r\n setReverse(type);\r\n };\r\n\r\n const toggle = () => {\r\n if (showSort !== item.selector) {\r\n setShowShort(item.selector);\r\n } else {\r\n setShowShort(null);\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {item.sortType === 'string' && (\r\n \r\n action(false)}>\r\n {i18next.t(9059)}\r\n \r\n action(true)}>\r\n {i18next.t(9060)}\r\n \r\n \r\n )}\r\n {item.sortType === 'number' && (\r\n \r\n action(false)}>\r\n {i18next.t(9061)}\r\n \r\n action(true)}>\r\n {i18next.t(9062)}\r\n \r\n \r\n )}\r\n {item.sortType === 'date' && (\r\n \r\n action(false)}>\r\n {i18next.t(7098)}\r\n \r\n action(true)}>\r\n {i18next.t(7099)}\r\n \r\n \r\n )}\r\n {item.sortType === 'valueDate' && (\r\n \r\n action(false)}>\r\n {i18next.t(7098)}\r\n \r\n action(true)}>\r\n {i18next.t(7099)}\r\n \r\n \r\n )}\r\n {item.sortType === 'valueString' && (\r\n \r\n action(false)}>\r\n {i18next.t(9059)}\r\n \r\n action(true)}>\r\n {i18next.t(9060)}\r\n \r\n \r\n )}\r\n {item.sortType === 'valueNumber' && (\r\n \r\n action(false)}>\r\n {i18next.t(9061)}\r\n \r\n action(true)}>\r\n {i18next.t(9062)}\r\n \r\n \r\n )}\r\n {item.sortType === 'fileSize' && (\r\n \r\n action(false)}>\r\n {i18next.t(9061)}\r\n \r\n action(true)}>\r\n {i18next.t(9062)}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n };\r\n\r\n const getSortedData = () => {\r\n const bodyData = getDataProp('body');\r\n if (!bodyData) return null;\r\n if (bodyData.data.length === 0) return null;\r\n let body = { ...bodyData };\r\n let sortable = [];\r\n let nonSortable = [];\r\n\r\n if (sortBy) {\r\n if (sortType === 'string') {\r\n body.data.sort((a, b) => {\r\n // console.log(typeof a[sortBy], typeof b[sortBy]);\r\n if (typeof a[sortBy] !== 'string' && typeof b[sortBy] !== 'string')\r\n return 0;\r\n if (typeof a[sortBy] !== 'string') return -1;\r\n if (typeof b[sortBy] !== 'string') return 1;\r\n\r\n var textA = a[sortBy].toUpperCase();\r\n var textB = b[sortBy].toUpperCase();\r\n\r\n return textA < textB ? -1 : textA > textB ? 1 : 0;\r\n });\r\n if (reverse) {\r\n body.data.reverse();\r\n }\r\n } else if (sortType === 'number') {\r\n if (!reverse) {\r\n body.data.sort((a, b) => {\r\n var numberA = a[sortBy];\r\n var numberB = b[sortBy];\r\n\r\n return numberA < numberB ? -1 : numberA > numberB ? 1 : 0;\r\n });\r\n } else {\r\n body.data.sort((a, b) => {\r\n var numberA = a[sortBy];\r\n var numberB = b[sortBy];\r\n\r\n return numberA > numberB ? -1 : numberA < numberB ? 1 : 0;\r\n });\r\n }\r\n } else if (sortType === 'date') {\r\n if (!reverse) {\r\n sortable = body.data.filter(x => x.date !== '');\r\n nonSortable = body.data.filter(x => x.date === '');\r\n sortable.sort((a, b) => {\r\n var parts = a[sortBy].split('.');\r\n var bparts = b[sortBy].split('.');\r\n var aDate = new Date(parts[2], parts[1], parts[0]);\r\n var bDate = new Date(bparts[2], bparts[1], bparts[0]);\r\n return moment(aDate).isAfter(moment(bDate)) ? 1 : -1;\r\n });\r\n body.data = [...sortable, ...nonSortable];\r\n } else {\r\n sortable = body.data.filter(x => x.date !== '');\r\n nonSortable = body.data.filter(x => x.date === '');\r\n sortable.sort((a, b) => {\r\n var parts = a[sortBy].split('.');\r\n var bparts = b[sortBy].split('.');\r\n var aDate = new Date(parts[2], parts[1], parts[0]);\r\n var bDate = new Date(bparts[2], bparts[1], bparts[0]);\r\n return moment(aDate).isBefore(moment(bDate)) ? 1 : -1;\r\n });\r\n body.data = [...sortable, ...nonSortable];\r\n }\r\n } else if (sortType === 'valueDate') {\r\n if (!reverse) {\r\n sortable = body.data.filter(x => x.date !== '');\r\n nonSortable = body.data.filter(x => x.date === '');\r\n sortable.sort((a, b) => {\r\n var aDate = a[sortBy].props.value;\r\n var bDate = b[sortBy].props.value;\r\n return moment(aDate).isAfter(moment(bDate)) ? 1 : -1;\r\n });\r\n body.data = [...sortable, ...nonSortable];\r\n } else {\r\n sortable = body.data.filter(x => x.date !== '');\r\n nonSortable = body.data.filter(x => x.date === '');\r\n sortable.sort((a, b) => {\r\n var aDate = a[sortBy].props.value;\r\n var bDate = b[sortBy].props.value;\r\n return moment(aDate).isBefore(moment(bDate)) ? 1 : -1;\r\n });\r\n body.data = [...sortable, ...nonSortable];\r\n }\r\n } else if (sortType === 'valueString') {\r\n body.data.sort((a, b) => {\r\n var textA = a[sortBy].props.value?.toUpperCase();\r\n var textB = b[sortBy].props.value?.toUpperCase();\r\n\r\n return textA < textB ? -1 : textA > textB ? 1 : 0;\r\n });\r\n if (reverse) {\r\n body.data.reverse();\r\n }\r\n } else if (sortType === 'valueNumber') {\r\n if (!reverse) {\r\n body.data.sort((a, b) => {\r\n var numberA = a[sortBy].props.value;\r\n var numberB = b[sortBy].props.value;\r\n\r\n return numberA < numberB ? -1 : numberA > numberB ? 1 : 0;\r\n });\r\n } else {\r\n body.data.sort((a, b) => {\r\n var numberA = a[sortBy].props.value;\r\n var numberB = b[sortBy].props.value;\r\n\r\n return numberA > numberB ? -1 : numberA < numberB ? 1 : 0;\r\n });\r\n }\r\n } else if (sortType === 'fileSize') {\r\n body.data.sort((a, b) => {\r\n var bytesA = 0;\r\n var bytesB = 0;\r\n var sizeA = a[sortBy].split(' ');\r\n var sizeB = b[sortBy].split(' ');\r\n\r\n if (sizeA.length > 1) {\r\n bytesA = calculateBytes(sizeA[0], sizeA[1]);\r\n }\r\n if (sizeB.length > 1) {\r\n bytesB = calculateBytes(sizeB[0], sizeB[1]);\r\n }\r\n\r\n return bytesA < bytesB ? -1 : bytesA > bytesB ? 1 : 0;\r\n });\r\n if (reverse) {\r\n body.data.reverse();\r\n }\r\n }\r\n }\r\n\r\n return body;\r\n };\r\n\r\n const renderHeaders = () => {\r\n const headers = getDataProp('headers');\r\n if (!headers) return null;\r\n\r\n const renderHeader = (header, index) => {\r\n return (\r\n \r\n {header.title} {header.sortable ? getSortMenu(header) : null}\r\n \r\n );\r\n };\r\n\r\n return (\r\n \r\n {headers.data.map(renderHeader)}\r\n \r\n );\r\n };\r\n\r\n const renderBody = () => {\r\n const body = getSortedData();\r\n if (!body) return null;\r\n if (body.data.length === 0) return null;\r\n\r\n const renderRow = (item, i) => {\r\n if (\r\n !(i <= renderCount.current) &&\r\n getDataProp('scrollRender')\r\n //&& key >= renderCount - 20\r\n ) {\r\n return null;\r\n }\r\n // Ready for next loading chunk\r\n if (\r\n i === renderCount.current &&\r\n renderLoading &&\r\n getDataProp('scrollRender')\r\n ) {\r\n setRenderLoading(false);\r\n }\r\n // Reached the end\r\n if (\r\n i + 1 === body.data.length &&\r\n renderLoading &&\r\n getDataProp('scrollRender')\r\n ) {\r\n //console.log('done');\r\n setRenderLoading(false);\r\n renderDone.current = true;\r\n }\r\n\r\n const renderColumn = (key, l) => {\r\n let headers = getDataProp('headers');\r\n let tdClass = headers.data[l]?.tdClass;\r\n let onClick = headers.data[l]?.onClick;\r\n if (key === '_id') return null;\r\n if (key === '_onClick') return null;\r\n\r\n return (\r\n onClick(item['_id']) : null}\r\n >\r\n {item[key]}\r\n \r\n );\r\n };\r\n\r\n const action = item._onClick;\r\n let classes = action ? 'clickable-row' : null;\r\n if (hover) {\r\n if (!classes) {\r\n classes = 'hover';\r\n } else {\r\n classes += ' hover';\r\n }\r\n }\r\n\r\n return (\r\n \r\n {Object.keys(item).map(renderColumn)}\r\n \r\n );\r\n };\r\n\r\n return (\r\n {body.data.map(renderRow)}\r\n );\r\n };\r\n\r\n const renderTable = () => {\r\n return (\r\n \r\n \r\n {getColGroups()}\r\n {renderHeaders()}\r\n {renderBody()}\r\n \r\n {getDataProp('scrollRender') && (\r\n \r\n {/* {!renderLoading && renderDone && renderUsed && (\r\n
{i18next.t(7187)}
\r\n )} */}\r\n {renderLoading && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n };\r\n\r\n const renderEmpty = () => {\r\n const body = getDataProp('body');\r\n if (!body) return null;\r\n if (body.data.length > 0) return null;\r\n\r\n let text = i18next.t(9079);\r\n\r\n if (body.empty?.trim().length > 0) {\r\n text = body.empty;\r\n }\r\n\r\n return (\r\n
\r\n
{text}
\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n {!!data && renderTable()}\r\n {renderEmpty()}\r\n \r\n );\r\n};\r\n\r\nexport default ReactTable;\r\n","import React from 'react';\r\nimport i18next from '../i18n';\r\nimport { MdSearch } from 'react-icons/md';\r\nimport { Form, Input } from 'reactstrap';\r\n\r\nconst SearchInput = props => {\r\n const { placeholderExtra, placeholder, className } = props;\r\n\r\n let ph = i18next.t(39);\r\n if (placeholder) {\r\n ph = placeholder;\r\n }\r\n\r\n let classNames = `cr-search-form__input ${className}`;\r\n\r\n return (\r\n
e.preventDefault()}>\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SearchInput;\r\n","import React from 'react';\r\nimport { Input, Label, FormGroup, Col } from 'reactstrap';\r\nimport ReactSelect from '../ReactSelect';\r\nimport CountryList from 'countries-list';\r\n\r\n/**\r\n * Custom text-input with ability to have a label displayed to its left.\r\n * @param {*} props - set properies here\r\n * @param {Boolean} row\r\n * @param {Boolean} disabled\r\n * @param {Number} labelSize\r\n * @param {Number} inputSize\r\n * @param {String} for\r\n * @param {String} type\r\n * @param {String} name\r\n * @param {*} value\r\n * @param {Function} onChange\r\n * @param {Function} onBlur\r\n * @param {String} placeholder\r\n * @param {Boolean} error - Bind to a boolean value\r\n * @param {String} errorText - Displayed text when error is true\r\n */\r\n\r\nconst PhoneInput = props => {\r\n const {\r\n row,\r\n infoText,\r\n extra, //error, errorText\r\n type,\r\n name,\r\n value,\r\n valueCode,\r\n onChange,\r\n onChangeCode,\r\n onBlur,\r\n placeholder,\r\n disabled,\r\n inputSize,\r\n error,\r\n errorText,\r\n } = props;\r\n\r\n const onHandleTelephoneChange = e => {\r\n let telephone = e.target.value;\r\n const regex = /^[0-9\\b]+$/;\r\n\r\n if (telephone === '' || regex.test(telephone)) {\r\n props.onChange(e);\r\n }\r\n };\r\n\r\n const renderLabel = () => {\r\n let label = ;\r\n\r\n if (props.row) {\r\n label = (\r\n \r\n );\r\n }\r\n return label;\r\n };\r\n\r\n const getCountryCodeOptions = () => {\r\n return Object.keys(CountryList.countries).map((country, index) => {\r\n const obj = CountryList.countries[country];\r\n const value = `+${obj.phone}`;\r\n const name = `${obj.emoji} ${value}`;\r\n\r\n return { label: name, value };\r\n });\r\n };\r\n\r\n const renderInput = () => {\r\n const sharedProps = {\r\n type: type ? type : 'text',\r\n name: name,\r\n onBlur: onBlur,\r\n placeholder: placeholder,\r\n };\r\n\r\n let codeProps = {\r\n ...sharedProps,\r\n value: valueCode ? valueCode : '',\r\n onChange: onChangeCode,\r\n disabled,\r\n };\r\n\r\n let inputProps = {\r\n ...sharedProps,\r\n value: value ? value : '',\r\n onChange: onChange,\r\n disabled,\r\n autoComplete: 'new-password',\r\n };\r\n\r\n let countrySelector = (\r\n \r\n );\r\n\r\n let inputComp = (\r\n
\r\n {countrySelector}\r\n \r\n
\r\n );\r\n\r\n if (row) {\r\n codeProps.bsSize = 'md';\r\n inputProps.bsSize = 'md';\r\n inputComp = (\r\n \r\n
\r\n {countrySelector}\r\n \r\n
\r\n {extra}\r\n {error &&

{errorText}

}\r\n \r\n );\r\n }\r\n\r\n return inputComp;\r\n };\r\n\r\n return (\r\n \r\n {renderLabel()}\r\n {renderInput()}\r\n {infoText ? (\r\n

\r\n {infoText ? infoText : null}\r\n

\r\n ) : null}\r\n {!row ? extra : null}\r\n {/* {error &&

{errorText}

} */}\r\n
\r\n );\r\n};\r\n\r\nexport default PhoneInput;\r\n","import React from 'react';\r\nimport i18next from '../i18n';\r\nimport { Card, CardBody, Container } from 'reactstrap';\r\n\r\nconst InaccessibleFeature = props => {\r\n return (\r\n \r\n \r\n \r\n
{i18next.t(6411)}
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default InaccessibleFeature;\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport InaccessibleFeature from '../components/InaccessibleFeature';\r\nimport { FEATURE } from '../redux/constants';\r\n\r\n/**\r\n * @param {Component} WrappedComponent React component that belongs to a certain feature.\r\n * We use redux and the features stored to determine if the user is allowed to view/use the component.\r\n * @param {Array} featureTypes Based on the feature enums.\r\n * @returns Component or generic \"No access\" display.\r\n */\r\nconst withFeature = (WrappedComponent, featureTypes, hideNoAccess) => {\r\n const FeatureHOC = class extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n show: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.hasFeature();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const prevFeatures = JSON.stringify(prevProps.features);\r\n const curFeatures = JSON.stringify(this.props.features);\r\n if (prevFeatures !== curFeatures) {\r\n this.hasFeature();\r\n }\r\n }\r\n\r\n hasFeature = () => {\r\n const { features, isServiceAgreement } = this.props;\r\n let show = false;\r\n\r\n for (let index = 0; index < featureTypes.length; index++) {\r\n let featureType = featureTypes[index];\r\n\r\n if (isServiceAgreement && featureType === FEATURE.QualityInsurance) {\r\n featureType = FEATURE.ServiceAgreement;\r\n }\r\n\r\n show = features\r\n .filter(x => x.active)\r\n .map(x => x.type)\r\n .includes(featureType);\r\n\r\n if (show) break;\r\n }\r\n\r\n this.setState({ show });\r\n };\r\n\r\n renderInaccessible = () => {\r\n if (hideNoAccess) return null;\r\n\r\n return ;\r\n };\r\n\r\n renderContent = () => {\r\n if (typeof WrappedComponent === 'function') {\r\n return ;\r\n }\r\n if (typeof WrappedComponent === 'object') {\r\n return WrappedComponent;\r\n }\r\n };\r\n\r\n render() {\r\n const { show } = this.state;\r\n\r\n return (\r\n \r\n {!show && this.renderInaccessible()}\r\n {show && this.renderContent()}\r\n \r\n );\r\n }\r\n };\r\n\r\n function mapStateToProps(state) {\r\n return {\r\n features: state.features.features,\r\n };\r\n }\r\n\r\n if (typeof WrappedComponent === 'function') {\r\n return connect(mapStateToProps, {})(FeatureHOC);\r\n }\r\n\r\n if (typeof WrappedComponent === 'object') {\r\n const Elem = connect(mapStateToProps, {})(FeatureHOC);\r\n return ;\r\n }\r\n};\r\n\r\nexport default withFeature;\r\n","import React from 'react';\r\nimport {\r\n DropdownMenu,\r\n DropdownToggle,\r\n UncontrolledButtonDropdown,\r\n} from 'reactstrap';\r\nimport { BsThreeDots } from 'react-icons/bs';\r\n\r\nconst ButtonDropdown = props => {\r\n if (!props.children) return null;\r\n if (props.children.length === 0) return null;\r\n\r\n let extraClass = '';\r\n if (props.className) {\r\n extraClass += ' ' + props.className;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {props.children}\r\n \r\n );\r\n};\r\n\r\nexport default ButtonDropdown;\r\n","import React, { useState } from 'react';\r\nimport { Card, CardBody, CardFooter, CardHeader, Collapse } from 'reactstrap';\r\nimport { MdKeyboardArrowDown } from 'react-icons/md';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport Typography from '../Typography';\r\n\r\nconst CollapsableCard = props => {\r\n const {\r\n id,\r\n body,\r\n title,\r\n headerLeft,\r\n headerRight,\r\n extra,\r\n left,\r\n footer,\r\n defaultOpen,\r\n toggle,\r\n } = props;\r\n const [isOpen, setOpen] = useState(!!defaultOpen);\r\n\r\n const toggleAction = () => {\r\n if (!!toggle) {\r\n toggle();\r\n } else {\r\n setOpen(!isOpen);\r\n }\r\n };\r\n\r\n const getIsOpen = () => {\r\n if (!!toggle) return props.isOpen;\r\n\r\n return isOpen;\r\n };\r\n\r\n const arrowStatus = getIsOpen() ? ' open' : ' closed';\r\n\r\n const renderExtras = () => {\r\n if (!extra) return null;\r\n\r\n return
{extra}
;\r\n };\r\n\r\n const renderLeft = () => {\r\n if (!left) return null;\r\n\r\n return
{left}
;\r\n };\r\n\r\n const renderHeader = () => {\r\n const leftTmp =
{headerLeft}
;\r\n const rightTmp =
{headerRight}
;\r\n\r\n if (!!headerLeft && !!headerRight) {\r\n return (\r\n <>\r\n {leftTmp}\r\n {rightTmp}\r\n \r\n );\r\n } else if (!!headerLeft) {\r\n return leftTmp;\r\n } else if (!!headerRight) {\r\n return rightTmp;\r\n } else if (!!title) {\r\n return (\r\n \r\n {title}\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n const renderFooter = () => {\r\n if (!footer) return null;\r\n\r\n return {footer};\r\n };\r\n\r\n return (\r\n
\r\n {renderLeft()}\r\n \r\n \r\n
{renderHeader()}
\r\n
\r\n \r\n
\r\n
\r\n \r\n {body}\r\n {renderFooter()}\r\n \r\n
\r\n {renderExtras()}\r\n
\r\n );\r\n};\r\n\r\nexport default CollapsableCard;\r\n","/**\r\n * @module actions/customerGroups\r\n */\r\nimport axios from 'axios';\r\nimport { API_URL, SET_CUSTOMERGROUPS } from '../constants';\r\n\r\n/**\r\n * @description Get list of customerGroups from API and dispatching event\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getCustomerGroups() {\r\n let url = API_URL + '/cugroup/groups';\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n dispatch({\r\n type: SET_CUSTOMERGROUPS,\r\n customerGroups: res.data,\r\n });\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * @description Get customer group from API\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getCustomerGroup(id) {\r\n let url = API_URL + '/cugroup/' + id;\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Create customer group\r\n * @return {Promise} Axios promise\r\n */\r\nexport function CreateCustomerGroup(data) {\r\n let url = API_URL + '/cugroup';\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Update customer group\r\n * @return {Promise} Axios promise\r\n */\r\nexport function UpdateCustomerGroup(id, data) {\r\n let url = API_URL + `/cugroup/${id}/update`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description \"Delete\" customer group\r\n * @return {Promise} Axios promise\r\n */\r\nexport function DeleteCustomerGroup(id, data) {\r\n let url = API_URL + `/cugroup/${id}/delete`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n","/**\r\n * @module actions/auth\r\n */\r\nimport axios from 'axios';\r\nimport { API_URL, TEAM_UPDATE } from '../constants';\r\n\r\n/**\r\n * @description Get teams\r\n * @return {Promise} Promise\r\n */\r\nexport function getTeams() {\r\n let url = API_URL + '/team';\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Get all teams\r\n * @return {Promise} Promise\r\n */\r\nexport function getAllTeams() {\r\n let url = API_URL + '/team/all';\r\n return dispatch => {\r\n return axios.get(url);\r\n };\r\n}\r\n\r\n/**\r\n * @description Create team\r\n * @return {Promise} Promise\r\n */\r\nexport function createTeam(data) {\r\n let url = API_URL + '/team';\r\n\r\n data.type = TEAM_UPDATE.CreateTeam;\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Update team\r\n * @return {Promise} Promise\r\n */\r\nexport function updateTeam(data) {\r\n let url = API_URL + '/team';\r\n\r\n data.type = TEAM_UPDATE.TeamUpdate;\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Delete team\r\n * @return {Promise} Promise\r\n */\r\nexport function deleteTeam(data) {\r\n let url = API_URL + '/team';\r\n\r\n data.type = TEAM_UPDATE.TeamDelete;\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Add team member\r\n * @return {Promise} Promise\r\n */\r\nexport function addTeamMember(data) {\r\n let url = API_URL + '/team/members';\r\n\r\n data.type = TEAM_UPDATE.AddMember;\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Remove team member\r\n * @return {Promise} Promise\r\n */\r\nexport function removeTeamMember(data) {\r\n let url = API_URL + '/team/members';\r\n\r\n data.type = TEAM_UPDATE.RemoveMember;\r\n\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n","import i18next from '../i18n';\r\n\r\nexport const GetErrorCodeDescription = code => {\r\n const errorCodes = {\r\n 1: i18next.t(1106),\r\n 2: i18next.t(1107),\r\n 8: i18next.t(1108),\r\n 9: i18next.t(1109),\r\n 10: i18next.t(1110),\r\n 11: i18next.t(1111),\r\n 12: i18next.t(1112),\r\n 13: i18next.t(1113),\r\n 14: i18next.t(1114),\r\n 15: i18next.t(1115),\r\n 16: i18next.t(1116),\r\n 17: i18next.t(1117),\r\n 18: i18next.t(1118),\r\n 19: i18next.t(1119),\r\n 20: i18next.t(1120),\r\n 21: i18next.t(1121),\r\n 22: i18next.t(1122),\r\n 23: i18next.t(1123),\r\n 24: i18next.t(1124),\r\n 25: i18next.t(1125),\r\n 26: i18next.t(1126),\r\n 27: i18next.t(1127),\r\n 28: i18next.t(1128),\r\n 29: i18next.t(1129),\r\n 30: i18next.t(1130),\r\n 31: i18next.t(1131),\r\n 32: i18next.t(1132),\r\n 33: i18next.t(1133),\r\n 34: i18next.t(1134),\r\n 35: i18next.t(1135),\r\n 36: i18next.t(1136),\r\n 37: i18next.t(1137),\r\n 38: i18next.t(1138),\r\n 39: i18next.t(1139),\r\n 40: i18next.t(1140),\r\n 41: i18next.t(1141),\r\n 42: i18next.t(1245),\r\n 43: i18next.t(1249),\r\n 44: i18next.t(1250),\r\n 45: i18next.t(1251),\r\n 46: i18next.t(1252),\r\n 47: i18next.t(1262),\r\n 48: i18next.t(1263),\r\n 49: i18next.t(7042),\r\n 50: i18next.t(21234),\r\n\r\n // Alt:\r\n 81: i18next.t(81),\r\n 1111: i18next.t(1111),\r\n 1112: i18next.t(1112),\r\n };\r\n\r\n if (!code) {\r\n return errorCodes[1];\r\n }\r\n return errorCodes[code];\r\n};\r\n","/**\r\n * @module actions/emploees\r\n */\r\nimport axios from 'axios';\r\nimport { API_URL } from '../constants';\r\n\r\n/**\r\n * @description Get contacts associated with a user\r\n * @return {Promise} Axios promise\r\n */\r\nexport function getContacts(data) {\r\n let url = API_URL + `/contacts/get`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Add contact to a user\r\n * @return {Promise} Axios promise\r\n */\r\nexport function addContact(data) {\r\n let url = API_URL + `/contacts/create`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description update contact on a user\r\n * @return {Promise} Axios promise\r\n */\r\nexport function updateContact(data) {\r\n let url = API_URL + `/contacts/update`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n/**\r\n * @description delete contact on a user\r\n * @return {Promise} Axios promise\r\n */\r\nexport function deleteContact(contactId) {\r\n let url = API_URL + `/contacts/delete/` + contactId;\r\n return dispatch => {\r\n return axios.post(url);\r\n };\r\n}\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../i18n';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\n// Elements\r\nimport { Button, Card, Col, Collapse, Container } from 'reactstrap';\r\nimport TaghaandbogenLogo from '../../assets/img/logo/method-draw-image.svg';\r\n\r\n// Actions\r\nimport { sendErrorLog } from '../../redux/actions/error';\r\n\r\n// Components\r\nimport Typography from '../Typography';\r\nimport { getUserData } from '../../utils/userUtil';\r\nimport { ERROR_TYPE } from '../../redux/constants';\r\n\r\n// Utils\r\nconst { detect } = require('detect-browser');\r\n\r\n// ComponentDidCatch does not exist in functional components, cannot be converted.\r\nclass ErrorBoundary extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { catchError } = this.props;\r\n\r\n this.state = {\r\n hasError: false,\r\n error: catchError ? catchError.message : null,\r\n errorInfo: catchError ? catchError : null,\r\n guid: null,\r\n\r\n showDetails: false,\r\n };\r\n }\r\n\r\n static getDerivedStateFromError(error) {\r\n //console.log('getDerivedStateFromError', error);\r\n return { hasError: true };\r\n }\r\n\r\n componentDidCatch(error, errorInfo) {\r\n //console.log('componentDidCatch', error, errorInfo);\r\n //if (this.state.error !== null && this.state.errorInfo !== null) {\r\n this.setState({ error, errorInfo, guid: uuidv4() }, () =>\r\n this.handleAutoReportError(),\r\n );\r\n //}\r\n }\r\n\r\n handleAutoReportError = () => {\r\n const { guid, error, errorInfo } = this.state;\r\n const { auth, catchError } = this.props;\r\n\r\n let userId = -1;\r\n let metadata = {\r\n appVersion: process.env.REACT_APP_VERSION,\r\n };\r\n\r\n try {\r\n metadata.url = window.location.href;\r\n } catch (err) {\r\n metadata.errorUrl = {\r\n message: 'Failed to get url',\r\n error: err,\r\n };\r\n }\r\n\r\n try {\r\n const user = getUserData(auth);\r\n userId = user.id;\r\n metadata.loggedInAsUser = auth.loginAsUser ? true : false;\r\n } catch (err) {\r\n metadata.error = {\r\n message: 'Failed to get user information',\r\n error: err,\r\n };\r\n }\r\n\r\n try {\r\n const browser = detect();\r\n\r\n if (browser) {\r\n metadata.browser = {\r\n name: browser.name,\r\n version: browser.version,\r\n os: browser.os,\r\n };\r\n }\r\n } catch (err) {\r\n metadata.error2 = {\r\n message: 'Failed to get browser information',\r\n error: err,\r\n };\r\n }\r\n\r\n let infoText = '';\r\n if (catchError && errorInfo !== null) {\r\n infoText = errorInfo.stack.toString();\r\n } else if (errorInfo !== null) {\r\n infoText = errorInfo.componentStack.toString();\r\n }\r\n\r\n let errorObj = {\r\n guid,\r\n userId,\r\n error: error.toString(),\r\n stackTrace: infoText.trim(),\r\n metadata,\r\n type: ERROR_TYPE.WebError,\r\n };\r\n\r\n // console.log(errorObj);\r\n this.props.sendErrorLog(errorObj);\r\n };\r\n\r\n renderLogo = () => {\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n renderErrorBlock = () => {\r\n const { simple, catchError } = this.props;\r\n const { error, errorInfo, showDetails, guid } = this.state;\r\n //console.log(catchError);\r\n\r\n if (catchError !== undefined && error === null) {\r\n this.setState(\r\n {\r\n error: catchError.message,\r\n errorInfo: catchError,\r\n guid: uuidv4(),\r\n },\r\n () => {\r\n this.handleAutoReportError();\r\n },\r\n );\r\n }\r\n\r\n const toggleDetails = () => {\r\n this.setState({ showDetails: !this.state.showDetails });\r\n };\r\n\r\n let colClasses = 'error-col';\r\n if (simple) {\r\n colClasses += ' simple';\r\n }\r\n let infoText = '';\r\n if (catchError !== undefined && errorInfo !== null) {\r\n infoText = errorInfo.stack.toString();\r\n } else if (errorInfo !== null) {\r\n console.log(errorInfo);\r\n infoText = errorInfo.componentStack.toString();\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {i18next.t(1451)}\r\n \r\n {i18next.t(1454)} {i18next.t(1455)?.toLowerCase()}.\r\n \r\n {i18next.t(1452)}\r\n \r\n \r\n \r\n
\r\n \r\n {error &&

{error.toString()}

}\r\n {errorInfo &&

{infoText}

}\r\n
\r\n
\r\n
\r\n {!simple && this.renderLogo()}\r\n \r\n {i18next.t(1456)}: {guid}\r\n \r\n {/* \r\n {i18next.t(1453)}:{' '}\r\n example@example.com\r\n */}\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n render() {\r\n const { hasError } = this.state;\r\n const { catchError } = this.props;\r\n //console.log(this.props);\r\n // console.log(this.state);\r\n\r\n if (hasError || catchError != null) {\r\n //console.log('Error');\r\n return this.renderErrorBlock();\r\n } else {\r\n //console.log('No error');\r\n return this.props.children;\r\n }\r\n }\r\n}\r\n\r\n// const ErrorBoundary = props => {\r\n// const { auth, simple, catchError } = props;\r\n// const [hasError, setHasError] = useState(false);\r\n// const [error, setError] = useState(catchError ? catchError.message : null);\r\n// const [errorInfo, setErrorInfo] = useState(catchError ? catchError : null);\r\n// const [guid, setGuid] = useState(null);\r\n// const [showDetails, setShowDetails] = useState(false);\r\n\r\n// componentDidCatch(error, errorInfo) {\r\n// // There is no hook equivelant to componentDidCatch yet, no timetable for implementation\r\n// //console.log('componentDidCatch', error, errorInfo);\r\n// setError(error);\r\n// setErrorInfo(errorInfo);\r\n// setGuid(uuidv4());\r\n// handleAutoReportError();\r\n// }\r\n\r\n// // const getDerivedStateFromError = error => {\r\n// // //console.log('getDerivedStateFromError', error);\r\n// // return { hasError: true };\r\n// // };\r\n\r\n// const handleAutoReportError = () => {\r\n// let userId = -1;\r\n// let metadata = {\r\n// appVersion: process.env.REACT_APP_VERSION,\r\n// };\r\n\r\n// try {\r\n// metadata.url = window.location.href;\r\n// } catch (err) {\r\n// metadata.errorUrl = {\r\n// message: 'Failed to get url',\r\n// error: err,\r\n// };\r\n// }\r\n\r\n// try {\r\n// const user = getUserData(auth);\r\n// userId = user.id;\r\n// metadata.loggedInAsUser = auth.loginAsUser ? true : false;\r\n// } catch (err) {\r\n// metadata.error = {\r\n// message: 'Failed to get user information',\r\n// error: err,\r\n// };\r\n// }\r\n\r\n// try {\r\n// const browser = detect();\r\n\r\n// if (browser) {\r\n// metadata.browser = {\r\n// name: browser.name,\r\n// version: browser.version,\r\n// os: browser.os,\r\n// };\r\n// }\r\n// } catch (err) {\r\n// metadata.error2 = {\r\n// message: 'Failed to get browser information',\r\n// error: err,\r\n// };\r\n// }\r\n\r\n// let infoText = '';\r\n// if (catchError && errorInfo !== null) {\r\n// infoText = errorInfo.stack.toString();\r\n// } else if (errorInfo !== null) {\r\n// infoText = errorInfo.componentStack.toString();\r\n// }\r\n\r\n// let errorObj = {\r\n// guid,\r\n// userId,\r\n// error: error.toString(),\r\n// stackTrace: infoText.trim(),\r\n// metadata,\r\n// type: ERROR_TYPE.WebError,\r\n// };\r\n\r\n// // console.log(errorObj);\r\n// props.sendErrorLog(errorObj);\r\n// };\r\n\r\n// const renderLogo = () => {\r\n// return (\r\n//
\r\n//
\r\n// \r\n// \r\n// \r\n//
\r\n//
\r\n// );\r\n// };\r\n\r\n// const renderErrorBlock = () => {\r\n// //console.log(catchError);\r\n\r\n// if (catchError !== undefined && error === null) {\r\n// setError(catchError.message);\r\n// setErrorInfo(catchError);\r\n// setGuid(uuidv4());\r\n// handleAutoReportError();\r\n// }\r\n\r\n// const toggleDetails = () => {\r\n// setShowDetails(!showDetails);\r\n// };\r\n\r\n// let colClasses = 'error-col';\r\n// if (simple) {\r\n// colClasses += ' simple';\r\n// }\r\n// let infoText = '';\r\n// if (catchError !== undefined && errorInfo !== null) {\r\n// infoText = errorInfo.stack.toString();\r\n// } else if (errorInfo !== null) {\r\n// console.log(errorInfo);\r\n// infoText = errorInfo.componentStack.toString();\r\n// }\r\n\r\n// return (\r\n// \r\n// \r\n//
\r\n// {i18next.t(1451)}\r\n// \r\n// {i18next.t(1454)} {i18next.t(1455).toLowerCase()}.\r\n// \r\n// {i18next.t(1452)}\r\n// \r\n// \r\n// \r\n//
\r\n// \r\n// {error &&

{error.toString()}

}\r\n// {errorInfo &&

{infoText}

}\r\n//
\r\n//
\r\n//
\r\n// {!simple && renderLogo()}\r\n// \r\n// {i18next.t(1456)}: {guid}\r\n// \r\n//
\r\n// \r\n//
\r\n// );\r\n// };\r\n\r\n// if (hasError || catchError != null) {\r\n// //console.log('Error');\r\n// return renderErrorBlock();\r\n// } else {\r\n// //console.log('No error');\r\n// return props.children;\r\n// }\r\n// };\r\n\r\nErrorBoundary.defaultProps = {\r\n simple: true,\r\n};\r\n\r\nfunction mapStateToProps({ auth }) {\r\n return {\r\n auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, { sendErrorLog })(ErrorBoundary);\r\n","/**\r\n * @module actions/error\r\n */\r\nimport axios from 'axios';\r\nimport { ADD_TRACE_LOG, API_URL } from '../constants';\r\n\r\n/**\r\n * @description Send error log\r\n * @return {Promise} Axios promise\r\n */\r\nexport function sendErrorLog(data) {\r\n let url = API_URL + `/error`;\r\n return dispatch => {\r\n return axios.post(url, data);\r\n };\r\n}\r\n\r\n/**\r\n * @description Add trace log for errors\r\n * @return {Promise} Axios promise\r\n */\r\nexport function addTraceLog(message) {\r\n return dispatch => {\r\n dispatch({\r\n type: ADD_TRACE_LOG,\r\n payload: message,\r\n });\r\n };\r\n}\r\n","import i18next from '../i18n';\r\n\r\nexport function industryTypes() {\r\n return [\r\n { label: i18next.t(9063), value: 0 },\r\n { label: i18next.t(21277), value: 1 },\r\n { label: i18next.t(21233), value: 2 },\r\n ];\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { Spinner } from 'reactstrap';\r\n\r\nconst PageSpinner = ({ color = 'primary', extraClass = '' }) => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nPageSpinner.propTypes = {\r\n color: PropTypes.oneOf([\r\n 'primary',\r\n 'secondary',\r\n 'success',\r\n 'danger',\r\n 'warning',\r\n 'info',\r\n 'light',\r\n 'dark',\r\n ]),\r\n};\r\n\r\nexport default PageSpinner;\r\n","import React from 'react';\r\nimport { FormGroup, Col, Label } from 'reactstrap';\r\n\r\nconst FormGroupRow = props => {\r\n return (\r\n \r\n \r\n \r\n {props.input}\r\n {props.error ? (\r\n

{props.error ? props.errorText : null}

\r\n ) : null}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default FormGroupRow;\r\n","module.exports = __webpack_public_path__ + \"static/media/billede-kamera.e2770d97.svg\";","module.exports = __webpack_public_path__ + \"static/media/billede-kamerarulle.aedcca83.svg\";","module.exports = __webpack_public_path__ + \"static/media/kvalitetssikring.ccf01918.svg\";","module.exports = __webpack_public_path__ + \"static/media/log-ud.9dd5129a.svg\";","module.exports = __webpack_public_path__ + \"static/media/mappe.0620f322.svg\";","module.exports = __webpack_public_path__ + \"static/media/sager.8e6f5018.svg\";","module.exports = __webpack_public_path__ + \"static/media/User.f9050ab1.svg\";","module.exports = __webpack_public_path__ + \"static/media/varmt_arbejde.a42aba6f.svg\";","module.exports = __webpack_public_path__ + \"static/media/info.4d4fcb89.svg\";","module.exports = __webpack_public_path__ + \"static/media/produkter-icon.dd8b3fdf.svg\";","module.exports = __webpack_public_path__ + \"static/media/service-aftale_hvid.aa1c3683.svg\";","module.exports = __webpack_public_path__ + \"static/media/Roed_mand_77202D.ff473be8.svg\";","module.exports = __webpack_public_path__ + \"static/media/groen_mand_39B021.6e70d49d.svg\";","module.exports = __webpack_public_path__ + \"static/media/sagsansvarlig.1b494dc0.svg\";","module.exports = __webpack_public_path__ + \"static/media/firma_logo.e52eca73.svg\";","module.exports = __webpack_public_path__ + \"static/media/firma_logo_notifikation.10acae9f.svg\";","module.exports = __webpack_public_path__ + \"static/media/tagpas_logo.f140b281.svg\";","module.exports = __webpack_public_path__ + \"static/media/notification-bell-new.d726f9a1.svg\";","import PropTypes from 'prop-types';\r\n\r\nexport default {\r\n ...PropTypes,\r\n ID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\r\n date: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),\r\n};\r\n","module.exports = __webpack_public_path__ + \"static/media/Global-mappe.1c96ccb3.svg\";","module.exports = __webpack_public_path__ + \"static/media/Lokal-mappe.8ec87c7f.svg\";","module.exports = __webpack_public_path__ + \"static/media/folder.f9ffe77d.svg\";","module.exports = __webpack_public_path__ + \"static/media/image-icon.0864c240.svg\";","module.exports = __webpack_public_path__ + \"static/media/PDF.ac2c9cca.svg\";","module.exports = __webpack_public_path__ + \"static/media/Excel.b639ed90.svg\";","// API URL\r\nexport const API_URL = process.env.REACT_APP_API_URL;\r\n\r\n// Third Party API\r\nexport const POSTAL_API = 'https://dawa.aws.dk/';\r\n\r\n// Language constants\r\nexport const GET_LANGUAGES = 'GET_LANGUAGES';\r\nexport const SET_LANGUAGES = 'SET_LANGUAGES';\r\n\r\n// Auth constants\r\nexport const SET_CURRENT_USER = 'SET_CURRENT_USER';\r\nexport const SET_USER_PERMISSIONS = 'SET_USER_PERMISSIONS';\r\nexport const SET_LOGIN_AS = 'SET_LOGIN_AS';\r\nexport const LOGOUT_AS = 'LOGOUT_AS';\r\nexport const SET_PAUSED_MODAL = 'SET_PAUSED_MODAL';\r\nexport const HANDLED_PAUSED_MODAL = 'HANDLED_PAUSED_MODAL';\r\nexport const SET_CUSTOMER_STATUS = 'SET_CUSTOMER_STATUS';\r\nexport const SET_PERMISSION_SET = 'SET_PERMISSION_SET';\r\n\r\n// Cases\r\nexport const SET_CASE = 'SET_CASE';\r\nexport const SET_CASES_ALL = 'SET_CASES_CALL';\r\nexport const SET_CASES_WARM_WORK = 'SET_CASES_WARM_WORK';\r\nexport const SET_CASES_QUALITY_WORK = 'SET_CASES_QUALITY_WORK';\r\nexport const SET_CASE_IMAGE_GALLERY = 'SET_CASE_IMAGE_GALLERY';\r\n\r\n// Service Agreements\r\nexport const SET_SERVICE_AGREEMENTS = 'SET_SERVICE_AGREEMENTS';\r\nexport const SET_SERVICE_AGREEMENT = 'SET_SERVICE_AGREEMENT';\r\n\r\n// Customer Group constants\r\nexport const SET_CUSTOMERGROUPS = 'SET_CUSTOMERGROUPS';\r\n\r\n// System Constants\r\nexport const SET_SYSTEM_INFO = 'SET_SYSTEM_INFO';\r\nexport const SET_SYSTEM_MESSAGE = 'SET_SYSTEM_MESSAGE';\r\n\r\n// Customer constants\r\nexport const SET_CUSTOMERS = 'SET_CUSTOMERS';\r\nexport const SET_CUSTOMER = 'SET_CUSTOMER';\r\n\r\n// Sales manager constants\r\nexport const SET_SALES_MANAGERS = ' SET_SALES_MANAGERS';\r\nexport const SET_SALES_MANAGER = ' SET_SALES_MANAGER';\r\n\r\n// Employee constants\r\nexport const SET_EMPLOYEES = 'SET_EMPLOYEES';\r\n\r\n// Insurance companies constants\r\nexport const SET_INSURANCE_COMPANIES = 'SET_INSURANCE_COMPANIES';\r\n\r\n// Features\r\nexport const GET_FEATURES = 'GET_FEATURES';\r\nexport const ADD_FEATURES = 'ADD_FEATURES';\r\nexport const UPDATE_FEATURES = 'UPDATE_FEATURES';\r\nexport const GRANT_FEATURES = 'GRANT_FEATURES';\r\n\r\n// Schemabuilder\r\nexport const SB_GET_SCHEMAS_WITH_INDEX = 'SB_GET_SCHEMAS_WITH_INDEX';\r\nexport const SB_ADD_SCHEMA_TO_CATEGORY = 'SB_ADD_SCHEMA_TO_CATEGORY';\r\nexport const SB_UPDATE_SCHEMA_IN_CATEGORY = 'SB_UPDATE_SCHEMA_IN_CATEGORY';\r\nexport const SB_REMOVE_SCHEMA_FROM_CATEGORY = 'SB_REMOVE_SCHEMA_FROM_CATEGORY';\r\n\r\nexport const SB_GET_SCHEMA_PACKAGES_INDICE = 'SB_GET_SCHEMA_PACKAGES_INDICE';\r\nexport const SB_ADD_SCHEMA_PACKAGE = 'SB_ADD_SCHEMA_PACKAGE';\r\nexport const SB_UPDATE_SCHEMA_PACKAGE = 'SB_UPDATE_SCHEMA_PACKAGE';\r\nexport const SB_REMOVE_SCHEMA_PACKAGE = 'SB_REMOVE_SCHEMA_PACKAGE';\r\n\r\nexport const SB_SET_CURRENT_SCHEMA_CATEGORY = 'SB_SET_CURRENT_SCHEMA_CATEGORY';\r\nexport const SB_GET_SCHEMA_CATEGORIES = 'SB_GET_SCHEMA_CATEGORIES';\r\nexport const SB_ADD_SCHEMA_CATEGORY = 'SB_ADD_SCHEMA_CATEGORY';\r\nexport const SB_UPDATE_SCHEMA_CATEGORY = 'SB_UPDATE_CATEGORY_IN_PACKAGES';\r\nexport const SB_REMOVE_SCHEMA_CATEGORY = 'SB_REMOVE_SCHEMA_CATEGORY';\r\n\r\nexport const SB_SET_CURRENT_SCHEMA_PACKAGE = 'SB_SET_CURRENT_SCHEMA_PACKAGE';\r\nexport const SB_GET_PACKAGE_SCHEMAS = 'SB_GET_PACKAGE_SCHEMAS';\r\nexport const SB_ADD_SCHEMA_TO_PACKAGE = 'SB_ADD_SCHEMA_TO_PACKAGE';\r\nexport const SB_UPDATE_SCHEMA_IN_PACKAGE = 'SB_UPDATE_SCHEMA_IN_PACKAGE';\r\nexport const SB_REMOVE_SCHEMA_FROM_PACKAGE = 'SB_REMOVE_SCHEMA_FROM_PACKAGE';\r\n\r\nexport const SB_GET_SCHEMAS = 'SB_GET_SCHEMAS';\r\nexport const SB_GET_SCHEMA = 'SB_GET_SCHEMA';\r\nexport const SB_ADD_SCHEMA = 'SB_ADD_SCHEMA';\r\nexport const SB_UPDATE_SCHEMA = 'SB_UPDATE_SCHEMA';\r\nexport const SB_REMOVE_SCHEMA = 'SB_REMOVE_SCHEMA';\r\nexport const SB_SET_CURRENT_SCHEMA = 'SB_SET_CURRENT_SCHEMA';\r\n\r\nexport const SB_GET_RELATION_CONTROLS = 'SB_GET_RELATION_CONTROLS';\r\nexport const SB_ADD_RELATION_CONTROL = 'SB_ADD_RELATION_CONTROL';\r\nexport const SB_UPDATE_RELATION_CONTROL = 'SB_UPDATE_RELATION_CONTROL';\r\nexport const SB_REMOVE_RELATION_CONTROL = 'SB_REMOVE_RELATION_CONTROL';\r\nexport const SB_SET_RELATION_CONTROL = 'SB_SET_RELATION_CONTROL';\r\n\r\nexport const SB_GET_RELATION_GROUPS = 'SB_GET_RELATION_GROUPS';\r\nexport const SB_SET_RELATION_GROUP = 'SB_SET_RELATION_GROUP';\r\n\r\nexport const SB_GET_CRITERIA = 'SB_GET_CRITERIA';\r\nexport const SB_ADD_CRITERIA = 'SB_ADD_CRITERIA';\r\nexport const SB_UPDATE_CRITERIA = 'SB_UPDATE_CRITERIA';\r\nexport const SB_REMOVE_CRITERIA = 'SB_REMOVE_CRITERIA';\r\n\r\nexport const SB_GET_CONTROL_ITEMS = 'SB_GET_CONTROL_ITEMS';\r\nexport const SB_GET_CONTROL_ITEM = 'SB_GET_CONTROL_ITEM';\r\nexport const SB_ADD_CONTROL_ITEM = 'SB_ADD_CONTROL_ITEM';\r\nexport const SB_UPDATE_CONTROL_ITEM = 'SB_UPDATE_CONTROL_ITEM';\r\nexport const SB_REMOVE_CONTROL_ITEM = 'SB_REMOVE_CONTROL_ITEM';\r\nexport const SB_SET_CONTROL_ITEM = 'SB_SET_CONTROL_ITEM';\r\n\r\n// Control Schemas\r\nexport const GET_SCHEMA_GROUP = 'GET_SCHEMA_GROUP';\r\nexport const SET_SCHEMA_GROUP = 'SET_SCHEMA_GROUP';\r\nexport const SET_CURRENT_SCHEMA = 'SET_CURRENT_SCHEMA';\r\nexport const GET_SCHEMA_OPTIONS = 'GET_SCHEMA_OPTIONS';\r\nexport const SET_MARKED_SCHEMAS = 'SET_MARKED_SCHEMAS';\r\nexport const REFRESH_SCHEMA_GROUP = 'REFRESH_SCHEMA_GROUP';\r\n\r\n// Control plan\r\nexport const GET_CONTROLPLANS = 'GET_CONTROLPLANS';\r\nexport const SET_CONTROLPLANS = 'SET_CONTROLPLANS';\r\nexport const GET_CONTROLPLAN = 'GET_CONTROLPLAN';\r\nexport const SET_CONTROLPLAN = 'SET_CONTROLPLAN';\r\nexport const GET_CONTROLPLAN_ON_CASE = 'GET_CONTROLPLAN_ON_CASE';\r\nexport const SET_CONTROLPLAN_ON_CASE = 'SET_CONTROLPLAN_ON_CASE';\r\n\r\n// Common constants\r\nexport const SET_HEADERINFO = 'SET_HEADERINFO';\r\nexport const SET_USER_LANGUAGE = 'SET_USER_LANGUAGE';\r\nexport const SET_BRANDING = 'SET_BRANDING';\r\nexport const GET_CUSTOMER_BRANDING = 'GET_CUSTOMER_BRANDING';\r\nexport const SET_CUSTOMER_BRANDING = 'SET_CUSTOMER_BRANDING';\r\nexport const ADD_TRACE_LOG = 'ADD_TRACE_LOG';\r\nexport const TOA_HANDLED = 'TOA_HANDLED'; // Terms of Agreement Handled\r\nexport const SET_SA_FILTER = 'SET_SA_FILTER';\r\nexport const GET_SA_FILTER = 'GET_SA_FILTER';\r\nexport const SET_RM_FILTER = 'SET_RM_FILTER';\r\nexport const GET_RM_FILTER = 'GET_RM_FILTER';\r\nexport const SET_RM_MATS_FILTER = 'SET_RM_MATS_FILTER';\r\nexport const GET_RM_MATS_FILTER = 'GET_RM_MATS_FILTER';\r\nexport const GET_USER_FILTERS = 'GET_USER_FILTERS';\r\nexport const UPDATE_USER_FILTERS = 'UPDATE_USER_FILTERS';\r\nexport const GET_AGREEMENT_SCHEMA_SETTINGS = 'GET_AGREEMENT_SCHEMA_SETTINGS';\r\nexport const UPDATE_AGREEMENT_SCHEMA_SETTING =\r\n 'UPDATE_AGREEMENT_SCHEMA_SETTING';\r\nexport const GET_BINDINGS = 'GET_BINDINGS';\r\nexport const GET_HIDE_MODAL_SETTINGS = 'GET_HIDE_MODAL_SETTINGS';\r\nexport const UPDATE_HIDE_MODAL_SETTINGS = 'UPDATE_HIDE_MODAL_SETTINGS';\r\nexport const GET_PRODUCTS = 'GET_PRODUCTS';\r\nexport const GET_CASE_MATERIALS = 'GET_CASE_MATERIALS';\r\nexport const IMAGE_HASH_REFRESH = 'IMAGE_HASH_REFRESH';\r\n\r\n//Documents\r\nexport const GET_FOLDERS = 'GET_FOLDERS';\r\nexport const GET_CURRENT_FOLDER = 'GET_CURRENT_FOLDER';\r\nexport const SET_CURRENT_FOLDER = 'SET_CURRENT_FOLDER';\r\nexport const ADD_FOLDERS = 'ADD_FOLDERS';\r\nexport const UPDATE_FOLDERS = 'UPDATE_FOLDERS';\r\nexport const DELETE_FOLDERS = 'DELETE_FOLDERS';\r\nexport const GET_FILES = 'GET_FILES';\r\nexport const ADD_FILES = 'ADD_FILES';\r\nexport const UPDATE_FILES = 'UPDATE_FILES';\r\nexport const DELETE_FILES = 'DELETE_FILES';\r\nexport const GET_FAVORITES = 'GET_FAVORITES';\r\nexport const ADD_FAVORITES = 'ADD_FAVORITES';\r\nexport const UPDATE_FAVORITES = 'UPDATE_FAVORITES';\r\nexport const DELETE_FAVORITES = 'DELETE_FAVORITES';\r\n\r\n// Roadmap\r\nexport const GET_ROADMAP_DATA = 'GET_ROADMAP_DATA';\r\nexport const GET_ROADMAP_MATERIALS_DATA = 'GET_ROADMAP_MATERIALS_DATA';\r\nexport const SET_ROADMAP_DATE_INTERVAL = 'SET_ROADMAP_DATE_INTERVAL';\r\nexport const RENDERED_ROADMAP_TIMELINE = 'RENDERED_ROADMAP_TIMELINE';\r\nexport const RENDERED_ROADMAP_MATERIALS = 'RENDERED_ROADMAP_MATERIALS';\r\nexport const RENDERED_ROADMAP_TIMEINDICATOR = 'RENDERED_ROADMAP_TIMEINDICATOR';\r\nexport const RERENDER_ROADMAP_LOCK_STATE = 'RERENDER_ROADMAP_LOCK_STATE';\r\nexport const GET_ROADMAP_INFO_SCREEN_DATA = 'GET_ROADMAP_INFO_SCREEN_DATA';\r\nexport const TOGGLE_ROADMAP_INFO_SCREEN = 'TOGGLE_ROADMAP_INFO_SCREEN';\r\nexport const SET_SIDEMENU_ERRORS = 'SET_SIDEMENU_ERRORS';\r\nexport const ROADMAP_SET_INFOBAR_DATA = 'ROADMAP_SET_INFOBAR_DATA';\r\n\r\n// Notifications\r\nexport const GET_NOTIFICATIONS = 'GET_NOTIFICATIONS';\r\nexport const MARK_NOTIFICATION = 'MARK_NOTIFICATION';\r\nexport const GET_NOTIFICATION_SETTINGS = 'GET_NOTIFICATION_SETTINGS';\r\nexport const UPDATE_NOTIFICATION_SETTINGS = 'UPDATE_NOTIFICATION_SETTINGS';\r\n\r\n// Case descriptions\r\nexport const GET_CASE_DESCRIPTIONS = 'GET_CASE_DESCRIPTIONS';\r\nexport const GET_CUSTOMER_DESCRIPTIONS = 'GET_CUSTOMER_DESCRIPTIONS';\r\nexport const SET_CASE_DESCRIPTIONS = 'SET_CASE_DESCRIPTIONS';\r\nexport const SET_CUSTOMER_DESCRIPTIONS = 'SET_CUSTOMER_DESCRIPTIONS';\r\n\r\n// Image marking\r\nexport const GET_ALL_IMAGE_REFERENCES = 'GET_ALL_IMAGE_REFERENCES';\r\nexport const SET_CURRENT_IMAGE_REFERENCES = 'SET_CURRENT_IMAGE_REFERENCES';\r\nexport const UPDATE_REFERENCE_INFO = 'UPDATE_REFERENCE_INFO';\r\nexport const IS_REF_SAVE_ALLOWED = 'IS_REF_SAVE_ALLOWED';\r\nexport const RECENT_UPLOADS = 'RECENT_UPLOADS';\r\n\r\n// Icon constants\r\nexport const DEFAULT_ICON_COLOR = '#003341';\r\n\r\n// Months\r\nexport const MONTHS = {\r\n January: 1,\r\n February: 2,\r\n March: 3,\r\n April: 4,\r\n May: 5,\r\n June: 6,\r\n July: 7,\r\n August: 8,\r\n September: 9,\r\n October: 10,\r\n November: 11,\r\n December: 12,\r\n};\r\n\r\n// Employee Type constants\r\nexport const EMPLOYEE_TYPE = {\r\n None: 0,\r\n SuperAdmin: 1,\r\n LocalAdmin: 2,\r\n ResponsiblePerson: 3,\r\n // Landlord: 4, // Unused - but kept in list\r\n ExecutivePerson: 5,\r\n BuildingOwner: 6,\r\n Firewatch: 7,\r\n Subcontractor: 8,\r\n RoofingContractor: 9,\r\n Advisor: 10,\r\n Architect: 11,\r\n InternalSubcontractor: 12,\r\n Supplier: 13,\r\n CompanyOwner: 14,\r\n};\r\n\r\nexport const USER_POSITION_TYPE = {\r\n None: 0,\r\n RoofingContractor: 1,\r\n EnterpriseLeader: 2,\r\n Director: 3,\r\n DepartmentLead: 4,\r\n Planner: 5,\r\n Calculator: 6,\r\n Advisor: 7,\r\n Architect: 8,\r\n Specialist: 9,\r\n Supplier: 10,\r\n Customer: 11,\r\n Student: 12,\r\n Other: 13,\r\n};\r\n\r\n// AccessLevel constants\r\nexport const ACCESS_LEVEL = {\r\n SuperAdmin: 1,\r\n LocalAdmin: 2,\r\n CustomerAdmin: 3,\r\n Employee: 4,\r\n None: 100,\r\n};\r\n\r\n// Assignee Types\r\nexport const ASSIGNEE_TYPE = {\r\n ExecutivePerson: 1,\r\n Firewatch: 2,\r\n BuildingOwner: 3,\r\n ExecutiveResponsible: 4,\r\n Subcontractor: 5,\r\n // ContactForCompany: 6,\r\n // ContactForProjectOrganisation: 7,\r\n // ContactForSubcontractor: 8,\r\n ContactForInternalOrganisation: 9,\r\n // ContactForEmployee: 10,\r\n Employee: 11,\r\n RoofingContractor: 12,\r\n Advisor: 13,\r\n Architect: 14,\r\n Supplier: 15,\r\n None: 100,\r\n};\r\n\r\n// Used in conjunction with contaction information\r\nexport const SIMPLE_USERS = [\r\n EMPLOYEE_TYPE.BuildingOwner,\r\n EMPLOYEE_TYPE.Firewatch,\r\n EMPLOYEE_TYPE.RoofingContractor,\r\n EMPLOYEE_TYPE.Subcontractor,\r\n];\r\n\r\n// Business Intelligence Search types\r\nexport const BI_SEARCH_TYPES = {\r\n Unknown: 0,\r\n CurrentCasesVA: 1,\r\n CurrentCasesKS: 2,\r\n // Users: 3,\r\n Companies: 4,\r\n CompanyUsers: 5,\r\n CompanyUsersInternal: 6,\r\n CompanyUsersExternal: 7,\r\n UsersWithoutBindings: 8,\r\n CurrentCases: 12,\r\n CurrentCasesSA: 13,\r\n ControlSchemas: 14,\r\n};\r\n\r\n// Template types\r\nexport const TEMPLATE = {\r\n GlobalMaster: 1,\r\n // GroupMaster: 2, // not yet implemented\r\n CustomerMaster: 3,\r\n Template: 4,\r\n};\r\n\r\n// Template section types\r\nexport const TEMPLATE_SECTIONS = {\r\n None: 0,\r\n RecieveControl: 1,\r\n ExecutiveControl: 2,\r\n FinalControl: 3,\r\n RunnerUpControl: 4,\r\n ServiceAgreement: 5,\r\n};\r\n\r\n// Expire date types\r\nexport const EXPIRE_TYPES = {\r\n Hour: 0,\r\n Day: 1,\r\n Week: 2,\r\n Month: 3,\r\n Year: 6,\r\n Permanent: 4,\r\n Custom: 5,\r\n};\r\n\r\n// Description types\r\nexport const DESCRIPTION_TYPE = {\r\n Customer: 0,\r\n OperationAndMaintenance: 1,\r\n QualityInsuranceDescription: 2,\r\n};\r\n\r\n// Hide Modal types\r\nexport const HIDE_MODAL_TYPES = {\r\n PdfGenerationModalWeb: 0,\r\n PdfGenerationModalApp: 1,\r\n};\r\n\r\n// System Message Types\r\nexport const SYSTEM_MESSAGE_TYPE = {\r\n STANDARD: 0,\r\n INFORMATIVE: 1,\r\n WARNING: 2,\r\n URGENT: 3,\r\n STANDARD_PRIMARY: 4,\r\n};\r\n\r\n// Error types\r\nexport const ERROR_TYPE = {\r\n ApiError: 0,\r\n WebError: 1,\r\n};\r\n// Team Update Types\r\nexport const TEAM_UPDATE = {\r\n TeamCreate: 0,\r\n TeamUpdate: 1,\r\n TeamDelete: 2,\r\n AddMember: 100,\r\n RemoveMember: 101,\r\n};\r\n\r\n// System Push message types\r\nexport const PUSH_TYPE = {\r\n None: 0,\r\n Users: 1,\r\n Teams: 2,\r\n Companies: 3,\r\n Groups: 4,\r\n Global: 5,\r\n};\r\n\r\n// Device Types\r\nexport const DEVICE_TYPE = {\r\n iOS: 1,\r\n iPhoneOS: 2,\r\n Android: 3,\r\n None: 100,\r\n};\r\n\r\n// Case states\r\nexport const CASE_STATUS = {\r\n NotAccepted: 1,\r\n Accepted: 2,\r\n InProgress: 3,\r\n Done: 4,\r\n Created: 5, // Quality Insurance Case\r\n Active: 6, // Quality Insurance Case\r\n Invoiced: 7,\r\n MissingControls: 8,\r\n IncompleteControl: 9,\r\n CompletedControl: 10,\r\n Subscribed: 11,\r\n Unsubscribed: 12,\r\n Draft: 99,\r\n None: 100,\r\n NullState: 1000,\r\n};\r\n\r\nexport const CASE_FILE_TYPE = {\r\n Unknown: 0,\r\n Case: 1,\r\n QualtiyCase: 2,\r\n CoverImage: 3,\r\n Contract: 4,\r\n CompressedImage: 5,\r\n ControlImage: 6,\r\n BuildingImage: 7,\r\n KSGenericDocument: 20000,\r\n KSFixingPlan: 20001,\r\n};\r\n\r\n// Search categories\r\nexport const SEARCH_CATEGORY = {\r\n All: 0,\r\n New: 1,\r\n Archive: 2,\r\n};\r\n\r\n// Shapes\r\nexport const MARKING_TYPE = {\r\n Square: 1,\r\n Circle: 2,\r\n};\r\n\r\n// Features\r\nexport const FEATURE = {\r\n Hotwork: 0,\r\n QualityInsurance: 1,\r\n ServiceAgreement: 2,\r\n Documents: 3,\r\n DocumentsBasic: 4,\r\n Roadmap: 5,\r\n Materials: 6,\r\n SBSchemas: 7,\r\n PdfSchemaPrinting: 8,\r\n};\r\n\r\nexport const FEATURE_SUB = {\r\n Standard: 0,\r\n Basis: 1,\r\n Plus: 2,\r\n};\r\n\r\nexport const FEATURE_STATUS = {\r\n Unset: 0,\r\n Trial: 1,\r\n Purchased: 2,\r\n Disabled: 3,\r\n};\r\n\r\n// Customer states\r\nexport const CUSTOMER_STATUS = {\r\n Active: 1,\r\n Closed: 0,\r\n Paused: 3,\r\n // Trial: 2, // Not yet implemented\r\n};\r\n\r\n// Insurances\r\nexport const CUSTOM_ASSIGNMENT_TYPE_INSURANCES = {\r\n Koebstaedernes_forsikring: 1,\r\n};\r\n\r\n// Insurance type\r\nexport const INSURANCE_TYPE = {\r\n DBI_Forsikring: 1,\r\n Koebstaedernes_forsikring: 2,\r\n};\r\n\r\n// Assignment schemas\r\nexport const ASSIGNMENT_SCHEMA = {\r\n None: 100,\r\n WarmWorkStandard: 1,\r\n QualityWorkStandard: 2,\r\n WarmWorkStandardDBI: 101,\r\n WarmWorkStandardDBI_2021: 102,\r\n WarmWorkStandard_2021: 103,\r\n QBE_2022: 3,\r\n TRUST_2023: 4,\r\n};\r\n\r\n// Assignment types - VA\r\nexport const ASSIGNMENT_TYPE = {\r\n Standard: 0,\r\n Private: 1,\r\n ProfessionUnder50000: 2,\r\n ProfessionAbove50000: 3,\r\n};\r\n\r\n// Document Types\r\nexport const DOCUMENT_TYPE = {\r\n Generic: 0,\r\n Image: 1,\r\n Text: 2,\r\n Pdf: 3,\r\n Excel: 4,\r\n Word: 5,\r\n Powerpoint: 6,\r\n Video: 7,\r\n Numbers: 8,\r\n Pages: 9,\r\n Keynote: 10,\r\n Email: 11,\r\n};\r\n\r\n// Document Folder Types\r\nexport const DOCUMENT_FOLDER_TYPE = {\r\n Standard: 0,\r\n Global: 1,\r\n Cases: 2,\r\n};\r\n\r\n// Product types\r\nexport const PRODUCT_TYPES = {\r\n Standard: 1,\r\n Custom: 2,\r\n All: 3,\r\n};\r\n\r\n// Product Statuses\r\nexport const PRODUCT_STATUS = {\r\n // Case statuses\r\n CaseMissingMaterials: 0,\r\n CaseAwaitingMaterials: 1,\r\n CaseHasAllMaterials: 2,\r\n\r\n // Product status\r\n ProductHasNoSupplier: 3,\r\n ProductNotOrdered: 4,\r\n ProductOrdered: 5,\r\n};\r\n\r\n// Product sorting type\r\nexport const PRODUCT_SORT_BY = {\r\n ProductCategory: 0,\r\n SupplierName: 1,\r\n ProductStatus: 2,\r\n};\r\n\r\n// Roadmap date intervals\r\nexport const DATE_TYPE = {\r\n WEEKS: 0,\r\n MONTHS: 1,\r\n QUATERS: 2,\r\n};\r\n\r\n// Roadmap statuses\r\nexport const ROADMAP_STATUS = {\r\n None: 0,\r\n Active: 1,\r\n Complete: 2,\r\n Created: 3,\r\n};\r\n\r\n// Roadmap statuses\r\nexport const ROADMAP_PROJECT_STATE = {\r\n Start_Delayed: 0,\r\n End_Delayed: 1,\r\n Start_Moved: 2,\r\n End_Moved: 3,\r\n};\r\n\r\n// Roadmap statuses\r\nexport const ROADMAP_INFO_TYPE = {\r\n Generic: 0,\r\n QualityInsurance: 1,\r\n Materials: 2,\r\n};\r\n\r\n// Roadmap side menu types\r\nexport const ROADMAP_TYPE = {\r\n Generic: 0,\r\n QualityInsurance: 1,\r\n Materials: 2,\r\n};\r\n\r\n// Sorting types\r\nexport const SORT_TYPE = {\r\n None: 0,\r\n AZ: 1,\r\n ZA: 2,\r\n LowHigh: 3,\r\n HighLow: 4,\r\n};\r\n\r\n// Invitation Types\r\nexport const INVITATION_TYPE = {\r\n Unknown: 0,\r\n CustomerToUser: 1,\r\n UserToCustomer: 2,\r\n FromSystemToUser: 3,\r\n CustomerToNonExistingUser: 4,\r\n};\r\n\r\n// Invitation statuses\r\nexport const INVITATION_STATUS = {\r\n Unknown: 0,\r\n AwaitingUserResponse: 1,\r\n AwaitingCustomerResponse: 101,\r\n Accepted: 2,\r\n Rejected: 3,\r\n};\r\n\r\n// Notification type\r\nexport const NOTIFICATION_TYPE = {\r\n Message: 0,\r\n};\r\n\r\n// Notification priority\r\nexport const NOTIFICATION_PRIORITY = {\r\n Low: 0,\r\n Normal: 1,\r\n High: 2,\r\n Extreme: 3,\r\n};\r\n\r\n// Notification action type\r\nexport const NOTIFICATION_ACTION_TYPE = {\r\n None: 0,\r\n Simple: 1,\r\n Redirect: 2,\r\n};\r\n\r\n// Notification subject area\r\nexport const NOTIFICATION_SUBJECT_AREA = {\r\n None: 0,\r\n VA: 1,\r\n KS: 2,\r\n SA: 3,\r\n Invitation: 4,\r\n System: 5,\r\n ExternalLink: 6,\r\n PDF: 7,\r\n InvitationRequestAccess: 8,\r\n InvitationRequestAccepted: 9,\r\n SchemaSignature: 10,\r\n};\r\n\r\n// Notification settings actonis\r\nexport const NOTIFICATION_SETTINGS_ACTIONS = {\r\n UNKNOWN: 0,\r\n OPENED: 1,\r\n MARK_ALL_AS_READ: 2,\r\n};\r\n\r\n// Schema builder\r\nexport const SB_CONTROL_ITEM_TYPE = {\r\n Unset: 0,\r\n Standard: 1,\r\n Custom: 2,\r\n};\r\n\r\nexport const SB_CONTROL_TYPE = {\r\n Unset: 0,\r\n PhotoAreaMarking: 1,\r\n PhotoDocumentation: 2,\r\n Signature: 3,\r\n DateSelector: 4,\r\n DropdownProducts: 5,\r\n DropdownUsers: 6,\r\n DropdownCustom: 7,\r\n Checkboxes: 8,\r\n Text: 9,\r\n TextUneditable: 10,\r\n Numbers: 11,\r\n TimeTableUsers: 12,\r\n Checkmark: 13,\r\n DropdownCommentPhotos: 14,\r\n TextPhotos: 15,\r\n};\r\n\r\nexport const SB_CRITERIA_BEHAVIOR = {\r\n Unset: 0,\r\n AND: 1,\r\n OR: 2,\r\n};\r\n\r\nexport const SB_CATEGORY_TYPE = {\r\n Unset: 0,\r\n Common: 1,\r\n RiskEvaluation: 2,\r\n ServiceAgreement: 3,\r\n ExtraSchema: 4,\r\n};\r\n\r\n// For rendering depending on context\r\nexport const CONTROL_PLAN_CONTEXT = {\r\n Global: 0,\r\n Local: 1,\r\n OnCase: 2,\r\n};\r\n\r\n// MISC\r\nexport const SCHEMA_OPTION_FILTER = {\r\n Unset: 0,\r\n Common: 1,\r\n RiskEvaluation: 2,\r\n ServiceAgreement: 3,\r\n};\r\n\r\n// Language categories\r\nexport const LANG_TEXT_CATEGORY = {\r\n Unknown: 0,\r\n General: 1,\r\n Mail: 2,\r\n Sms: 3,\r\n Push: 4,\r\n};\r\n\r\nexport const RISK_ASSESSMENT = {\r\n NotSelected: 0,\r\n No: 1,\r\n Yes: 2,\r\n External: 3,\r\n};\r\n\r\nexport const INDUSTRY_TYPE = {\r\n Unknown: 0,\r\n Roofing: 1,\r\n Production_Roofing: 2,\r\n};\r\n\r\nexport const CUSTOMER_EDIT_EVENTS = {\r\n Unknown: 0,\r\n Created: 1,\r\n Paused: 2,\r\n Activated: 3,\r\n Closed: 5,\r\n};\r\n\r\nexport const PDF_FILTER = {\r\n None: 0,\r\n CoverPage: 1,\r\n TableOfContents: 2,\r\n CaseInformation: 3,\r\n DEP_CompanyDescription: 4,\r\n DEP_QualityDescription: 5,\r\n Building: 6,\r\n DEP_OperationsAndMaintenance: 7,\r\n Datasheets: 8,\r\n SchemaStarted: 9,\r\n SchemaDone: 10,\r\n DEP_CaseDocuments: 11,\r\n DEP_CaseSchemas: 13,\r\n SchemaAll: 14,\r\n HidePrivateAssignees: 15,\r\n Contracts: 16,\r\n DateInterval: 17,\r\n BuildingAll: 18,\r\n SchemaGroupGuid: 19,\r\n CaseDescription: 20,\r\n CaseDescriptionAll: 21,\r\n CaseDocument: 22,\r\n CaseDocumentAll: 23,\r\n ControlPlan: 24,\r\n ControlPlanAll: 25,\r\n MaterialsOverview: 26,\r\n};\r\n","module.exports = __webpack_public_path__ + \"static/media/Word.c88c9113.svg\";","module.exports = __webpack_public_path__ + \"static/media/pptx_icon.6089d388.svg\";","module.exports = __webpack_public_path__ + \"static/media/Video.3208f5ca.svg\";","module.exports = __webpack_public_path__ + \"static/media/Numbers.1b3d51cf.svg\";","module.exports = __webpack_public_path__ + \"static/media/Pages.b3e58d7c.svg\";","module.exports = __webpack_public_path__ + \"static/media/keynote.b64e48f6.svg\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABgAAAAYADwa0LPAAAA+klEQVRo3u3ZUQ7CIBAE0NGDGOL9r+SHJ6k/bWJIkV3KDrvCJHx3XgwsrcDKiuukfYXMA8ALwBvAc3SZ1vLbvkIh8vKhEKXyIRC18q4R0vIuEdryrhCt5bshboa4jfGsuyGAkukAidDJ7BnHhpUm37DSmJxO36eNNaD7EZsflQxAN8TZOc8CXEaUhhQT0Iz4NWHZADXi6vXAaokQXssXEeEn8Vm8/grd9oE0wzZxDcEGdJ8FTIDJNGYBzO5DDIDpjdQaYPqynwgAzTPWS/3wTA/QTOy/+zrnonwrwlV5LcJleSnCdfkaIkT5EiJU+RwRsvyRhMB/dK9MkQ9aiYmYo9JGZAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0xNlQxMToyOToyOSswMDowMLbgw4gAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMTZUMTE6Mjk6MjkrMDA6MDDHvXs0AAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABgAAAAYADwa0LPAAAA40lEQVRo3u2YTQrCMBCFP6Vb8QK67tktBdcuvJEKrQeoi+rCkEqbv0H6PphNaDvvZcLQCQghhBDLOQIt0AND5uiBM1CnFH8vINyNxzt3NK2B+E80rphNgIEe2KXYicDc+1gDQ4JNSJZvmzl5dmTAmsqzVvqMR/H3FZABa2TAGhmwRgaskQFrqoB3nnwPNEPAN0Lp3IWQClwLCna5zHnInUNdasYBu/Q8fAMOKQzAeDvQMJY0t/AOOE2J9/3rax6QgTUZ8J1vy4urKU2T+Cpg2eeTYNXnf7XtxZTs81kMCCGEWAcvC8bi1HeDKfMAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMTZUMTE6Mzk6MzErMDA6MDCIK1KxAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA3LTE2VDExOjM5OjMxKzAwOjAw+XbqDQAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABgAAAAYADwa0LPAAABUklEQVRo3u2YPU7DQBBGH4iWG4AU0UBPkUPRggRSwm9ooeUKoUpLkbMgepQQcgAocES0wrG9M7s7SPNJU8SWPe/triN7wePxeCznCJgAn8BXZBWFnwvAiwtMFOC7CFwAS+AR2NIQkCybrgK3wTVPGhK5lsKgRlwskUugD3zUSDxYFjgFeg0Sc6sC99U9Xxskzi0KhA/sG3BQnTsGZtXxK2mjFAIj/l7r4UycaTTTFghHPqz1mVCJpsBdA/yqTiwKNI38qgaa8FoCNy3hh9rwGgJF4aUCxeElAibgYwXMwMcIXLeEv0w4gNE30IbPKpACPqtACnhTAjHwZgQkr8TFBaTv80UFxB8jbfvvKDRS2cOJzXbJ5i7gAgby7wU2/Qstgd2139qbW12yqDuxaQamBYHDvMRcdMjvLlnJegf2Ys33gWd+pjA3+AIYS+A9Ho8nfb4BWILB3waP87AAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMTZUMTE6NDA6MjUrMDA6MDBl4Eh1AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA3LTE2VDExOjQwOjI1KzAwOjAwFL3wyQAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABgAAAAYADwa0LPAAAAu0lEQVRo3u3ZMQrCQBSE4V+x9QZae01Lr6I3sPBGIgQPEAtRgo15uy87ROeDLQJJmMmyC0nAzOxX7IF+5Diow9aETy2xCJzbN34oo7ItG4dK5wL27yK70MvUu1Eo0+zXgAuorRLuUbKOhqrW1OxnwAXUXEDNBdRcQM0F1FxAzQXUXEDNBdRK3onvwHpwnPmdqIteUDIDl8TAn84T3vttB9yI/9D4Nq7ApkUBgC1w4jnltcE74NgyvJlZngcceEkGh5RieQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0xNlQxMTozODoxNCswMDowMHf0EVUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMTZUMTE6Mzg6MTQrMDA6MDAGqanpAAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUh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u+7oMQX4r5FpoF7zHxa6ihG/NU+5eI3hfgm8B37XAR8BHbG4b8NeO3CsTeIBC4aQUcRL2/EgiMLOIUom3WuC0Ek0E70dlmWBNdixLZSfG1JcMWFbMRR2Im3HxyViHJkAveb2xOUA+ew2y7xIiK5y/1MIIUUUkjBW/wDHA5IuoGSXNUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMTZUMTE6NDE6MDMrMDA6MDCr1xEMAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA3LTE2VDExOjQxOjAzKzAwOjAw2oqpsAAAAABJRU5ErkJggg==\"","module.exports = __webpack_public_path__ + \"static/media/upload-icon.2696a8a7.svg\";","module.exports = __webpack_public_path__ + \"static/media/sorting-icon-both.e822896f.svg\";","module.exports = __webpack_public_path__ + \"static/media/sorting-icon-arrow.5f6816d2.svg\";","module.exports = __webpack_public_path__ + \"static/media/sorting-icon.f41a89c2.svg\";","import axios from 'axios';\r\nimport FileSaver from 'file-saver';\r\nimport {\r\n API_URL,\r\n GET_FOLDERS,\r\n GET_FILES,\r\n GET_CURRENT_FOLDER,\r\n SET_CURRENT_FOLDER,\r\n} from '../constants';\r\n\r\n/**\r\n * Gets folders\r\n * @param {Number} customerId is the customerId used for simple UAC\r\n * @param {Number} parentId is used where in the hierachy it needs to request folders\r\n * @return {Promise} Promise\r\n */\r\nexport function getFolders(customerId, parentId) {\r\n let url = API_URL + `/Document/getFolders/${customerId}/${parentId}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n let payload = res.data;\r\n dispatch({\r\n type: GET_FOLDERS,\r\n payload,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Searches for folders\r\n * @param {Number} customerId is the customerId used for simple UAC\r\n * @return {Promise} Promise\r\n */\r\nexport function searchFolders(customerId, data) {\r\n let url = API_URL + `/Document/searchFolders/${customerId}`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n let payload = res.data;\r\n dispatch({\r\n type: GET_FOLDERS,\r\n payload,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets specific folder\r\n * @param {Number} customerId is the customerId used for simple UAC\r\n * @param {Number} id is the id of the specific folder requested\r\n * @return {Promise} Promise\r\n */\r\nexport function getFolder(customerId, id) {\r\n let url = API_URL + `/Document/getFolder/${customerId}/${id}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n let payload = res.data;\r\n dispatch({\r\n type: GET_CURRENT_FOLDER,\r\n payload,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Sets the folder redux\r\n * @param {data} data is the customerId used for simple UAC\r\n */\r\nexport function setFolderRedux(data) {\r\n return dispatch => {\r\n let payload = data;\r\n dispatch({\r\n type: SET_CURRENT_FOLDER,\r\n payload,\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Gets files\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} parentId is used where in the hierachy it needs to request files\r\n * @return {Promise} Promise\r\n */\r\nexport function getFiles(customerId, parentId) {\r\n let url = API_URL + `/Document/getFiles/${customerId}/${parentId}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n let payload = res.data;\r\n dispatch({\r\n type: GET_FILES,\r\n payload,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Searches for files\r\n * @param {Number} customerId is the customerId used for simple UAC\r\n * @return {Promise} Promise\r\n */\r\nexport function searchFiles(customerId, data) {\r\n let url = API_URL + `/Document/searchFiles/${customerId}`;\r\n // console.log(data);\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n let payload = res.data;\r\n dispatch({\r\n type: GET_FILES,\r\n payload,\r\n });\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Create folder\r\n * @param {Object} data a data object used for the creation\r\n * @return {Promise} Promise\r\n */\r\nexport function createFolder(data) {\r\n let url = API_URL + `/Document/createFolder`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Update folder\r\n * @param {Object} data a data object used for the update\r\n * @return {Promise} Promise\r\n */\r\nexport function updateFolder(data) {\r\n let url = API_URL + `/Document/updateFolder/${data.id}`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Update global folder visibility at customer level for end users\r\n * @param {Object} data a data object used for the update\r\n * @return {Promise} Promise\r\n */\r\nexport function updateGlobalFolderVisibilty(data) {\r\n let url = API_URL + `/Document/updateFolderVisibility`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Update folder\r\n * @param {Object} data a data object used for the update\r\n * @return {Promise} Promise\r\n */\r\nexport function updateFile(data) {\r\n let url = API_URL + `/Document/updateFile/${data.id}`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Update global file visibility at customer level for end users\r\n * @param {Object} data a data object used for the update\r\n * @return {Promise} Promise\r\n */\r\nexport function updateGlobalFileVisibilty(data) {\r\n let url = API_URL + `/Document/updateFileVisibility`;\r\n return dispatch => {\r\n return axios.post(url, data).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Delete folder\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} folderId id of the folder to find what to delete\r\n * @return {Promise} Promise\r\n */\r\nexport function deleteFolder(customerId, folderId) {\r\n let url = API_URL + `/Document/deleteFolder/${customerId}/${folderId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Delete file\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} fileId id of the folder to find what to delete\r\n * @return {Promise} Promise\r\n */\r\nexport function deleteFile(customerId, fileId) {\r\n let url = API_URL + `/Document/deleteFile/${customerId}/${fileId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Upload document files and or folders\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} parentId used for placement of the folder/files\r\n * @return {Promise} Promise\r\n */\r\nexport function uploadDocumentFiles(files, customerId, parentId) {\r\n let url = API_URL + `/Document/uploadFiles/${customerId}/${parentId}`;\r\n return dispatch => {\r\n let data = new window.FormData();\r\n for (let i = 0; i < files.length; i++) {\r\n const file = files[i];\r\n data.append(file.name, file);\r\n //console.log(file.name, file);\r\n }\r\n\r\n return axios.post(url, data).then(res => {\r\n return res.data;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Download document files\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} id id of the files\r\n * @return {Promise} Promise\r\n */\r\nexport function downloadFile(customerId, id) {\r\n let url = API_URL + `/Document/downloadFile/${customerId}/${id}`;\r\n return axios.get(url, { responseType: 'blob' }).then(res => {\r\n let fileName = '';\r\n const regex = /filename=[\"]?(.*\\..*)[\"]?;/g;\r\n const headerContentDisposition = res.headers['content-disposition'];\r\n const fileNameGroups = regex.exec(headerContentDisposition);\r\n // console.log('download', fileNameGroups, headerContentDisposition);\r\n fileName = fileNameGroups[1].replace('\"', '');\r\n\r\n FileSaver.saveAs(res.data, fileName);\r\n });\r\n}\r\n\r\n/**\r\n * Move File\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} fileId id of the file to find what to move\r\n * @param {Number} parentId parentId that the file will be moved to\r\n * @return {Promise} Promise\r\n */\r\nexport function moveFile(customerId, fileId, parentId) {\r\n let url = API_URL + `/Document/moveFile/${customerId}/${fileId}/${parentId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Move Folder\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} folderId id of the folder to find what to move\r\n * @param {Number} parentId parentId that the folder will be moved to\r\n * @return {Promise} Promise\r\n */\r\nexport function moveFolder(customerId, folderId, parentId) {\r\n let url =\r\n API_URL + `/Document/moveFolder/${customerId}/${folderId}/${parentId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Copy File\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} fileId id of the file to find what to copy\r\n * @param {Number} parentId parentId that the file will be copied to\r\n * @return {Promise} Promise\r\n */\r\nexport function copyFile(customerId, fileId, parentId) {\r\n let url = API_URL + `/Document/copyFile/${customerId}/${fileId}/${parentId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Copy Folder\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @param {Number} folderId id of the folder to find what to move\r\n * @param {Number} parentId parentId that the folder will be moved to\r\n * @return {Promise} Promise\r\n */\r\nexport function copyFolder(customerId, folderId, parentId) {\r\n let url =\r\n API_URL + `/Document/copyFolder/${customerId}/${folderId}/${parentId}`;\r\n return dispatch => {\r\n return axios.post(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Get customer capacity\r\n * @param {Number} customerId is the customersId used for simple UAC\r\n * @return {Promise} Promise\r\n */\r\nexport function getCapacity(customerId) {\r\n let url = API_URL + `/Document/getCapacity/${customerId}`;\r\n return dispatch => {\r\n return axios.get(url).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n\r\n/**\r\n * Get capacities of customerIds\r\n * @return {Promise} Promise\r\n */\r\nexport function getCapacities(customerIds) {\r\n let url = API_URL + `/Document/getCapacities`;\r\n return dispatch => {\r\n return axios.post(url, { CustomerIds: customerIds }).then(res => {\r\n return res;\r\n });\r\n };\r\n}\r\n","import React from 'react';\r\nimport { Input, Label, FormGroup, Col } from 'reactstrap';\r\nimport InputGroup from 'reactstrap/lib/InputGroup';\r\nimport InputGroupAddon from 'reactstrap/lib/InputGroupAddon';\r\nimport InputGroupText from 'reactstrap/lib/InputGroupText';\r\nimport InfoTip from '../InfoTip';\r\n\r\n/**\r\n * Custom text-input with ability to have a label displayed to its left.\r\n * @param {*} props - set properies here\r\n * @param {Boolean} row\r\n * @param {Boolean} disabled\r\n * @param {Number} labelSize\r\n * @param {Number} inputSize\r\n * @param {String} for\r\n * @param {String} type\r\n * @param {String} name\r\n * @param {*} value\r\n * @param {Function} onChange\r\n * @param {Function} onBlur\r\n * @param {String} placeholder\r\n * @param {Boolean} error - Bind to a boolean value\r\n * @param {String} errorText - Displayed text when error is true\r\n * @param {String} placeholder - Placeholder tekst\r\n * @param {Boolean} inputOnly - Returns the input comp only\r\n */\r\nconst TextInput = props => {\r\n let lineRows = 3;\r\n if (props.value && typeof props.value === 'string') {\r\n lineRows = props.value.split('\\n').length;\r\n\r\n if (lineRows < 3) lineRows = 3;\r\n if (lineRows > 12) lineRows = 12;\r\n }\r\n\r\n const prependUnitType = comp => {\r\n if (!props.unitType) return comp;\r\n\r\n return (\r\n \r\n \r\n {props.unitType}\r\n \r\n {comp}\r\n \r\n );\r\n };\r\n\r\n let inputProps = {\r\n type: props.type ? props.type : 'text',\r\n name: props.name,\r\n value: props.value ? props.value : '',\r\n onChange: props.onChange,\r\n onBlur: props.onBlur,\r\n placeholder: props.placeholder,\r\n disabled: props.disabled,\r\n rows: props.rows ? props.rows : lineRows,\r\n autoComplete: props.autoComplete ? props.autoComplete : 'new-password',\r\n pattern: props.pattern ? props.pattern : null,\r\n steps: props.steps ? props.steps : null,\r\n min: props.min ? props.min : null,\r\n };\r\n\r\n if (props.bsSize) {\r\n inputProps.bsSize = props.bsSize;\r\n }\r\n\r\n const infoTip = props.info && (\r\n \r\n );\r\n\r\n let label = (\r\n \r\n );\r\n let inputComp = prependUnitType();\r\n\r\n if (props.inputOnly) return inputComp;\r\n\r\n const errorRender = props.error && (\r\n

\r\n {props.error ? props.errorText : null}\r\n

\r\n );\r\n\r\n const infoRender = props.infoText && (\r\n

\r\n {props.infoText ? props.infoText : null}\r\n

\r\n );\r\n\r\n if (props.row) {\r\n label = (\r\n \r\n );\r\n\r\n inputProps.bsSize = 'md';\r\n inputComp = (\r\n \r\n {prependUnitType()}\r\n {props.extra}\r\n {infoRender}\r\n {errorRender}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {props.labelless ? null : label}\r\n {inputComp}\r\n {!props.row ? props.extra : null}\r\n {!props.row && infoRender}\r\n {!props.row && errorRender}\r\n \r\n );\r\n};\r\n\r\nexport default TextInput;\r\n","import React from 'react';\r\n\r\n// Utils\r\nimport { isJSON } from '../common';\r\n\r\n// Icons\r\nimport { SB_CONTROL_TYPE } from '../../redux/constants';\r\nimport {\r\n DanishFlag,\r\n UnitedKingdomFlag,\r\n PolandFlag,\r\n GermanFlag,\r\n NorwayFlag,\r\n //SwedenFlag,\r\n} from '../../assets/icons_v2';\r\n\r\n// Global current user lang\r\nconst globalLang = window.localStorage.getItem('user_lang');\r\n\r\nexport const languages = [\r\n { name: 'Dansk', lang: 'dk', icon: },\r\n { name: 'English', lang: 'en', icon: },\r\n { name: 'Polski', lang: 'pl', icon: },\r\n { name: 'Deutsch', lang: 'de', icon: },\r\n { name: 'Norsk', lang: 'no', icon: },\r\n //{ name: 'Svenska', lang: 'se', icon: },\r\n];\r\n\r\nexport function languageIsValid(lang) {\r\n if (languages.find(x => x.lang === lang)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nexport function initialLanguageObject() {\r\n let obj = {};\r\n languages.forEach(x => {\r\n obj[x.lang] = '';\r\n });\r\n return JSON.stringify(obj);\r\n}\r\n\r\nexport function changeCurrentLangObj(obj, value, lang = globalLang) {\r\n const isValidJson = typeof obj === 'string' && isJSON(obj);\r\n\r\n let dataObj = {\r\n [lang]: value,\r\n };\r\n\r\n if (isValidJson) {\r\n const prev = JSON.parse(obj);\r\n dataObj = { ...prev, [lang]: value };\r\n }\r\n\r\n return JSON.stringify(dataObj);\r\n}\r\n\r\nexport function displayCurrentLangObj(obj, lang = globalLang) {\r\n let out;\r\n\r\n try {\r\n out = typeof obj === 'string' ? JSON.parse(obj.replace(/\\n/g, '\\\\n')) : obj;\r\n if (!out[lang]) {\r\n return '';\r\n }\r\n return out[lang];\r\n } catch (error) {\r\n // JSON parsing failed, output the original string\r\n //return obj+\"-MANGLER\";\r\n return obj;\r\n }\r\n}\r\n\r\n////////////////////////////////////////////////////////////////////////\r\n/////////////////////// Parse Control Items /////////////////////////\r\n////////////////////////////////////////////////////////////////////////\r\n\r\nexport function parseControlItemsLang(data, lang = globalLang) {\r\n let out = data;\r\n //console.log(out);\r\n out.forEach(group => {\r\n if (group.schemas.length > 0)\r\n group.schemas.forEach(schema => {\r\n schema.titleWhenDone = displayCurrentLangObj(schema.titleWhenDone);\r\n if (schema.controlItems.length > 0)\r\n schema.controlItems.forEach(controlItem => {\r\n // Data\r\n controlItem.title = displayCurrentLangObj(controlItem.title);\r\n controlItem.alternativeTitle = displayCurrentLangObj(\r\n controlItem.alternativeTitle,\r\n );\r\n controlItem.name = displayCurrentLangObj(controlItem.name);\r\n controlItem.infoTitle = displayCurrentLangObj(\r\n controlItem.infoTitle,\r\n );\r\n controlItem.infoText = displayCurrentLangObj(controlItem.infoText);\r\n controlItem.errorMessage = displayCurrentLangObj(\r\n controlItem.errorMessage,\r\n );\r\n controlItem.placeholder = displayCurrentLangObj(\r\n controlItem.placeholder,\r\n );\r\n // Options\r\n controlItem.dropdownOptions.forEach(dropdownOption => {\r\n dropdownOption.label = displayCurrentLangObj(\r\n dropdownOption.label,\r\n );\r\n });\r\n controlItem.checkboxOptions.forEach(checkboxOption => {\r\n checkboxOption.label = displayCurrentLangObj(\r\n checkboxOption.label,\r\n );\r\n });\r\n controlItem.categoryOptions.forEach(categoryOption => {\r\n categoryOption.label = displayCurrentLangObj(\r\n categoryOption.label,\r\n );\r\n });\r\n // Special cases ie. TextUneditable\r\n if (controlItem.controlType === SB_CONTROL_TYPE.TextUneditable) {\r\n controlItem.textValue = displayCurrentLangObj(\r\n controlItem.textValue,\r\n );\r\n }\r\n });\r\n });\r\n });\r\n\r\n //console.log(out);\r\n return out;\r\n}\r\n\r\n////////////////////////////////////////////////////////////////////////\r\n/////////////////////// Parse Control Plan /////////////////////////\r\n////////////////////////////////////////////////////////////////////////\r\n\r\nexport function parseControlPlanLang(item, lang = globalLang) {}\r\n","import React from 'react';\r\nimport Select, { components } from 'react-select';\r\nimport i18next from '../../i18n';\r\n\r\n/**\r\n * Main component for controlling the react-select component. Allows us to perform global changes.\r\n * Works like normal react-select component.\r\n * Documentation: https://react-select.com/\r\n * Styles documentation: https://react-select.com/styles#styles\r\n * @param {*} props - All properties on component are passed to the react-select component.\r\n */\r\n\r\nconst ReactSelect = props => {\r\n const customStyles = {\r\n control: (provided, state) => ({\r\n ...provided,\r\n backgroundColor: state.isDisabled ? '#e9ecef' : provided.backgroundColor,\r\n borderColor: state.isDisabled ? '#ced4da' : provided.borderColor,\r\n }),\r\n singleValue: (provided, state) => ({\r\n ...provided,\r\n color: state.isDisabled ? '#495057' : provided.color,\r\n }),\r\n menu: (provided, state) => ({\r\n ...provided,\r\n zIndex: 999,\r\n }),\r\n };\r\n\r\n const placeholder = props.placeholder\r\n ? props.placeholder\r\n : i18next.t(1468) + '...';\r\n const noOptionsMessage = props.noOptionsMessage\r\n ? props.noOptionsMessage\r\n : () => 'Tom';\r\n\r\n const MoreSelectedBadge = ({ items }) => {\r\n const title = items.join(', ');\r\n const length = items.length;\r\n const label = `${length}`;\r\n\r\n return (\r\n
\r\n +{label}\r\n
\r\n );\r\n };\r\n\r\n const MultiValue = ({ index, getValue, ...props }) => {\r\n const maxToShow = 4;\r\n const overflow = getValue()\r\n .slice(maxToShow)\r\n .map(x => x.label);\r\n\r\n return index < maxToShow ? (\r\n \r\n ) : index === maxToShow ? (\r\n
\r\n \r\n
\r\n ) : null;\r\n };\r\n\r\n return (\r\n \r\n \r\n {props.extra}\r\n {props.error ? (\r\n

\r\n {props.error\r\n ? props.errorText\r\n ? props.errorText\r\n : i18next.t(1062)\r\n : null}\r\n

\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nexport default ReactSelect;\r\n","import React from 'react';\r\nglobal.appVersion = process.env.REACT_APP_VERSION;\r\n\r\n// version from response - first param, local version second param\r\nconst semVerCompare = (versionA, versionB) => {\r\n const cleanStr = str =>\r\n str\r\n .replace('v', '')\r\n .replace(/-DEV|-DEMO|-STAGING/i, '')\r\n .split(/\\./g);\r\n\r\n const latest = cleanStr(versionA);\r\n const current = cleanStr(versionB);\r\n\r\n while (latest.length || current.length) {\r\n const a = Number(latest.shift());\r\n const b = Number(current.shift());\r\n if (a === b) continue;\r\n return a > b || isNaN(b);\r\n }\r\n return false;\r\n};\r\n\r\nclass CacheBuster extends React.Component {\r\n componentDidMount() {\r\n fetch('/meta.json')\r\n .then(response => response.json())\r\n .then(meta => {\r\n const latestVersion = meta.version;\r\n const currentVersion = global.appVersion;\r\n const latestVersionId = meta.version_id;\r\n const currentVersionId = window.localStorage.getItem('version_id');\r\n\r\n const shouldForceRefresh = semVerCompare(latestVersion, currentVersion);\r\n if (shouldForceRefresh || latestVersionId !== currentVersionId) {\r\n console.log(\r\n `We have a new version - ${latestVersion}. Should force refresh`,\r\n );\r\n this.refreshCacheAndReload(latestVersionId);\r\n } else {\r\n console.log(\r\n `You already have the latest version - ${latestVersion}. No cache refresh needed.`,\r\n );\r\n }\r\n });\r\n }\r\n\r\n refreshCacheAndReload = versionId => {\r\n console.log('Clearing cache and hard reloading...');\r\n if (caches) {\r\n // Service worker cache should be cleared with caches.delete()\r\n caches.keys().then(function(names) {\r\n for (let name of names) caches.delete(name);\r\n });\r\n }\r\n\r\n if ('caches' in window) {\r\n caches.keys().then(names => {\r\n // Delete all the cache files\r\n names.forEach(name => {\r\n caches.delete(name);\r\n });\r\n });\r\n }\r\n\r\n // delete browser cache and hard reload\r\n window.location.reload(true);\r\n window.localStorage.setItem('version_id', versionId);\r\n };\r\n\r\n render() {\r\n return this.props.children;\r\n }\r\n}\r\n\r\nexport default CacheBuster;\r\n","import { SB_CONTROL_TYPE, SB_CRITERIA_BEHAVIOR } from '../redux/constants';\r\n\r\n/**\r\n * Validate if a schema can be marked as done.\r\n * @param {Object} schema Schema object.\r\n * @returns bool\r\n */\r\nexport const isValidSchema = schema => {\r\n if (!schema) return false;\r\n if (!schema.controlItems || schema.controlItems?.length === 0) return false;\r\n\r\n let controls = [];\r\n schema.controlItems.forEach(x => {\r\n if (x.isGroup) {\r\n if (x.required) {\r\n controls.push(\r\n ...x.controlItems.map(y => {\r\n return {\r\n ...y,\r\n required: true,\r\n };\r\n }),\r\n );\r\n } else {\r\n controls.push(...x.controlItems.filter(y => y.required));\r\n }\r\n } else {\r\n controls.push(x);\r\n }\r\n });\r\n\r\n // Get required controls and if 0, we return true.\r\n const requiredControls = controls.filter(\r\n x => x.required && isPassingCriteria(schema, x),\r\n );\r\n if (requiredControls.length === 0) return true;\r\n\r\n // Parse and check if all controls are valid.\r\n for (let i = 0; i < requiredControls.length; i++) {\r\n const control = requiredControls[i];\r\n\r\n let result;\r\n if (control.isGroup) {\r\n control.controlItems.forEach(x => (result = validateControl(x)));\r\n } else {\r\n result = validateControl(control);\r\n }\r\n\r\n // If just one control is false, then the schema is invalid.\r\n if (!result) return false;\r\n }\r\n\r\n return true;\r\n};\r\n\r\n/**\r\n * Checks if the control is valid based on its type requirements.\r\n * @param {Object} control\r\n * @returns bool\r\n */\r\nexport const validateControl = control => {\r\n if (!control) return false;\r\n\r\n const {\r\n textValue,\r\n maxCharacters,\r\n dateValue,\r\n checkboxValues,\r\n dropdownValue,\r\n allCategories,\r\n categoryValues,\r\n productValues,\r\n dropdownSelectedUsers,\r\n numberValue,\r\n files,\r\n minFiles,\r\n maxFiles,\r\n // signatureValue,\r\n timeTableUsers,\r\n answeredByUserId,\r\n hideMarkedQuestion,\r\n checkboxOptions,\r\n } = control;\r\n const filesNum = files?.length ?? 0;\r\n let selectedIds = [];\r\n\r\n switch (control.controlType) {\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.PhotoAreaMarking:\r\n return filesNum > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.PhotoDocumentation:\r\n if (!!minFiles && !!maxFiles) {\r\n return minFiles <= filesNum && filesNum <= maxFiles;\r\n } else if (!!minFiles && !maxFiles) {\r\n return minFiles <= filesNum;\r\n } else if (!minFiles && !!maxFiles) {\r\n return filesNum <= maxFiles;\r\n } else {\r\n return filesNum > 0;\r\n }\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.Signature:\r\n selectedIds = dropdownSelectedUsers?.map(x => x.userId) ?? [];\r\n return selectedIds.length > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.DateSelector:\r\n return !!dateValue;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.DropdownProducts:\r\n if (allCategories) {\r\n return (\r\n categoryValues?.trim().length > 0 && productValues?.trim().length > 0\r\n );\r\n } else {\r\n return productValues?.trim().length > 0;\r\n }\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.DropdownUsers:\r\n selectedIds = dropdownSelectedUsers?.map(x => x.userId) ?? [];\r\n return selectedIds.length > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.DropdownCustom:\r\n return dropdownValue?.trim().length > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.DropdownCommentPhotos:\r\n return (\r\n dropdownValue?.trim().length > 0 ||\r\n textValue?.trim().length > 0 ||\r\n filesNum > 0\r\n );\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.Checkboxes:\r\n if (!!checkboxOptions.find(x => x.value)) return true;\r\n return checkboxValues?.trim().length > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.Text:\r\n if (!textValue) return false;\r\n const length = textValue?.trim().length;\r\n\r\n if (maxCharacters === 0 && length === 0) {\r\n return false;\r\n } else if (!!maxCharacters && maxCharacters > 0) {\r\n return length <= maxCharacters && length > 0;\r\n } else {\r\n return true;\r\n }\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.TextUneditable:\r\n return true;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.TextPhotos:\r\n return textValue?.trim().length > 0 || filesNum > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.Numbers:\r\n if (!numberValue) return false;\r\n return !!numberValue;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.TimeTableUsers:\r\n selectedIds = timeTableUsers?.map(x => x.userId) ?? [];\r\n return selectedIds.length > 0;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n case SB_CONTROL_TYPE.Checkmark:\r\n return !hideMarkedQuestion || !!answeredByUserId;\r\n ////////////////////////////////////////////////////////////////////////////////\r\n default:\r\n return true;\r\n }\r\n};\r\n\r\n////////////////////////////////////////////////////////////////////////\r\n/////////////////////// Parse Control Items /////////////////////////\r\n////////////////////////////////////////////////////////////////////////\r\n\r\nexport function preprocessControlItemsAndGroups(data) {\r\n return data.map(schemaGroup => {\r\n let parsed = {\r\n ...schemaGroup,\r\n };\r\n\r\n parsed.schemas = schemaGroup.schemas.map(schema => {\r\n const filtered = schema.controlItems.filter(x => !x.isDeleted);\r\n const groups = schema.controlItemGroups;\r\n\r\n // Handle groups\r\n const foundItemIds = [];\r\n const tmpGroups = [];\r\n\r\n groups.forEach(x => {\r\n const items = filtered.filter(\r\n c => !!c.controlItemGroupId && c.controlItemGroupId === x.id,\r\n );\r\n\r\n foundItemIds.push(...items.map(c => c.id));\r\n\r\n tmpGroups.push({\r\n ...x,\r\n controlItems: items,\r\n isGroup: true,\r\n });\r\n });\r\n\r\n // Normal control items,\r\n const controlItems = filtered.filter(x => !foundItemIds.includes(x.id));\r\n\r\n let result = [...tmpGroups, ...controlItems];\r\n result.sort((a, b) => a.index - b.index);\r\n\r\n return {\r\n ...schema,\r\n controlItems: result,\r\n rawControlItems: sortRawsByIndex(result, filtered),\r\n };\r\n });\r\n\r\n return parsed;\r\n });\r\n}\r\n\r\nfunction sortRawsByIndex(controls, raws) {\r\n const allowedTypes = [\r\n SB_CONTROL_TYPE.PhotoDocumentation, // 2\r\n SB_CONTROL_TYPE.TextPhotos, // 15\r\n SB_CONTROL_TYPE.DropdownCommentPhotos, // 14\r\n ];\r\n\r\n let result = [];\r\n let foundIds = [];\r\n\r\n controls.forEach((x, i) => {\r\n let rawItem;\r\n if (!!x.isGroup) {\r\n for (let l = 0; l < x.controlItems.length; l++) {\r\n const item = x.controlItems[l];\r\n\r\n rawItem = raws.find(y => y.id === item.id);\r\n\r\n if (allowedTypes.includes(rawItem.controlType)) {\r\n result.push(rawItem);\r\n foundIds.push(rawItem.id);\r\n }\r\n }\r\n } else {\r\n rawItem = raws.find(y => y.id === x.id);\r\n\r\n if (allowedTypes.includes(rawItem.controlType)) {\r\n result.push(rawItem);\r\n foundIds.push(rawItem.id);\r\n }\r\n }\r\n });\r\n const remainder = raws.filter(x => !foundIds.includes(x.id));\r\n\r\n result.push(...remainder);\r\n\r\n // console.log(result, raws, controls);\r\n\r\n return result;\r\n}\r\n\r\n/////////////////////////////////////////////////////////////////////////////////////////////////\r\n////// Criteria handling\r\n\r\n/**\r\n * Check if a control-item passes its crieria.\r\n * @param {Object} schema Schema\r\n * @param {Object} control ControlItem\r\n * @returns boolean\r\n */\r\nexport const isPassingCriteria = (schema, control) => {\r\n const { criteria } = control;\r\n\r\n const minMaxValueCheck = (minValue, maxValue, value) => {\r\n if (minValue === 0 && maxValue === 0) return true;\r\n if (!value) return false;\r\n\r\n if ((minValue > 0 && maxValue > 0) || (minValue < 0 && maxValue < 0)) {\r\n return value >= minValue && value <= maxValue;\r\n } else if (minValue > 0 && maxValue === 0) {\r\n return value >= minValue;\r\n } else if (minValue < 0 && maxValue === 0) {\r\n return value <= minValue;\r\n } else if (minValue === 0 && (maxValue > 0 || maxValue < 0)) {\r\n return value <= maxValue;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n const criteriaPassCheck = crit => {\r\n if (!crit) return true;\r\n const {\r\n controlType,\r\n targetControlItemId,\r\n hasValue,\r\n hasValues,\r\n minValue,\r\n maxValue,\r\n } = crit;\r\n let target;\r\n const tmpTarget = schema.rawControlItems.find(\r\n x => x.id === targetControlItemId,\r\n );\r\n\r\n if (!!tmpTarget.controlItemGroupId) {\r\n const group = schema.controlItems.find(\r\n x => x.isGroup && x.id === tmpTarget.controlItemGroupId,\r\n );\r\n target = group.controlItems.find(x => x.id === targetControlItemId);\r\n } else {\r\n target = schema.controlItems.find(x => x.id === targetControlItemId);\r\n }\r\n\r\n let pass = true;\r\n\r\n if (targetControlItemId && target) {\r\n const {\r\n textValue,\r\n numberValue,\r\n dateValue,\r\n signatureValue,\r\n files,\r\n productValues,\r\n dropdownValue,\r\n checkboxValues,\r\n dropdownSelectedUsers,\r\n timeTableUsers,\r\n marked,\r\n hideMarkedQuestion,\r\n answeredByUserId,\r\n } = target;\r\n\r\n switch (controlType) {\r\n case SB_CONTROL_TYPE.PhotoAreaMarking:\r\n if (hasValue) {\r\n pass = files.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.PhotoDocumentation:\r\n if (hasValue) {\r\n pass = files.length > 0;\r\n }\r\n pass = minMaxValueCheck(minValue, maxValue, files.length);\r\n break;\r\n case SB_CONTROL_TYPE.Signature:\r\n if (hasValue) {\r\n pass = !!signatureValue;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.DateSelector:\r\n if (hasValue) {\r\n pass = !!dateValue;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.DropdownProducts:\r\n if (hasValue) {\r\n pass = productValues?.trim().length > 0;\r\n }\r\n if (hasValues) {\r\n const vals = hasValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n const prodVals =\r\n productValues\r\n ?.split(',')\r\n .filter(x => !!x || x?.trim().length > 0) ?? [];\r\n\r\n const intersected = vals.filter(value => prodVals.includes(value));\r\n pass = intersected.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.DropdownUsers:\r\n if (hasValue) {\r\n pass = dropdownSelectedUsers?.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.DropdownCustom:\r\n if (hasValue) {\r\n pass = dropdownValue?.trim().length > 0;\r\n }\r\n if (hasValues) {\r\n const vals = hasValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n const dpVals =\r\n dropdownValue\r\n ?.split(',')\r\n .filter(x => !!x || x?.trim().length > 0) ?? [];\r\n\r\n const intersected = vals.filter(value => dpVals.includes(value));\r\n pass = intersected.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.DropdownCommentPhotos:\r\n if (hasValue) {\r\n pass =\r\n dropdownValue?.trim().length > 0 ||\r\n files?.length > 0 ||\r\n !!textValue ||\r\n textValue?.trim().length > 0;\r\n }\r\n if (hasValues) {\r\n const vals = hasValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n const dpVals =\r\n dropdownValue\r\n ?.split(',')\r\n .filter(x => !!x || x?.trim().length > 0) ?? [];\r\n\r\n const intersected = vals.filter(value => dpVals.includes(value));\r\n pass = intersected.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.Checkboxes:\r\n if (hasValue) {\r\n pass = checkboxValues?.trim().length > 0;\r\n }\r\n if (hasValues) {\r\n const vals = hasValues\r\n .split(',')\r\n .filter(x => !!x || x?.trim().length > 0);\r\n const cbVals =\r\n checkboxValues\r\n ?.split(',')\r\n .filter(x => !!x || x?.trim().length > 0) ?? [];\r\n\r\n const intersected = vals.filter(value => cbVals.includes(value));\r\n pass = intersected.length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.Text:\r\n case SB_CONTROL_TYPE.TextUneditable:\r\n if (hasValue) {\r\n pass = !!textValue || textValue?.trim().length > 0;\r\n }\r\n break;\r\n case SB_CONTROL_TYPE.TextPhotos:\r\n if (hasValue) {\r\n pass =\r\n !!textValue || textValue?.trim().length > 0 || files.length > 0;\r\n }\r\n pass = minMaxValueCheck(minValue, maxValue, files.length);\r\n break;\r\n case SB_CONTROL_TYPE.Numbers:\r\n if (hasValue) {\r\n pass = !!numberValue;\r\n }\r\n pass = minMaxValueCheck(minValue, maxValue, numberValue);\r\n break;\r\n case SB_CONTROL_TYPE.TimeTableUsers:\r\n if (hasValue) {\r\n pass = !!timeTableUsers || timeTableUsers?.length > 0;\r\n }\r\n pass = minMaxValueCheck(minValue, maxValue, timeTableUsers.length);\r\n break;\r\n case SB_CONTROL_TYPE.Checkmark:\r\n if (hasValue) {\r\n pass =\r\n marked || hideMarkedQuestion || (!marked && !!answeredByUserId);\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return pass;\r\n };\r\n\r\n const checkCriteria = () => {\r\n if (!criteria || criteria?.length === 0) return true;\r\n let pass = true;\r\n\r\n // criteria.sort((a, b) => a.id - b.id);\r\n // console.log('criteria', criteria);\r\n\r\n for (let i = 0; i < criteria.length; i++) {\r\n const crit = criteria[i];\r\n pass = criteriaPassCheck(crit);\r\n\r\n // console.log(\r\n // control.id,\r\n // crit,\r\n // pass,\r\n // crit.linkBehavior === SB_CRITERIA_BEHAVIOR.AND,\r\n // );\r\n\r\n if (\r\n [SB_CRITERIA_BEHAVIOR.OR, SB_CRITERIA_BEHAVIOR.Unset].includes(\r\n crit.linkBehavior,\r\n ) &&\r\n pass\r\n ) {\r\n break;\r\n } else if (crit.linkBehavior === SB_CRITERIA_BEHAVIOR.AND && !pass) {\r\n break;\r\n }\r\n }\r\n\r\n return pass;\r\n };\r\n\r\n return checkCriteria();\r\n};\r\n","import {\r\n ACCESS_LEVEL,\r\n CUSTOMER_STATUS,\r\n EMPLOYEE_TYPE,\r\n} from '../redux/constants';\r\nimport i18next from '../i18n';\r\n\r\nexport const getUserCustomerId = auth => {\r\n if (auth.loginAsUser) {\r\n const loggedUser = JSON.parse(auth.loginAsUser);\r\n return loggedUser.companyId;\r\n } else {\r\n const { user } = auth.user;\r\n return user.belongsToCustomerId;\r\n }\r\n};\r\n\r\nexport const getUserData = auth => {\r\n if (auth?.loginAsUser) {\r\n const loggedUser = JSON.parse(auth.loginAsUser);\r\n return {\r\n id: loggedUser.userId,\r\n groupId: loggedUser.groupId,\r\n customerId: loggedUser.companyId,\r\n customerName: loggedUser.loginData.user.belongsToCustomerName,\r\n name: loggedUser.loginData.user.name,\r\n mobile: loggedUser.loginData.user.mobile,\r\n countryCode: loggedUser.loginData.user.countryCode,\r\n country: loggedUser.loginData.user.country,\r\n mail: loggedUser.loginData.user.mail,\r\n guid: loggedUser.loginData.user.guid,\r\n initials: loggedUser.loginData.user.initials,\r\n notifyByEmail: loggedUser.loginData.user.notifyByEmail,\r\n notifyByPush: loggedUser.loginData.user.notifyByPush,\r\n notifyBySMS: loggedUser.loginData.user.notifyBySMS,\r\n role: loggedUser.loginData.user.role,\r\n employeeType: loggedUser.loginData.user.employeeType,\r\n accessLevel: loggedUser.loginData.accessLevel,\r\n hasAP: loggedUser.loginData.user.hasAP,\r\n hasPdf: loggedUser.loginData.user.hasPdf,\r\n permission: getPermissions(loggedUser.loginData.user),\r\n customerStatus: loggedUser.loginData.customerStatus\r\n ? loggedUser.loginData.customerStatus\r\n : CUSTOMER_STATUS.Closed,\r\n };\r\n } else if (auth?.user) {\r\n const { user } = auth.user;\r\n\r\n if (user) {\r\n return {\r\n id: user.id,\r\n guid: user.guid,\r\n groupId: user.groupId,\r\n customerId: user.belongsToCustomerId,\r\n customerName: user.belongsToCustomerName,\r\n name: user.name,\r\n mobile: user.mobile,\r\n countryCode: user.countryCode,\r\n country: user.country,\r\n mail: user.mail,\r\n initials: user.initials,\r\n notifyByEmail: user.notifyByEmail,\r\n notifyByPush: user.notifyByPush,\r\n notifyBySMS: user.notifyBySMS,\r\n role: user.role,\r\n employeeType: user.employeeType,\r\n accessLevel: auth.user.accessLevel,\r\n hasAP: user.hasAP,\r\n hasPdf: user.hasPdf,\r\n permission: getPermissions(user),\r\n customerStatus: auth.customerStatus\r\n ? auth.customerStatus\r\n : CUSTOMER_STATUS.Closed,\r\n };\r\n }\r\n } else {\r\n console.log('User object in Auth is null!');\r\n return {\r\n id: 0,\r\n guid: '',\r\n groupId: 0,\r\n customerId: 0,\r\n customerName: '',\r\n name: '',\r\n mobile: '',\r\n mail: '',\r\n country: 'Danmark',\r\n initials: '',\r\n notifyByEmail: false,\r\n notifyByPush: false,\r\n notifyBySMS: false,\r\n role: -1,\r\n employeeType: EMPLOYEE_TYPE.None,\r\n accessLevel: ACCESS_LEVEL.None,\r\n hasAP: false,\r\n hasPdf: false,\r\n permission: getPermissions(),\r\n customerStatus: CUSTOMER_STATUS.Closed,\r\n };\r\n }\r\n};\r\n\r\nexport const getUserTypeName = type => {\r\n switch (type) {\r\n case '1':\r\n return i18next.t(1103);\r\n case '2':\r\n return i18next.t(1104);\r\n case '3':\r\n return i18next.t(1105);\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\nfunction getPermissions(user) {\r\n const defaultPermissions = {\r\n projectCreate: false,\r\n projectCopy: false,\r\n projectDelete: false,\r\n showAddSchemaCategory: false,\r\n };\r\n\r\n if (!user) return defaultPermissions;\r\n if (!user.permission || typeof user.permission !== 'object')\r\n return defaultPermissions;\r\n\r\n return { ...defaultPermissions, ...user.permission };\r\n}\r\n\r\nexport const getUserPositionTypeStrings = () => {\r\n return [\r\n { label: '', value: 0 },\r\n { label: i18next.t(1348), value: 1 },\r\n { label: i18next.t(1349), value: 2 },\r\n { label: i18next.t(1350), value: 3 },\r\n { label: i18next.t(1351), value: 4 },\r\n { label: i18next.t(1352), value: 5 },\r\n { label: i18next.t(1353), value: 6 },\r\n { label: i18next.t(202), value: 7 },\r\n { label: i18next.t(203), value: 8 },\r\n { label: i18next.t(1356), value: 9 },\r\n { label: i18next.t(216), value: 10 },\r\n { label: i18next.t(7), value: 11 },\r\n { label: i18next.t(1359), value: 12 },\r\n { label: i18next.t(1176), value: 13 },\r\n ];\r\n};\r\n\r\nexport const getEmployeeTypeNameByType = type => {\r\n switch (type) {\r\n case EMPLOYEE_TYPE.Advisor:\r\n return i18next.t(202);\r\n case EMPLOYEE_TYPE.Architect:\r\n return i18next.t(203);\r\n case EMPLOYEE_TYPE.BuildingOwner:\r\n return i18next.t(54);\r\n case EMPLOYEE_TYPE.CompanyOwner:\r\n return i18next.t(7155);\r\n case EMPLOYEE_TYPE.ExecutivePerson:\r\n return i18next.t(53);\r\n case EMPLOYEE_TYPE.Firewatch:\r\n return i18next.t(55);\r\n case EMPLOYEE_TYPE.InternalSubcontractor:\r\n return i18next.t(1073);\r\n case EMPLOYEE_TYPE.LocalAdmin:\r\n return i18next.t(5) + ' Admin';\r\n case EMPLOYEE_TYPE.ResponsiblePerson:\r\n return i18next.t(108);\r\n case EMPLOYEE_TYPE.RoofingContractor:\r\n return i18next.t(173);\r\n case EMPLOYEE_TYPE.Subcontractor:\r\n return i18next.t(1073);\r\n case EMPLOYEE_TYPE.SuperAdmin:\r\n return 'Super Admin';\r\n case EMPLOYEE_TYPE.Supplier:\r\n return i18next.t(216);\r\n default:\r\n return '';\r\n }\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Col, DropdownItem, FormGroup, Label, Button } from 'reactstrap';\r\nimport moment from 'moment';\r\n\r\n// Actions\r\nimport {\r\n updateControlItemMetaData,\r\n updateSchemasControlItemsMetaData,\r\n removeControlItemMetaData,\r\n} from '../../redux/actions/schemas';\r\n\r\n// Utils\r\nimport { getUserData } from '../../utils/userUtil';\r\nimport i18n from '../../i18n';\r\nimport toast from '../../utils/toast';\r\nimport { parseDate } from '../../utils/common';\r\n\r\n// Components\r\nimport ButtonDropdown from '../Custom/ButtonDropdown';\r\nimport CustomModal from '../Custom/CustomModal';\r\nimport ConfirmModal from '../Custom/ConfirmModal';\r\nimport ReactSelect from '../Custom/ReactSelect';\r\nimport ReactDatePicker from '../Custom/ReactDatePicker';\r\nimport Typography from '../Typography';\r\nimport TextInput from '../Custom/Forms/TextInput';\r\nimport { MdDeleteForever, MdEdit } from 'react-icons/md';\r\nimport { EMPLOYEE_TYPE } from '../../redux/constants';\r\n\r\nconst ControlItemMetaAdminModal = ({\r\n auth,\r\n control,\r\n updateControlItemMetaData,\r\n updateSchemasControlItemsMetaData,\r\n removeControlItemMetaData,\r\n schema,\r\n extra,\r\n employees,\r\n callback,\r\n}) => {\r\n const [isLoading, setLoading] = useState(false);\r\n const [showControlItemModal, setShowControlItemModal] = useState(false);\r\n const [showSchemaModal, setShowSchemaModal] = useState(false);\r\n const [showDeleteModal, setShowDeleteModal] = useState(false);\r\n const [visible, setVisible] = useState(false);\r\n const [options, setOptions] = useState([]);\r\n\r\n const [userId, setUserId] = useState(null);\r\n const [date, setDate] = useState(new Date());\r\n const size = 'lg';\r\n const labelSize = 4;\r\n const inputSize = 8;\r\n const allowedTypes = [\r\n EMPLOYEE_TYPE.ExecutivePerson,\r\n EMPLOYEE_TYPE.CompanyOwner,\r\n EMPLOYEE_TYPE.InternalSubcontractor,\r\n ];\r\n\r\n //#region Use effect\r\n\r\n useEffect(() => {\r\n const user = getUserData(auth);\r\n setVisible(user.hasAP);\r\n\r\n const options = employees\r\n .filter(x => allowedTypes.includes(x.employeeType))\r\n .map(x => {\r\n return {\r\n label: x.name,\r\n value: x.id,\r\n };\r\n });\r\n\r\n if (!!control?.answeredByUserId) {\r\n setUserId(control?.answeredByUserId);\r\n } else if (options.length > 0) {\r\n setUserId(options[0].value);\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n useEffect(() => {\r\n const options = employees\r\n .filter(x => allowedTypes.includes(x.employeeType))\r\n .map(x => {\r\n return {\r\n label: x.name,\r\n value: x.id,\r\n };\r\n });\r\n\r\n setOptions(options);\r\n // eslint-disable-next-line\r\n }, [employees]);\r\n\r\n //#endregion\r\n\r\n //#region Getters\r\n\r\n const renderMetaInfoField = (title, value) => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n const getCurrentUser = () => {\r\n let name = '';\r\n if (!!control?.answeredByUserId) {\r\n const user = employees.find(x => x.id === control.answeredByUserId);\r\n\r\n if (!!user) {\r\n name = user.name;\r\n }\r\n }\r\n\r\n return renderMetaInfoField(i18n.t(21423) + ':', name);\r\n };\r\n\r\n const getCurrentDate = () => {\r\n let date = '';\r\n if (!!control) {\r\n const dt = !!control.manualAnswerDate\r\n ? control.manualAnswerDate\r\n : control.updatedDate;\r\n\r\n const tmp = parseDate(dt, true);\r\n\r\n if (tmp !== '01.01.0001') {\r\n date = tmp;\r\n }\r\n }\r\n\r\n return renderMetaInfoField(i18n.t(21426) + ':', date);\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Actions\r\n\r\n const onChangeManualDate = date => {\r\n setDate(date);\r\n };\r\n\r\n const toggle = () => {\r\n if (!!schema) {\r\n setShowSchemaModal(!showSchemaModal);\r\n } else {\r\n setShowControlItemModal(!showControlItemModal);\r\n }\r\n };\r\n\r\n const handleUpdateMetaData = () => {\r\n const dataObj = {\r\n date: moment(date).format('MM.DD.YYYY HH:mm'),\r\n userId,\r\n id: !!schema ? null : control.id,\r\n schemaId: !!schema ? schema.id : null,\r\n };\r\n\r\n const action = !!schema\r\n ? updateSchemasControlItemsMetaData\r\n : updateControlItemMetaData;\r\n\r\n setLoading(true);\r\n action(dataObj)\r\n .then(res => {\r\n setLoading(false);\r\n toggle();\r\n toast.success(i18n.t(4000));\r\n if (!!callback) callback();\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n setLoading(false);\r\n toast.error(i18n.t(212));\r\n });\r\n };\r\n\r\n const handleRemoveMetaData = () => {\r\n const dataObj = {\r\n id: control.id,\r\n };\r\n\r\n setLoading(true);\r\n removeControlItemMetaData(dataObj)\r\n .then(res => {\r\n setLoading(false);\r\n setShowDeleteModal(false);\r\n toast.success(i18n.t(4000));\r\n if (!!callback) callback();\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n setLoading(false);\r\n toast.error(i18n.t(212));\r\n });\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Inputs\r\n\r\n const renderUserDropdown = () => {\r\n const title = !!schema ? i18n.t(21429) : i18n.t(21424);\r\n\r\n return (\r\n \r\n \r\n \r\n x.value === userId)}\r\n onChange={v => setUserId(v.value)}\r\n isDisabled={isLoading}\r\n closeMenuOnSelect\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n const renderDateTimePicker = () => {\r\n const title = !!schema ? i18n.t(138) : i18n.t(21427);\r\n\r\n const defaultProps = {\r\n className: 'form-control',\r\n wrapperClass: 'meta',\r\n locale: 'da',\r\n value: date,\r\n format: 'dd.MM.yyyy HH:mm',\r\n showYearDropdown: true,\r\n showMonthDropdown: true,\r\n showTimeSelect: true,\r\n timeIntervals: 15,\r\n timeCaption: i18n.t(21428),\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Render modals\r\n\r\n const footer = () => {\r\n return (\r\n
\r\n \r\n {i18n.t(2)}\r\n \r\n \r\n {i18n.t(1180)}\r\n \r\n
\r\n );\r\n };\r\n\r\n const renderControlItemContent = () => {\r\n return (\r\n
\r\n {i18n.t(21421)}\r\n \r\n {i18n.t(21422)}\r\n \r\n {getCurrentUser()}\r\n {renderUserDropdown()}\r\n\r\n \r\n {i18n.t(21425)}\r\n \r\n {getCurrentDate()}\r\n {renderDateTimePicker()}\r\n
\r\n );\r\n };\r\n\r\n const renderSchemaContent = () => {\r\n return (\r\n
\r\n {i18n.t(21430)}\r\n \r\n {i18n.t(21422)}\r\n \r\n {renderUserDropdown()}\r\n\r\n \r\n {i18n.t(21425)}\r\n \r\n {renderDateTimePicker()}\r\n
\r\n );\r\n };\r\n\r\n const renderModal = () => {\r\n const title = !!schema ? i18n.t(21419) : i18n.t(21420);\r\n\r\n return (\r\n \r\n {!schema && renderControlItemContent()}\r\n {!!schema && renderSchemaContent()}\r\n \r\n );\r\n };\r\n\r\n const renderDeleteModal = () => {\r\n return (\r\n setShowDeleteModal(!showDeleteModal)}\r\n cancelFunc={() => setShowDeleteModal(!showDeleteModal)}\r\n confirmFunc={handleRemoveMetaData}\r\n showActionSpinner={isLoading}\r\n >\r\n {i18n.t(21431)}\r\n \r\n );\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Main render\r\n\r\n const renderOptions = () => {\r\n return (\r\n <>\r\n {extra}\r\n \r\n \r\n {i18n.t(21417)}\r\n \r\n setShowDeleteModal(!showDeleteModal)}>\r\n \r\n {i18n.t(21418)}\r\n \r\n \r\n );\r\n };\r\n\r\n const renderMenuButton = () => {\r\n if (!visible || (!schema && !control?.answeredByUserId)) return null;\r\n\r\n const shared = (\r\n <>\r\n {renderModal()}\r\n {renderDeleteModal()}\r\n \r\n );\r\n\r\n if (!!schema) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {i18n.t(16)}\r\n \r\n \r\n \r\n \r\n {shared}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n {renderOptions()}\r\n {shared}\r\n
\r\n );\r\n };\r\n\r\n return renderMenuButton();\r\n\r\n //#endregion\r\n};\r\n\r\nfunction mapStateToProps({ auth, employees }) {\r\n return { auth, employees: employees.employees };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n updateControlItemMetaData,\r\n updateSchemasControlItemsMetaData,\r\n removeControlItemMetaData,\r\n})(ControlItemMetaAdminModal);\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport parse from 'html-react-parser';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport { Popover, PopoverBody, PopoverHeader } from 'reactstrap';\r\nimport { IconInfo } from '../../assets/icons_v2';\r\nimport { getRng } from '../../utils/common';\r\n\r\nconst InfoTip = props => {\r\n const { text, html, title, id, placement, inline } = props;\r\n const [open, setOpen] = useState(false);\r\n\r\n const toggle = () => setOpen(!open);\r\n\r\n let classes = '';\r\n if (inline) {\r\n classes += ' inline';\r\n }\r\n\r\n let content;\r\n if (text) {\r\n content = text;\r\n }\r\n if (html) {\r\n content = parse(html);\r\n }\r\n\r\n return (\r\n setOpen(true)}\r\n onMouseLeave={() => setOpen(false)}\r\n >\r\n \r\n \r\n {title}\r\n {content}\r\n \r\n \r\n );\r\n};\r\n\r\nInfoTip.propTypes = {\r\n id: PropTypes.string,\r\n placement: PropTypes.string,\r\n};\r\n\r\nInfoTip.defaultProps = {\r\n id: 'it' + Date.now() + '-' + getRng(),\r\n placement: 'auto',\r\n};\r\n\r\nexport default InfoTip;\r\n","/**\r\n * Contains functions whose purpose is to emit/create a Toast popup\r\n * @module utils/toast\r\n */\r\nimport { toast } from 'react-toastify';\r\n\r\n// Toast length values\r\nexport const TOAST_LENGTH = {\r\n DEFAULT: 3000,\r\n LONG: 7500,\r\n SHORT: 2500,\r\n};\r\n\r\n// Default settings\r\nconst settings = {\r\n position: 'bottom-right',\r\n autoClose: TOAST_LENGTH.DEFAULT,\r\n hideProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n progress: undefined,\r\n};\r\n\r\n//////////////////////////////////////////////////////////////////\r\n/**\r\n * Displays a green success popup.\r\n * @param {String} text text value\r\n */\r\nfunction success(text) {\r\n toast.success(text, settings);\r\n}\r\n\r\n/**\r\n * Displays a short lasting green success popup.\r\n * @param {String} text text value\r\n */\r\nfunction successShort(text) {\r\n toast.success(text, { ...settings, autoClose: TOAST_LENGTH.SHORT });\r\n}\r\n\r\n/**\r\n * Displays a long lasting green success popup.\r\n * @param {String} text text value\r\n */\r\nfunction successLong(text) {\r\n toast.success(text, { ...settings, autoClose: TOAST_LENGTH.LONG });\r\n}\r\n\r\n//////////////////////////////////////////////////////////////////\r\n/**\r\n * Displays a blue info popup.\r\n * @param {String} text text value\r\n */\r\nfunction info(text) {\r\n toast.info(text, settings);\r\n}\r\n\r\n/**\r\n * Displays a short lasting blue info popup.\r\n * @param {String} text text value\r\n */\r\nfunction infoShort(text) {\r\n toast.info(text, { ...settings, autoClose: TOAST_LENGTH.SHORT });\r\n}\r\n\r\n/**\r\n * Displays a long lasting blue info popup.\r\n * @param {String} text text value\r\n */\r\nfunction infoLong(text) {\r\n toast.info(text, { ...settings, autoClose: TOAST_LENGTH.LONG });\r\n}\r\n\r\n//////////////////////////////////////////////////////////////////\r\n/**\r\n * Displays a yellow warning popup.\r\n * @param {String} text text value\r\n */\r\nfunction warning(text) {\r\n toast.warning(text, settings);\r\n}\r\n\r\n/**\r\n * Displays a short lasting yellow warning popup.\r\n * @param {String} text text value\r\n */\r\nfunction warningShort(text) {\r\n toast.warning(text, { ...settings, autoClose: TOAST_LENGTH.SHORT });\r\n}\r\n\r\n/**\r\n * Displays a long lasting yellow warning popup.\r\n * @param {String} text text value\r\n */\r\nfunction warningLong(text) {\r\n toast.warning(text, { ...settings, autoClose: TOAST_LENGTH.LONG });\r\n}\r\n\r\n//////////////////////////////////////////////////////////////////\r\n/**\r\n * Displays a red error popup.\r\n * @param {String} text text value\r\n */\r\nfunction error(text) {\r\n toast.error(text, settings);\r\n}\r\n\r\n/**\r\n * Displays a short lasting red error popup.\r\n * @param {String} text text value\r\n */\r\nfunction errorShort(text) {\r\n toast.error(text, { ...settings, autoClose: TOAST_LENGTH.SHORT });\r\n}\r\n\r\n/**\r\n * Displays a long red error popup.\r\n * @param {String} text text value\r\n */\r\nfunction errorLong(text) {\r\n toast.error(text, { ...settings, autoClose: TOAST_LENGTH.LONG });\r\n}\r\n\r\n//////////////////////////////////////////////////////////////////\r\nexport default {\r\n // default\r\n success,\r\n info,\r\n warning,\r\n error,\r\n // short\r\n successShort,\r\n infoShort,\r\n warningShort,\r\n errorShort,\r\n // long\r\n successLong,\r\n infoLong,\r\n warningLong,\r\n errorLong,\r\n};\r\n","import React, { useState } from 'react';\r\nimport i18next from '../i18n';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Form } from 'reactstrap';\r\n\r\n// Utils\r\nimport { StringIsEmpty } from '../utils/common';\r\n\r\n// Components\r\nimport TextInput from '../components/Custom/Forms/TextInput';\r\nimport TaghaandbogenLogo from './../assets/img/logo/method-draw-image.svg';\r\n\r\nconst AuthForm = props => {\r\n const {\r\n showLogo,\r\n children,\r\n loginFailed,\r\n remember,\r\n } = props;\r\n\r\n const [username, setUsername] = useState('');\r\n const [password, setPassword] = useState('');\r\n const [missingUsername, setMissingUsername] = useState(false);\r\n const [missingPassword, setMissingPassword] = useState(false);\r\n\r\n const handleSubmit = event => {\r\n event.preventDefault();\r\n\r\n let emptyUsername = StringIsEmpty(username);\r\n let emptyPassword = StringIsEmpty(password);\r\n\r\n if (!emptyUsername)\r\n emptyUsername = StringIsEmpty(username.replace(' ', ''));\r\n if (!emptyPassword)\r\n emptyPassword = StringIsEmpty(password.replace(' ', ''));\r\n\r\n if (emptyUsername || emptyPassword) {\r\n setUsername('');\r\n setPassword('');\r\n setMissingUsername(emptyUsername);\r\n setMissingPassword(emptyPassword);\r\n } else {\r\n props.login(username, password);\r\n }\r\n };\r\n\r\n const onChange = e => {\r\n if (e.target.name === 'username') {\r\n setUsername(e.target.value);\r\n } else if (e.target.name === 'password') {\r\n setPassword(e.target.value);\r\n }\r\n setMissingUsername(false);\r\n setMissingPassword(false);\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n {showLogo && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n {props.isDev ? (\r\n
\r\n

\r\n {i18next.t(180)}\r\n

\r\n
\r\n
\r\n ) : null}\r\n\r\n {loginFailed ?

{props.errorText}

: null}\r\n \r\n\r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nAuthForm.propTypes = {\r\n showLogo: PropTypes.bool,\r\n usernameLabel: PropTypes.string,\r\n passwordLabel: PropTypes.string,\r\n};\r\n\r\nAuthForm.defaultProps = {\r\n showLogo: true,\r\n};\r\n\r\nexport default AuthForm;\r\n","import React, { useState } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Button } from 'reactstrap';\r\n\r\n// Utils\r\nimport { languages } from '../../utils/translation/langauges';\r\n\r\n// Flags\r\n\r\n// Actions\r\n\r\nconst LangaugePicker = props => {\r\n const [showFlags, setShowFlags] = useState(false);\r\n const lang = window.localStorage.getItem('user_lang');\r\n\r\n const setLang = lang => {\r\n if (!lang || lang?.trim().length === 0) {\r\n lang = 'en';\r\n }\r\n\r\n window.localStorage.setItem('user_lang', lang);\r\n setShowFlags(false);\r\n window.location.reload();\r\n };\r\n\r\n const getCurrentLangIcon = () => {\r\n let tmp = languages.find(x => x.lang === lang);\r\n if (!tmp) languages.find(x => x.lang === 'en');\r\n\r\n return tmp.icon;\r\n };\r\n\r\n const renderFlags = () => {\r\n let cl = 'language-picker-flags';\r\n\r\n // Adjust class?\r\n //console.log(props.language.currentLanguage)\r\n\r\n const onAction = item => {\r\n setShowFlags(false);\r\n setLang(item.lang);\r\n };\r\n\r\n return (\r\n
\r\n {languages\r\n .filter(x => x.lang !== lang)\r\n .map((x, index) => {\r\n return (\r\n onAction(x)}\r\n >\r\n {x.icon}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {showFlags && renderFlags()}\r\n \r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps({ language }) {\r\n return {\r\n language,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {})(LangaugePicker);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { Card, CardBody, CardHeader, Col, Row, Input } from 'reactstrap';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../i18n';\r\nimport { osName } from 'react-device-detect';\r\n\r\n// Actions\r\nimport { login, logout } from '../redux/actions/auth';\r\nimport { GetBranding } from '../redux/actions/common';\r\nimport { getSystemMessage } from '../redux/actions/systemInfo';\r\nimport { getFeatures } from '../redux/actions/features';\r\nimport { getCustomer } from '../redux/actions/customers';\r\n\r\n// Utils\r\nimport { GetErrorCodeDescription } from '../utils/errorCodes';\r\nimport { isDevEnvironment } from '../utils/routeHandling';\r\nimport { CUSTOMER_STATUS } from '../redux/constants';\r\n\r\n// Components\r\nimport Typography from '../components/Typography';\r\nimport AuthForm from '../components/AuthForm';\r\nimport LanguagePicker from '../components/Custom/LanguagePicker';\r\n\r\nconst AuthPage = props => {\r\n const {\r\n auth,\r\n history,\r\n login,\r\n getCustomer,\r\n logout,\r\n getSystemMessage,\r\n getFeatures,\r\n GetBranding,\r\n } = props;\r\n const [failedLogin, setFailedLogin] = useState(false);\r\n const [errorText, setErrorText] = useState(null);\r\n const [showClosedAccountMessage, setShowClosedAccount] = useState(false);\r\n const [salesManager, setSalesMaanger] = useState(null);\r\n const [remember, setRemember] = useState(false);\r\n\r\n useEffect(() => {\r\n const rememberPass = localStorage.getItem('remember_pass');\r\n if (rememberPass) {\r\n setRemember(rememberPass === 'true');\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (auth?.isAuthenticated) {\r\n history.push('/');\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const handleLogoClick = () => {\r\n window.location.href = 'https://www.nordicwaterproofing.com/';\r\n };\r\n\r\n const handleLogin = (username, password) => {\r\n login({\r\n username: username,\r\n password: password,\r\n devicetype: osName,\r\n })\r\n .then(res => {\r\n // console.log(res.data);\r\n if (res.data.verification !== 0 && res.data.token === null) {\r\n history.push('/verification');\r\n } else {\r\n if (res.data.customerStatus === CUSTOMER_STATUS.Closed) {\r\n const { user } = res.data;\r\n getCustomer(user.groupId, user.belongsToCustomerId)\r\n .then(res => {\r\n logout();\r\n setShowClosedAccount(true);\r\n setSalesMaanger(res.data.salesManager);\r\n })\r\n .catch(err => {\r\n logout();\r\n setShowClosedAccount(true);\r\n setSalesMaanger(null);\r\n });\r\n } else {\r\n getSystemMessage();\r\n getFeatures();\r\n if (res.data.accessLevel > 1 && res.data.user) {\r\n const { user } = res.data;\r\n\r\n GetBranding(user.belongsToCustomerId)\r\n .then(res => {\r\n history.push('/');\r\n })\r\n .catch(err => {\r\n console.log('Failed to get branding.', err);\r\n history.push('/');\r\n });\r\n } else {\r\n history.push('/');\r\n }\r\n }\r\n }\r\n })\r\n .catch(err => {\r\n let text = i18next.t(1090);\r\n if (err.response) {\r\n if (err.response.data) {\r\n if (err.response.data.dictionaryKey) {\r\n text = GetErrorCodeDescription(err.response.data.dictionaryKey);\r\n }\r\n }\r\n }\r\n setFailedLogin(true);\r\n setErrorText(text);\r\n });\r\n };\r\n\r\n const navigateToForgotPassword = () => {\r\n history.push('/forgot-password');\r\n };\r\n\r\n const onChangeRemember = () => {\r\n setRemember(!remember);\r\n localStorage.setItem('remember_pass', !remember);\r\n };\r\n\r\n const renderAuthForm = () => {\r\n if (showClosedAccountMessage) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n

\r\n onChangeRemember()}\r\n />\r\n {i18next.t(151)}\r\n

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

{i18next.t(3253)}

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

history.push('/create-profile')}>\r\n {i18next.t(9095)}\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderClosedAccountMessage = () => {\r\n if (!showClosedAccountMessage) return null;\r\n return (\r\n \r\n {i18next.t(1495)}\r\n \r\n {i18next.t(1496)}\r\n {salesManager && (\r\n
\r\n
\r\n \r\n {i18next.t(7103)}\r\n \r\n \r\n \r\n {i18next.t(13)}:\r\n {i18next.t(1040)}:\r\n {i18next.t(27)}:\r\n {i18next.t(58)}:\r\n \r\n \r\n {salesManager.name}\r\n {salesManager.corporation}\r\n \r\n {salesManager.countryCode} {salesManager.phone}\r\n \r\n \r\n \r\n {salesManager.mail}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n {renderAuthForm()}\r\n {renderClosedAccountMessage()}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n login,\r\n logout,\r\n GetBranding,\r\n getSystemMessage,\r\n getFeatures,\r\n getCustomer,\r\n})(AuthPage);\r\n","export const isDevEnvironment = () => {\r\n const env = process.env.REACT_APP_IS_DEV_ENV;\r\n\r\n if (env === 'true') {\r\n console.log('---DEV ENVIRONMENT---');\r\n console.log('API:', process.env.REACT_APP_API_URL);\r\n\r\n return true;\r\n }\r\n\r\n console.log('PROD');\r\n return false;\r\n};\r\n","import React, { useState } from 'react';\r\nimport TaghaandbogenLogo from './../assets/img/logo/method-draw-image.svg';\r\nimport { Card, Form, Col, Row, Button } from 'reactstrap';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../i18n';\r\n//import { osName } from 'react-device-detect';\r\n\r\n// Actions\r\nimport { verifySms, resendSms } from '../redux/actions/auth';\r\nimport { CUSTOMER_STATUS } from '../redux/constants';\r\nimport { GetBranding } from '../redux/actions/common';\r\nimport { getSystemMessage } from '../redux/actions/systemInfo';\r\nimport { getFeatures } from '../redux/actions/features';\r\nimport { getCustomer } from '../redux/actions/customers';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport TextInput from '../components/Custom/Forms/TextInput';\r\nimport PageSpinner from '../components/PageSpinner';\r\nimport { useEffect } from 'react';\r\n\r\nconst Verification = props => {\r\n const {\r\n auth,\r\n verifySms,\r\n getCustomer,\r\n logout,\r\n getSystemMessage,\r\n getFeatures,\r\n GetBranding,\r\n history,\r\n } = props;\r\n\r\n const [isLoading, setLoading] = useState(false);\r\n const [verifyFailed, setVerifyFailed] = useState(false);\r\n const [smsVerify, setSmsVerify] = useState(false);\r\n const [googleVerify, setGoogleVerify] = useState(false);\r\n const [windowsVerify, setWindowsVerify] = useState(false);\r\n const [smsInput, setSmsInput] = useState('');\r\n // const [showClosedAccountMessage, setShowClosedAccount] = useState(false);\r\n // const [salesManager, setSalesMaanger] = useState(null);\r\n\r\n useEffect(() => {\r\n setSmsVerify(true);\r\n setGoogleVerify(false);\r\n setWindowsVerify(false);\r\n }, []);\r\n\r\n const renderSmsVericiation = () => {\r\n const verify = event => {\r\n event.preventDefault();\r\n //console.log('Verify');\r\n\r\n setVerifyFailed(false);\r\n setLoading(true);\r\n\r\n const dataObj = { userId: auth.user.user.id, code: smsInput };\r\n\r\n verifySms(dataObj).then(res => {\r\n //console.log(res);\r\n if (res.data.token === null) {\r\n setVerifyFailed(true);\r\n setLoading(false);\r\n } else {\r\n if (res.data.customerStatus === CUSTOMER_STATUS.Closed) {\r\n const { user } = res.data;\r\n getCustomer(user.groupId, user.belongsToCustomerId)\r\n .then(res => {\r\n logout();\r\n // setShowClosedAccount(true);\r\n // setSalesMaanger(res.data.salesManager);\r\n })\r\n .catch(err => {\r\n logout();\r\n // setShowClosedAccount(true);\r\n // setSalesMaanger(null);\r\n });\r\n } else {\r\n getSystemMessage();\r\n getFeatures();\r\n if (res.data.accessLevel > 1 && res.data.user) {\r\n const { user } = res.data;\r\n\r\n GetBranding(user.belongsToCustomerId)\r\n .then(res => {\r\n history.push('/');\r\n })\r\n .catch(err => {\r\n console.log('Failed to get branding.', err);\r\n history.push('/');\r\n });\r\n } else {\r\n history.push('/');\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n const resendSms = () => {\r\n //console.log('resend sms');\r\n const dataObj = { userId: auth.user.user.id };\r\n setLoading(true);\r\n props.resendSms(dataObj).then(res => {\r\n setLoading(false);\r\n });\r\n };\r\n\r\n const onChangeSmsInput = e => {\r\n setSmsInput(e.target.value);\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n {verifyFailed ? (\r\n

{i18next.t(8309)}

\r\n ) : null}\r\n {/* // TODO */}\r\n\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n const renderGoogleVerification = () => {};\r\n\r\n const renderWindowsVerification = () => {};\r\n\r\n return (\r\n \r\n \r\n {isLoading && }\r\n {!isLoading && (\r\n <>\r\n {smsVerify && renderSmsVericiation()}\r\n {googleVerify && renderGoogleVerification()}\r\n {windowsVerify && renderWindowsVerification()}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n verifySms,\r\n resendSms,\r\n GetBranding,\r\n getCustomer,\r\n getFeatures,\r\n getSystemMessage,\r\n})(Verification);\r\n","import React, { useState } from 'react';\r\nimport i18next from '../i18n';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Form } from 'reactstrap';\r\n\r\n// Utils\r\nimport { StringIsEmpty } from '../utils/common';\r\n\r\n// Components\r\nimport TextInput from '../components/Custom/Forms/TextInput';\r\nimport TaghaandbogenLogo from './../assets/img/logo/method-draw-image.svg';\r\n\r\nconst ForgotPasswordForm = props => {\r\n const { showLogo, children } = props;\r\n\r\n const [username, setUsername] = useState('');\r\n const [missingUsername, setMissingUsername] = useState(false);\r\n\r\n const handleSubmit = event => {\r\n event.preventDefault();\r\n\r\n let emptyUsername = StringIsEmpty(username);\r\n if (!emptyUsername)\r\n emptyUsername = StringIsEmpty(username.replace(' ', ''));\r\n\r\n if (emptyUsername) {\r\n setUsername('');\r\n setMissingUsername(emptyUsername);\r\n } else {\r\n props.forgotpassword(username);\r\n }\r\n };\r\n\r\n const onChange = e => {\r\n setUsername(e.target.value);\r\n setMissingUsername(false);\r\n };\r\n\r\n const renderContent = () => {\r\n const { resetFailed, resetSent, errorText } = props;\r\n\r\n return (\r\n
\r\n {!resetSent ? (\r\n \r\n ) : (\r\n

{i18next.t(3254)}

\r\n )}\r\n\r\n
\r\n {resetFailed ?

{errorText}

: null}\r\n\r\n {!resetSent ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n {showLogo && (\r\n
\r\n \r\n
\r\n )}\r\n {renderContent()}\r\n {children}\r\n
\r\n \r\n );\r\n};\r\n\r\nForgotPasswordForm.propTypes = {\r\n showLogo: PropTypes.bool,\r\n usernameLabel: PropTypes.string,\r\n};\r\n\r\nForgotPasswordForm.defaultProps = {\r\n showLogo: true,\r\n};\r\n\r\nexport default ForgotPasswordForm;\r\n","import React, { useState, useEffect } from 'react';\r\nimport { Card, Col, Row } from 'reactstrap';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\nimport { forgotpassword } from '../redux/actions/auth';\r\n\r\n// Utils\r\n\r\n// Components\r\nimport ForgotPasswordForm from '../components/ForgotPasswordForm';\r\n\r\nconst ForgotPassword = props => {\r\n const { auth, history, forgotpassword } = props;\r\n const [resetSent, setResetSent] = useState(false);\r\n\r\n useEffect(() => {\r\n if (auth?.isAuthenticated) {\r\n history.push('/');\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const handleLogoClick = () => {\r\n window.location.href = 'https://www.nordicwaterproofing.com/';\r\n };\r\n\r\n const handleForgotPassword = username => {\r\n forgotpassword({\r\n username: username,\r\n })\r\n .then(res => {\r\n setResetSent(true);\r\n })\r\n .catch(err => {\r\n console.log('err', err);\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n forgotpassword,\r\n})(ForgotPassword);\r\n","import React, { useState } from 'react';\r\nimport i18next from '../i18n';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Form } from 'reactstrap';\r\n\r\n// Utils\r\nimport { StringIsEmpty } from '../utils/common';\r\n\r\n// Components\r\nimport TextInput from '../components/Custom/Forms/TextInput';\r\nimport TaghaandbogenLogo from './../assets/img/logo/method-draw-image.svg';\r\n\r\nconst ResetPasswordForm = props => {\r\n const { showLogo, children, resetFailed, errorText } = props;\r\n\r\n const [password, setPassword] = useState('');\r\n const [confirmPassword, setConfirmPassword] = useState('');\r\n const [missingPassword, setMissingPassword] = useState(false);\r\n const [passwordsNotMatching, setPasswordsNotMatching] = useState(false);\r\n\r\n const handleSubmit = event => {\r\n event.preventDefault();\r\n\r\n let emptyPassword = StringIsEmpty(password);\r\n let emptyConfirmPassword = StringIsEmpty(confirmPassword);\r\n\r\n if (!emptyPassword)\r\n emptyPassword = StringIsEmpty(password.replace(' ', ''));\r\n if (!emptyConfirmPassword)\r\n emptyConfirmPassword = StringIsEmpty(confirmPassword.replace(' ', ''));\r\n\r\n if (emptyPassword || emptyConfirmPassword) {\r\n setMissingPassword(emptyPassword);\r\n setPassword('');\r\n } else {\r\n if (password === confirmPassword) {\r\n props.resetpassword(password);\r\n } else {\r\n setPasswordsNotMatching(true);\r\n }\r\n }\r\n };\r\n\r\n const onChange = e => {\r\n if (e.target.name === 'password') {\r\n setPassword(e.target.value);\r\n } else if (e.target.name === 'confirmPassword') {\r\n setConfirmPassword(e.target.value);\r\n }\r\n\r\n setMissingPassword(false);\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n {showLogo && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n \r\n\r\n \r\n\r\n {resetFailed ? errorText : null}\r\n
\r\n \r\n\r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nResetPasswordForm.propTypes = {\r\n showLogo: PropTypes.bool,\r\n passwordLabel: PropTypes.string,\r\n};\r\n\r\nResetPasswordForm.defaultProps = {\r\n showLogo: true,\r\n};\r\n\r\nexport default ResetPasswordForm;\r\n","import React, { useState, useEffect } from 'react';\r\nimport { Card, Col, Row } from 'reactstrap';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../i18n';\r\n\r\n// Actions\r\nimport { resetpassword, loginReset, logout } from '../redux/actions/auth';\r\nimport { getSystemMessage } from '../redux/actions/systemInfo';\r\nimport { getFeatures } from '../redux/actions/features';\r\nimport { getCustomer } from '../redux/actions/customers';\r\nimport { GetBranding } from '../redux/actions/common';\r\n\r\n// Utils\r\nimport { CUSTOMER_STATUS } from '../redux/constants';\r\n\r\n// Components\r\nimport ResetPasswordForm from '../components/ResetPasswordForm';\r\n\r\nconst ResetPassword = props => {\r\n const {\r\n auth,\r\n history,\r\n resetpassword,\r\n loginReset,\r\n getSystemMessage,\r\n logout,\r\n getFeatures,\r\n GetBranding,\r\n } = props;\r\n const [failedReset, setFailedReset] = useState(false);\r\n const [errorText, setErrorText] = useState(null);\r\n const [token, setToken] = useState(null);\r\n\r\n useEffect(() => {\r\n if (auth?.isAuthenticated) {\r\n history.push('/');\r\n }\r\n const query = new URLSearchParams(props.location.search);\r\n const tmpToken = query.get('token');\r\n setToken(tmpToken);\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const handleLogoClick = () => {\r\n window.location.href = 'https://www.nordicwaterproofing.com/';\r\n };\r\n\r\n const navigateToLogin = () => {\r\n history.push('/login');\r\n };\r\n\r\n const handleResetPassword = password => {\r\n resetpassword({\r\n password: password,\r\n resetcode: token,\r\n })\r\n .then(res1 => {\r\n loginReset(res1).then(res => {\r\n if (res.data.customerStatus === CUSTOMER_STATUS.Closed) {\r\n logout();\r\n navigateToLogin();\r\n } else {\r\n getSystemMessage();\r\n getFeatures();\r\n if (res.data.accessLevel > 1 && res.data.user) {\r\n const { user } = res.data;\r\n\r\n GetBranding(user.belongsToCustomerId)\r\n .then(res => {\r\n history.push('/');\r\n })\r\n .catch(err => {\r\n console.log('Failed to get branding.', err);\r\n history.push('/');\r\n });\r\n } else {\r\n history.push('/');\r\n }\r\n }\r\n });\r\n })\r\n .catch(err => {\r\n setFailedReset(true);\r\n setErrorText(err.response.data);\r\n });\r\n };\r\n\r\n const handleError = errorText => {\r\n if (errorText) {\r\n if (Array.isArray(errorText)) {\r\n return errorText.map((err, index) => {\r\n let txt = i18next.t(err.dictionaryKey);\r\n if (err.descriptor) {\r\n txt += ` - ${err.descriptor}`;\r\n }\r\n\r\n return (\r\n

\r\n {txt}\r\n

\r\n );\r\n });\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n resetpassword,\r\n GetBranding,\r\n loginReset,\r\n logout,\r\n getSystemMessage,\r\n getFeatures,\r\n getCustomer,\r\n})(ResetPassword);\r\n","import { useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\n// Actions\r\nimport { logout, loginOutAs } from '../redux/actions/auth';\r\n\r\nconst Logout = props => {\r\n const { auth, logout, loginOutAs, history } = props;\r\n\r\n useEffect(() => {\r\n if (auth?.isAuthenticated) {\r\n if (auth.loginAsUser) {\r\n loginOutAs();\r\n } else {\r\n logout();\r\n }\r\n reload();\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const reload = () => {\r\n history.push('/');\r\n window.location.reload();\r\n };\r\n\r\n return null;\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, { logout, loginOutAs })(Logout);\r\n","import React, { useState } from 'react';\r\nimport i18next from '../../../../i18n';\r\nimport {\r\n Button,\r\n Container,\r\n Form,\r\n ListGroup,\r\n ListGroupItem,\r\n ListGroupItemHeading,\r\n} from 'reactstrap';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Utils\r\nimport { ASSIGNMENT_SCHEMA, ASSIGNEE_TYPE } from '../../../../redux/constants';\r\nimport { GetQuestion } from '../../../../utils/translation/schemaQuestions';\r\n\r\n// Components\r\nimport Checkbox from '../../../../components/Custom/Forms/Checkbox';\r\nimport TextInput from '../../../../components/Custom/Forms/TextInput';\r\nimport ConfirmModal from '../../../../components/Custom/ConfirmModal';\r\nimport InfoModal from '../../../../components/Custom/InfoModal';\r\nimport Typography from '../../../../components/Typography';\r\n\r\nconst BuildingownerApproval = props => {\r\n const {\r\n onChangeComment,\r\n schema,\r\n questions,\r\n hasSigned,\r\n // allApproved,\r\n allMarked,\r\n // declaration,\r\n handleMarkAll,\r\n isInfo,\r\n assigneeType,\r\n aggreementComment,\r\n handleSetDeclaration,\r\n handleApproveAll,\r\n } = props;\r\n const [showConfirm, setShowConfirm] = useState(false);\r\n const [showBuildingOwnerContent, setShowBuildingOwnerContent] = useState(\r\n false,\r\n );\r\n const [showExecutivePersonContent, setShowExecutivePersonContent] = useState(\r\n false,\r\n );\r\n const [showFireWatchContent, setShowFireWatchContent] = useState(false);\r\n\r\n const is2021Version = [\r\n ASSIGNMENT_SCHEMA.QBE_2022,\r\n ASSIGNMENT_SCHEMA.TRUST_2023,\r\n ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021,\r\n ASSIGNMENT_SCHEMA.WarmWorkStandard_2021,\r\n ].includes(schema);\r\n\r\n const isKoeb2021 = [ASSIGNMENT_SCHEMA.WarmWorkStandard_2021].includes(schema);\r\n\r\n const onChange = e => {\r\n if (onChangeComment) {\r\n onChangeComment(e);\r\n }\r\n };\r\n\r\n const getQuestionContentByType = (q, question, excludeIndex = false) => {\r\n switch (schema) {\r\n // case 101:\r\n // const forName = `q-${q.number}`;\r\n\r\n // const isChecked = this.props.approvals\r\n // ? this.props.approvals[`${q.number - 1}`]\r\n // : false;\r\n\r\n // return (\r\n // this.props.handleApproveSingle(null, q.number)}\r\n // checked={isChecked}\r\n // disabled={this.props.hasSigned}\r\n // key={forName}\r\n // />\r\n // );\r\n default:\r\n if (excludeIndex) return question.text;\r\n return `${q.number}. ${question.text}`;\r\n }\r\n };\r\n\r\n const generateCheckboxes = () => {\r\n questions.sort((a, b) => {\r\n return a.number < b.number ? -1 : 1;\r\n });\r\n\r\n let beforeWorkBO = [],\r\n duringWorkBO = [],\r\n afterWorkBO = [];\r\n\r\n let beforeWorkEX = [],\r\n duringWorkEX = [],\r\n afterWorkEX = [];\r\n\r\n let beforeWorkFW = [],\r\n duringWorkFW = [],\r\n afterWorkFW = [];\r\n\r\n questions.map((q, key) => {\r\n const question = GetQuestion(q.number, q.type, q.schema);\r\n\r\n let listContent = getQuestionContentByType(q, question, is2021Version);\r\n let content = {listContent};\r\n\r\n switch (question.group) {\r\n case 1:\r\n switch (question.type) {\r\n case ASSIGNEE_TYPE.BuildingOwner:\r\n beforeWorkBO.push(content);\r\n // beforeWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.ExecutivePerson:\r\n beforeWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.Firewatch:\r\n beforeWorkFW.push(content);\r\n break;\r\n default:\r\n break;\r\n }\r\n break;\r\n case 2:\r\n switch (question.type) {\r\n case ASSIGNEE_TYPE.BuildingOwner:\r\n duringWorkBO.push(content);\r\n // duringWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.ExecutivePerson:\r\n duringWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.Firewatch:\r\n duringWorkFW.push(content);\r\n break;\r\n default:\r\n break;\r\n }\r\n break;\r\n case 3:\r\n switch (question.type) {\r\n case ASSIGNEE_TYPE.BuildingOwner:\r\n afterWorkBO.push(content);\r\n // afterWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.ExecutivePerson:\r\n afterWorkEX.push(content);\r\n break;\r\n case ASSIGNEE_TYPE.Firewatch:\r\n afterWorkFW.push(content);\r\n break;\r\n default:\r\n break;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return null;\r\n });\r\n\r\n // BUILDING OWNER QUESTIONS\r\n let beforeContentBO, duringContentBO, afterContentBO;\r\n\r\n if (beforeWorkBO.length > 0) {\r\n beforeContentBO = (\r\n
\r\n \r\n {i18next.t(1084)}\r\n {beforeWorkBO}\r\n \r\n
\r\n );\r\n }\r\n if (duringWorkBO.length > 0) {\r\n duringContentBO = (\r\n
\r\n \r\n {i18next.t(1085)}\r\n {duringWorkBO}\r\n \r\n
\r\n );\r\n }\r\n if (afterWorkBO.length > 0) {\r\n afterContentBO = (\r\n
\r\n \r\n {i18next.t(1086)}\r\n {afterWorkBO}\r\n \r\n
\r\n );\r\n }\r\n // BUILDING OWNER QUESTIONS\r\n\r\n // ROOFING CONTRACTOR QUESTIONS\r\n let beforeContentEX, duringContentEX, afterContentEX;\r\n if (beforeWorkEX.length > 0) {\r\n beforeContentEX = (\r\n
\r\n \r\n {i18next.t(1084)}\r\n {beforeWorkEX}\r\n \r\n
\r\n );\r\n }\r\n if (duringWorkEX.length > 0) {\r\n duringContentEX = (\r\n
\r\n \r\n {i18next.t(1085)}\r\n {duringWorkEX}\r\n \r\n
\r\n );\r\n }\r\n if (afterWorkEX.length > 0) {\r\n afterContentEX = (\r\n
\r\n \r\n {i18next.t(1086)}\r\n {afterWorkEX}\r\n \r\n
\r\n );\r\n }\r\n // ROOFING CONTRACTOR QUESTIONS\r\n\r\n // FIREWATCH QUESTIONS\r\n let beforeContentFW, duringContentFW, afterContentFW;\r\n if (beforeWorkFW.length > 0) {\r\n beforeContentFW = (\r\n
\r\n \r\n {i18next.t(1084)}\r\n {beforeWorkFW}\r\n \r\n
\r\n );\r\n }\r\n if (duringWorkFW.length > 0) {\r\n duringContentFW = (\r\n
\r\n \r\n {i18next.t(1085)}\r\n {duringWorkFW}\r\n \r\n
\r\n );\r\n }\r\n if (afterWorkFW.length > 0) {\r\n afterContentFW = (\r\n
\r\n \r\n {i18next.t(1086)}\r\n {afterWorkFW}\r\n \r\n
\r\n );\r\n }\r\n // FIREWATCH QUESTIONS\r\n\r\n let rooferTitle = is2021Version\r\n ? i18next.t(5011) + (isKoeb2021 ? ` (${i18next.t(1081)})` : '')\r\n : i18next.t(1081);\r\n let execTitle = is2021Version ? i18next.t(5012) : i18next.t(53);\r\n let fireTitle = is2021Version ? i18next.t(5013) : i18next.t(55);\r\n return (\r\n
\r\n {!is2021Version && (\r\n
\r\n {i18next.t(1080)}\r\n
\r\n )}\r\n setShowBuildingOwnerContent(!showBuildingOwnerContent)}\r\n >\r\n {rooferTitle}\r\n \r\n setShowBuildingOwnerContent(!showBuildingOwnerContent)}\r\n header={rooferTitle}\r\n size='lg'\r\n >\r\n
\r\n {beforeContentBO}\r\n {duringContentBO}\r\n {afterContentBO}\r\n
\r\n \r\n \r\n setShowExecutivePersonContent(!showExecutivePersonContent)\r\n }\r\n >\r\n {execTitle}\r\n \r\n\r\n \r\n setShowExecutivePersonContent(!showExecutivePersonContent)\r\n }\r\n header={execTitle}\r\n size='lg'\r\n >\r\n
\r\n {beforeContentEX}\r\n {duringContentEX}\r\n {afterContentEX}\r\n
\r\n \r\n\r\n setShowFireWatchContent(!showFireWatchContent)}\r\n >\r\n {fireTitle}\r\n \r\n\r\n setShowFireWatchContent(!showFireWatchContent)}\r\n header={fireTitle}\r\n size='lg'\r\n >\r\n
\r\n {beforeContentFW}\r\n {duringContentFW}\r\n {afterContentFW}\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n const renderDeclaration = () => {\r\n // const isDisabled = hasSigned || (schema === 101 && !allApproved);\r\n const isDisabled = hasSigned;\r\n let checked = allMarked;\r\n let onChange = handleMarkAll;\r\n\r\n // if (schema === 101 && !allApproved) {\r\n // checked = declaration;\r\n // onChange = this.toggleConfirm;\r\n // }\r\n\r\n const getDeclarationText = () => {\r\n switch (schema) {\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n return i18next.t(8115);\r\n default:\r\n return i18next.t(125);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {is2021Version && (\r\n
\r\n \r\n {i18next.t(122)}\r\n \r\n
\r\n \r\n {isKoeb2021 ? i18next.t(241) : i18next.t(230)}\r\n \r\n {isKoeb2021 && {i18next.t(240)}}\r\n
\r\n
\r\n )}\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n const renderCommentField = () => {\r\n if (assigneeType === 5) return null; // Subcontractor cannot leave comments\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n // const onClickFunc =\r\n // schema === 101\r\n // ? this.props.handleApproveButton\r\n // : this.props.handleApproveAll;\r\n const onClickFunc = handleApproveAll;\r\n\r\n return (\r\n \r\n
\r\n {generateCheckboxes()}\r\n
\r\n {renderCommentField()}\r\n {!isInfo && renderDeclaration()}\r\n {!isInfo && (\r\n \r\n {i18next.t(1094)}\r\n \r\n )}\r\n \r\n setShowConfirm(!showConfirm)}\r\n confirmFunc={() => handleSetDeclaration()}\r\n cancelFunc={() => setShowConfirm(false)}\r\n >\r\n {i18next.t(178)}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default BuildingownerApproval;\r\n","import i18next from '../../../i18n';\r\n\r\nexport function GetQuestion(number, type, schemaType) {\r\n // Type is the assigneeType\r\n const questions = [\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2001),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2002),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2003),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2004),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2005),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2006),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2007),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2008),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2009),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2011),\r\n },\r\n {\r\n number: 13,\r\n group: 3,\r\n schema: 1,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2013),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2014),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2015),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2016),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 6,\r\n group: 2,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2047),\r\n },\r\n {\r\n number: 7,\r\n group: 3,\r\n schema: 1,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2020),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2050),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2022),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2023),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 6,\r\n group: 2,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2025),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2055),\r\n },\r\n {\r\n number: 8,\r\n group: 3,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 1,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n // DBI Schema\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2001),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2002),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2003),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2004),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2005),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2006),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2036),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2037),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2038),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2011),\r\n },\r\n {\r\n number: 13,\r\n group: 3,\r\n schema: 101,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2042),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2043),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2015),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2045),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 6,\r\n group: 2,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2047),\r\n },\r\n {\r\n number: 7,\r\n group: 3,\r\n schema: 101,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2020),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2050),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2022),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2023),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 6,\r\n group: 2,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2025),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2055),\r\n },\r\n {\r\n number: 8,\r\n group: 3,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 101,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n //////////////////////////////////// DBI 2021 ////////////////////////////////////\r\n //////////////////////////////////// DBI 2021 ////////////////////////////////////\r\n //// Bestiller ////\r\n //// Bestiller ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4006),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4007),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4008),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4009),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4010),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4011),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4012),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4013),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4015),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4016),\r\n },\r\n {\r\n number: 13,\r\n group: 1,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(4017),\r\n },\r\n {\r\n number: 14,\r\n group: 3,\r\n schema: 102,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n //// Udførende ////\r\n //// Udførende ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4019),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4020),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4021),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4022),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4023),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(2045),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4025),\r\n },\r\n {\r\n number: 8,\r\n group: 2,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4026),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 10,\r\n group: 3,\r\n schema: 102,\r\n type: 1,\r\n text: i18next.t(4028),\r\n },\r\n //// Brandvagt ////\r\n //// Brandvagt ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(4029),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(4030),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(4031),\r\n },\r\n {\r\n number: 4,\r\n group: 2,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(4032),\r\n },\r\n {\r\n number: 5,\r\n group: 3,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 6,\r\n group: 3,\r\n schema: 102,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n //////////////////////////////////// Koebstaederne 2021 ////////////////////////////////////\r\n //////////////////////////////////// Koebstaederne 2021 ////////////////////////////////////\r\n //// Bestiller ////\r\n //// Bestiller ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4038),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4007),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4008),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4009),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4010),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4011),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4012),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4013),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4015),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4016),\r\n },\r\n {\r\n number: 13,\r\n group: 1,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(4017),\r\n },\r\n {\r\n number: 14,\r\n group: 3,\r\n schema: 103,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n //// Udførende ////\r\n //// Udførende ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4019),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4020),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4021),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4022),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4023),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(2045),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4025),\r\n },\r\n {\r\n number: 8,\r\n group: 2,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4026),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 10,\r\n group: 3,\r\n schema: 103,\r\n type: 1,\r\n text: i18next.t(4028),\r\n },\r\n //// Brandvagt ////\r\n //// Brandvagt ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(4029),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(4030),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(4031),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(2017),\r\n },\r\n {\r\n number: 4,\r\n group: 2,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(4032),\r\n },\r\n {\r\n number: 5,\r\n group: 3,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 6,\r\n group: 3,\r\n schema: 103,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n\r\n //////////////////////////////////// QBE 2022 ////////////////////////////////////\r\n //////////////////////////////////// QBE 2022 ////////////////////////////////////\r\n //// Bestiller ////\r\n //// Bestiller ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4006),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4007),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4008),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4009),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4010),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4011),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4012),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4013),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4015),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4016),\r\n },\r\n {\r\n number: 13,\r\n group: 1,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(4017),\r\n },\r\n {\r\n number: 14,\r\n group: 3,\r\n schema: 3,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n //// Udførende ////\r\n //// Udførende ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4019),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4020),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4021),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4022),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4023),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(2045),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4025),\r\n },\r\n {\r\n number: 8,\r\n group: 2,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4026),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 10,\r\n group: 3,\r\n schema: 3,\r\n type: 1,\r\n text: i18next.t(4028),\r\n },\r\n //// Brandvagt ////\r\n //// Brandvagt ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(4029),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(4030),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(4031),\r\n },\r\n {\r\n number: 4,\r\n group: 2,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(4032),\r\n },\r\n {\r\n number: 5,\r\n group: 3,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 6,\r\n group: 3,\r\n schema: 3,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n\r\n //////////////////////////////////// TRUST 2023 ////////////////////////////////////\r\n //////////////////////////////////// TRUST 2023 ////////////////////////////////////\r\n //// Bestiller ////\r\n //// Bestiller ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(2000),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4006),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4007),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4008),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4009),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4010),\r\n },\r\n {\r\n number: 7,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4011),\r\n },\r\n {\r\n number: 8,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4012),\r\n },\r\n {\r\n number: 9,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4013),\r\n },\r\n {\r\n number: 10,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(2039),\r\n },\r\n {\r\n number: 11,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4015),\r\n },\r\n {\r\n number: 12,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4016),\r\n },\r\n {\r\n number: 13,\r\n group: 1,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(4017),\r\n },\r\n {\r\n number: 14,\r\n group: 3,\r\n schema: 4,\r\n type: 3,\r\n text: i18next.t(2012),\r\n },\r\n //// Udførende ////\r\n //// Udførende ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4019),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4020),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4021),\r\n },\r\n {\r\n number: 4,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4022),\r\n },\r\n {\r\n number: 5,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4023),\r\n },\r\n {\r\n number: 6,\r\n group: 1,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(2045),\r\n },\r\n {\r\n number: 7,\r\n group: 2,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4025),\r\n },\r\n {\r\n number: 8,\r\n group: 2,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4026),\r\n },\r\n {\r\n number: 9,\r\n group: 3,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(2019),\r\n },\r\n {\r\n number: 10,\r\n group: 3,\r\n schema: 4,\r\n type: 1,\r\n text: i18next.t(4028),\r\n },\r\n //// Brandvagt ////\r\n //// Brandvagt ////\r\n {\r\n number: 1,\r\n group: 1,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(4029),\r\n },\r\n {\r\n number: 2,\r\n group: 1,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(4030),\r\n },\r\n {\r\n number: 3,\r\n group: 1,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(4031),\r\n },\r\n {\r\n number: 4,\r\n group: 2,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(4032),\r\n },\r\n {\r\n number: 5,\r\n group: 3,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(2027),\r\n },\r\n {\r\n number: 6,\r\n group: 3,\r\n schema: 4,\r\n type: 2,\r\n text: i18next.t(2028),\r\n },\r\n ];\r\n\r\n let arr = questions.filter(\r\n q => q.number === number && q.type === type && q.schema === schemaType,\r\n );\r\n\r\n if (arr.length > 0) {\r\n return arr[0];\r\n }\r\n\r\n return null;\r\n}\r\n","import React, { useState, useRef, useEffect } from 'react';\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport { Button, Container } from 'reactstrap';\r\nimport i18next from '../../i18n';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Utils\r\n\r\n// Componenents\r\nimport Typography from '../../components/Typography';\r\n\r\nconst Signature = props => {\r\n const { hasSigned, signData, userSignedInApproval } = props;\r\n const [hasError, setHasError] = useState(null);\r\n\r\n let sigPad = useRef(null);\r\n\r\n useEffect(() => {\r\n if (hasSigned) {\r\n sigPad.fromDataURL(signData);\r\n sigPad.off();\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const getMobileClass = () => {\r\n return isMobile ? 'mobile' : '';\r\n };\r\n\r\n const clear = () => {\r\n sigPad.clear();\r\n };\r\n\r\n const goBackToCase = () => {\r\n props.goBackToCase();\r\n };\r\n\r\n const handleSignApprovals = () => {\r\n // const { sigData } = this.state;\r\n if (!sigPad.isEmpty()) {\r\n setHasError(false);\r\n\r\n const data = sigPad.toDataURL('image/png');\r\n props.handleSignApprovals(data);\r\n } else {\r\n setHasError(true);\r\n }\r\n };\r\n\r\n const renderButtons = () => {\r\n let backButtonClass = 'float-right';\r\n\r\n if (userSignedInApproval && !hasSigned) {\r\n backButtonClass += ' margin-right-10px';\r\n }\r\n\r\n return (\r\n
\r\n {!hasSigned && (\r\n \r\n {i18next.t(1092)}\r\n \r\n )}\r\n {userSignedInApproval && (\r\n \r\n {i18next.t(1089)}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n
\r\n {renderButtons()}\r\n
\r\n \r\n {i18next.t(1088)}\r\n \r\n (sigPad = ref)}\r\n clearOnResize={false}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n {hasError &&

{i18next.t(1339)}

}\r\n {!hasSigned && (\r\n \r\n {i18next.t(1093)}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Signature;\r\n","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../../../i18n';\r\nimport {\r\n Card,\r\n CardBody,\r\n CardHeader,\r\n Col,\r\n Row,\r\n Button,\r\n Table,\r\n Container,\r\n} from 'reactstrap';\r\nimport queryString from 'query-string';\r\nimport { isMobile } from 'react-device-detect';\r\n\r\n// Actions\r\nimport {\r\n PostApproval,\r\n SignApprovals,\r\n PostTokenlessApproval,\r\n} from './../../../redux/actions/cases';\r\nimport { GetHotworkById } from '../../../redux/actions/hotwork';\r\n\r\n// Utils\r\nimport { parseDate, splitIntoBreakpoints } from '../../../utils/common';\r\nimport { getAssigneeTitleFrom } from '../../../utils/common';\r\nimport { ASSIGNEE_TYPE, ASSIGNMENT_SCHEMA } from '../../../redux/constants';\r\nimport { getUserData } from '../../../utils/userUtil';\r\n\r\n// Components\r\nimport BuildingownerApproval from './Approvals/BuildingownerApproval';\r\nimport PageSpinner from '../../../components/PageSpinner';\r\nimport Signature from '../../../components/Custom/Signature';\r\nimport InfoModal from '../../../components/Custom/InfoModal';\r\nimport Typography from '../../../components/Typography';\r\n\r\nconst Approval = props => {\r\n const {\r\n auth,\r\n location,\r\n history,\r\n match,\r\n GetHotworkById,\r\n PostApproval,\r\n SignApprovals,\r\n PostTokenlessApproval,\r\n caseInfo,\r\n userSignedInApproval,\r\n tokenView,\r\n } = props;\r\n const [isLoading, setLoading] = useState(true);\r\n const [allApproved, setAllApproved] = useState(false);\r\n const [showApprovals, setShowApprovals] = useState(false);\r\n const [showSigningReason, setShowSigningReason] = useState(false);\r\n const [approvals, setApprovals] = useState([]);\r\n const [caseId, setCaseId] = useState(-1);\r\n const [hasSigned, setHasSigned] = useState(false);\r\n const [signedData, setSignedData] = useState(null);\r\n const [signatureToken, setSignatureToken] = useState('');\r\n const [allMarked, setAllMarked] = useState(false);\r\n const [assignee, setAssignee] = useState(null);\r\n const [assigneeType, setAssigneeType] = useState(-1);\r\n const [declaration, setDeclaration] = useState(false);\r\n const [aggreementComment, setAgreementComment] = useState('');\r\n const [schemaType, setSchemaType] = useState(1);\r\n const user = getUserData(auth);\r\n const headerTypes = [2, 3, 5];\r\n\r\n useEffect(() => {\r\n const query = queryString.parse(location.search);\r\n\r\n let signatureToken = query.token;\r\n if (userSignedInApproval) {\r\n if (!auth.isAuthenticated) {\r\n history.push('/login');\r\n }\r\n\r\n const id = match.params.id;\r\n\r\n GetHotworkById(id).then(res => {\r\n const found = res.case.assignees.find(x => x.user.id === user.id);\r\n if (found) {\r\n handleApprovalInitialization(\r\n res.case,\r\n found.asigneeType,\r\n user.id,\r\n '',\r\n );\r\n } else {\r\n history.push('/');\r\n }\r\n });\r\n } else if (signatureToken) {\r\n GetHotworkById(0, signatureToken).then(res => {\r\n handleApprovalInitialization(\r\n res.case,\r\n res.assigneeType,\r\n res.userId,\r\n signatureToken,\r\n );\r\n });\r\n }\r\n\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const handleApprovalInitialization = (\r\n _case,\r\n assigneeType,\r\n userId,\r\n signToken,\r\n ) => {\r\n let sigData = {};\r\n\r\n if (assigneeType === ASSIGNEE_TYPE.ExecutiveResponsible)\r\n assigneeType = ASSIGNEE_TYPE.ExecutivePerson;\r\n\r\n const sigState = getAssigneeInfoSignature(\r\n _case.signatureApprovals,\r\n assigneeType,\r\n );\r\n\r\n if (sigState) {\r\n if (sigState.signed) {\r\n sigData.hasSigned = true;\r\n sigData.signData = sigState.signatureData;\r\n sigData.signDate = parseDate(sigState.signDate);\r\n }\r\n\r\n if (sigState.userData) {\r\n sigData.userData = sigState.userData;\r\n }\r\n }\r\n\r\n const comment = _case.agreementComments.find(\r\n x => x.caseAssigneeType === assigneeType,\r\n );\r\n\r\n const questions = getAssigneeQuestionsByType(assigneeType);\r\n questions.sort((a, b) => {\r\n return a.number < b.number ? -1 : 1;\r\n });\r\n\r\n const arr = questions.map(q => q.status);\r\n const preApproved = questionsAreAlreadyApproved(arr);\r\n\r\n setCaseId(_case.id);\r\n setSignatureToken(signToken);\r\n setAssignee(userId);\r\n setApprovals(arr);\r\n setAllApproved(assigneeType === 5 ? true : preApproved);\r\n setAssigneeType(assigneeType);\r\n setSchemaType(_case.schemaType);\r\n setAgreementComment(comment ? comment.comment : '');\r\n setHasSigned(sigData.hasSigned);\r\n setSignedData(sigData.signData);\r\n setLoading(false);\r\n };\r\n\r\n const is2021Version = () => {\r\n return [\r\n ASSIGNMENT_SCHEMA.WarmWorkStandard_2021,\r\n ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021,\r\n ASSIGNMENT_SCHEMA.QBE_2022,\r\n ASSIGNMENT_SCHEMA.TRUST_2023,\r\n ].includes(schemaType);\r\n };\r\n\r\n const getAssigneeInfoSignature = (sigs, type) => {\r\n const res = sigs.filter(item => item.assigneeType === type);\r\n\r\n if (res.length > 0) return res[0];\r\n\r\n return null;\r\n };\r\n\r\n const onChangeComment = e => {\r\n setAgreementComment(e.target.value);\r\n };\r\n\r\n const onChangeChecked = e => {\r\n const nameSplit = e.target.name.split('_');\r\n\r\n approvals[parseInt(nameSplit[1]) - 1] = e.target.checked;\r\n\r\n const approvalObj = {\r\n Status: e.target.checked,\r\n Number: nameSplit[1],\r\n CaseId: caseId,\r\n Type: assigneeType,\r\n IsArray: false,\r\n SignatureToken: signatureToken,\r\n Id: caseInfo.case.userId,\r\n };\r\n\r\n handleSendApproval(approvalObj, approvals);\r\n };\r\n\r\n const handleApproveButton = e => {\r\n const commentObj = {\r\n IsComment: true,\r\n Comment: aggreementComment,\r\n CaseId: caseId,\r\n Type: assigneeType,\r\n SignatureToken: signatureToken,\r\n Id: caseInfo.case.userId,\r\n };\r\n\r\n PostApproval(commentObj)\r\n .then(() => {\r\n setDeclaration(true);\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n };\r\n\r\n const handleMarkAll = e => {\r\n const tmp = approvals.map(item => (item = true));\r\n\r\n setApprovals(tmp);\r\n setAllMarked(e.target.checked);\r\n };\r\n\r\n const handleSetDeclaration = () => {\r\n setDeclaration(!declaration);\r\n };\r\n\r\n const handleApproveAll = e => {\r\n let approvalObjs = [],\r\n approv = [...approvals];\r\n\r\n for (let i = 0; i < approvals.length; i++) {\r\n approvalObjs.push({\r\n Status: true,\r\n Number: i + 1,\r\n CaseId: caseId,\r\n Type: assigneeType,\r\n });\r\n\r\n approv[i] = true;\r\n }\r\n\r\n const commentObj = {\r\n IsComment: true,\r\n Comment: aggreementComment,\r\n CaseId: caseId,\r\n Type: assigneeType,\r\n SignatureToken: signatureToken,\r\n };\r\n\r\n approvalObjs.push(commentObj);\r\n\r\n const approvalObj = {\r\n IsArray: true,\r\n Approvals: approvalObjs,\r\n CaseId: caseId,\r\n SignatureToken: signatureToken,\r\n Id: assignee,\r\n };\r\n\r\n handleSendApproval(approvalObj, approv);\r\n };\r\n\r\n const handleApproveSingle = (e, number) => {\r\n let approv = [...approvals];\r\n approv[number - 1] = !approv[number - 1];\r\n\r\n const approvalObj = {\r\n Status: approv[number - 1],\r\n Number: number,\r\n CaseId: caseId,\r\n Type: assigneeType,\r\n SignatureToken: signatureToken,\r\n Id: assignee,\r\n };\r\n\r\n handleSendApproval(approvalObj, approv);\r\n };\r\n\r\n const handleSendApproval = (data, appro) => {\r\n let action = PostApproval;\r\n\r\n if (userSignedInApproval) {\r\n action = PostTokenlessApproval;\r\n }\r\n\r\n action(data)\r\n .then(() => {\r\n const all = questionsAreAlreadyApproved(appro);\r\n\r\n setApprovals(appro);\r\n setAllApproved(all);\r\n setDeclaration(true);\r\n })\r\n .catch(err => console.log(err));\r\n };\r\n\r\n const handleSignApprovals = sigData => {\r\n if (assignee > 0) {\r\n const sigObj = {\r\n Signature: sigData,\r\n CaseId: caseId,\r\n UserId: assignee,\r\n AssigneeType: assigneeType,\r\n SignatureToken: signatureToken,\r\n };\r\n\r\n setLoading(true);\r\n SignApprovals(sigObj, signatureToken)\r\n .then(res => {\r\n const { data } = res;\r\n\r\n if (data.signed) {\r\n window.location.reload();\r\n } else {\r\n setLoading(false);\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n setLoading(false);\r\n });\r\n }\r\n };\r\n\r\n const getAssigneeQuestionsByType = userType => {\r\n if (userType === ASSIGNEE_TYPE.Subcontractor)\r\n userType = ASSIGNEE_TYPE.ExecutivePerson;\r\n if (userType === ASSIGNEE_TYPE.RoofingContractor)\r\n userType = ASSIGNEE_TYPE.BuildingOwner;\r\n if (userType === ASSIGNEE_TYPE.ExecutiveResponsible)\r\n userType = ASSIGNEE_TYPE.ExecutivePerson;\r\n\r\n if (!caseInfo) return [];\r\n const questions = caseInfo.case.agreementApprovals.filter(\r\n ag => ag.type === userType,\r\n );\r\n\r\n return questions;\r\n };\r\n\r\n const questionsAreAlreadyApproved = questions => {\r\n let allApproved = true;\r\n for (let i = 0; i < questions.length; i++) {\r\n if (!questions[i]) {\r\n allApproved = false;\r\n break;\r\n }\r\n }\r\n\r\n return allApproved;\r\n };\r\n\r\n const getQuestions = () => {\r\n const questionsBuildingOwner = caseInfo.case.agreementApprovals.filter(\r\n ag => ag.type === ASSIGNEE_TYPE.BuildingOwner,\r\n );\r\n const questionsFireWatch = caseInfo.case.agreementApprovals.filter(\r\n ag => ag.type === ASSIGNEE_TYPE.Firewatch,\r\n );\r\n const questionsExecutivePerson = caseInfo.case.agreementApprovals.filter(\r\n ag => ag.type === ASSIGNEE_TYPE.ExecutivePerson,\r\n );\r\n\r\n return [\r\n ...questionsBuildingOwner,\r\n ...questionsExecutivePerson,\r\n ...questionsFireWatch,\r\n ];\r\n };\r\n\r\n const approvalPageSwitch = () => {\r\n const questions = getQuestions();\r\n\r\n if (!declaration && !hasSigned && questions.length > 0) {\r\n return (\r\n \r\n );\r\n } else {\r\n const cvsProps = {\r\n height: window.innerHeight * 0.5,\r\n className: 'signature',\r\n };\r\n\r\n return (\r\n history.goBack()}\r\n />\r\n );\r\n }\r\n };\r\n\r\n const handleShowApprovals = value => {\r\n setShowApprovals(value);\r\n };\r\n\r\n const handleShowSigningReasons = value => {\r\n setShowSigningReason(value);\r\n };\r\n\r\n const getApprovalsTitle = schemaType => {\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n return i18next.t(1343);\r\n default:\r\n return i18next.t(1080);\r\n }\r\n };\r\n\r\n const getHeaderContent = () => {\r\n let content = null;\r\n\r\n if (!declaration && !hasSigned && assigneeType !== 5) {\r\n content = (\r\n
\r\n \r\n {getApprovalsTitle(schemaType)}\r\n \r\n {is2021Version() && !tokenView && (\r\n history.goBack()}\r\n className={'float-right'}\r\n >\r\n {i18next.t(1089)}\r\n \r\n )}\r\n
\r\n );\r\n } else if (\r\n (declaration || hasSigned || assigneeType === 5) &&\r\n headerTypes.includes(assigneeType) &&\r\n !is2021Version()\r\n ) {\r\n let title = '';\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n title = i18next.t(1343);\r\n break;\r\n default:\r\n title = i18next.t(1087);\r\n break;\r\n }\r\n\r\n content = (\r\n
\r\n handleShowApprovals(!showApprovals)}\r\n key='showApprovalsBtn'\r\n >\r\n {title}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (!content) return null;\r\n\r\n return (\r\n \r\n \r\n {content}\r\n \r\n \r\n );\r\n };\r\n\r\n const getCaseInformation = () => {\r\n const _case = caseInfo.case;\r\n const customer = caseInfo.customer;\r\n\r\n const execResp = _case.assignees.find(\r\n x => x.asigneeType === ASSIGNEE_TYPE.ExecutiveResponsible,\r\n );\r\n\r\n return (\r\n \r\n \r\n {isMobile && (\r\n <>\r\n \r\n {simpleTable(\r\n [\r\n `${i18next.t(1011)}`,\r\n `${i18next.t(1012)}`,\r\n `${i18next.t(110)}`,\r\n `${i18next.t(111)}`,\r\n `${i18next.t(30)}`,\r\n `${i18next.t(25)}`,\r\n `${i18next.t(27)}`,\r\n `${i18next.t(130)}`,\r\n ],\r\n [\r\n `${_case.workplaceName}`,\r\n `${_case.workplaceAddress}, ${_case.workplacePostalCode}, ${_case.workplaceCity}`,\r\n `${parseDate(_case.startDate)}`,\r\n `${parseDate(_case.endDate)}`,\r\n `${customer.name}`,\r\n `${execResp.user.mail}`,\r\n `${execResp.user.countryCode} ${execResp.user.mobile}`,\r\n getAssigneeTitleFrom(assigneeType, schemaType),\r\n ],\r\n )}\r\n \r\n \r\n )}\r\n {!isMobile && (\r\n <>\r\n \r\n {simpleTable(\r\n [\r\n `${i18next.t(1011)}`,\r\n `${i18next.t(1012)}`,\r\n `${i18next.t(110)}`,\r\n `${i18next.t(111)}`,\r\n ],\r\n [\r\n `${_case.workplaceName}`,\r\n `${_case.workplaceAddress}, ${_case.workplacePostalCode}, ${_case.workplaceCity}`,\r\n `${parseDate(_case.startDate)}`,\r\n `${parseDate(_case.endDate)}`,\r\n ],\r\n )}\r\n \r\n \r\n {simpleTable(\r\n [\r\n `${i18next.t(30)}`,\r\n `${i18next.t(25)}`,\r\n `${i18next.t(27)}`,\r\n `${i18next.t(130)}`,\r\n ],\r\n [\r\n `${customer.name}`,\r\n `${execResp.user.mail}`,\r\n `${execResp.user.countryCode} ${execResp.user.mobile}`,\r\n getAssigneeTitleFrom(assigneeType, schemaType),\r\n ],\r\n )}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n };\r\n\r\n const simpleTable = (names, values) => {\r\n return (\r\n \r\n \r\n {names.map((name, index) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
{name}:{values[index]}
\r\n );\r\n };\r\n\r\n const renderHeaderTitle = () => {\r\n const getTitle = () => {\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.QBE_2022:\r\n case ASSIGNMENT_SCHEMA.TRUST_2023:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI_2021:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard_2021:\r\n return i18next.t(8114);\r\n default:\r\n return i18next.t(5000);\r\n }\r\n };\r\n\r\n let buttonText = i18next.t(5015);\r\n switch (schemaType) {\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandard:\r\n case ASSIGNMENT_SCHEMA.WarmWorkStandardDBI:\r\n buttonText = i18next.t(5005);\r\n break;\r\n default:\r\n buttonText = i18next.t(5015);\r\n break;\r\n }\r\n\r\n return (\r\n
\r\n \r\n {getTitle()}\r\n \r\n handleShowSigningReasons(!showSigningReason)}\r\n >\r\n {buttonText}\r\n \r\n
\r\n );\r\n };\r\n\r\n const renderInfoModal = () => {\r\n const is2021 = is2021Version();\r\n const headerText = is2021 ? i18next.t(5016) : i18next.t(5006);\r\n\r\n let content = null;\r\n if (is2021) {\r\n content = (\r\n <>\r\n {i18next.t(5001)}\r\n {i18next.t(5002)}\r\n {i18next.t(5019)}\r\n {i18next.t(5020)}\r\n {i18next.t(5021)}\r\n {i18next.t(5022)}\r\n {i18next.t(5023)}\r\n {i18next.t(5024)}\r\n {i18next.t(5025)}\r\n {i18next.t(5026)}\r\n {i18next.t(5027)}\r\n \r\n );\r\n } else {\r\n content = (\r\n <>\r\n {i18next.t(5001)}\r\n {i18next.t(5002)}\r\n \r\n {i18next.t(5003)}\r\n \r\n
{splitIntoBreakpoints(i18next.t(5004))}
\r\n \r\n );\r\n }\r\n\r\n return (\r\n handleShowSigningReasons(!showSigningReason)}\r\n header={headerText}\r\n size='lg'\r\n >\r\n {content}\r\n \r\n );\r\n };\r\n\r\n if (isLoading || !caseInfo) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {renderHeaderTitle()}\r\n \r\n
\r\n \r\n {getCaseInformation()}\r\n \r\n
\r\n \r\n {(headerTypes.includes(assigneeType) || is2021Version()) &&\r\n getHeaderContent()}\r\n \r\n {approvalPageSwitch()}\r\n \r\n \r\n handleShowApprovals(!showApprovals)}\r\n header={getApprovalsTitle()}\r\n >\r\n \r\n \r\n\r\n {renderInfoModal()}\r\n
\r\n
\r\n );\r\n};\r\n\r\nfunction mapStateToProps(state) {\r\n return {\r\n caseInfo: state.cases.selectedCase,\r\n auth: state.auth,\r\n };\r\n}\r\n\r\nexport default connect(mapStateToProps, {\r\n GetHotworkById,\r\n PostApproval,\r\n SignApprovals,\r\n PostTokenlessApproval,\r\n})(Approval);\r\n","import React, { useState, useEffect } from 'react';\r\nimport queryString from 'query-string';\r\nimport { connect } from 'react-redux';\r\nimport i18next from '../i18n';\r\nimport {\r\n isMobile,\r\n // isIOS,\r\n // isSafari\r\n} from 'react-device-detect';\r\n\r\n// redux\r\nimport {\r\n validateFileToken,\r\n downloadFileWithToken,\r\n} from '../redux/actions/files';\r\n\r\n// utils\r\nimport { StringIsEmpty } from '../utils/common';\r\n\r\n// components\r\nimport PageSpinner from '../components/PageSpinner';\r\n\r\nconst PdfPage = props => {\r\n const { validateFileToken, downloadFileWithToken } = props;\r\n const [isLoading, setLoading] = useState(true);\r\n const [path, setPath] = useState('');\r\n const [expired, setExpired] = useState(false);\r\n const [invalid, setInvalid] = useState(false);\r\n const [hasError, setHasError] = useState(false);\r\n\r\n useEffect(() => {\r\n const query = queryString.parse(props.location.search);\r\n\r\n let token = query.token;\r\n\r\n if (!StringIsEmpty(token)) {\r\n validateFileToken(token)\r\n .then(res => {\r\n const valid = res.data;\r\n\r\n if (valid) {\r\n downloadFileWithToken(token).then(res => {\r\n window.location.replace(res);\r\n setLoading(false);\r\n setPath(res);\r\n });\r\n } else {\r\n setLoading(false);\r\n setExpired(true);\r\n }\r\n })\r\n .catch(err => {\r\n if (err.response) {\r\n if (err.response.status === 400 || err.response.status === 404) {\r\n setInvalid(true);\r\n } else {\r\n setHasError(true);\r\n }\r\n } else {\r\n setHasError(true);\r\n }\r\n setLoading(false);\r\n });\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const renderBadResultContent = result => {\r\n return (\r\n
\r\n

\r\n {i18next.t(212)}: {result}\r\n

\r\n
\r\n );\r\n };\r\n\r\n const renderContent = content => {\r\n return (\r\n
\r\n \r\n {content}\r\n \r\n
\r\n );\r\n };\r\n\r\n const renderiOSVersion = () => {\r\n return (\r\n
\r\n
\r\n

\r\n Hvis rapporten ikke er hentet eller vises,{' '}\r\n tryk her for at download den.\r\n

\r\n
\r\n
\r\n );\r\n };\r\n\r\n if (isLoading) {\r\n return renderContent();\r\n }\r\n\r\n if (hasError) {\r\n return renderBadResultContent(i18next.t(6034));\r\n }\r\n\r\n if (invalid) {\r\n return renderBadResultContent(i18next.t(6032));\r\n }\r\n\r\n if (expired) {\r\n return renderBadResultContent(i18next.t(6031));\r\n }\r\n\r\n if (isMobile) {\r\n return renderiOSVersion();\r\n } else {\r\n return